[PATCH obexd 11/12 v3] gobex: fix sending Connection ID header in all requests

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

 



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

According to both OBEX and GOEP specs Connection ID should only be
included in the first packet of a request.
---
 client/transfer.c |    1 -
 gobex/gobex.c     |    3 +++
 2 files changed, 3 insertions(+), 1 deletions(-)

diff --git a/client/transfer.c b/client/transfer.c
index b6994d1..7db20f6 100644
--- a/client/transfer.c
+++ b/client/transfer.c
@@ -377,7 +377,6 @@ static void get_buf_xfer_progress(GObex *obex, GError *err, GObexPacket *rsp,
 
 	transfer->xfer = g_obex_send_req(obex, req, -1, get_buf_xfer_progress,
 							transfer, &err);
-
 	if (callback)
 		callback->func(transfer, transfer->transferred, err,
 							callback->data);
diff --git a/gobex/gobex.c b/gobex/gobex.c
index e2d9c6c..8a23485 100644
--- a/gobex/gobex.c
+++ b/gobex/gobex.c
@@ -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;
-- 
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