summaryrefslogtreecommitdiff
path: root/gobex
diff options
context:
space:
mode:
authorLuiz Augusto von Dentz <luiz.von.dentz@intel.com>2011-11-11 16:29:06 +0200
committerMarcel Holtmann <marcel@holtmann.org>2012-12-04 22:22:04 +0100
commit16e1f86a1e10fa9784749bde7cdd16668c98a666 (patch)
treef21f9cecbc2369f80696c295a000706c20d6dfdb /gobex
parentad8d85382faa6f8c167b6f8ec9e5952e60430b34 (diff)
gobex: make connection id check less strict
OBEX spec says: Only the first packet in the request needs to contain the Connection Id header... If a Connection Id header is received with an invalid connection identifier, it is recommended that the operation be rejected with the response code (0xD3) “Service Unavailable”. Since not all requests packets need to contain Connection Id header we should only try to validate it in case a header is received. Reported by Hendrik Sattler <post@hendrik-sattler.de>
Diffstat (limited to 'gobex')
-rw-r--r--gobex/gobex.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/gobex/gobex.c b/gobex/gobex.c
index 8a23485eb..784030459 100644
--- a/gobex/gobex.c
+++ b/gobex/gobex.c
@@ -694,7 +694,7 @@ static gboolean check_connid(GObex *obex, GObexPacket *pkt)
hdr = g_obex_packet_get_header(pkt, G_OBEX_HDR_CONNECTION);
if (hdr == NULL)
- return FALSE;
+ return TRUE;
g_obex_header_get_uint32(hdr, &id);