diff options
author | Frédéric Danis <frederic.danis@linux.intel.com> | 2011-08-08 16:34:41 +0200 |
---|---|---|
committer | Denis Kenzior <denkenz@gmail.com> | 2011-08-08 10:16:21 -0500 |
commit | 02db6119f26f8fc6b932664b4114318bb82049b8 (patch) | |
tree | 29911ae79c65a9912d6915b174aaaffb096bec3c | |
parent | 6b5761f5f0f95290d7a923d70a7b5e5fc5cf3f03 (diff) | |
download | ofono-02db6119f26f8fc6b932664b4114318bb82049b8.tar.bz2 |
hfp_hf: retrieve AG version
-rw-r--r-- | plugins/hfp_hf.c | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/plugins/hfp_hf.c b/plugins/hfp_hf.c index 9fa420ae..6516e75d 100644 --- a/plugins/hfp_hf.c +++ b/plugins/hfp_hf.c @@ -161,11 +161,14 @@ static DBusMessage *hfp_agent_new_connection(DBusConnection *conn, int fd, err; struct ofono_modem *modem = data; struct hfp_data *hfp_data = ofono_modem_get_data(modem); + guint16 version; if (!dbus_message_get_args(msg, NULL, DBUS_TYPE_UNIX_FD, &fd, - DBUS_TYPE_INVALID)) + DBUS_TYPE_UINT16, &version, DBUS_TYPE_INVALID)) return __ofono_error_invalid_args(msg); + hfp_slc_info_init(&hfp_data->info, version); + err = service_level_connection(modem, fd); if (err < 0 && err != -EINPROGRESS) return __ofono_error_failed(msg); @@ -192,7 +195,7 @@ static DBusMessage *hfp_agent_release(DBusConnection *conn, } static GDBusMethodTable agent_methods[] = { - { "NewConnection", "h", "", hfp_agent_new_connection, + { "NewConnection", "hq", "", hfp_agent_new_connection, G_DBUS_METHOD_FLAG_ASYNC }, { "Release", "", "", hfp_agent_release }, { NULL, NULL, NULL, NULL } @@ -223,8 +226,6 @@ static int hfp_hf_probe(const char *device, const char *dev_addr, if (data == NULL) goto free; - hfp_slc_info_init(&data->info, HFP_VERSION_1_5); - data->handsfree_path = g_strdup(device); if (data->handsfree_path == NULL) goto free; |