diff options
author | Denis Kenzior <denkenz@gmail.com> | 2010-02-12 11:58:49 -0600 |
---|---|---|
committer | Denis Kenzior <denkenz@gmail.com> | 2010-02-12 12:01:04 -0600 |
commit | 668dc8e42b553d73765f583fba9a0c9fcf731127 (patch) | |
tree | dbfba260e2b807b444a4c53b35e935cc87c7db89 /plugins | |
parent | 1155a0c1a7705b2c86f1ae357afc071b193f2af9 (diff) | |
download | ofono-668dc8e42b553d73765f583fba9a0c9fcf731127.tar.bz2 |
Style: No need for this to be a function
Diffstat (limited to 'plugins')
-rw-r--r-- | plugins/hfp.c | 18 |
1 files changed, 9 insertions, 9 deletions
diff --git a/plugins/hfp.c b/plugins/hfp.c index 49b5537e..f66b6a0b 100644 --- a/plugins/hfp.c +++ b/plugins/hfp.c @@ -848,22 +848,22 @@ done: dbus_message_unref(reply); } -static int hfp_disconnect_ofono_handsfree(struct ofono_modem *modem) +static int hfp_disable(struct ofono_modem *modem) { struct hfp_data *data = ofono_modem_get_data(modem); + int status; - return send_method_call_with_reply(BLUEZ_SERVICE, data->handsfree_path, - BLUEZ_GATEWAY_INTERFACE, "Disconnect", - hfp_power_down, modem, -1, DBUS_TYPE_INVALID); -} - -static int hfp_disable(struct ofono_modem *modem) -{ DBG("%p", modem); clear_data(modem); - hfp_disconnect_ofono_handsfree(modem); + status = send_method_call_with_reply(BLUEZ_SERVICE, + data->handsfree_path, + BLUEZ_GATEWAY_INTERFACE, "Disconnect", + hfp_power_down, modem, -1, DBUS_TYPE_INVALID); + + if (status < 0) + return -EINVAL; return -EINPROGRESS; } |