linux-bluetooth.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH obexd 2/2] gobex: Fix ABORT request not processing
@ 2012-01-13  9:56 Jaganath Kanakkassery
  2012-01-13 10:29 ` Hendrik Sattler
  0 siblings, 1 reply; 8+ messages in thread
From: Jaganath Kanakkassery @ 2012-01-13  9:56 UTC (permalink / raw)
  To: linux-bluetooth; +Cc: Jaganath Kanakkassery

G_OBEX_OP_ABORT is defined as 0x7f but error checking of opcode is
done for greater than 0x1f. So abort request is simply ignored.
So corrected the error checking.
---
 gobex/gobex.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/gobex/gobex.c b/gobex/gobex.c
index 33b77fd..bfb9f37 100644
--- a/gobex/gobex.c
+++ b/gobex/gobex.c
@@ -1150,7 +1150,7 @@ static gboolean incoming_data(GIOChannel *io, GIOCondition cond,
 	} else {
 		opcode = obex->rx_last_op;
 		/* Unexpected response -- fail silently */
-		if (opcode > 0x1f && opcode < 0xff) {
+		if (opcode > G_OBEX_OP_ABORT && opcode < 0xff) {
 			obex->rx_data = 0;
 			return TRUE;
 		}
-- 
1.7.1


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

end of thread, other threads:[~2012-01-13 13:36 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-01-13  9:56 [PATCH obexd 2/2] gobex: Fix ABORT request not processing Jaganath Kanakkassery
2012-01-13 10:29 ` Hendrik Sattler
2012-01-13 10:54   ` Johan Hedberg
2012-01-13 11:07     ` Hendrik Sattler
2012-01-13 11:21       ` Johan Hedberg
2012-01-13 12:27         ` Hendrik Sattler
2012-01-13 13:01           ` Johan Hedberg
2012-01-13 13:36             ` Hendrik Sattler

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).