r16942 - gnucash/branches/gda-dev2/src/business/business-core/gda - Fix segmentation fault when loading invoices. Problem is that getters

Phil Longstaff plongstaff at cvs.gnucash.org
Wed Feb 13 20:33:21 EST 2008


Author: plongstaff
Date: 2008-02-13 20:33:20 -0500 (Wed, 13 Feb 2008)
New Revision: 16942
Trac: http://svn.gnucash.org/trac/changeset/16942

Modified:
   gnucash/branches/gda-dev2/src/business/business-core/gda/gnc-entry-gda.c
   gnucash/branches/gda-dev2/src/business/business-core/gda/gnc-invoice-gda.c
Log:
Fix segmentation fault when loading invoices.  Problem is that getters
are registered with qof, but not setters, so the gda backend can't just
grab the qof-registered functions.



Modified: gnucash/branches/gda-dev2/src/business/business-core/gda/gnc-entry-gda.c
===================================================================
--- gnucash/branches/gda-dev2/src/business/business-core/gda/gnc-entry-gda.c	2008-02-11 21:21:30 UTC (rev 16941)
+++ gnucash/branches/gda-dev2/src/business/business-core/gda/gnc-entry-gda.c	2008-02-14 01:33:20 UTC (rev 16942)
@@ -65,7 +65,8 @@
 	{ "i_acct",        CT_ACCOUNTREF,  0,                   0,        NULL, ENTRY_IACCT },
 	{ "i_price",       CT_NUMERIC,     0,                   0,        NULL, ENTRY_IPRICE },
 	{ "i_discount",    CT_NUMERIC,     0,                   0,        NULL, NULL, (QofAccessFunc)gncEntryGetInvDiscount, (QofSetterFunc)gncEntrySetInvDiscount },
-	{ "invoice",       CT_INVOICEREF,  0,                   0,        NULL, ENTRY_INVOICE },
+	{ "invoice",       CT_INVOICEREF,  0,                   0,        NULL, NULL,
+			(QofAccessFunc)gncEntryGetInvoice, (QofSetterFunc)gncEntrySetInvoice },
 	{ "i_disc_type",   CT_STRING,      MAX_DISCTYPE_LEN,    0,        NULL, ENTRY_INV_DISC_TYPE },
 	{ "i_disc_how",    CT_STRING,      MAX_DISCHOW_LEN,     0,        NULL, ENTRY_INV_DISC_HOW },
 	{ "i_taxable",     CT_BOOLEAN,     0,                   0,        NULL, ENTRY_INV_TAXABLE },

Modified: gnucash/branches/gda-dev2/src/business/business-core/gda/gnc-invoice-gda.c
===================================================================
--- gnucash/branches/gda-dev2/src/business/business-core/gda/gnc-invoice-gda.c	2008-02-11 21:21:30 UTC (rev 16941)
+++ gnucash/branches/gda-dev2/src/business/business-core/gda/gnc-invoice-gda.c	2008-02-14 01:33:20 UTC (rev 16942)
@@ -68,7 +68,8 @@
 	{ "post_lot",     CT_LOTREF,       0,                  0,        NULL, NULL,
 			(QofAccessFunc)gncInvoiceGetPostedLot, (QofSetterFunc)gncInvoiceSetPostedLot },
 	{ "post_acc",     CT_ACCOUNTREF,   0,                  0,        NULL, INVOICE_ACC },
-	{ "billto",       CT_OWNERREF,     0,                  0,        NULL, INVOICE_BILLTO },
+	{ "billto",       CT_OWNERREF,     0,                  0,        NULL, NULL,
+			(QofAccessFunc)gncInvoiceGetBillTo, (QofSetterFunc)gncInvoiceSetBillTo },
 	{ "charge_amt",   CT_NUMERIC,      0,                  0,        NULL, NULL,
 			(QofAccessFunc)gncInvoiceGetToChargeAmount, (QofSetterFunc)gncInvoiceSetToChargeAmount },
 	{ NULL }



More information about the gnucash-changes mailing list