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:
Luiz Augusto von Dentz 2010-09-28 10:52:25 +03:00 committed by Marcel Holtmann
parent 8065696454
commit 8702ac21b9

View File

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