cleanup some sql mess

git-svn-id: svn+ssh://svn.gnucash.org/repo/gnucash/trunk@2379 57a11ea4-9604-0410-9ed3-97b8803252fd
This commit is contained in:
Linas Vepstas
2000-05-25 16:37:28 +00:00
parent ea9af6f2ee
commit 62b9e047b3
2 changed files with 12 additions and 8 deletions
+4 -1
View File
@@ -194,10 +194,11 @@ xaccSessionBeginSQL (Session *sess, const char * dbname)
if (!sess) return NULL;
// #define SQLHACK
#ifdef SQLHACK
{
/* for testing the sql, just a hack, remove later ... */
Backend * pgendNew (void);
extern Backend * pgendNew (void);
be = pgendNew ();
}
#endif
@@ -210,6 +211,8 @@ xaccSessionBeginSQL (Session *sess, const char * dbname)
// comment out until testing done, else clobber file ...
// sess->topgroup = grp;
xaccGroupSetBackend (sess->topgroup, be);
return (sess->topgroup);
}
/* ============================================================== */
+8 -7
View File
@@ -988,7 +988,7 @@ xaccTransBeginEdit (Transaction *trans, int defer)
void
xaccTransCommitEdit (Transaction *trans)
{
int i, rc=0;
int i;
Split *split;
Account *acc;
Backend *be;
@@ -1056,15 +1056,16 @@ xaccTransCommitEdit (Transaction *trans)
/* See if there's a backend. If there is, invoke it. */
be = xaccTransactionGetBackend (trans);
rc = 0;
if (be && be->trans_commit_edit) {
int rc = 0;
rc = (be->trans_commit_edit) (be, trans, trans->orig);
}
if (rc) {
/* if the backend puked, then we must roll-back
* at this point, and let the user know that we failed.
*/
if (rc) {
/* if the backend puked, then we must roll-back
* at this point, and let the user know that we failed.
*/
/* hack alert -- finish this */
}
}
/* ------------------------------------------------- */