From 0d39f2db3c792f79c13f798e1ff4a47538d54d03 Mon Sep 17 00:00:00 2001 From: "Gustavo F. Padovan" Date: Wed, 8 Dec 2010 18:26:01 -0200 Subject: Add btd_error_already_connected() --- audio/headset.c | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) (limited to 'audio/headset.c') 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; -- cgit v1.2.3