From 533655873c4978091edf3698b20d2b96c43dafc8 Mon Sep 17 00:00:00 2001 From: Johan Hedberg Date: Sun, 28 Sep 2008 23:40:56 +0300 Subject: Use global DBusConnection instead of request specific one The browse request will not have a DBusConnection associated with it when the browsing was started due to a remotely initated pairing attempt so it's safer to use a global DBusConnection pointer instead. --- src/device.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/device.c b/src/device.c index 4f5e3c37..db769e21 100644 --- a/src/device.c +++ b/src/device.c @@ -857,6 +857,7 @@ static void discover_device_reply(struct browse_req *req, sdp_list_t *recs) static void services_changed(struct browse_req *req) { + DBusConnection *conn = get_dbus_connection(); struct btd_device *device = req->device; char **uuids; GSList *l; @@ -866,7 +867,7 @@ static void services_changed(struct browse_req *req) for (i = 0, l = device->uuids; l; l = l->next, i++) uuids[i] = l->data; - dbus_connection_emit_property_changed(req->conn, device->path, + dbus_connection_emit_property_changed(conn, device->path, DEVICE_INTERFACE, "UUIDs", DBUS_TYPE_ARRAY, &uuids); -- cgit