Return-Path: From: Mikel Astiz To: linux-bluetooth@vger.kernel.org Cc: Mikel Astiz Subject: [PATCH obexd 9/9] client: make sure callback does not match size Date: Tue, 21 Feb 2012 09:46:23 +0100 Message-Id: <1329813983-26707-10-git-send-email-mikel.astiz.oss@gmail.com> In-Reply-To: <1329813983-26707-1-git-send-email-mikel.astiz.oss@gmail.com> References: <1329813983-26707-1-git-send-email-mikel.astiz.oss@gmail.com> Sender: linux-bluetooth-owner@vger.kernel.org List-ID: From: Mikel Astiz Otherwise it can be interpreted as successfully finished, which has its own code path. --- client/transfer.c | 4 ++-- 1 files changed, 2 insertions(+), 2 deletions(-) diff --git a/client/transfer.c b/client/transfer.c index f380cb7..99007ec 100644 --- a/client/transfer.c +++ b/client/transfer.c @@ -395,7 +395,7 @@ static void get_buf_xfer_progress(GObex *obex, GError *err, GObexPacket *rsp, transfer, &err); } - if (callback) + if (callback && transfer->transferred != transfer->size) callback->func(transfer, transfer->transferred, err, callback->data); } @@ -439,7 +439,7 @@ static gboolean get_xfer_progress(const void *buf, gsize len, transfer->filled -= w; } - if (callback) + if (callback && transfer->transferred != transfer->size) callback->func(transfer, transfer->transferred, NULL, callback->data); -- 1.7.6.5