diff options
author | Boris Faure <billiob@gmail.com> | 2015-02-15 18:03:40 +0100 |
---|---|---|
committer | Boris Faure <billiob@gmail.com> | 2015-02-21 11:40:10 +0100 |
commit | 6762578ace9a7a036636aeb28710c925ddf07dc1 (patch) | |
tree | 903e1c63a14634923d83d67961642ed692c8adab /src | |
parent | ca2d7846a99ca826aa7211e5c0fb7cbbb87e394f (diff) |
do only once ecore_con_(url_)init/shutdown()
Diffstat (limited to 'src')
-rw-r--r-- | src/bin/main.c | 6 | ||||
-rw-r--r-- | 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 d6cbb11..9bd6484 100644 --- a/src/bin/main.c +++ b/src/bin/main.c | |||
@@ -922,8 +922,14 @@ remote: | |||
922 | 922 | ||
923 | ty_dbus_init(); | 923 | ty_dbus_init(); |
924 | 924 | ||
925 | ecore_con_init(); | ||
926 | ecore_con_url_init(); | ||
927 | |||
925 | elm_run(); | 928 | elm_run(); |
926 | 929 | ||
930 | ecore_con_url_shutdown(); | ||
931 | ecore_con_shutdown(); | ||
932 | |||
927 | ty_dbus_shutdown(); | 933 | ty_dbus_shutdown(); |
928 | config = NULL; | 934 | config = NULL; |
929 | end: | 935 | end: |
diff --git a/src/bin/media.c b/src/bin/media.c index 651548b..c0bfc26 100644 --- a/src/bin/media.c +++ b/src/bin/media.c | |||
@@ -866,8 +866,6 @@ _smart_del(Evas_Object *obj) | |||
866 | ecore_event_handler_del(sd->url_prog_hand); | 866 | ecore_event_handler_del(sd->url_prog_hand); |
867 | ecore_event_handler_del(sd->url_compl_hand); | 867 | ecore_event_handler_del(sd->url_compl_hand); |
868 | ecore_con_url_free(sd->url); | 868 | ecore_con_url_free(sd->url); |
869 | ecore_con_url_shutdown(); | ||
870 | ecore_con_shutdown(); | ||
871 | } | 869 | } |
872 | sd->url = NULL; | 870 | sd->url = NULL; |
873 | sd->url_prog_hand = NULL; | 871 | sd->url_prog_hand = NULL; |
@@ -1055,8 +1053,6 @@ _url_compl_cb(void *data, int type EINA_UNUSED, void *event_info) | |||
1055 | ecore_event_handler_del(sd->url_prog_hand); | 1053 | ecore_event_handler_del(sd->url_prog_hand); |
1056 | ecore_event_handler_del(sd->url_compl_hand); | 1054 | ecore_event_handler_del(sd->url_compl_hand); |
1057 | ecore_con_url_free(sd->url); | 1055 | ecore_con_url_free(sd->url); |
1058 | ecore_con_url_shutdown(); | ||
1059 | ecore_con_shutdown(); | ||
1060 | sd->url = NULL; | 1056 | sd->url = NULL; |
1061 | sd->url_prog_hand = NULL; | 1057 | sd->url_prog_hand = NULL; |
1062 | sd->url_compl_hand = NULL; | 1058 | sd->url_compl_hand = NULL; |
@@ -1210,15 +1206,11 @@ media_add(Evas_Object *parent, const char *src, const Config *config, int mode, | |||
1210 | sd->tmpfd = mkstemps(buf, strlen(sd->ext)); | 1206 | sd->tmpfd = mkstemps(buf, strlen(sd->ext)); |
1211 | if (sd->tmpfd >= 0) | 1207 | if (sd->tmpfd >= 0) |
1212 | { | 1208 | { |
1213 | ecore_con_init(); | ||
1214 | ecore_con_url_init(); | ||
1215 | sd->url = ecore_con_url_new(tbuf); | 1209 | sd->url = ecore_con_url_new(tbuf); |
1216 | if (!sd->url) | 1210 | if (!sd->url) |
1217 | { | 1211 | { |
1218 | unlink(buf); | 1212 | unlink(buf); |
1219 | close(sd->tmpfd); | 1213 | close(sd->tmpfd); |
1220 | ecore_con_url_shutdown(); | ||
1221 | ecore_con_shutdown(); | ||
1222 | } | 1214 | } |
1223 | else | 1215 | else |
1224 | { | 1216 | { |
@@ -1227,8 +1219,6 @@ media_add(Evas_Object *parent, const char *src, const Config *config, int mode, | |||
1227 | { | 1219 | { |
1228 | unlink(buf); | 1220 | unlink(buf); |
1229 | close(sd->tmpfd); | 1221 | close(sd->tmpfd); |
1230 | ecore_con_url_shutdown(); | ||
1231 | ecore_con_shutdown(); | ||
1232 | sd->url = NULL; | 1222 | sd->url = NULL; |
1233 | } | 1223 | } |
1234 | else | 1224 | else |