2002-09-29 Benoit Gr�goire <bock@step.polymtl.ca>

* src/import-export/Transaction-matcher.c: Fix	segfault when
	importing into a gnucash account which has no splits.

	* src/import-export/gnc-ofx-import.c: Code simplification for
	commodity autoselection.


git-svn-id: svn+ssh://svn.gnucash.org/repo/gnucash/trunk@7249 57a11ea4-9604-0410-9ed3-97b8803252fd
This commit is contained in:
Benoit Grégoire
2002-09-29 17:28:21 +00:00
parent 9a01a4d300
commit 1d2e270101
3 changed files with 14 additions and 3 deletions
+9
View File
@@ -1,4 +1,13 @@
2002-09-29 Benoit Grégoire <bock@step.polymtl.ca>
* src/import-export/Transaction-matcher.c: Fix segfault when
importing into a gnucash account which has no splits.
* src/import-export/gnc-ofx-import.c: Code simplification for
commodity autoselection.
2002-09-28 Derek Atkins <derek@ihtfp.com>
* fix g-wrap testing in configure to work with an existing config.cache
2002-09-26 David Hampton <hampton@employees.org>
+4 -2
View File
@@ -740,12 +740,14 @@ void gnc_import_add_trans(Transaction *trans)
this will be added as new by default */
static const int TRANSACTION_ADD_PROBABILITY_THRESHOLD = 2;
best_match=g_list_nth_data(transaction_info->match_list,0);
if(best_match->probability>=TRANSACTION_RECONCILE_PROBABILITY_THRESHOLD)
if(best_match != NULL &&
best_match->probability >= TRANSACTION_RECONCILE_PROBABILITY_THRESHOLD)
{
transaction_info->action=RECONCILE;
transaction_info->selected_match_info=best_match;
}
else if(best_match->probability<=TRANSACTION_ADD_PROBABILITY_THRESHOLD)
else if(best_match == NULL ||
best_match->probability<=TRANSACTION_ADD_PROBABILITY_THRESHOLD)
{
transaction_info->action=ADD;
}
+1 -1
View File
@@ -288,7 +288,7 @@ int ofx_proc_account(struct OfxAccountData data)
if(data.account_id_valid==true){
//printf("ofx_proc_account() Now calling gnc_import_select_account()\n");
printf("WRITEME: ofx_proc_account() Fill in the account type, default name, currency, etc. \n");
commodity_table = gnc_book_get_commodity_table(gnc_get_current_book());
commodity_table = gnc_get_current_commodities ();
if( data.currency_valid == true)
{
DEBUG("Currency from libofx: %s",data.currency);