Change declaration of GDBusWatchFunction
authorMarcel Holtmann <marcel@holtmann.org>
Fri, 17 Oct 2008 16:26:13 +0000 (18:26 +0200)
committerMarcel Holtmann <marcel@holtmann.org>
Fri, 17 Oct 2008 16:26:13 +0000 (18:26 +0200)
gdbus/gdbus.h
gdbus/watch.c

index b44bc8678a27e7450911a680ed4d1be027ed6004..42b9061d1cda2008ed3fc7e68f3c2b1399751255 100644 (file)
@@ -31,7 +31,8 @@ extern "C" {
 #include <dbus/dbus.h>
 #include <glib.h>
 
-typedef void (* GDBusWatchFunction) (void *user_data);
+typedef void (* GDBusWatchFunction) (DBusConnection *connection,
+                                                       void *user_data);
 
 typedef gboolean (* GDBusSignalFunction) (DBusConnection *connection,
                                        DBusMessage *message, void *user_data);
index fb0bef3fd938e494930d5b0ec76064386a916517..63e3a7c3a24e59fed5231363788fad75d5d242b6 100644 (file)
@@ -94,7 +94,7 @@ static void name_data_call_and_free(struct name_data *data)
        for (l = data->callbacks; l != NULL; l = l->next) {
                struct name_callback *cb = l->data;
                if (cb->func)
-                       cb->func(cb->user_data);
+                       cb->func(data->connection, cb->user_data);
                g_free(cb);
        }
 
@@ -246,7 +246,7 @@ static DBusHandlerResult name_exit_filter(DBusConnection *connection,
 
        for (l = data->callbacks; l != NULL; l = l->next) {
                struct name_callback *cb = l->data;
-               cb->func(cb->user_data);
+               cb->func(connection, cb->user_data);
        }
 
        name_listeners = g_slist_remove(name_listeners, data);