linux-bluetooth.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH obexd 01/13 v3] client: fix not checking session_request return
@ 2012-02-08  9:43 Luiz Augusto von Dentz
  2012-02-08  9:43 ` [PATCH obexd 02/13 v3] client: remove unused field from obc_session Luiz Augusto von Dentz
                   ` (12 more replies)
  0 siblings, 13 replies; 14+ messages in thread
From: Luiz Augusto von Dentz @ 2012-02-08  9:43 UTC (permalink / raw)
  To: linux-bluetooth

From: Luiz Augusto von Dentz <luiz.von.dentz@intel.com>

In case session_request return an error proceed to the next
---
 client/session.c |   13 ++++++++++---
 1 files changed, 10 insertions(+), 3 deletions(-)

diff --git a/client/session.c b/client/session.c
index c127974..c9df832 100644
--- a/client/session.c
+++ b/client/session.c
@@ -687,9 +687,16 @@ static void session_terminate_transfer(struct obc_session *session,
 
 	obc_session_remove_transfer(session, transfer);
 
-	if (session->pending)
-		session_request(session, session_prepare_put,
-				session->pending->data);
+	while (session->pending != NULL) {
+		struct obc_transfer *transfer = session->pending->data;
+		int err;
+
+		err = session_request(session, session_prepare_put, transfer);
+		if (err == 0)
+			break;
+
+		obc_session_remove_transfer(session, transfer);
+	}
 
 	obc_session_unref(session);
 }
-- 
1.7.7.6


^ permalink raw reply related	[flat|nested] 14+ messages in thread

end of thread, other threads:[~2012-02-08 10:42 UTC | newest]

Thread overview: 14+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-02-08  9:43 [PATCH obexd 01/13 v3] client: fix not checking session_request return Luiz Augusto von Dentz
2012-02-08  9:43 ` [PATCH obexd 02/13 v3] client: remove unused field from obc_session Luiz Augusto von Dentz
2012-02-08  9:43 ` [PATCH obexd 03/13 v3] client: fix not queuing requests properly Luiz Augusto von Dentz
2012-02-08  9:44 ` [PATCH obexd 04/13 v3] client: introduce obc_session_setpath Luiz Augusto von Dentz
2012-02-08  9:44 ` [PATCH obexd 05/13 v3] client: introduce obc_session_mkdir Luiz Augusto von Dentz
2012-02-08  9:44 ` [PATCH obexd 06/13 v3] client: introduce obc_session_copy Luiz Augusto von Dentz
2012-02-08  9:44 ` [PATCH obexd 07/13 v3] client: introduce obc_session_move Luiz Augusto von Dentz
2012-02-08  9:44 ` [PATCH obexd 08/13 v3] client: introduce obc_session_delete Luiz Augusto von Dentz
2012-02-08  9:44 ` [PATCH obexd 09/13 v3] client: introduce obc_session_cancel Luiz Augusto von Dentz
2012-02-08  9:44 ` [PATCH obexd 10/13 v3] client: remove use of gobex in pbap module Luiz Augusto von Dentz
2012-02-08  9:44 ` [PATCH obexd 11/13 v3] client: remove use of gobex in map module Luiz Augusto von Dentz
2012-02-08  9:44 ` [PATCH obexd 12/13 v3] client: remove use of gobex in ftp module Luiz Augusto von Dentz
2012-02-08  9:44 ` [PATCH obexd 13/13 v3] client: remove gobex dependency of session Luiz Augusto von Dentz
2012-02-08 10:42 ` [PATCH obexd 01/13 v3] client: fix not checking session_request return Johan Hedberg

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).