summaryrefslogtreecommitdiffstats
path: root/plugins
diff options
context:
space:
mode:
authorGustavo F. Padovan <padovan@profusion.mobi>2010-01-28 15:12:52 -0200
committerDenis Kenzior <denkenz@gmail.com>2010-01-28 11:16:05 -0600
commitbc7d0fb27fc9b2ddcfeff75ac1e5cd41d7ea57a7 (patch)
tree48d8a3f9dbd5829b4041d91b2d8ffc9f5f5fd44e /plugins
parent0bb749a51fefd38864cd424ee1ef8eeae60ce89d (diff)
downloadofono-bc7d0fb27fc9b2ddcfeff75ac1e5cd41d7ea57a7.tar.bz2
Handle the error path from service_level_connection
Diffstat (limited to 'plugins')
-rw-r--r--plugins/hfp.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/plugins/hfp.c b/plugins/hfp.c
index 5b2cdae9..0e2e3592 100644
--- a/plugins/hfp.c
+++ b/plugins/hfp.c
@@ -367,7 +367,7 @@ static int service_level_connection(struct ofono_modem *modem, int fd)
static DBusMessage *hfp_agent_new_connection(DBusConnection *conn,
DBusMessage *msg, void *data)
{
- int fd;
+ int fd, err;
struct ofono_modem *modem = data;
struct hfp_data *hfp_data = ofono_modem_get_data(modem);
@@ -375,7 +375,9 @@ static DBusMessage *hfp_agent_new_connection(DBusConnection *conn,
DBUS_TYPE_INVALID))
return __ofono_error_invalid_args(msg);
- service_level_connection(modem, fd);
+ err = service_level_connection(modem, fd);
+ if (err < 0 && err != -EINPROGRESS)
+ return __ofono_error_failed(msg);
hfp_data->slc_msg = msg;
dbus_message_ref(msg);