r15829 - gnucash/trunk/src/engine - Balance ENTER/LEAVE calls on some functions.

David Hampton hampton at cvs.gnucash.org
Thu Apr 5 20:19:09 EDT 2007


Author: hampton
Date: 2007-04-05 20:19:08 -0400 (Thu, 05 Apr 2007)
New Revision: 15829
Trac: http://svn.gnucash.org/trac/changeset/15829

Modified:
   gnucash/trunk/src/engine/Scrub.c
   gnucash/trunk/src/engine/Transaction.c
   gnucash/trunk/src/engine/gnc-lot.c
Log:
Balance ENTER/LEAVE calls on some functions.


Modified: gnucash/trunk/src/engine/Scrub.c
===================================================================
--- gnucash/trunk/src/engine/Scrub.c	2007-04-05 19:49:52 UTC (rev 15828)
+++ gnucash/trunk/src/engine/Scrub.c	2007-04-06 00:19:08 UTC (rev 15829)
@@ -173,7 +173,10 @@
   ENTER ("(split=%p)", split);
 
   trans = xaccSplitGetParent (split);
-  if (!trans) return;
+  if (!trans) {
+    LEAVE("no trans");
+    return;
+  }
 
   account = xaccSplitGetAccount (split);
 
@@ -193,6 +196,7 @@
   if (!account) 
   {
     PINFO ("Free Floating Transaction!");
+    LEAVE ("no account");
     return;  
   }
 
@@ -232,6 +236,7 @@
 
   if (gnc_numeric_same (amount, value, scu, GNC_HOW_RND_ROUND))
   {
+    LEAVE("(split=%p) different values", split);
     return;
   }
 

Modified: gnucash/trunk/src/engine/Transaction.c
===================================================================
--- gnucash/trunk/src/engine/Transaction.c	2007-04-05 19:49:52 UTC (rev 15828)
+++ gnucash/trunk/src/engine/Transaction.c	2007-04-06 00:19:08 UTC (rev 15829)
@@ -990,8 +990,12 @@
 xaccTransCommitEdit (Transaction *trans)
 {
    if (!trans) return;
+   ENTER ("(trans=%p)", trans);
 
-   if (!qof_commit_edit (QOF_INSTANCE(trans))) return;
+   if (!qof_commit_edit (QOF_INSTANCE(trans))) {
+       LEAVE("editlevel non-zero");
+       return;
+   }
 
    /* We increment this for the duration of the call
     * so other functions don't result in a recursive

Modified: gnucash/trunk/src/engine/gnc-lot.c
===================================================================
--- gnucash/trunk/src/engine/gnc-lot.c	2007-04-05 19:49:52 UTC (rev 15828)
+++ gnucash/trunk/src/engine/gnc-lot.c	2007-04-06 00:19:08 UTC (rev 15829)
@@ -321,11 +321,13 @@
             "\tlot account=\'%s\', split account=\'%s\'\n",
             xaccAccountGetName(lot->account), xaccAccountGetName (acc));
       gnc_lot_commit_edit(lot);
+      LEAVE("different accounts");
       return;
    }
 
    if (lot == split->lot) {
         gnc_lot_commit_edit(lot);
+        LEAVE("already in lot");
 	return; /* handle not-uncommon no-op */
    }
    if (split->lot)
@@ -341,6 +343,7 @@
    gnc_lot_commit_edit(lot);
 
    qof_event_gen (&lot->inst.entity, QOF_EVENT_MODIFY, NULL);
+   LEAVE("added to lot");
 }
 
 void



More information about the gnucash-changes mailing list