Fix launching duplication bug 84/220284/2 holder
authorhyunho <hhstark.kang@samsung.com>
Tue, 17 Dec 2019 01:46:23 +0000 (10:46 +0900)
committerhyunho <hhstark.kang@samsung.com>
Tue, 17 Dec 2019 02:35:37 +0000 (11:35 +0900)
When __launch_instance is called twice,
duplicate timer will be added.

Change-Id: I1267d8aa2ffda59dabb3728b8bff712c49f65626
Signed-off-by: hyunho <hhstark.kang@samsung.com>
widget_viewer_evas/src/widget_viewer_evas.c

index df077a4..9b0e71c 100644 (file)
@@ -689,6 +689,12 @@ static void __launch_instance()
                return;
        }
 
+       if (s_info.launch_timer > 0) {
+               LOGW("already in launching process(%s)",
+                       s_info.launching_instance_id);
+               return;
+       }
+
        instance_id = s_info.launch_list->data;
        info = g_hash_table_lookup(s_info.widget_table, instance_id);
        if (info == NULL) {
@@ -838,8 +844,7 @@ static int __restart_terminated_widget(const char *widget_id)
                }
                __add_launch_list(instance_id);
        }
-       if (s_info.launch_timer == 0)
-               __launch_instance();
+       __launch_instance();
 
        return 0;
 }
@@ -852,6 +857,7 @@ static gboolean __launch_timeout_cb(gpointer user_data)
        LOGW("Timeout called !! %s", instance_id);
        __clear_launch_waiting(instance_id);
        __set_faulted(instance_id);
+       s_info.launch_timer = 0;
        __launch_instance();
        return G_SOURCE_REMOVE;
 }
@@ -1312,8 +1318,7 @@ static void __resize_cb(void *data, Evas *e, Evas_Object *layout, void *event_in
                 */
                __display_loading_text(info);
                __add_launch_list(info->instance_id);
-               if (s_info.launch_timer == 0)
-                       __launch_instance();
+               __launch_instance();
        } else {
                /**
                 * @note