[tracker/dbus] libtracker-common: Always set last_time in D-Bus client data
- From: Jürg Billeter <juergbi src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [tracker/dbus] libtracker-common: Always set last_time in D-Bus client data
- Date: Fri, 2 Jul 2010 13:15:45 +0000 (UTC)
commit 4029390b52fffece1d8cc97536b3a0f84b8b583a
Author: Jürg Billeter <j bitron ch>
Date: Wed Jun 30 17:31:04 2010 +0200
libtracker-common: Always set last_time in D-Bus client data
src/libtracker-common/tracker-dbus.c | 15 ++++++---------
1 files changed, 6 insertions(+), 9 deletions(-)
---
diff --git a/src/libtracker-common/tracker-dbus.c b/src/libtracker-common/tracker-dbus.c
index ffdbc07..ebfb535 100644
--- a/src/libtracker-common/tracker-dbus.c
+++ b/src/libtracker-common/tracker-dbus.c
@@ -301,21 +301,18 @@ client_get_for_context (DBusGMethodInvocation *context)
if (G_UNLIKELY (!clients)) {
clients_init ();
+ }
+ cd = g_hash_table_lookup (clients, sender);
+ if (!cd) {
cd = client_data_new (sender);
g_hash_table_insert (clients, sender, cd);
} else {
- cd = g_hash_table_lookup (clients, sender);
-
- if (G_UNLIKELY (!cd)) {
- cd = client_data_new (sender);
- g_hash_table_insert (clients, sender, cd);
- } else {
- g_get_current_time (&cd->last_time);
- g_free (sender);
- }
+ g_free (sender);
}
+ g_get_current_time (&cd->last_time);
+
return cd;
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]