From: Luiz Augusto von Dentz <luiz.von.dentz@xxxxxxxxx> If a transfer is suspended it should be resumed before cancelling otherwise it will timeout. --- obexd/client/transfer.c | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/obexd/client/transfer.c b/obexd/client/transfer.c index 0b5735b..c31a722 100644 --- a/obexd/client/transfer.c +++ b/obexd/client/transfer.c @@ -160,6 +160,9 @@ static DBusMessage *obc_transfer_cancel(DBusConnection *connection, ERROR_INTERFACE ".InProgress", "Cancellation already in progress"); + if (transfer->status == TRANSFER_STATUS_SUSPENDED) + g_obex_resume(transfer->obex); + if (transfer->req > 0) { if (!g_obex_cancel_req(transfer->obex, transfer->req, TRUE)) return g_dbus_create_error(message, @@ -414,6 +417,9 @@ static void obc_transfer_free(struct obc_transfer *transfer) { DBG("%p", transfer); + if (transfer->status == TRANSFER_STATUS_SUSPENDED) + g_obex_resume(transfer->obex); + if (transfer->req > 0) g_obex_cancel_req(transfer->obex, transfer->req, TRUE); @@ -659,6 +665,9 @@ static void xfer_complete(GObex *obex, GError *err, gpointer user_data) transfer->progress_id = 0; } + if (transfer->status == TRANSFER_STATUS_SUSPENDED) + g_obex_resume(transfer->obex); + if (err) transfer_set_status(transfer, TRANSFER_STATUS_ERROR); else -- 1.9.3 -- To unsubscribe from this list: send the line "unsubscribe linux-bluetooth" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html