diff options
author | Luiz Augusto von Dentz <luiz.dentz-von@nokia.com> | 2010-09-28 10:52:25 +0300 |
---|---|---|
committer | Johan Hedberg <johan.hedberg@nokia.com> | 2010-09-28 11:09:29 +0300 |
commit | 857c9c65aaa54934495002c30ebade7dd5a45e0d (patch) | |
tree | 15457baaade25634b9e37926cfc5e81eb578a1f2 /client | |
parent | f1974e73f7b87915bfb561fa3f283b97bb3c9859 (diff) | |
download | obexd-857c9c65aaa54934495002c30ebade7dd5a45e0d.tar.gz |
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.
Diffstat (limited to 'client')
-rw-r--r-- | client/transfer.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/client/transfer.c b/client/transfer.c index 58ac265..8ceb36f 100644 --- a/client/transfer.c +++ b/client/transfer.c @@ -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, |