From b17209a9b4f591f3f018a1704a5e790beaf5fd64 Mon Sep 17 00:00:00 2001 From: Dmitriy Paliy Date: Wed, 13 Jul 2011 12:43:46 +0300 Subject: [PATCH] obexd: Add adapter ReleaseSession to obex-client Release of adapter session is added to obex-client when closing OBEX transfer. --- obexd/client/session.c | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/obexd/client/session.c b/obexd/client/session.c index a84b74e63..36475d607 100644 --- a/obexd/client/session.c +++ b/obexd/client/session.c @@ -285,6 +285,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); @@ -313,6 +318,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); } -- 2.47.3