Description: Fix shadowing local declaration of and bad parameters for function AH_Provider_SendDtazv
 aqbanking-cli used a local declaration of function AH_Provider_SendDtazv that
 is used at compile time. It shadows the real one from libaqhbci that is used at
 link time. This would not matter if the types of both functions match, but they
 do not match.
 .
 I fixed this by dumping the local declaration from aqbanking-cli. Instead I
 included the ones from libaqhbci that are also used at linktime. The function
 AH_Provider_SendDtazv from libaqhbci has an additional parameter
 'withProgress' that was added in upstream SVN revision 1860. Prior to this
 change the function used a hard-coded 1 instead of the new parameter. So I
 figured that 1 is the correct value to restore the intended behavior.
Author: Micha Lenk <micha@debian.org>
Origin: upstream, SVN rev. 2591 and 2592
Bug-Debian: http://bugs.debian.org/750046
Reviewed-By: Micha Lenk <micha@debian.org
Last-Update: 2014-06-15

--- libaqbanking-5.4.3beta.orig/src/tools/aqbanking-cli/Makefile.am
+++ libaqbanking-5.4.3beta/src/tools/aqbanking-cli/Makefile.am
@@ -1,6 +1,8 @@
 #EXTRA_DIST=
 
-INCLUDES = -I$(aqbanking_symlinkdir) $(gwenhywfar_includes) $(aqfinance_includes)
+INCLUDES = -I$(aqbanking_symlinkdir) $(gwenhywfar_includes) $(aqfinance_includes) \
+  -I$(top_srcdir)/src/plugins/backends/aqhbci/plugin/banking \
+  -I$(top_srcdir)/src/plugins/backends/aqhbci/plugin/msglayer
 
 AM_CFLAGS=@visibility_cflags@
 
--- libaqbanking-5.4.3beta.orig/src/tools/aqbanking-cli/senddtazv.c
+++ libaqbanking-5.4.3beta/src/tools/aqbanking-cli/senddtazv.c
@@ -16,6 +16,9 @@
 
 
 #include "globals.h"
+/* The code below uses the private symbol AH_Provider_SendDtazv from libaqhbci */
+#include "hbci_l.h"
+#include "provider_l.h"
 
 #include <gwenhywfar/text.h>
 #include <gwenhywfar/fslock.h>
@@ -34,20 +37,6 @@
 #endif
 
 
-/* this is a more or less secret job which is not declared in AqHBCI, so
- * we must do it here. The AQHBCI_API makes this file import that symbol
- * from the libaqhbci library.
- */
-AQHBCI_API
-int AH_Provider_SendDtazv(AB_PROVIDER *pro,
-			  AB_ACCOUNT *a,
-			  AB_IMEXPORTER_CONTEXT *ctx,
-			  const uint8_t *dataPtr,
-			  uint32_t dataLen,
-			  int nounmount,
-			  uint32_t guiid);
-
-
 static int _incrementUniqueId(AB_ACCOUNT *a, const char *path) {
   GWEN_BUFFER *pbuf;
   const char *s;
@@ -371,7 +360,7 @@ int sendDtazv(AB_BANKING *ab,
     rv=AH_Provider_SendDtazv(pro, a, ctx,
 			     (const uint8_t*)GWEN_Buffer_GetStart(dtazv),
 			     GWEN_Buffer_GetUsedBytes(dtazv),
-			     1, 0);
+			     1, 1, 0);
     /* write ctx file */
     if (ctxFile) {
       GWEN_DB_NODE *dbCtx;
