src/mobileap_wfd.c
)
SET(PKGS "${BASE_PKGS} ${HEADED_PKGS} capi-network-wifi-direct")
-ENDIF("${CMAKE_BUILD_TYPE}" STREQUAL "HEADEDN")
+ENDIF("${CMAKE_BUILD_TYPE}" STREQUAL "HEADED")
## Redefine for TM1
IF("${CMAKE_BUILD_TYPE}" STREQUAL "TM1")
Tethering *obj = (Tethering *)data;
char *vconf_key = NULL;
softap_settings_t *new_settings = _get_softap_settings();
- softap_security_type_e sec_type;
if (!_mobileap_is_enabled(MOBILE_AP_STATE_WIFI | MOBILE_AP_STATE_WIFI_AP))
return;
if (g_strcmp0(vconf_key, new_settings->ssid) != 0) {
DBG("Device name is changed\n");
- if (!g_strcmp0(new_settings->security_type, SOFTAP_SECURITY_TYPE_WPA2_PSK_STR))
- sec_type = SOFTAP_SECURITY_TYPE_WPA2_PSK;
- else
- sec_type = SOFTAP_SECURITY_TYPE_OPEN;
-
+ g_strlcpy(new_settings->ssid, vconf_key, sizeof(new_settings->ssid));
if (_mobileap_is_enabled(MOBILE_AP_STATE_WIFI)) {
_reload_softap_settings(obj, new_settings);
}
mobile_ap_error_code_e ret = MOBILE_AP_ERROR_NONE;
gboolean ret_val = TRUE;
softap_settings_t settings = {0, };
- mobile_ap_address_type_e address_type = _mobileap_get_ipv6_state(MOBILE_AP_STATE_WIFI);
DBG("+\n");
g_assert(obj != NULL);
g_assert(obj != NULL);
g_assert(context != NULL);
- /* TODO : setup settings structure */
g_strlcpy(settings.ssid, ssid, sizeof(settings.ssid));
if (security_type == SOFTAP_SECURITY_TYPE_WPA2_PSK) {
g_strlcpy(settings.key, key, sizeof(settings.key));
g_strlcpy(settings.security_type, SOFTAP_SECURITY_TYPE_WPA2_PSK_STR,
sizeof(settings.security_type));
- } else if (settings.security_type == SOFTAP_SECURITY_TYPE_WPS) {
+ } else if (security_type == SOFTAP_SECURITY_TYPE_WPS) {
g_strlcpy(settings.key, "00000000", sizeof(settings.key));
g_strlcpy(settings.security_type, SOFTAP_SECURITY_TYPE_WPS_STR,
sizeof(settings.security_type));
settings.max_sta = MOBILE_AP_MAX_WIFI_STA;
settings.mac_filter = 0;
-
ret = _reload_softap_settings_for_softap(obj, &settings);
if (ret != MOBILE_AP_ERROR_NONE) {
ERR("_reload_softap_settings is failed\n");