diff options
author | Marcel Holtmann <marcel@holtmann.org> | 2008-08-04 21:18:49 +0200 |
---|---|---|
committer | Marcel Holtmann <marcel@holtmann.org> | 2008-08-04 21:18:49 +0200 |
commit | 855aecc7b576a5741df3c685ccfa2b3b11cd13ce (patch) | |
tree | 31f0d092eaf18a2bff66e52a2de58fb23db566c6 | |
parent | efb4418ec798151491d72a422f585800b09e0566 (diff) |
Move error_failed_errno where it is actually used
-rw-r--r-- | common/error.c | 13 | ||||
-rw-r--r-- | common/error.h | 3 | ||||
-rw-r--r-- | src/adapter.c | 8 |
3 files changed, 8 insertions, 16 deletions
diff --git a/common/error.c b/common/error.c index bc813d74..3e97b2a9 100644 --- a/common/error.c +++ b/common/error.c @@ -91,19 +91,6 @@ DBusHandlerResult error_failed(DBusConnection *conn, DBusMessage *msg, return error_common_reply(conn, msg, ERROR_INTERFACE ".Failed", desc); } -/** - org.bluez.Error.Failed: - - This is a the most generic error, instantiated form a UNIX errno number. -*/ -DBusHandlerResult error_failed_errno(DBusConnection *conn, DBusMessage *msg, - int err) -{ - const char *desc = strerror(err); - - return error_failed(conn, msg, desc); -} - /* Helper function - internal use only */ DBusHandlerResult error_common_reply(DBusConnection *conn, DBusMessage *msg, const char *name, const char *descr) diff --git a/common/error.h b/common/error.h index 68ce105a..4d4236b8 100644 --- a/common/error.h +++ b/common/error.h @@ -42,8 +42,5 @@ DBusHandlerResult error_canceled(DBusConnection *conn, DBusMessage *msg, DBusHandlerResult error_failed(DBusConnection *conn, DBusMessage *msg, const char *desc); -DBusHandlerResult error_failed_errno(DBusConnection *conn, DBusMessage *msg, - int err); - DBusHandlerResult error_common_reply(DBusConnection *conn, DBusMessage *msg, const char *name, const char *descr); diff --git a/src/adapter.c b/src/adapter.c index cd14b2b7..8b76bb2e 100644 --- a/src/adapter.c +++ b/src/adapter.c @@ -140,6 +140,14 @@ static inline DBusMessage *unsupported_major_class(DBusMessage *msg) "Unsupported Major Class"); } +static DBusHandlerResult error_failed_errno(DBusConnection *conn, + DBusMessage *msg, int err) +{ + const char *desc = strerror(err); + + return error_failed(conn, msg, desc); +} + static int auth_req_cmp(const void *p1, const void *p2) { const struct pending_auth_info *pb1 = p1; |