mirror of
https://git.kernel.org/pub/scm/bluetooth/bluez.git
synced 2024-12-15 15:04:34 +08:00
obexd: Fix not detecting errors when transferring the last part of the buffer
The last part has to be flushed in order to sent the remaining buffer as a obex packet and detect possible errors.
This commit is contained in:
parent
8065696454
commit
8702ac21b9
@ -379,8 +379,10 @@ static void put_xfer_progress(GwObexXfer *xfer, gpointer user_data)
|
||||
|
||||
transfer->filled += len;
|
||||
|
||||
if (transfer->filled == 0)
|
||||
if (transfer->filled == 0) {
|
||||
gw_obex_xfer_flush(xfer, &err);
|
||||
goto done;
|
||||
}
|
||||
|
||||
if (gw_obex_xfer_write(xfer, transfer->buffer,
|
||||
transfer->filled,
|
||||
|
Loading…
Reference in New Issue
Block a user