mirror of
https://git.kernel.org/pub/scm/bluetooth/bluez.git
synced 2025-01-19 10:05:09 +08:00
gobex: fix setting final bit on PUT requests
Final bit should not be set when creating new request packets for PUT since it may be not be the end of the body.
This commit is contained in:
parent
1e00bd8f5e
commit
c96d0645b3
@ -170,10 +170,14 @@ static void transfer_response(GObex *obex, GError *err, GObexPacket *rsp,
|
||||
return;
|
||||
}
|
||||
|
||||
req = g_obex_packet_new(transfer->opcode, TRUE, G_OBEX_HDR_INVALID);
|
||||
|
||||
if (transfer->opcode == G_OBEX_OP_PUT)
|
||||
if (transfer->opcode == G_OBEX_OP_PUT) {
|
||||
req = g_obex_packet_new(transfer->opcode, FALSE,
|
||||
G_OBEX_HDR_INVALID);
|
||||
g_obex_packet_add_body(req, put_get_data, transfer);
|
||||
} else {
|
||||
req = g_obex_packet_new(transfer->opcode, TRUE,
|
||||
G_OBEX_HDR_INVALID);
|
||||
}
|
||||
|
||||
transfer->req_id = g_obex_send_req(obex, req, -1, transfer_response,
|
||||
transfer, &err);
|
||||
|
Loading…
Reference in New Issue
Block a user