From: Luiz Augusto von Dentz <luiz.von.dentz@xxxxxxxxx> Final bit should not be set when creating new request packets for PUT since it may be not be the end of the body. --- gobex/gobex-transfer.c | 6 ++++-- 1 files changed, 4 insertions(+), 2 deletions(-) diff --git a/gobex/gobex-transfer.c b/gobex/gobex-transfer.c index fad641b..386ba9a 100644 --- a/gobex/gobex-transfer.c +++ b/gobex/gobex-transfer.c @@ -170,9 +170,11 @@ static void transfer_response(GObex *obex, GError *err, GObexPacket *rsp, return; } - req = g_obex_packet_new(transfer->opcode, TRUE, G_OBEX_HDR_INVALID); + final = transfer->opcode == G_OBEX_OP_PUT ? FALSE : TRUE; - if (transfer->opcode == G_OBEX_OP_PUT) + req = g_obex_packet_new(transfer->opcode, final, G_OBEX_HDR_INVALID); + + if (!final) g_obex_packet_add_body(req, put_get_data, transfer); transfer->req_id = g_obex_send_req(obex, req, -1, transfer_response, -- 1.7.6 -- 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