r16865 - gnucash/branches/gda-dev2/src/backend/gda - 1) In gnc_gda_check_sqlite_file(), print a debug message based on what
Phil Longstaff
plongstaff at cvs.gnucash.org
Tue Jan 15 16:17:22 EST 2008
Author: plongstaff
Date: 2008-01-15 16:17:22 -0500 (Tue, 15 Jan 2008)
New Revision: 16865
Trac: http://svn.gnucash.org/trac/changeset/16865
Modified:
gnucash/branches/gda-dev2/src/backend/gda/gnc-backend-gda.c
gnucash/branches/gda-dev2/src/backend/gda/gnc-backend-util-gda.c
Log:
1) In gnc_gda_check_sqlite_file(), print a debug message based on what
path is taken to see why the decision is made.
2) Remove incorrect parameter check
Modified: gnucash/branches/gda-dev2/src/backend/gda/gnc-backend-gda.c
===================================================================
--- gnucash/branches/gda-dev2/src/backend/gda/gnc-backend-gda.c 2008-01-15 20:40:19 UTC (rev 16864)
+++ gnucash/branches/gda-dev2/src/backend/gda/gnc-backend-gda.c 2008-01-15 21:17:22 UTC (rev 16865)
@@ -28,6 +28,7 @@
#include "config.h"
+#include <errno.h>
#include <glib.h>
#include <glib/gi18n.h>
#include <glib/gstdio.h>
@@ -1085,6 +1086,7 @@
// OK if the file doesn't exist - new file
if( f == NULL ) {
+ PINFO( "Has '.db', doesn't exist (errno=%d) -> GDA", errno );
return TRUE;
}
@@ -1092,18 +1094,22 @@
fread( buf, sizeof(buf), 1, f );
fclose( f );
if( g_str_has_prefix( buf, "SQLite format" ) ) {
+ PINFO( "Has '.db', exists, has SQLite format string -> GDA" );
return TRUE;
}
+ PINFO( "Has '.db', exists, does not have SQLite format string -> not GDA" );
} else {
f = g_fopen( path, "r" );
// BAD if the file exists - not ours
if( f != NULL ) {
fclose( f );
+ PINFO( "No '.db', exists -> not GDA" );
return FALSE;
}
// OK - new file
+ PINFO( "No '.db', doesn't exist (errno=%d) -> GDA", errno );
return TRUE;
}
Modified: gnucash/branches/gda-dev2/src/backend/gda/gnc-backend-util-gda.c
===================================================================
--- gnucash/branches/gda-dev2/src/backend/gda/gnc-backend-util-gda.c 2008-01-15 20:40:19 UTC (rev 16864)
+++ gnucash/branches/gda-dev2/src/backend/gda/gnc-backend-util-gda.c 2008-01-15 21:17:22 UTC (rev 16865)
@@ -1394,7 +1394,6 @@
g_return_if_fail( be != NULL );
g_return_if_fail( pModel != NULL );
g_return_if_fail( row >= 0 );
- g_return_if_fail( obj_name != NULL );
g_return_if_fail( pObject != NULL );
g_return_if_fail( table_row != NULL );
More information about the gnucash-changes
mailing list