static Elm_Genlist_Item_Class ip_entry_itc;
static Evas_Object *curr_unfocus_entry = NULL;
static int curr_unfocuc_cursor_pos = 0;
+static char *ip_info_text_list[ENTRY_TYPE_MAX];
static void _ip_info_set_current_unfocussed_entry(Evas_Object *entry)
{
}
g_free(entry_text);
+ entry_text = NULL;
}
static void _ip_info_entry_changed_cb(void *data,
ip_text = g_strsplit(entry_text, ".", 5);
if (entry_text == NULL || entry_text[0] == '\0') {
- if (entry_info->entry_txt)
+ if (entry_info->entry_txt) {
g_free(entry_info->entry_txt);
+ entry_info->entry_txt = NULL;
+ }
entry_info->entry_txt = g_strdup(DEFAULT_GUIDE_IP);
g_free(entry_text);
+ entry_text = NULL;
} else {
for (i=0; i<5; i++) {
if (ip_text[i] == NULL) {
}
g_free(entry_text);
g_strfreev(ip_text);
+ entry_text = NULL;
+ ip_text = NULL;
if (fixed == TRUE) {
entry_pos = elm_entry_cursor_pos_get(obj);
}
g_free(entry_text);
+ entry_text = NULL;
} else {
entry_text = elm_entry_markup_to_utf8(elm_entry_entry_get(obj));
if (entry_text == NULL || *entry_text == '\0') {
entry_info->entry_txt = NULL;
}
g_free(entry_text);
+ entry_text = NULL;
}
}
entry_info->entry_txt = g_strdup(entry_text);
}
g_free(entry_text);
+ entry_text = NULL;
}
elm_object_item_signal_emit(entry_info->item, "elm,state,eraser,hide", "");
return;
}
+ g_free(ip_info_text_list[entry_info->entry_id]);
+ ip_info_text_list[entry_info->entry_id] = NULL;
+
if (entry_info->entry_txt) {
+ ip_info_text_list[entry_info->entry_id] = g_strdup(entry_info->entry_txt);
g_free(entry_info->entry_txt);
+ entry_info->entry_txt = NULL;
}
g_free(entry_info);
+ entry_info = NULL;
}
#ifdef ACCESSIBLITY_FEATURE
ip_info_list_data->ip_toggle_item);
g_free(ip_addr);
+ ip_addr = NULL;
ip_info_list_data->ip_type = WIFI_IP_CONFIG_TYPE_DYNAMIC;
} else if (ip_type == WIFI_IP_CONFIG_TYPE_STATIC) {
if (ip_data == NULL) {
g_free(prev_ip_info);
g_free(ip_info_list_data);
+ prev_ip_info = NULL;
+ ip_info_list_data = NULL;
return NULL;
}
ip_entry_itc.func.state_get = NULL;
ip_entry_itc.func.del = _ip_info_entry_item_del;
+ elm_genlist_mode_set(genlist, ELM_LIST_COMPRESS);
+
/* Static/Dynamic switch button */
wifi_ip_config_type_e type = WIFI_IP_CONFIG_TYPE_NONE;
ret = wifi_ap_get_ip_config_type(ap, WIFI_ADDRESS_FAMILY_IPV4, &type);
"IDS_WIFI_BODY_IP_ADDRESS", ip_addr, NULL);
g_free(ip_addr);
+ ip_addr = NULL;
}
#if 0
ip_info_list_data->mac_addr_item = item;
g_free(mac_addr);
+ mac_addr = NULL;
#endif
ret = wifi_ap_get_proxy_type(ap, &proxy_type);
proxy_addr = g_strdup(temp);
g_free(temp);
+ temp = NULL;
}
prev_ip_info->proxy_data = g_strdup(proxy_data);
ip_info_list_data->proxy_port_item = edit_box_details->item;
g_free(proxy_data);
+ proxy_data = NULL;
__COMMON_FUNC_EXIT__;
return ip_data;
}
+static char* get_ip_info_text(entry_id_type_t e)
+{
+ if (ip_info_text_list[e] != NULL) {
+ return ip_info_text_list[e];
+ }
+ return NULL;
+}
+
+static void free_ip_info_text(entry_id_type_t e)
+{
+ g_free(ip_info_text_list[e]);
+ ip_info_text_list[e] = NULL;
+}
+
void ip_info_save_data(full_ip_info_t *ip_data)
{
__COMMON_FUNC_ENTER__;
}
if (WIFI_IP_CONFIG_TYPE_STATIC == ip_info_list_data->ip_type) {
- txt = common_utils_get_list_item_entry_txt(ip_info_list_data->ip_addr_item);
+ txt = get_ip_info_text(ENTRY_TYPE_IP_ADDR);
if (!txt)
txt = g_strdup(DEFAULT_GUIDE_IP);
if (g_strcmp0(prev_ip_info->ip_addr, txt) != 0) {
if (ret == WIFI_ERROR_NONE)
ip_data->is_info_changed = TRUE;
}
- g_free(txt);
+ free_ip_info_text(ENTRY_TYPE_IP_ADDR);
- txt = common_utils_get_list_item_entry_txt(ip_info_list_data->subnet_mask_item);
+ txt = get_ip_info_text(ENTRY_TYPE_SUBNET_MASK);
if (!txt)
txt = g_strdup(DEFAULT_GUIDE_IP);
if (g_strcmp0(prev_ip_info->subnet_mask, txt) != 0) {
if (ret == WIFI_ERROR_NONE)
ip_data->is_info_changed = TRUE;
}
- g_free(txt);
+ free_ip_info_text(ENTRY_TYPE_SUBNET_MASK);
- txt = common_utils_get_list_item_entry_txt(ip_info_list_data->gateway_addr_item);
+ txt = get_ip_info_text(ENTRY_TYPE_GATEWAY);
if (!txt)
txt = g_strdup(DEFAULT_GUIDE_IP);
if (g_strcmp0(prev_ip_info->gateway_addr, txt) != 0) {
if (ret == WIFI_ERROR_NONE)
ip_data->is_info_changed = TRUE;
}
- g_free(txt);
+ free_ip_info_text(ENTRY_TYPE_GATEWAY);
- txt = common_utils_get_list_item_entry_txt(ip_info_list_data->dns_1_item);
+ txt = get_ip_info_text(ENTRY_TYPE_DNS_1);
if (!txt)
txt = g_strdup(DEFAULT_GUIDE_IP);
if (g_strcmp0(prev_ip_info->dns_1, txt) != 0) {
if (ret == WIFI_ERROR_NONE)
ip_data->is_info_changed = TRUE;
}
- g_free(txt);
+ free_ip_info_text(ENTRY_TYPE_DNS_1);
- txt = common_utils_get_list_item_entry_txt(ip_info_list_data->dns_2_item);
+ txt = get_ip_info_text(ENTRY_TYPE_DNS_2);
if (!txt)
txt = g_strdup(DEFAULT_GUIDE_IP);
if (g_strcmp0(prev_ip_info->dns_2, txt) != 0) {
if (ret == WIFI_ERROR_NONE)
ip_data->is_info_changed = TRUE;
}
- g_free(txt);
+ free_ip_info_text(ENTRY_TYPE_DNS_2);
}
- proxy_addr = common_utils_get_list_item_entry_txt(ip_info_list_data->proxy_addr_item);
+ proxy_addr = get_ip_info_text(ENTRY_TYPE_PROXY_ADDR);
if (proxy_addr == NULL) {
DEBUG_LOG(UG_NAME_NORMAL, "Set proxy type - auto");
if (prev_ip_info->proxy_type != WIFI_PROXY_TYPE_AUTO) {
wifi_ap_set_proxy_type(ap, WIFI_PROXY_TYPE_AUTO);
}
} else {
- proxy_port = common_utils_get_list_item_entry_txt(ip_info_list_data->proxy_port_item);
+ proxy_port = txt = get_ip_info_text(ENTRY_TYPE_PROXY_PORT);
if (proxy_port) {
txt = g_strdup_printf("%s:%s", proxy_addr, proxy_port);
} else {
txt = g_strdup_printf("%s:%s", proxy_addr, DEFAULT_GUIDE_PROXY_PORT);
}
- DEBUG_LOG(UG_NAME_NORMAL, "Set proxy type - manual");
+ DEBUG_LOG(UG_NAME_NORMAL, "Set proxy type - manual : %s", txt);
if (prev_ip_info->proxy_type != WIFI_PROXY_TYPE_MANUAL) {
wifi_ap_set_proxy_type(ap, WIFI_PROXY_TYPE_MANUAL);
}
if (g_strcmp0(prev_ip_info->proxy_data, txt) != 0) {
wifi_ap_set_proxy_address(ap, WIFI_ADDRESS_FAMILY_IPV4, txt);
}
- g_free((gpointer)proxy_addr);
- g_free((gpointer)proxy_port);
- g_free((gpointer)txt);
+
+ free_ip_info_text(ENTRY_TYPE_PROXY_ADDR);
+ free_ip_info_text(ENTRY_TYPE_PROXY_PORT);
}
/* ip_info_print_values(ap); */
if (ip_info_list) {
g_free(ip_info_list);
+ ip_info_list = NULL;
}
__COMMON_FUNC_EXIT__;