OSDN Git Service

gobex: fix sending Connection ID header in all requests
authorLuiz Augusto von Dentz <luiz.von.dentz@intel.com>
Fri, 11 Nov 2011 14:29:05 +0000 (16:29 +0200)
committerMarcel Holtmann <marcel@holtmann.org>
Tue, 4 Dec 2012 21:22:04 +0000 (22:22 +0100)
According to both OBEX and GOEP specs Connection ID should only be
included in the first packet of a request.

gobex/gobex.c

index e2d9c6c..8a23485 100644 (file)
@@ -410,6 +410,9 @@ guint g_obex_send_req(GObex *obex, GObexPacket *req, gint timeout,
        if (obex->conn_id == CONNID_INVALID)
                goto create_pending;
 
+       if (obex->rx_last_op == G_OBEX_RSP_CONTINUE)
+               goto create_pending;
+
        connid = g_obex_packet_get_header(req, G_OBEX_HDR_CONNECTION);
        if (connid != NULL)
                goto create_pending;