From: Seonah Moon Date: Thu, 29 Sep 2022 07:23:05 +0000 (+0900) Subject: DA: Set softap eanble state after executing hostapd and adding route table. X-Git-Tag: accepted/tizen/unified/20221004.073932~3 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=refs%2Fchanges%2F57%2F282257%2F2;p=platform%2Fcore%2Fconnectivity%2Fmobileap-agent.git DA: Set softap eanble state after executing hostapd and adding route table. DA patch 20201229 since tizen 6.0 Some processes check softap enable state using softap_is_enabled API. But mobileap-agent set the state of vconfkey before softap is completely enabled. So, change the vconfkey setting timming. Change-Id: I78c96ed6370c82e3352d7adac52be5791e464a10 --- diff --git a/src/mobileap_wifi.c b/src/mobileap_wifi.c index fb2c239..a490a56 100755 --- a/src/mobileap_wifi.c +++ b/src/mobileap_wifi.c @@ -939,8 +939,10 @@ mobile_ap_error_code_e _enable_soft_ap(Softap *obj, softap_settings_t *settings) return MOBILE_AP_ERROR_ALREADY_ENABLED; } +#ifndef TIZEN_DA if (!_mobileap_set_state(MOBILE_AP_STATE_WIFI_AP)) return MOBILE_AP_ERROR_RESOURCE; +#endif /* !TIZEN_DA */ ret = __update_softap_settings(&obj_softap_settings, settings); if (ret != MOBILE_AP_ERROR_NONE) { @@ -1004,6 +1006,13 @@ mobile_ap_error_code_e _enable_soft_ap(Softap *obj, softap_settings_t *settings) _add_multicast_routing(src_if); #endif +#ifdef TIZEN_DA + if (!_mobileap_set_state(MOBILE_AP_STATE_WIFI_AP)) { + _disable_soft_ap(obj); + return MOBILE_AP_ERROR_RESOURCE; + } +#endif /* TIZEN_DA */ + DONE: _unblock_device_sleep(); return ret;