From: Niraj Kumar Goit Date: Thu, 17 Sep 2020 11:54:42 +0000 (+0530) Subject: Fix logic to set ip-address on softap interface. X-Git-Tag: accepted/tizen/6.0/unified/20201030.120420^0 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=refs%2Fheads%2Ftizen_6.0;p=platform%2Fcore%2Fconnectivity%2Fmobileap-agent.git Fix logic to set ip-address on softap interface. Change-Id: I5f585757a03b165a65c843d5826513528377dc27 Signed-off-by: Niraj Kumar Goit --- diff --git a/packaging/mobileap-agent.spec b/packaging/mobileap-agent.spec index a507c92..19b5ed7 100644 --- a/packaging/mobileap-agent.spec +++ b/packaging/mobileap-agent.spec @@ -1,6 +1,6 @@ Name: mobileap-agent Summary: Mobile AP daemon for setting tethering environments -Version: 1.0.139 +Version: 1.0.140 Release: 1 Group: System/Network License: Apache-2.0 diff --git a/src/mobileap_softap.c b/src/mobileap_softap.c index b412966..6224752 100755 --- a/src/mobileap_softap.c +++ b/src/mobileap_softap.c @@ -979,7 +979,7 @@ int _mh_core_enable_softap(const mobile_ap_type_e type, softap_settings_t *setti drv_interface = __get_drv_interface(); - DBG("source if_name: %s", if_name); + DBG("[softap] if_name: %s", if_name); switch (drv_interface) { #ifndef TIZEN_FEATURE_UNITTEST @@ -1073,12 +1073,10 @@ int _mh_core_enable_softap(const mobile_ap_type_e type, softap_settings_t *setti ret_status = _mh_core_set_ip_address(if_name, settings->ip_addr); else { - if (!wifi_band) - ret_status = _mh_core_set_ip_address(mobileap_get_wifi_interface(), - IP_ADDRESS_SOFTAP); + if (!wifi_band) + ret_status = _mh_core_set_ip_address(if_name, IP_ADDRESS_SOFTAP); else - ret_status = _mh_core_set_ip_address(mobileap_get_wifi_interface(), - IP_ADDRESS_SOFTAP_5G); + ret_status = _mh_core_set_ip_address(if_name, IP_ADDRESS_SOFTAP_5G); } if (ret_status != MOBILE_AP_ERROR_NONE) { ERR("_mh_core_set_ip_address is failed on %s\n", if_name); //LCOV_EXCL_LINE