return SOFTAP_ERROR_NONE;
}
-static softap_error_e __set_channel(int channel)
-{
- if (vconf_set_int(VCONFKEY_SOFTAP_CHANNEL, channel) < 0) {
- ERR("vconf_set_int is failed\n");
- return SOFTAP_ERROR_OPERATION_FAILED;
- }
-
- return SOFTAP_ERROR_NONE;
-}
-
static softap_error_e __get_channel(int *channel)
{
if (channel == NULL) {
__softap_h *sa = NULL;
GError *error = NULL;
char ssid[SOFTAP_SSID_MAX_LEN + 1] = {0, };
- int channel;
+ int channel = 1;
sa = (__softap_h *) malloc(sizeof(__softap_h));
return SOFTAP_ERROR_OPERATION_FAILED;
}
- if (__get_channel(&channel) != SOFTAP_ERROR_NONE) {
+ if (__get_channel(&channel) != SOFTAP_ERROR_NONE)
ERR("Fail to get saved channel!!");
- if (__set_channel(1) != SOFTAP_ERROR_NONE) {
- ERR("Fail to set channel");
- g_free(sa->ssid);
- free(sa);
- return SOFTAP_ERROR_OPERATION_FAILED;
- }
- channel = 1;
- }
sa->channel = channel;
sa->dhcp_enabled = false;
ret = __set_visibility(visible);
if (ret == SOFTAP_ERROR_NONE) {
+ sa->visibility = visible;
__send_dbus_signal(sa->client_bus,
SIGNAL_NAME_SSID_VISIBILITY_CHANGED,
visible ? SIGNAL_MSG_SSID_VISIBLE :
__softap_h *sa = (__softap_h *) softap;
sa->channel = channel;
- return __set_channel(channel);
+ return SOFTAP_ERROR_NONE;
}