diff options
Diffstat (limited to 'gdbus')
-rw-r--r-- | gdbus/gdbus.h | 3 | ||||
-rw-r--r-- | gdbus/watch.c | 4 |
2 files changed, 4 insertions, 3 deletions
diff --git a/gdbus/gdbus.h b/gdbus/gdbus.h index 5a318c0e..4733f354 100644 --- a/gdbus/gdbus.h +++ b/gdbus/gdbus.h @@ -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); DBusConnection *g_dbus_setup_bus(DBusBusType type, const char *name, DBusError *error); diff --git a/gdbus/watch.c b/gdbus/watch.c index b451cb00..8f4936ab 100644 --- a/gdbus/watch.c +++ b/gdbus/watch.c @@ -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); |