static void _selected(void *data, int id);
static char *_get_connected_ap(void *data, int id);
static void _selected_menu(void *data, int id);
+static void _grid_find_retry_ap(Elm_Object_Item *it, void *data);
void network_wireless_set_update_callbacks(void *data);
void network_wired_set_update_callbacks(void *data);
}
static void _wireless_retry_cb(void *data, Evas_Object *obj, void *ei)
{
- struct _priv *priv;;
+ struct _priv *priv;
priv = data;
struct wifi_manager_ap_info *ap_info;
char *essid;
if (!priv)
return;
+ viewmgr_update_view(VIEW_WIRELESS_LIST, GRID_FOREACH,
+ _grid_find_retry_ap);
+ free(priv->connecting_essid);
ap_info = elm_object_item_data_get(priv->connecting_wireless_item);
essid = ap_info->essid;
_destroy_wireless_status_popup();
if (it != priv->focused_wireless_item)
elm_object_item_signal_emit(it, SIG_LIST_ITEM_UNFOCUS, SRC_ELM);
}
+static bool _compare_ap_name(const char *ap_name, const char *ap_name_part)
+{
+ int ap_name_len = strlen(ap_name);
+ int ap_name_part_len = strlen(ap_name_part);
+
+ if (strncmp(ap_name, ap_name_part,
+ ap_name_len > ap_name_part_len ? ap_name_len : ap_name_part_len) == 0)
+ return true;
+ else
+ return false;
+}
+
+
+static void _grid_find_retry_ap(Elm_Object_Item *it, void *data)
+{
+ struct wifi_manager_ap_info *ap_info = NULL;
+ struct _priv *priv = data;
+ if (NULL == priv) {
+ _ERR("User data not found");
+ return;
+ }
+
+ ap_info = elm_object_item_data_get(it);
+
+ if (_compare_ap_name(priv->connecting_essid, ap_info->essid)) {
+ priv->connecting_wireless_item = it;
+ priv->selected_wireless_item = it;
+ }
+}
static void _grid_remove_connecting_state(Elm_Object_Item *it, void *data)
{
return;
}
+ priv->connecting_essid = strdup(ap_info->essid);
if (ap_info->connection_state == WIFI_MANAGER_CONNECTION_STATE_CONNECTED) {
_ERR("Already connected AP.");
return;