Fixed DNS address set issue 72/131572/1 accepted/tizen/unified/20170602.154217 submit/tizen/20170601.042236
authorAbhishek Sansanwal <abhishek.s94@samsung.com>
Tue, 30 May 2017 05:17:46 +0000 (10:47 +0530)
committerAbhishek Sansanwal <abhishek.s94@samsung.com>
Tue, 30 May 2017 05:24:23 +0000 (10:54 +0530)
Description: DNS was not set because dns config type was not
changed to static before setting dns address and calling
wifi_manager_update_ap()

Signed-off-by: Abhishek Sansanwal <abhishek.s94@samsung.com>
Change-Id: I72ba48d7ef803ed2b78b3cd526e3250dfcd8a63e

sources/libraries/Common/common_ip_info.c
sources/libraries/Common/include/common_ip_info.h

index 0f2b58c..f4db815 100755 (executable)
@@ -1302,12 +1302,20 @@ void ip_info_save_data(full_ip_info_t *ip_data)
                                        WIFI_MANAGER_ADDRESS_FAMILY_IPV4, DEFAULT_GUIDE_IP);
                        if (ret == WIFI_MANAGER_ERROR_NONE)
                                ip_data->is_info_changed = TRUE;
+                       ip_info_list_data->dns_type = WIFI_MANAGER_DNS_CONFIG_TYPE_DYNAMIC;
+
+               } else if (WIFI_MANAGER_IP_CONFIG_TYPE_STATIC == ip_info_list_data->ip_type) {
+                       ip_info_list_data->dns_type = WIFI_MANAGER_DNS_CONFIG_TYPE_STATIC;
                }
 
                ret = wifi_manager_ap_set_ip_config_type(ap, WIFI_MANAGER_ADDRESS_FAMILY_IPV4,
                                ip_info_list_data->ip_type);
                retm_if(WIFI_MANAGER_ERROR_NONE != ret);
 
+               ret = wifi_manager_ap_set_dns_config_type(ap, WIFI_MANAGER_ADDRESS_FAMILY_IPV4,
+                               ip_info_list_data->dns_type);
+               retm_if(WIFI_MANAGER_ERROR_NONE != ret);
+
                ip_data->is_info_changed = TRUE;
        }
 
index c339990..20f91fd 100755 (executable)
@@ -53,6 +53,7 @@ typedef struct ip_info_list {
 
        wifi_manager_ap_h ap;
        wifi_manager_ip_config_type_e ip_type;
+       wifi_manager_dns_config_type_e dns_type;
 
 } ip_info_list_t;