Some profiles (BIP) put CONTINUE in a final response packet.
OpenOBEX currently assumes that a response is completed
when a packet arrives with a different status than CONTINUE.
The proposed patch changes this to check instead whether a packet
arrives that has the final bit set in the status.
---
lib/obex_client.c | 6 +++---
1 files changed, 3 insertions(+), 3 deletions(-)
diff --git a/lib/obex_client.c b/lib/obex_client.c
index 5107d62..4a845e8 100644
--- a/lib/obex_client.c
+++ b/lib/obex_client.c
@@ -49,7 +49,7 @@ static __inline uint16_t msg_get_len(const buf_t *msg)
return 0;
}
-static int obex_client_recv(obex_t *self, buf_t *msg, int rsp)
+static int obex_client_recv(obex_t *self, buf_t *msg, int rsp, int final)
{
int ret;
@@ -90,7 +90,7 @@ static int obex_client_recv(obex_t *self, buf_t *msg, int rsp)
}
/* Are we done yet? */
- if (rsp == OBEX_RSP_CONTINUE) {
+ if (!final) {
DEBUG(3, "Continue...\n");
self->object->continue_received = 1;
@@ -249,7 +249,7 @@ int obex_client(obex_t *self, buf_t *msg, int final)
return obex_client_send(self, msg, rsp);
case STATE_REC:
- return obex_client_recv(self, msg, rsp);
+ return obex_client_recv(self, msg, rsp, final);
default:
DEBUG(0, "Unknown state\n");
--
1.7.0.4
------------------------------------------------------------------------------
Magic Quadrant for Content-Aware Data Loss Prevention
Research study explores the data loss prevention market. Includes in-depth
analysis on the changes within the DLP market, and the criteria used to
evaluate the strengths and weaknesses of these DLP solutions.
http://www.accelacomm.com/jaw/sfnl/114/51385063/
_______________________________________________
Openobex-users mailing list
[email protected]
http://lists.sourceforge.net/lists/listinfo/openobex-users