Thread (7 messages) flat view 7 messages, 3 authors, 2011-07-13
STALE5513d

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

From: Dmitriy Paliy <hidden>
Date: 2011-06-28 21:40:42
Subsystem: the rest · Maintainer: Linus Torvalds

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
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help