Diff between 90bd74108581c501a5fcbb93c83b0c9ce9e4dc3d and 09364c9d3f0f0c80822567333887a917f44bbc94

Changed Files

File Additions Deletions Status
obexd/client/session.c +2 -2 modified

Full Patch

diff --git a/obexd/client/session.c b/obexd/client/session.c
index 003c7f6..9e1ae25 100644
--- a/obexd/client/session.c
+++ b/obexd/client/session.c
@@ -735,8 +735,6 @@ static DBusMessage *release_agent(DBusConnection *connection,
 
 static void session_shutdown(struct session_data *session)
 {
-	g_dbus_remove_watch(session->conn, session->owner_watch);
-
 	if (session->transfer_path) {
 		agent_notify_error(session->conn, session->agent_name,
 				session->agent_path, session->transfer_path,
@@ -780,6 +778,8 @@ static DBusMessage *close_session(DBusConnection *connection,
 				"org.openobex.Error.NotAuthorized",
 				"Not Authorized");
 
+	g_dbus_remove_watch(session->conn, session->owner_watch);
+
 	session_shutdown(session);
 
 	return dbus_message_new_method_return(message);