aboutsummaryrefslogtreecommitdiffstats
path: root/attrib/client.c
diff options
context:
space:
mode:
authorGustavo F. Padovan <padovan@profusion.mobi>2010-12-06 17:10:48 -0200
committerJohan Hedberg <johan.hedberg@nokia.com>2010-12-07 23:13:16 +0200
commitb7d1fc1f399e6ea445520b93961f3a11243d8b04 (patch)
tree4c1364b10fc97eb68cdc0863a5607a1f2fc91666 /attrib/client.c
parent581171be9bff79d2603387551460f70e825ef9d8 (diff)
downloadbluez-b7d1fc1f399e6ea445520b93961f3a11243d8b04.tar.gz
bluez-b7d1fc1f399e6ea445520b93961f3a11243d8b04.tar.xz
bluez-b7d1fc1f399e6ea445520b93961f3a11243d8b04.zip
Add btd_error_not_authorized()
Diffstat (limited to 'attrib/client.c')
-rw-r--r--attrib/client.c8
1 files changed, 1 insertions, 7 deletions
diff --git a/attrib/client.c b/attrib/client.c
index ac78fbd0..08054920 100644
--- a/attrib/client.c
+++ b/attrib/client.c
@@ -191,12 +191,6 @@ static int watcher_cmp(gconstpointer a, gconstpointer b)
return g_strcmp0(watcher->path, match->path);
}
-static inline DBusMessage *not_authorized(DBusMessage *msg)
-{
- return g_dbus_create_error(msg, ERROR_INTERFACE ".NotAuthorized",
- "Not authorized");
-}
-
static void append_char_dict(DBusMessageIter *iter, struct characteristic *chr)
{
DBusMessageIter dict;
@@ -502,7 +496,7 @@ static DBusMessage *unregister_watcher(DBusConnection *conn,
l = g_slist_find_custom(prim->watchers, match, watcher_cmp);
watcher_free(match);
if (!l)
- return not_authorized(msg);
+ return btd_error_not_authorized(msg);
watcher = l->data;
g_dbus_remove_watch(conn, watcher->id);