diff options
author | Gustavo F. Padovan <padovan@profusion.mobi> | 2010-12-08 18:26:01 -0200 |
---|---|---|
committer | Johan Hedberg <johan.hedberg@nokia.com> | 2010-12-08 22:54:58 +0200 |
commit | 0d39f2db3c792f79c13f798e1ff4a47538d54d03 (patch) | |
tree | a7b3d88ba993aefd3e0f416fedba8943ec50e6fc /audio/headset.c | |
parent | d1bc7a947c6c7a6aebda0e4a1387cffda33ef69d (diff) |
Add btd_error_already_connected()
Diffstat (limited to 'audio/headset.c')
-rw-r--r-- | audio/headset.c | 8 |
1 files changed, 2 insertions, 6 deletions
diff --git a/audio/headset.c b/audio/headset.c index 840278971..3d584e030 100644 --- a/audio/headset.c +++ b/audio/headset.c @@ -1697,9 +1697,7 @@ static DBusMessage *hs_connect(DBusConnection *conn, DBusMessage *msg, if (hs->state == HEADSET_STATE_CONNECTING) return btd_error_in_progress(msg); else if (hs->state > HEADSET_STATE_CONNECTING) - return g_dbus_create_error(msg, ERROR_INTERFACE - ".AlreadyConnected", - "Already Connected"); + return btd_error_already_connected(msg); if (hs->hfp_handle && !ag.telephony_ready) return g_dbus_create_error(msg, ERROR_INTERFACE ".NotReady", @@ -1806,9 +1804,7 @@ static DBusMessage *hs_play(DBusConnection *conn, DBusMessage *msg, } return btd_error_busy(msg); case HEADSET_STATE_PLAYING: - return g_dbus_create_error(msg, ERROR_INTERFACE - ".AlreadyConnected", - "Device Already Connected"); + return btd_error_already_connected(msg); case HEADSET_STATE_CONNECTED: default: break; |