diff options
author | Marcel Holtmann <marcel@holtmann.org> | 2008-08-04 21:39:10 +0200 |
---|---|---|
committer | Marcel Holtmann <marcel@holtmann.org> | 2008-08-04 21:39:10 +0200 |
commit | 1f57429a07bbe7021889d9cfad6f4aa270d1d2c2 (patch) | |
tree | ba00bf83186eb814f3a8c7b7778932a3f8ee6665 | |
parent | ea35b0481357b3c7e12db6b1f19c9c35a179ce83 (diff) |
Move error_failed to its usage places
-rw-r--r-- | audio/sink.c | 6 | ||||
-rw-r--r-- | common/error.c | 12 | ||||
-rw-r--r-- | common/error.h | 3 | ||||
-rw-r--r-- | src/adapter.c | 6 |
4 files changed, 12 insertions, 15 deletions
diff --git a/audio/sink.c b/audio/sink.c index f3b7c55f..c6d2dc48 100644 --- a/audio/sink.c +++ b/audio/sink.c @@ -136,6 +136,12 @@ static void stream_state_changed(struct avdtp_stream *stream, sink->state = new_state; } +static DBusHandlerResult error_failed(DBusConnection *conn, + DBusMessage *msg, const char * desc) +{ + return error_common_reply(conn, msg, ERROR_INTERFACE ".Failed", desc); +} + static gboolean stream_setup_retry(gpointer user_data) { struct sink *sink = user_data; diff --git a/common/error.c b/common/error.c index 5b0fe36a..d6f321bd 100644 --- a/common/error.c +++ b/common/error.c @@ -48,18 +48,6 @@ DBusHandlerResult error_connection_attempt_failed(DBusConnection *conn, DBusMess err > 0 ? strerror(err) : "Connection attempt failed"); } -/** - org.bluez.Error.Failed: - - This is a the most generic error. - desc filed is MANDATORY -*/ -DBusHandlerResult error_failed(DBusConnection *conn, DBusMessage *msg, - const char * desc) -{ - return error_common_reply(conn, msg, ERROR_INTERFACE ".Failed", 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 4182cfe7..63ce2069 100644 --- a/common/error.h +++ b/common/error.h @@ -31,8 +31,5 @@ DBusHandlerResult error_connection_attempt_failed(DBusConnection *conn, DBusMessage *msg, int err); -DBusHandlerResult error_failed(DBusConnection *conn, DBusMessage *msg, - const char *desc); - 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 8b76bb2e..0adfffd9 100644 --- a/src/adapter.c +++ b/src/adapter.c @@ -140,6 +140,12 @@ static inline DBusMessage *unsupported_major_class(DBusMessage *msg) "Unsupported Major Class"); } +static DBusHandlerResult error_failed(DBusConnection *conn, + DBusMessage *msg, const char * desc) +{ + return error_common_reply(conn, msg, ERROR_INTERFACE ".Failed", desc); +} + static DBusHandlerResult error_failed_errno(DBusConnection *conn, DBusMessage *msg, int err) { |