---
 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


------------------------------------------------------------------------------
Got Input?   Slashdot Needs You.
Take our quick survey online.  Come on, we don't ask for help often.
Plus, you'll get a chance to win $100 to spend on ThinkGeek.
http://p.sf.net/sfu/slashdot-survey
_______________________________________________
Openobex-users mailing list
Openobex-users@lists.sourceforge.net
http://lists.sourceforge.net/lists/listinfo/openobex-users

Reply via email to