[PATCH obexd 1/2] gobex: fix checking connection id for ABORT

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

 



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

OBEX spec state that it is optional to send a Connection Id header in an
OBEX ABORT operation.

Reported by Hendrik Sattler <post@xxxxxxxxxxxxxxxxxx>
---
 gobex/gobex.c |   11 +++++++++--
 1 files changed, 9 insertions(+), 2 deletions(-)

diff --git a/gobex/gobex.c b/gobex/gobex.c
index 86e1c4a..b0f3716 100644
--- a/gobex/gobex.c
+++ b/gobex/gobex.c
@@ -705,9 +705,16 @@ static void handle_request(GObex *obex, GObexPacket *req)
 
 	op = g_obex_packet_get_operation(req, NULL);
 
-	if (op == G_OBEX_OP_CONNECT)
+	switch (op) {
+	case G_OBEX_OP_CONNECT:
 		parse_connect_data(obex, req);
-	else if (check_connid(obex, req) == FALSE) {
+		break;
+	case G_OBEX_OP_ABORT:
+		break;
+	default:
+		if (check_connid(obex, req))
+			break;
+
 		g_obex_debug(G_OBEX_DEBUG_ERROR, "Invalid Connection ID");
 		g_obex_send_rsp(obex, G_OBEX_RSP_SERVICE_UNAVAILABLE, NULL,
 							G_OBEX_HDR_INVALID);
-- 
1.7.6.4

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