From: Luiz Augusto von Dentz <luiz.von.dentz@xxxxxxxxx> If there is no request to cancel send an abort since otherwise the remote may hang waiting. --- gobex/gobex-transfer.c | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/gobex/gobex-transfer.c b/gobex/gobex-transfer.c index 4e1a6c0..6720129 100644 --- a/gobex/gobex-transfer.c +++ b/gobex/gobex-transfer.c @@ -653,8 +653,13 @@ gboolean g_obex_cancel_transfer(guint id, GObexFunc complete_func, transfer->complete_func = complete_func; transfer->user_data = user_data; - if (transfer->req_id == 0) - goto done; + if (!transfer->req_id) { + transfer->req_id = g_obex_abort(transfer->obex, + transfer_abort_response, + transfer, NULL); + if (transfer->req_id) + return TRUE; + } ret = g_obex_cancel_req(transfer->obex, transfer->req_id, FALSE); if (ret) -- 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