mirror of
https://git.kernel.org/pub/scm/bluetooth/bluez.git
synced 2024-12-02 00:24:25 +08:00
obexd: Fix possible unreplied D-Bus message
If a previous cancel request is in progress, a second cancel request should fail. This by the way fixes unreplied D-Bus messages.
This commit is contained in:
parent
a9a5fcd7db
commit
68b394a78b
@ -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",
|
||||
|
Loading…
Reference in New Issue
Block a user