summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLuiz Augusto von Dentz <luiz.von.dentz@intel.com>2012-06-07 11:31:12 +0300
committerJohan Hedberg <johan.hedberg@intel.com>2012-06-07 23:33:00 +0800
commit7694d05c406c4149f949a2b6c59a23b5bb3c1bb2 (patch)
tree2da19e8689067368df2ccfd5dbf49576bffb7f84
parenta568298de7874d5a35c37cf77027b8c46439db04 (diff)
downloadobexd-7694d05c406c4149f949a2b6c59a23b5bb3c1bb2.tar.gz
client: Fix not using connection passed to obc_transfer_register
Make use of the connection parameter instead of assuming the connection will always be to the session bus.
-rw-r--r--client/transfer.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/client/transfer.c b/client/transfer.c
index 000a510..be61f40 100644
--- a/client/transfer.c
+++ b/client/transfer.c
@@ -309,7 +309,7 @@ gboolean obc_transfer_register(struct obc_transfer *transfer,
transfer->path = g_strdup_printf("%s/transfer%ju",
TRANSFER_BASEPATH, counter++);
- transfer->conn = dbus_bus_get(DBUS_BUS_SESSION, NULL);
+ transfer->conn = dbus_connection_ref(conn);
if (transfer->conn == NULL) {
g_set_error(err, OBC_TRANSFER_ERROR, -EFAULT,
"Unable to connect to D-Bus");