---
lib/obex_object.c | 12 +++++++-----
1 files changed, 7 insertions(+), 5 deletions(-)
diff --git a/lib/obex_object.c b/lib/obex_object.c
index 395c5ff..2773789 100644
--- a/lib/obex_object.c
+++ b/lib/obex_object.c
@@ -412,12 +412,14 @@ static int send_body(obex_object_t *object, struct
obex_header_element *h,
/* We have completely filled the tx-buffer */
actual = tx_left;
} else {
- DEBUG(4, "Add BODY_END header\n");
-
- if (slist_has_more(object->tx_headerq))
- hdr->hi = OBEX_HDR_BODY_END;
- else
+ if (slist_has_more(object->tx_headerq)) {
+ DEBUG(4, "Add BODY header\n");
hdr->hi = OBEX_HDR_BODY;
+ } else {
+ DEBUG(4, "Add BODY_END header\n");
+ hdr->hi = OBEX_HDR_BODY_END;
+ }
+
hdr->hl = htons((uint16_t)(h->buf->data_size + sizeof(*hdr)));
buf_insert_end(txmsg, h->buf->data, h->buf->data_size);
actual = h->buf->data_size;
--
1.7.5.4
------------------------------------------------------------------------------
AppSumo Presents a FREE Video for the SourceForge Community by Eric
Ries, the creator of the Lean Startup Methodology on "Lean Startup
Secrets Revealed." This video shows you how to validate your ideas,
optimize your ideas and identify your business strategy.
http://p.sf.net/sfu/appsumosfdev2dev
_______________________________________________
Openobex-users mailing list
[email protected]
http://lists.sourceforge.net/lists/listinfo/openobex-users