From: "Gustavo F. Padovan" <padovan@profusion.mobi>
To: linux-bluetooth@vger.kernel.org
Subject: [PATCH 6/7] convert error to btd_error_not_supported()
Date: Wed, 8 Dec 2010 18:26:00 -0200 [thread overview]
Message-ID: <1291839961-14940-6-git-send-email-padovan@profusion.mobi> (raw)
In-Reply-To: <1291839961-14940-5-git-send-email-padovan@profusion.mobi>
---
input/device.c | 8 +-------
network/connection.c | 2 +-
2 files changed, 2 insertions(+), 8 deletions(-)
diff --git a/input/device.c b/input/device.c
index f7f96be..3c3f9fd 100644
--- a/input/device.c
+++ b/input/device.c
@@ -315,12 +315,6 @@ failed:
return FALSE;
}
-static inline DBusMessage *not_supported(DBusMessage *msg)
-{
- return g_dbus_create_error(msg, ERROR_INTERFACE ".Failed",
- "Not supported");
-}
-
static inline DBusMessage *already_connected(DBusMessage *msg)
{
return g_dbus_create_error(msg, ERROR_INTERFACE ".AlreadyConnected",
@@ -937,7 +931,7 @@ static DBusMessage *input_device_connect(DBusConnection *conn,
iconn = find_connection(idev->connections, "HID");
if (!iconn)
- return not_supported(msg);
+ return btd_error_not_supported(msg);
if (iconn->pending_connect)
return btd_error_in_progress(msg);
diff --git a/network/connection.c b/network/connection.c
index d24d96c..a652b98 100644
--- a/network/connection.c
+++ b/network/connection.c
@@ -393,7 +393,7 @@ static DBusMessage *connection_connect(DBusConnection *conn,
id = bnep_service_id(svc);
nc = find_connection(peer->connections, id);
if (!nc)
- return not_supported(msg);
+ return btd_error_not_supported(msg);
if (nc->state != DISCONNECTED)
return already_connected(msg);
--
1.7.3.2
next prev parent reply other threads:[~2010-12-08 20:26 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-12-08 20:25 [PATCH 1/7] Fix coding styling issues in src/error.c Gustavo F. Padovan
2010-12-08 20:25 ` [PATCH 2/7] convert errors to btd_error_not_authorized() Gustavo F. Padovan
2010-12-08 20:25 ` [PATCH 3/7] convert errors to btd_error_does_not_exist() Gustavo F. Padovan
2010-12-08 20:25 ` [PATCH 4/7] convert error to btd_error_busy() Gustavo F. Padovan
2010-12-08 20:25 ` [PATCH 5/7] convert error to btd_error_not_connected() Gustavo F. Padovan
2010-12-08 20:26 ` Gustavo F. Padovan [this message]
2010-12-08 20:26 ` [PATCH 7/7] Add btd_error_already_connected() Gustavo F. Padovan
2010-12-08 20:58 ` [PATCH 1/7] Fix coding styling issues in src/error.c Johan Hedberg
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1291839961-14940-6-git-send-email-padovan@profusion.mobi \
--to=padovan@profusion.mobi \
--cc=linux-bluetooth@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox