diff options
author | Gustavo F. Padovan <padovan@profusion.mobi> | 2010-12-16 15:58:09 -0200 |
---|---|---|
committer | Johan Hedberg <johan.hedberg@nokia.com> | 2010-12-16 21:45:43 +0200 |
commit | fdafb86ff08e9552250df365bac9c49cd06b7e0c (patch) | |
tree | 3af5e3156babf66038dd083ae6f42b81c6a2850a /audio/headset.c | |
parent | 9f7a7d39ac16f1c1e5e316ae9f2599a29f3ca97f (diff) | |
download | bluez-fdafb86ff08e9552250df365bac9c49cd06b7e0c.tar.gz |
Convert more D-Bus errors to btd_error_*
Diffstat (limited to 'audio/headset.c')
-rw-r--r-- | audio/headset.c | 10 |
1 files changed, 2 insertions, 8 deletions
diff --git a/audio/headset.c b/audio/headset.c index af75f8ba..72bf5b6b 100644 --- a/audio/headset.c +++ b/audio/headset.c @@ -1872,14 +1872,8 @@ static DBusMessage *hs_set_gain(DBusConnection *conn, return btd_error_not_connected(msg); err = headset_set_gain(device, gain, type); - if (err < 0) { - /* Ignore if nothing has changed */ - if (err == -EALREADY) - return dbus_message_new_method_return(msg); - return g_dbus_create_error(msg, ERROR_INTERFACE - ".InvalidArgument", - "Must be less than or equal to 15"); - } + if (err < 0) + return btd_error_invalid_args(msg); reply = dbus_message_new_method_return(msg); if (!reply) |