Hello,

I managed to track down my ecore config problem (I was missing the
config.db file).

The attached patch adds some extra error checking to keep the system
from segfaulting.

(I created the patch with cvs diff -u if that isn't right please let me
know the correct way)

Thanks
dan

Index: ecore_config.c
===================================================================
RCS file: /cvsroot/enlightenment/e17/libs/ecore/src/lib/ecore_config/ecore_config.c,v
retrieving revision 1.9
diff -u -r1.9 ecore_config.c
--- ecore_config.c	26 Jan 2004 15:27:11 -0000	1.9
+++ ecore_config.c	30 Jan 2004 02:30:36 -0000
@@ -594,14 +594,20 @@
   
   __app_name = strdup(name);
   __server_local = ecore_config_init_local(name);
+  if (!__server_local) 
+    return ECORE_CONFIG_ERR_FAIL;
+
   __server_global = ecore_config_init_global(ECORE_CONFIG_GLOBAL_ID);
-  
+  if (!__server_global)
+    return ECORE_CONFIG_ERR_FAIL;
+
   __bundle_local = ecore_config_bundle_new(__server_local, "config");
 
   if((p=getenv("HOME"))) {  /* debug-only ### FIXME */
     if ((buf=malloc(PATH_MAX*sizeof(char)))) {
       snprintf(buf,PATH_MAX,"%s/.e/config.db",p);
-      ecore_config_load_file(buf);
+      if (ecore_config_load_file(buf) != 0)
+        return ECORE_CONFIG_ERR_NOFILE;
     }
     free(buf);
   }

Reply via email to