[Gnucash-changes] r14205 - gnucash/trunk - load the qsf backend from the right place.

Derek Atkins warlord at cvs.gnucash.org
Fri May 26 11:41:40 EDT 2006


Author: warlord
Date: 2006-05-26 11:41:38 -0400 (Fri, 26 May 2006)
New Revision: 14205
Trac: http://svn.gnucash.org/trac/changeset/14205

Modified:
   gnucash/trunk/ChangeLog
   gnucash/trunk/src/engine/gnc-engine.c
Log:
load the qsf backend from the right place.


Modified: gnucash/trunk/ChangeLog
===================================================================
--- gnucash/trunk/ChangeLog	2006-05-26 12:57:30 UTC (rev 14204)
+++ gnucash/trunk/ChangeLog	2006-05-26 15:41:38 UTC (rev 14205)
@@ -1,3 +1,7 @@
+2006-05-26  Derek Atkins  <derek at ihtfp.com>
+
+	* src/engine/gnc-engine.c: load the qsf backend from the right place.
+
 2006-05-26   Christian Stimming <stimming at tuhh.de>
 
 	* src/import-export/hbci/druid-hbci-initial.c: Simplify calling

Modified: gnucash/trunk/src/engine/gnc-engine.c
===================================================================
--- gnucash/trunk/src/engine/gnc-engine.c	2006-05-26 12:57:30 UTC (rev 14204)
+++ gnucash/trunk/src/engine/gnc-engine.c	2006-05-26 15:41:38 UTC (rev 14205)
@@ -75,10 +75,15 @@
 void 
 gnc_engine_init(int argc, char ** argv)
 {
-  static gchar *names[] = {
-      QSF_BACKEND_LIB, GNC_LIB_NAME, "gnc-backend-postgres", 
-      NULL};
-  gchar **np;
+  static struct {
+    const gchar* dir;
+    const gchar* lib;
+  } libs[] = {
+    { QOF_LIB_DIR, QSF_BACKEND_LIB },
+    { GNC_LIBDIR, GNC_LIB_NAME },
+    /* shouldn't the PG gnc-module do this instead of US doing it? */
+    { GNC_LIBDIR, "gnc-backend-postgres" },
+    { NULL, NULL } }, *lib;
   gnc_engine_init_hook_t hook;
   GList * cur;
 
@@ -98,9 +103,11 @@
   /* Now register our core types */
   cashobjects_register();
 
-  for (np = names; *np; np++) {
-      if (qof_load_backend_library(GNC_LIBDIR, *np))
+  for (lib = libs; lib->dir && lib->lib ; lib++) {
+      if (qof_load_backend_library(lib->dir, lib->lib))
           engine_is_initialized = 1;
+      else
+          g_message("failed to load %s from %s", lib->lib, lib->dir);
   }
 
   /* call any engine hooks */



More information about the gnucash-changes mailing list