Return-Path: From: Mikel Astiz To: linux-bluetooth@vger.kernel.org Cc: Mikel Astiz Subject: [PATCH obexd v2 3/8] client: fix cancel when no agent present Date: Tue, 21 Feb 2012 14:57:07 +0100 Message-Id: <1329832632-3681-4-git-send-email-mikel.astiz.oss@gmail.com> In-Reply-To: <1329832632-3681-1-git-send-email-mikel.astiz.oss@gmail.com> References: <1329832632-3681-1-git-send-email-mikel.astiz.oss@gmail.com> Sender: linux-bluetooth-owner@vger.kernel.org List-ID: From: Mikel Astiz The authorization check should consider the scenario of no agent being assigned to the transfer. --- client/transfer.c | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git a/client/transfer.c b/client/transfer.c index 157811d..4054799 100644 --- a/client/transfer.c +++ b/client/transfer.c @@ -168,7 +168,7 @@ static DBusMessage *obc_transfer_cancel(DBusConnection *connection, DBusMessage *reply; sender = dbus_message_get_sender(message); - if (g_str_equal(transfer->agent, sender) == FALSE) + if (g_strcmp0(transfer->agent, sender) != 0) return g_dbus_create_error(message, "org.openobex.Error.NotAuthorized", "Not Authorized"); -- 1.7.6.5