[PATCH ] obexd/client: clear pending transfers if fails

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

 



In case of obex transfer fails, clear all pending
transfers in the session.
---
 obexd/client/session.c | 8 ++++++--
 1 file changed, 6 insertions(+), 2 deletions(-)

diff --git a/obexd/client/session.c b/obexd/client/session.c
index d2ae4fd..512d6b7 100644
--- a/obexd/client/session.c
+++ b/obexd/client/session.c
@@ -901,8 +901,12 @@ static void session_terminate_transfer(struct obc_session *session,
 
 	pending_request_free(p);
 
-	if (session->p == NULL)
-		session_process_queue(session);
+	if (session->p == NULL) {
+		if (gerr != NULL)
+			obc_session_shutdown(session);
+		else
+			session_process_queue(session);
+	}
 
 	obc_session_unref(session);
 }
-- 
1.9.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