diff --git a/gobex/gobex.c b/gobex/gobex.c
index 3930cd7..61edbd5 100644
--- a/gobex/gobex.c
+++ b/gobex/gobex.c
if (status != G_IO_STATUS_NORMAL)
return FALSE;
+ g_obex_dump("<", buf, bytes_written);
+
obex->tx_sent += bytes_written;
obex->tx_data -= bytes_written;
if (bytes_written != obex->tx_data)
return FALSE;
+ g_obex_dump("<", buf, bytes_written);
+
obex->tx_sent += bytes_written;
obex->tx_data -= bytes_written;
obex->rx_data += rbytes;
if (obex->rx_data < 3)
- return TRUE;
+ goto done;
memcpy(&u16, &buf[1], sizeof(u16));
obex->rx_pkt_len = g_ntohs(u16);
read_body:
if (obex->rx_data >= obex->rx_pkt_len)
- return TRUE;
+ goto done;
do {
toread = obex->rx_pkt_len - obex->rx_data;
status = g_io_channel_read_chars(io, buf, toread, &rbytes, NULL);
if (status != G_IO_STATUS_NORMAL)
- return TRUE;
+ goto done;
obex->rx_data += rbytes;
} while (rbytes > 0 && obex->rx_data < obex->rx_pkt_len);
+done:
+ g_obex_dump(">", obex->rx_buf, obex->rx_data);
+
return TRUE;
}
return FALSE;
}
+ g_obex_dump(">", obex->rx_buf, obex->rx_data);
+
return TRUE;
fail:
g_obex_debug(G_OBEX_DEBUG_ERROR, "%s", (*err)->message);