Re: [PATCH obexd 2/2] gobex: Fix ABORT request not processing

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

 



Am 13.01.2012 10:56, schrieb 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;
 		}

This one always evaluates to false because 0xff == G_OBEX_OP_ABORT | FINAL_BIT.

HS

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