Hallo zusammen,

angehängt ein Patch für aqhbci-tool deluser gegen aqbanking-3.8.0.
Dieser Patch fügt den Filter --uninitialized=[0/1] hinzu, damit man im Bulk die User löschen kann, bei denen die System ID (noch) nicht abgerufen wurde.

Das ist für uns bei www.actindo.de eine recht wichtige Sache, da wir mittlerweile eine 3.5MB settings.conf haben...

Wie immer:
* Bei Fragen einfach fragen.
* Patch-Lizenz = aqbanking-Lizenz
* Einarbeitung in aqbanking wäre super!


Schöne Grüße,

Patrick Prasse


--- aqbanking-3.8.0-orig/src/plugins/backends/aqhbci/tools/aqhbci-tool/deluser.c	2008-10-11 11:29:29.000000000 +0200
+++ aqbanking-3.8.0/src/plugins/backends/aqhbci/tools/aqhbci-tool/deluser.c	2008-10-17 19:42:27.000000000 +0200
@@ -39,6 +39,7 @@
   const char *userId;
   const char *customerId;
   const char *userName;
+  int uninitialized = -1;
   uint32_t delAll = 0;
   uint32_t delAccounts = 0;
   uint32_t pretend = 0;
@@ -95,6 +96,17 @@
     "Specify the customer id (Kundennummer)"     /* long description */
   },
   {
+    GWEN_ARGS_FLAGS_HAS_ARGUMENT, /* flags */
+    GWEN_ArgsType_Int,           /* type */
+    "uninitialized",                 /* name */
+    0,                            /* minnum */
+    1,                            /* maxnum */
+    NULL,                          /* short option */
+    "uninitialized",                   /* long option */
+    "Match uninitialized users (PARAM=0) or initialized users (PARAM=1)",    /* short description */
+    "Match uninitialized users (PARAM=0) or initialized users (PARAM=1)"     /* long description */
+  },
+  {
     0, /* flags */
     GWEN_ArgsType_Int,           /* type */
     "all",                 /* name */
@@ -181,10 +193,17 @@
   userId=GWEN_DB_GetCharValue(db, "userId", 0, 0);
   customerId=GWEN_DB_GetCharValue(db, "customerId", 0, 0);
   userName=GWEN_DB_GetCharValue(db, "userName", 0, 0);
+  uninitialized=GWEN_DB_GetIntValue(db, "uninitialized", 0, -1);
   delAll=GWEN_DB_GetIntValue(db, "all", 0, 0);
   delAccounts=GWEN_DB_GetIntValue(db, "withAccounts", 0, 0);
   pretend=GWEN_DB_GetIntValue(db, "pretend", 0, 0);
 
+  if( uninitialized != 0 && uninitialized != 1  && uninitialized != -1 )
+  {
+    fprintf( stderr, "Please specify either 0 or 1 for --uninitialized\n" );
+    return 1;
+  }
+
   matches = AB_User_List2_new();
 
   ul=AB_Banking_FindUsers(ab, AH_PROVIDER_NAME, "*", "*", "*", "*");
@@ -225,6 +244,12 @@
             match=0;
         }
 
+        if (match && uninitialized != -1) {
+          s=AH_User_GetSystemId(u);
+          if( (uninitialized == 1 && s != NULL) || (uninitialized == 0 && s == NULL) )
+            match = 0;
+        }
+
         if( match )
         {
           match_count++;
-------------------------------------------------------------------------
This SF.Net email is sponsored by the Moblin Your Move Developer's challenge
Build the coolest Linux based applications with Moblin SDK & win great prizes
Grand prize is a trip for two to an Open Source event anywhere in the world
http://moblin-contest.org/redirect.php?banner_id=100&url=/
_______________________________________________
Aqbanking-devel mailing list
Aqbanking-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/aqbanking-devel

Reply via email to