diff --git a/obexd/client/session.c b/obexd/client/session.c
index bdd55d3..3143cc0 100644
--- a/obexd/client/session.c
+++ b/obexd/client/session.c
return dbus_message_new_method_return(message);
}
+static void owner_disconnected(DBusConnection *connection, void *user_data)
+{
+ struct session_data *session = user_data;
+
+ session_shutdown(session);
+}
static GDBusMethodTable session_methods[] = {
{ "GetProperties", "", "a{sv}", get_properties },
return -EIO;
}
+ g_dbus_add_disconnect_watch(session->conn, session->owner,
+ owner_disconnected, session, NULL);
+
session_ref(session);
return 0;