to fix incorrect error return when no connected peer exist
authorKim Gibyoung <lastkgb.kim@samsung.com>
Wed, 13 Mar 2013 01:45:59 +0000 (10:45 +0900)
committerKim Gibyoung <lastkgb.kim@samsung.com>
Wed, 13 Mar 2013 01:53:22 +0000 (10:53 +0900)
Change-Id: I426eb24bbd2230ea0f355c513f01491bf843fdac

debian/changelog
files/p2p_suppl.conf
oem/include/wifi-direct-oem.h
packaging/wifi-direct-manager.spec
src/wifi-direct-client-handler.c
src/wifi-direct-main.c

index f3f2e80..5192c02 100644 (file)
@@ -1,3 +1,11 @@
+wfi-direct-manager (0.6.10) precise; urgency=low
+
+  * to fix incorrect error return when no connected peer exist
+  * Git : framework/connectivity/wifi-direct-manager
+  * Tag : wifi-direct-manager_0.6.10
+
+ -- Gibyoung Kim <lastkgb.kim@samsung.com>  Wed, 13 Mar 2013 10:44:52 +0900
+
 wfi-direct-manager (0.6.9) precise; urgency=low
 
   * to fix PLM issue and prevent defect(private code sync)
index 34e1394..61d7003 100644 (file)
@@ -10,4 +10,4 @@ p2p_oper_channel=48
 device_name=TizenProxima
 device_type=10-0050F204-5
 config_methods=push_button
-driver_param='use_p2p_group_interface=1'
\ No newline at end of file
+driver_param=use_p2p_group_interface=1
\ No newline at end of file
index 430e51f..3acb7af 100755 (executable)
@@ -108,7 +108,7 @@ struct wfd_oem_operations {
        int (*wfd_oem_get_connected_peers_info)(wfd_connected_peer_info_s ** peer_list, int* peer_num);
        int (*wfd_oem_get_connected_peers_count)(int* peer_num);
        int (*wfd_oem_set_oem_loglevel)(int is_increase);
-       int (*wfd_oem_get_go_intent)(int* intent); 
+       int (*wfd_oem_get_go_intent)(int* intent);
        int (*wfd_oem_set_go_intent)(int intent);
        int (*wfd_oem_set_device_type)(wifi_direct_primary_device_type_e primary_cat, wifi_direct_secondary_device_type_e sub_cat);
        int (*wfd_oem_get_device_mac_address)(unsigned char* device_mac);
index 3ce6c90..aecf64d 100755 (executable)
@@ -1,6 +1,6 @@
 Name:       wifi-direct-manager
 Summary:    Wi-Fi Direct manger
-Version:    0.6.9
+Version:    0.6.10
 Release:    1
 Group:      TO_BE_FILLED
 License:    Apache License Version 2.0
index 4cb8012..e1247b8 100644 (file)
@@ -1251,8 +1251,13 @@ void wfd_server_process_client_request(wifi_direct_client_request_s * client_req
 
                peer_count = wfd_server->connected_peer_count;
                if (peer_count <= 0) {
-                       WDS_LOGE("Error?? There is no connected peers");
-                       resp.result = WIFI_DIRECT_ERROR_OPERATION_FAILED;
+                       if (state == WIFI_DIRECT_STATE_GROUP_OWNER) {
+                               resp.result = WIFI_DIRECT_ERROR_NONE;
+                               resp.param1 = 0;
+                       } else {
+                               resp.result = WIFI_DIRECT_ERROR_OPERATION_FAILED;
+                       }
+
                        if (wfd_server_send_response(client->sync_sockfd, &resp,
                                                                                        sizeof(wifi_direct_client_response_s)) < 0) {
                                wfd_server_reset_client(client->sync_sockfd);
index a635b11..4bf0a72 100644 (file)
@@ -150,8 +150,7 @@ char *wfd_server_print_cmd(wifi_direct_cmd_e cmd)
                return "WIFI_DIRECT_CMD_SET_AUTOCONNECTION_MODE";
        case WIFI_DIRECT_CMD_IS_AUTOCONNECTION_MODE:
                return "WIFI_DIRECT_CMD_IS_AUTOCONNECTION_MODE";
-       case WIFI_DIRECT_CMD_IS_DISCOVERABLE:   // 40
-
+       case WIFI_DIRECT_CMD_IS_DISCOVERABLE:
                return "WIFI_DIRECT_CMD_IS_DISCOVERABLE";
        case WIFI_DIRECT_CMD_GET_OWN_GROUP_CHANNEL:
                return "WIFI_DIRECT_CMD_GET_OWN_GROUP_CHANNEL";