summaryrefslogtreecommitdiffstats
path: root/hcid/dbus-database.c
diff options
context:
space:
mode:
authorJohan Hedberg <johan.hedberg@nokia.com>2008-05-27 21:31:12 +0000
committerJohan Hedberg <johan.hedberg@nokia.com>2008-05-27 21:31:12 +0000
commit649448818704cd93136d55d33676ad80cb463224 (patch)
treec7671bf290adebc08cc40ad75c1b6e89a92cc9a0 /hcid/dbus-database.c
parentaf457e55d1a46fbf3ecef32fc29e299ee4be21cf (diff)
Use guint identifier for all name_listener operations
Diffstat (limited to 'hcid/dbus-database.c')
-rw-r--r--hcid/dbus-database.c7
1 files changed, 5 insertions, 2 deletions
diff --git a/hcid/dbus-database.c b/hcid/dbus-database.c
index acf5301c..cf2369b1 100644
--- a/hcid/dbus-database.c
+++ b/hcid/dbus-database.c
@@ -58,6 +58,7 @@ static GSList *records = NULL;
struct record_data {
uint32_t handle;
char *sender;
+ guint listener_id;
};
static struct record_data *find_record(uint32_t handle, const char *sender)
@@ -133,7 +134,9 @@ static DBusHandlerResult add_service_record(DBusConnection *conn,
records = g_slist_append(records, user_record);
- name_listener_add(conn, sender, exit_callback, user_record);
+ user_record->listener_id = name_listener_add(conn, sender,
+ exit_callback,
+ user_record);
reply = dbus_message_new_method_return(msg);
if (!reply)
@@ -314,7 +317,7 @@ int remove_record(DBusConnection *conn, const char *sender,
if (!user_record)
return -1;
- name_listener_remove(conn, sender, exit_callback, user_record);
+ name_listener_id_remove(user_record->listener_id);
records = g_slist_remove(records, user_record);