Fix ASP logic and parameter for seek service 77/87777/2 accepted/tizen/common/20160912.180837 accepted/tizen/ivi/20160912.053948 accepted/tizen/mobile/20160912.053858 accepted/tizen/tv/20160912.053913 accepted/tizen/wearable/20160912.053931 submit/tizen/20160912.021246
authorYu Jiung <jiung.yu@samsung.com>
Fri, 9 Sep 2016 10:23:32 +0000 (19:23 +0900)
committerYu Jiung <jiung.yu@samsung.com>
Fri, 9 Sep 2016 10:36:17 +0000 (19:36 +0900)
Change-Id: Iffb421a626d84c3e020bc2dba682fa83b58fe8ea
Signed-off-by: Yu jiung <jiung.yu@samsung.com>
oem/wifi-direct-oem.h
packaging/wifi-direct-manager.spec
plugin/wpasupplicant/ctrl_iface_dbus/wfd-plugin-wpasupplicant.c
src/wifi-direct-iface.c

index 3c12244..f503cd6 100644 (file)
@@ -498,6 +498,7 @@ typedef enum {
 typedef struct {
        wfd_oem_asp_service_type_e type;
        unsigned int adv_id;
+       long long unsigned asp_search_id;
        long long unsigned search_id;
        int auto_accept;
        int discovery_tech;
index 2938e49..6650400 100644 (file)
@@ -2,7 +2,7 @@
 
 Name:          wifi-direct-manager
 Summary:       Wi-Fi Direct manger
-Version:       1.2.203
+Version:       1.2.204
 Release:       1
 Group:      Network & Connectivity/Wireless
 License:    Apache-2.0
index 9883c53..a264392 100755 (executable)
@@ -6865,7 +6865,7 @@ static void __ws_add_seek(wfd_oem_asp_service_s *service)
        return;
 }
 
-static wfd_oem_asp_service_s * __ws_get_seek(long long unsigned search_id)
+static wfd_oem_asp_service_s * __ws_get_seek(long long unsigned asp_search_id)
 {
        __WDP_LOG_FUNC_ENTER__;
        wfd_oem_asp_service_s *seek = NULL;
@@ -6873,7 +6873,7 @@ static wfd_oem_asp_service_s * __ws_get_seek(long long unsigned search_id)
 
        for (list = seek_list; list != NULL; list = list->next) {
                seek = list->data;
-               if (seek && (seek->search_id == search_id)) {
+               if (seek && (seek->asp_search_id == asp_search_id)) {
                        WDP_LOGD("List found");
                        break;
                } else {
@@ -6893,7 +6893,7 @@ static void __ws_remove_seek(wfd_oem_asp_service_s *service)
        for (list = seek_list; list != NULL; list = list->next) {
 
                seek = list->data;
-               if (seek && (seek->search_id == service->search_id)) {
+               if (seek && (seek->asp_search_id == service->asp_search_id)) {
                        WDP_LOGD("List remove");
                        seek_list = g_list_remove(seek_list, seek);
                        g_free(seek->service_type);
@@ -7030,7 +7030,7 @@ int ws_cancel_seek_service(wfd_oem_asp_service_s *service)
                return -1;
        }
 
-       seek = __ws_get_seek(service->search_id);
+       seek = __ws_get_seek(service->asp_search_id);
        if (!seek) {
                WDP_LOGE("seek data is NULL");
                __WDP_LOG_FUNC_EXIT__;
index 0112d7c..d8f3f0b 100644 (file)
@@ -418,7 +418,6 @@ const gchar wfd_manager_introspection_xml[] = {
                        "<method name='SeekService'>"
                                "<arg type='a{sv}' name='parameters' direction='in'/>"
                                "<arg type='i' name='result' direction='out'/>"
-                               "<arg type='t' name='search_id' direction='out'/>"
                        "</method>"
                        "<method name='CancelSeekService'>"
                                "<arg type='t' name='search_id' direction='in'/>"
@@ -2332,6 +2331,8 @@ static void __wfd_manager_asp_iface_handler(const gchar *method_name,
                while (g_variant_iter_loop(iter, "{sv}", &key, &var)) {
                        if (!g_strcmp0(key, "discovery_tech"))
                                g_variant_get(var, "i", &(service.discovery_tech));
+                       else if (!g_strcmp0(key, "search_id"))
+                               g_variant_get(var, "t", &(service.asp_search_id));
                        else if (!g_strcmp0(key, "preferred_connection"))
                                g_variant_get(var, "y", &(service.preferred_connection));
                        else if (!g_strcmp0(key, "service_type"))
@@ -2367,7 +2368,7 @@ static void __wfd_manager_asp_iface_handler(const gchar *method_name,
                }
 
                ret = WIFI_DIRECT_ERROR_NONE;
-               return_parameters = g_variant_new("(it)", ret, service.search_id);
+               return_parameters = g_variant_new("(i)", ret);
                goto done;
 
        } else if (!g_strcmp0(method_name, "CancelSeekService")) {
@@ -2381,7 +2382,7 @@ static void __wfd_manager_asp_iface_handler(const gchar *method_name,
                        goto failed;
                }
 
-               g_variant_get(parameters, "(t)", &(service.search_id));
+               g_variant_get(parameters, "(t)", &(service.asp_search_id));
                ret = wfd_oem_cancel_seek_service(manager->oem_ops, &service);
                if (ret < 0) {
                        WDS_LOGE("Failed to cancel seek service");