summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorJohan Hedberg <johan.hedberg@nokia.com>2008-09-28 23:40:56 +0300
committerJohan Hedberg <johan.hedberg@nokia.com>2008-09-28 23:40:56 +0300
commit533655873c4978091edf3698b20d2b96c43dafc8 (patch)
treec5038e5936a3ff2c5bcff1ea83d1af70d3f21108 /src
parentd8a39c12b8efdf9ac2ca5c50e780a522df165780 (diff)
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.
Diffstat (limited to 'src')
-rw-r--r--src/device.c3
1 files changed, 2 insertions, 1 deletions
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);