Hi,

I attached a patch which should make import via aqbanking work with 
AqBanking3/4. The patch is against trunk.


Regards
Martin

-- 
"Things are only impossible until they're not"

Martin Preuss - http://www2.aquamaniac.de/
AqBanking - http://www.aqbanking.de/
LibChipcard - http://www.libchipcard.de/
From 9059109244b61cc19d4c585faa96abad3ec4fbe8 Mon Sep 17 00:00:00 2001
From: Martin Preuss <[EMAIL PROTECTED]>
Date: Wed, 22 Oct 2008 12:17:01 +0200
Subject: [PATCH] Fixed a bug in AqBanking import code (don't use GWEN's buffered io here).

---
 src/import-export/aqbanking/gnc-file-aqb-import.c |   13 ++++++-------
 1 files changed, 6 insertions(+), 7 deletions(-)

diff --git a/src/import-export/aqbanking/gnc-file-aqb-import.c b/src/import-export/aqbanking/gnc-file-aqb-import.c
index 14b81ae..82fd233 100644
--- a/src/import-export/aqbanking/gnc-file-aqb-import.c
+++ b/src/import-export/aqbanking/gnc-file-aqb-import.c
@@ -68,7 +68,7 @@ gnc_file_aqbanking_import(const gchar *aqbanking_importername,
     GWEN_DB_NODE *db_profiles = NULL;
     GWEN_DB_NODE *db_profile;
     AB_IMEXPORTER_CONTEXT *context = NULL;
-    GWEN_IO_LAYER *io, *buffio;
+    GWEN_IO_LAYER *io;
     GncABImExContextImport *ieci = NULL;
     AB_JOB_LIST2 *job_list = NULL;
 
@@ -160,20 +160,19 @@ gnc_file_aqbanking_import(const gchar *aqbanking_importername,
     /* Wrap file in buffered gwen io */
     io = GWEN_Io_LayerFile_new(dtaus_fd, -1);
     dtaus_fd = -1;
-    buffio = GWEN_Io_LayerBuffered_new(io);
-    if (GWEN_Io_Manager_RegisterLayer(buffio)) {
-        g_warning("gnc_file_aqbanking_import: Failed to wrap file");
-        goto cleanup;
+    if (GWEN_Io_Manager_RegisterLayer(io)) {
+	g_warning("gnc_file_aqbanking_import: Failed to wrap file");
+	goto cleanup;
     }
 
     /* Run the import */
-    if (AB_ImExporter_Import(importer, context, buffio, db_profile, 0)) {
+    if (AB_ImExporter_Import(importer, context, io, db_profile, 0)) {
         g_warning("gnc_file_aqbanking_import: Error on import");
         goto cleanup;
     }
 
     /* Close the file */
-    GWEN_Io_Layer_free(buffio);
+    GWEN_Io_Layer_free(io);
 
     /* Import the results */
     ieci = gnc_ab_import_context(context, AWAIT_TRANSACTIONS,
-- 
1.5.4.3

_______________________________________________
gnucash-devel mailing list
gnucash-devel@gnucash.org
https://lists.gnucash.org/mailman/listinfo/gnucash-devel

Reply via email to