gnucash master: Multiple changes pushed
John Ralls
jralls at code.gnucash.org
Mon Mar 24 17:16:32 EDT 2014
Updated via https://github.com/Gnucash/gnucash/commit/eaae6e95 (commit)
via https://github.com/Gnucash/gnucash/commit/5dfd6109 (commit)
from https://github.com/Gnucash/gnucash/commit/2215e382 (commit)
commit eaae6e9546cd1ed34504c4a3817111c2b7ddea4b
Author: John Ralls <jralls at ceridwen.us>
Date: Mon Mar 24 14:15:38 2014 -0700
Bug 726891 - segmentation fault on session.end()
Fill in the gnucash and gnucash-resave versions in an initial load so
that the version checks pass. Have python's Session.__init__() always
load the session so it's ready to handle other actions.
diff --git a/src/backend/dbi/gnc-backend-dbi.c b/src/backend/dbi/gnc-backend-dbi.c
index 7114825..fb93e06 100644
--- a/src/backend/dbi/gnc-backend-dbi.c
+++ b/src/backend/dbi/gnc-backend-dbi.c
@@ -52,6 +52,8 @@
#include "gnc-backend-dbi.h"
+#include "gnc-prefs.h"
+
#ifdef S_SPLINT_S
#include "splint-defs.h"
#endif
@@ -1409,7 +1411,11 @@ gnc_dbi_load( QofBackend* qbe, /*@ dependent @*/ QofBook *book, QofBackendLoadTy
be->primary_book = book;
// Set up table version information
- gnc_sql_init_version_info( &be->sql_be );
+ gnc_sql_init_version_info (&be->sql_be);
+ gnc_sql_set_table_version (&be->sql_be, "Gnucash",
+ gnc_prefs_get_long_version());
+ gnc_sql_set_table_version (&be->sql_be, "Gnucash-Resave",
+ GNUCASH_RESAVE_VERSION);
// Call all object backends to create any required tables
qof_object_foreach_backend( GNC_SQL_BACKEND, create_tables_cb, be );
diff --git a/src/optional/python-bindings/gnucash_core.py b/src/optional/python-bindings/gnucash_core.py
index 23daeca..8244c1d 100644
--- a/src/optional/python-bindings/gnucash_core.py
+++ b/src/optional/python-bindings/gnucash_core.py
@@ -102,8 +102,7 @@ class Session(GnuCashCoreClass):
if book_uri is not None:
try:
self.begin(book_uri, ignore_lock, is_new, force_new)
- if not is_new:
- self.load()
+ self.load()
except GnuCashBackendException, backend_exception:
self.end()
self.destroy()
commit 5dfd61091e9a05423a068542a406a32c87c00dd6
Author: John Ralls <jralls at ceridwen.us>
Date: Mon Mar 24 14:09:53 2014 -0700
Fix dumb typo detected by a new Clang warning.
diff --git a/src/app-utils/gnc-gsettings.h b/src/app-utils/gnc-gsettings.h
index 9b9d59c..b66ae1d 100644
--- a/src/app-utils/gnc-gsettings.h
+++ b/src/app-utils/gnc-gsettings.h
@@ -47,7 +47,7 @@
*/
-#ifndef GNC_GSETIINGS_H
+#ifndef GNC_GSETTINGS_H
#define GNC_GSETTINGS_H
#include <gio/gio.h>
Summary of changes:
src/app-utils/gnc-gsettings.h | 2 +-
src/backend/dbi/gnc-backend-dbi.c | 8 +++++++-
src/optional/python-bindings/gnucash_core.py | 3 +--
3 files changed, 9 insertions(+), 4 deletions(-)
More information about the gnucash-changes
mailing list