[PATCH obexd 1/2] client: Fix not using connection passed to obc_transfer_register

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



From: Luiz Augusto von Dentz <luiz.von.dentz@xxxxxxxxx>

Make use of the connection parameter instead of assuming the connection
will always be to the session bus.
---
 client/transfer.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

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");
-- 
1.7.10.2

--
To unsubscribe from this list: send the line "unsubscribe linux-bluetooth" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[Index of Archives]     [Bluez Devel]     [Linux Wireless Networking]     [Linux Wireless Personal Area Networking]     [Linux ATH6KL]     [Linux USB Devel]     [Linux Media Drivers]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [Big List of Linux Books]

  Powered by Linux