From 6762578ace9a7a036636aeb28710c925ddf07dc1 Mon Sep 17 00:00:00 2001 From: Boris Faure Date: Sun, 15 Feb 2015 18:03:40 +0100 Subject: [PATCH] do only once ecore_con_(url_)init/shutdown() --- src/bin/main.c | 6 ++++++ src/bin/media.c | 10 ---------- 2 files changed, 6 insertions(+), 10 deletions(-) diff --git a/src/bin/main.c b/src/bin/main.c index d6cbb11d..9bd64845 100644 --- a/src/bin/main.c +++ b/src/bin/main.c @@ -922,8 +922,14 @@ remote: ty_dbus_init(); + ecore_con_init(); + ecore_con_url_init(); + elm_run(); + ecore_con_url_shutdown(); + ecore_con_shutdown(); + ty_dbus_shutdown(); config = NULL; end: diff --git a/src/bin/media.c b/src/bin/media.c index 651548b2..c0bfc263 100644 --- a/src/bin/media.c +++ b/src/bin/media.c @@ -866,8 +866,6 @@ _smart_del(Evas_Object *obj) ecore_event_handler_del(sd->url_prog_hand); ecore_event_handler_del(sd->url_compl_hand); ecore_con_url_free(sd->url); - ecore_con_url_shutdown(); - ecore_con_shutdown(); } sd->url = NULL; sd->url_prog_hand = NULL; @@ -1055,8 +1053,6 @@ _url_compl_cb(void *data, int type EINA_UNUSED, void *event_info) ecore_event_handler_del(sd->url_prog_hand); ecore_event_handler_del(sd->url_compl_hand); ecore_con_url_free(sd->url); - ecore_con_url_shutdown(); - ecore_con_shutdown(); sd->url = NULL; sd->url_prog_hand = NULL; sd->url_compl_hand = NULL; @@ -1210,15 +1206,11 @@ media_add(Evas_Object *parent, const char *src, const Config *config, int mode, sd->tmpfd = mkstemps(buf, strlen(sd->ext)); if (sd->tmpfd >= 0) { - ecore_con_init(); - ecore_con_url_init(); sd->url = ecore_con_url_new(tbuf); if (!sd->url) { unlink(buf); close(sd->tmpfd); - ecore_con_url_shutdown(); - ecore_con_shutdown(); } else { @@ -1227,8 +1219,6 @@ media_add(Evas_Object *parent, const char *src, const Config *config, int mode, { unlink(buf); close(sd->tmpfd); - ecore_con_url_shutdown(); - ecore_con_shutdown(); sd->url = NULL; } else