DA: Set softap eanble state after executing hostapd and adding route table. 57/282257/2
authorSeonah Moon <seonah1.moon@samsung.com>
Thu, 29 Sep 2022 07:23:05 +0000 (16:23 +0900)
committerseonah moon <seonah1.moon@samsung.com>
Thu, 29 Sep 2022 07:57:20 +0000 (07:57 +0000)
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

src/mobileap_wifi.c

index fb2c239..a490a56 100755 (executable)
@@ -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;