Improve HBCI debugging messages.

2005-05-05  Christian Stimming  <stimming@tuhh.de>

	* src/import-export/hbci/gnc-hbci-utils.c: Improve debugging
	messages.


git-svn-id: svn+ssh://svn.gnucash.org/repo/gnucash/trunk@11021 57a11ea4-9604-0410-9ed3-97b8803252fd
This commit is contained in:
Christian Stimming 2005-05-05 11:41:28 +00:00
parent 53c28c9e9b
commit fff65d1434
3 changed files with 41 additions and 7 deletions

View File

@ -1,3 +1,8 @@
2005-05-05 Christian Stimming <stimming@tuhh.de>
* src/import-export/hbci/gnc-hbci-utils.c: Improve debugging
messages.
2005-04-21 Christian Stimming <stimming@tuhh.de>
* src/import-export/hbci/gnc-hbci-getbalance.c: Fix forgotten NULL

View File

@ -450,7 +450,8 @@ on_aqhbci_button (GtkButton *button,
HBCIInitialInfo *info = user_data;
GWEN_BUFFER *buf;
int res;
const char *backend_name = "aqhbci";
const GWEN_STRINGLIST *active_backends;
const char *backend_name;
/* This is the point where we look for and start an external
application shipped with aqhbci that contains the setup druid for
@ -466,6 +467,15 @@ on_aqhbci_button (GtkButton *button,
AB_BANKING *banking = info->api;
g_assert(info->druid);
active_backends = AB_Banking_GetActiveProviders (banking);
if (GWEN_StringList_Count(active_backends) <= 1)
backend_name = "aqhbci";
else {
/* FIXME: Present a selection dialog to select a particular
backend */
backend_name = "aqhbci";
}
buf = GWEN_Buffer_new(NULL, 300, 0, 0);
AB_Banking_FindWizard(banking, backend_name, NULL, buf);
wizard_exists = (strlen(GWEN_Buffer_GetStart(buf)) > 0);

View File

@ -28,6 +28,7 @@
#include <iconv.h>
#include <langinfo.h>
#include <gwenhywfar/directory.h>
#include <gwenhywfar/logger.h>
#include "gnc-ui.h"
#include "gnc-hbci-kvp.h"
@ -189,6 +190,7 @@ gnc_hbci_debug_outboxjob (AB_JOB *job, gboolean verbose)
/* list_int *list; */
/* const char *msg; */
int cause = 0;
AB_JOB_STATUS jobstatus;
g_assert (job);
/* if (AB_JOB_status (job) != HBCI_JOB_STATUS_DONE) */
@ -197,12 +199,23 @@ gnc_hbci_debug_outboxjob (AB_JOB *job, gboolean verbose)
/* return; */
if (verbose) {
printf("OutboxJob status: %s", AB_Job_Status2Char(AB_Job_GetStatus(job)));
printf("gnc_hbci_debug_outboxjob: Job status: %s", AB_Job_Status2Char(AB_Job_GetStatus(job)));
printf(", result: %s", AB_Job_GetResultText(job));
printf("\n");
}
jobstatus = AB_Job_GetStatus (job);
if (jobstatus == AB_Job_StatusError) {
if (!verbose)
printf("gnc_hbci_debug_outboxjob: Job %s had an error: %s\n",
AB_Job_Type2Char(AB_Job_GetType(job)),
AB_Job_GetResultText(job));
cause = 9000;
} else {
cause = 0;
}
#if 0
list = AB_JOB_resultCodes (job);
if (list_int_size (list) > 0) {
@ -420,17 +433,23 @@ gnc_AB_BANKING_execute (GtkWidget *parent, AB_BANKING *api,
{
int err;
int resultcode;
int be_verbose = FALSE;
if (inter)
GNCInteractor_show (inter);
if (gnc_lookup_boolean_option("_+Advanced",
"HBCI Verbose Debug Messages", FALSE)) {
/* GWEN_Logger_SetLevel(0, GWEN_LoggerLevelDebug); */
/* HBCI_Hbci_setDebugLevel (4); */
GWEN_Logger_SetLevel(GWEN_LOGDOMAIN, GWEN_LoggerLevelNotice);
GWEN_Logger_SetLevel(AQBANKING_LOGDOMAIN, GWEN_LoggerLevelInfo);
GWEN_Logger_SetLevel("aqhbci", GWEN_LoggerLevelInfo);
be_verbose = TRUE;
}
else {
GWEN_Logger_SetLevel(GWEN_LOGDOMAIN, GWEN_LoggerLevelError);
GWEN_Logger_SetLevel(AQBANKING_LOGDOMAIN, GWEN_LoggerLevelError);
GWEN_Logger_SetLevel("aqhbci", GWEN_LoggerLevelError);
}
/* else */
/* HBCI_Hbci_setDebugLevel (0); */
do {
if (inter) {
@ -450,7 +469,7 @@ gnc_AB_BANKING_execute (GtkWidget *parent, AB_BANKING *api,
} while (gnc_hbci_Error_retry (parent, err, inter));
resultcode = gnc_hbci_debug_outboxjob (job, FALSE);
resultcode = gnc_hbci_debug_outboxjob (job, be_verbose);
if (!hbci_Error_isOk(err)) {
/* char *errstr = */
/* g_strdup_printf("gnc_AB_BANKING_execute: Error at executeQueue: %s", */