summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorFlavio Ceolin <flavio.ceolin@gmail.com>2015-02-24 01:22:35 -0300
committerFlavio Ceolin <flavio.ceolin@gmail.com>2015-02-24 01:22:35 -0300
commit86d1a3c3f56862c9b1d318ec45821a727a0a988d (patch)
tree10e863b5fe688ba011c8e39ebae49ca5e09fdb6a
parentce1e2978facb8da9197606a22429e510f7495cc4 (diff)
module: Fix first use (without config)
If there is no backend already set the module iterates over the available backends and uses the first found.
-rw-r--r--src/module/e_mod_main.c12
1 files changed, 5 insertions, 7 deletions
diff --git a/src/module/e_mod_main.c b/src/module/e_mod_main.c
index b530d28..586dccf 100644
--- a/src/module/e_mod_main.c
+++ b/src/module/e_mod_main.c
@@ -747,12 +747,12 @@ e_modapi_init(E_Module *m)
747 emix_event_callback_add(_events_cb, NULL); 747 emix_event_callback_add(_events_cb, NULL);
748 748
749 backend = emix_config_backend_get(); 749 backend = emix_config_backend_get();
750 if (!backend) 750 if (backend && emix_backend_set(backend) == EINA_TRUE)
751 goto err; 751 backend_loaded = EINA_TRUE;
752 752 else
753 if (emix_backend_set(backend) == EINA_FALSE)
754 { 753 {
755 WRN("Could not load %s, trying another one ...", backend); 754 if (backend)
755 WRN("Could not load %s, trying another one ...", backend);
756 EINA_LIST_FOREACH((Eina_List *)emix_backends_available(), l, 756 EINA_LIST_FOREACH((Eina_List *)emix_backends_available(), l,
757 backend) 757 backend)
758 { 758 {
@@ -765,8 +765,6 @@ e_modapi_init(E_Module *m)
765 } 765 }
766 } 766 }
767 } 767 }
768 else
769 backend_loaded = EINA_TRUE;
770 768
771 if (backend_loaded == EINA_FALSE) 769 if (backend_loaded == EINA_FALSE)
772 goto err; 770 goto err;