summaryrefslogtreecommitdiffstats
path: root/daemon
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 /daemon
parentaf457e55d1a46fbf3ecef32fc29e299ee4be21cf (diff)
Use guint identifier for all name_listener operations
Diffstat (limited to 'daemon')
-rw-r--r--daemon/database.c7
1 files changed, 5 insertions, 2 deletions
diff --git a/daemon/database.c b/daemon/database.c
index f0c8b38d..47e21915 100644
--- a/daemon/database.c
+++ b/daemon/database.c
@@ -53,6 +53,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)
@@ -144,7 +145,9 @@ static DBusHandlerResult add_service_record_from_xml(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)
@@ -173,7 +176,7 @@ static DBusHandlerResult remove_service_record(DBusConnection *conn,
if (!user_record)
return DBUS_HANDLER_RESULT_NOT_YET_HANDLED;
- name_listener_remove(conn, sender, exit_callback, user_record);
+ name_listener_id_remove(user_record->listener_id);
remove_record_from_server(handle);