[PATCH obexd v2 4/4] Add adapter ReleaseSession to obex-client

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

 



Release of adapter session is added to obex-client when closing OBEX
transfer.
---
 client/session.c |   10 ++++++++++
 1 files changed, 10 insertions(+), 0 deletions(-)

diff --git a/client/session.c b/client/session.c
index 4b8cf09..a2a3b2d 100644
--- a/client/session.c
+++ b/client/session.c
@@ -284,6 +284,11 @@ static struct pending_req *send_method_call(DBusConnection *connection,
 
 	va_end(args);
 
+	if (!cb) {
+		g_dbus_send_message(connection, msg);
+		return 0;
+	}
+
 	if (!dbus_connection_send_with_reply(connection, msg, &call, -1)) {
 		error("Sending %s failed", method);
 		dbus_message_unref(msg);
@@ -312,6 +317,11 @@ void session_unref(struct session_data *session)
 	if (ret == FALSE)
 		return;
 
+	send_method_call(session->conn_system,
+				BT_BUS_NAME, session->adapter,
+				BT_ADAPTER_IFACE, "ReleaseSession",
+				NULL, NULL,
+				DBUS_TYPE_INVALID);
 	session_free(session);
 }
 
-- 
1.7.4.1

--
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