propery call eina_init/ecore_init and eina_shutdown/ecore_shutdown() here to avoid...
authordiscomfitor <discomfitor@7cbeb6ba-43b4-40fd-8cce-4c39aea84d33>
Tue, 25 Jan 2011 20:22:50 +0000 (20:22 +0000)
committerdiscomfitor <discomfitor@7cbeb6ba-43b4-40fd-8cce-4c39aea84d33>
Tue, 25 Jan 2011 20:22:50 +0000 (20:22 +0000)
git-svn-id: svn+ssh://svn.enlightenment.org/var/svn/e/trunk/e_dbus@56301 7cbeb6ba-43b4-40fd-8cce-4c39aea84d33

src/bin/notify-send.c
src/lib/dbus/e_dbus.c

index 89be670..96c1dec 100644 (file)
@@ -80,6 +80,8 @@ main(int argc, char **argv)
   int print_id = 0;
   E_Notification *n;
 
+  eina_init();
+  ecore_init();
   e_notification_init();
   n = e_notification_new();
   e_notification_app_name_set(n, "e-notify-send");
@@ -170,6 +172,8 @@ main(int argc, char **argv)
 
   e_notification_unref(n);
   e_notification_shutdown();
+  ecore_shutdown();
+  eina_shutdown();
 
   return EXIT_SUCCESS;
 }
index 8cade04..c215f8f 100644 (file)
@@ -604,15 +604,23 @@ e_dbus_init(void)
   
   if (!eina_init())
     {
-      fprintf(stderr,"E-dbus: Enable to initialize the eina module");
+      fprintf(stderr,"E-dbus: Enable to initialize eina\n");
+      return --_edbus_init_count;
+    }
+
+  if (!ecore_init())
+    {
+      fprintf(stderr,"E-dbus: Enable to initialize ecore\n");
+      eina_shutdown();
       return --_edbus_init_count;
     }
 
   _e_dbus_log_dom = eina_log_domain_register("e_dbus", E_DBUS_COLOR_DEFAULT);
   if (_e_dbus_log_dom < 0)
     {
-      EINA_LOG_ERR("Enable to create a 'e_dbus' log domain");
+      EINA_LOG_ERR("Enable to create an 'e_dbus' log domain");
       eina_shutdown();
+      ecore_shutdown();
       return --_edbus_init_count;
     }
 
@@ -634,6 +642,7 @@ e_dbus_shutdown(void)
   e_dbus_object_shutdown();
   eina_log_domain_unregister(_e_dbus_log_dom);
   _e_dbus_log_dom = -1;
+  ecore_shutdown();
   eina_shutdown();
 
   return _edbus_init_count;