From: Mikel Astiz <mikel.astiz@xxxxxxxxxxxx> If a previous cancel request is in progress, a second cancel request should fail. This by the way fixes unreplied D-Bus messages. --- client/transfer.c | 5 +++++ 1 files changed, 5 insertions(+), 0 deletions(-) diff --git a/client/transfer.c b/client/transfer.c index 242d989..0686afe 100644 --- a/client/transfer.c +++ b/client/transfer.c @@ -213,6 +213,11 @@ static DBusMessage *obc_transfer_cancel(DBusConnection *connection, ERROR_INTERFACE ".NotAuthorized", "Not Authorized"); + if (transfer->msg != NULL) + return g_dbus_create_error(message, + ERROR_INTERFACE ".InProgress", + "Cancellation already in progress"); + if (!obc_transfer_abort(transfer)) return g_dbus_create_error(message, ERROR_INTERFACE ".Failed", -- 1.7.7.6 -- 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