diff options
author | Chan-yeol Park <chanyeol.park@samsung.com> | 2012-08-28 19:24:54 +0900 |
---|---|---|
committer | Johan Hedberg <johan.hedberg@intel.com> | 2012-09-03 14:50:06 +0300 |
commit | 7e583e8891e531a9a8ecbbaa7d50fa4dd8bb45c7 (patch) | |
tree | acfeaf85233c2faec98c2e2712e589aab0fe1059 /audio | |
parent | 0dc67c07644745162e625f78d80d590644c5fabc (diff) | |
download | bluez-7e583e8891e531a9a8ecbbaa7d50fa4dd8bb45c7.tar.gz |
core: replace NULL by dbus invalid arguments
This patch replaces NULL with dbus invalid arguments return if dbus
method call gets invalid arguments from the peer. This will avoid dbus
peer coommander's infinite wait.
Diffstat (limited to 'audio')
-rw-r--r-- | audio/media.c | 4 | ||||
-rw-r--r-- | audio/transport.c | 4 |
2 files changed, 4 insertions, 4 deletions
diff --git a/audio/media.c b/audio/media.c index ea6d58263..b0ea4e97e 100644 --- a/audio/media.c +++ b/audio/media.c @@ -926,7 +926,7 @@ static DBusMessage *unregister_endpoint(DBusConnection *conn, DBusMessage *msg, if (!dbus_message_get_args(msg, NULL, DBUS_TYPE_OBJECT_PATH, &path, DBUS_TYPE_INVALID)) - return NULL; + return btd_error_invalid_args(msg); sender = dbus_message_get_sender(msg); @@ -1808,7 +1808,7 @@ static DBusMessage *unregister_player(DBusConnection *conn, DBusMessage *msg, if (!dbus_message_get_args(msg, NULL, DBUS_TYPE_OBJECT_PATH, &path, DBUS_TYPE_INVALID)) - return NULL; + return btd_error_invalid_args(msg); sender = dbus_message_get_sender(msg); diff --git a/audio/transport.c b/audio/transport.c index 832ad2a62..d40c92d56 100644 --- a/audio/transport.c +++ b/audio/transport.c @@ -667,7 +667,7 @@ static DBusMessage *acquire(DBusConnection *conn, DBusMessage *msg, if (!dbus_message_get_args(msg, NULL, DBUS_TYPE_STRING, &accesstype, DBUS_TYPE_INVALID)) - return NULL; + return btd_error_invalid_args(msg); sender = dbus_message_get_sender(msg); @@ -704,7 +704,7 @@ static DBusMessage *release(DBusConnection *conn, DBusMessage *msg, if (!dbus_message_get_args(msg, NULL, DBUS_TYPE_STRING, &accesstype, DBUS_TYPE_INVALID)) - return NULL; + return btd_error_invalid_args(msg); sender = dbus_message_get_sender(msg); |