gnunet-svn
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[GNUnet-SVN] [libebics] branch master updated (b1db597 -> 4f4ce30)


From: gnunet
Subject: [GNUnet-SVN] [libebics] branch master updated (b1db597 -> 4f4ce30)
Date: Fri, 26 Oct 2018 12:23:03 +0200

This is an automated email from the git hooks/post-receive script.

marcello pushed a change to branch master
in repository libebics.

    from b1db597  Includes schema refactoring.
     new c70e99f  fix Revision and Version for CAMT.053 type.
     new 4f4ce30  fix date type in tests.

The 2 revisions listed above as "new" are entirely new to this
repository and will be described in separate emails.  The revisions
listed as "add" were already present in the repository and have only
been added to this reference.


Summary of changes:
 src/libebics.c      |  4 ++++
 src/sandbox_tests.c | 18 +++++++++---------
 src/xmlmessages.c   | 34 +++++++++++++++++++++++++---------
 src/xmlproto.c      | 15 ++++++++-------
 4 files changed, 46 insertions(+), 25 deletions(-)

diff --git a/src/libebics.c b/src/libebics.c
index a915766..27a5a0f 100644
--- a/src/libebics.c
+++ b/src/libebics.c
@@ -1027,6 +1027,10 @@ EBICS_generate_message_camt053
     return NULL;
   }
 
+  LOG (EBICS_LOGLEVEL_DEBUG,
+       "camt053, picked base document %s\n",
+       instance->name);
+
   struct EBICS_MSG_Spec spec[] = {
     EBICS_MSG_op_subcommand (EBICS_build_header_ebicsRequest,
                              header_args),
diff --git a/src/sandbox_tests.c b/src/sandbox_tests.c
index 4f6685f..1eb11d0 100644
--- a/src/sandbox_tests.c
+++ b/src/sandbox_tests.c
@@ -84,14 +84,14 @@ struct EBICS_ARGS_build_content_hia hia_args = {
 
 struct EBICS_ARGS_build_content_camt053 camt053_args = {
   .startdate = {
-    .day = 0,
-    .month = 0,
-    .year = 0
+    .day = 1,
+    .month = 1,
+    .year = 1970
   },
   .enddate = {
-    .day = 0,
-    .month = 0,
-    .year = 0
+    .day = 1,
+    .month = 1,
+    .year = 1970
   }
 };
 
@@ -259,7 +259,7 @@ run ()
        &camt053_args)))
   {
     LOG (EBICS_LOGLEVEL_ERROR,
-        "Failed to instantiate HPB message\n");
+        "Failed to instantiate CAMT.053 message\n");
     return;
   }
 
@@ -269,11 +269,11 @@ run ()
                                            cb))
   {
     LOG (EBICS_LOGLEVEL_ERROR,
-         "Could not POST the HIA message\n");
+         "Could not POST the CAMT.053 message\n");
     return;
   }
   #else
-  write_xml_file ("HPB.xml",
+  write_xml_file ("CAMT.053.xml",
                   msg);
   #endif
   GNUNET_free (msg);
diff --git a/src/xmlmessages.c b/src/xmlmessages.c
index f38f3db..e8ca74d 100644
--- a/src/xmlmessages.c
+++ b/src/xmlmessages.c
@@ -191,6 +191,11 @@ EBICS_build_header_generic (void *cls,
     struct EBICS_ARGS_build_header*) cls;
 
   struct EBICS_MSG_Spec header[] = {
+
+    EBICS_MSG_op_set_string
+      ("//ebics:OrderDetails/ebics:OrderAttribute",
+       "UZHNN"),
+
     EBICS_MSG_op_unique_choice ("//ebics:static"),
     EBICS_MSG_op_set_string ("//ebics:static//ebics:HostID",
                            data->hostID),
@@ -218,8 +223,9 @@ EBICS_build_header_generic (void *cls,
  * 
  */
 void
-EBICS_build_header_ebicsRequest (void *cls,
-                                 struct EBICS_genex_document *document)
+EBICS_build_header_ebicsRequest
+  (void *cls,
+   struct EBICS_genex_document *document)
 {
   char nonce[EBICS_NONCE_STRING_SIZE];
   char date[DATE_STR_SIZE];
@@ -228,6 +234,13 @@ EBICS_build_header_ebicsRequest (void *cls,
     EBICS_MSG_op_subcommand (EBICS_build_header_generic,
                              cls),
 
+    EBICS_MSG_op_set_string
+      ("ebics:ebicsRequest/@Version",
+       EBICS_MSG_VERSION),
+    EBICS_MSG_op_set_uint
+      ("ebics:ebicsRequest/@Revision",
+       EBICS_REVISION),
+
     EBICS_MSG_op_set_string ("//ebics:static//ebics:Nonce",
                              tools_get_nonce (nonce)),
 
@@ -582,15 +595,18 @@ EBICS_build_content_camt053 (void *cls,
     struct EBICS_ARGS_build_content_camt053*) cls;
 
   struct EBICS_MSG_Spec request[] = {
-  
+
     EBICS_MSG_op_unique_choice ("//ebics:OrderDetails"),
-    EBICS_MSG_op_set_string ("//ebics:OrderDetails/ebics:OrderType",
-                             "C53"),
+    EBICS_MSG_op_set_string
+      ("//ebics:OrderDetails/ebics:OrderType",
+       "C53"),
     EBICS_MSG_op_unique_choice ("//ebics:StandardOrderParams"),
-    EBICS_MSG_op_set_date ("//ebics:StandardOrderParams//ebics:Start",
-                           data->startdate), 
-    EBICS_MSG_op_set_date("//ebics:StandardOrderParams//ebics:End",
-                          data->enddate), 
+    EBICS_MSG_op_set_date
+      ("//ebics:StandardOrderParams//ebics:Start",
+       data->startdate), 
+    EBICS_MSG_op_set_date
+      ("//ebics:StandardOrderParams//ebics:End",
+       data->enddate), 
     EBICS_MSG_op_del_node ("//ebics:body/ds:X509Data"),
     EBICS_MSG_op_select_choice ("//ebics:body/schema:CHOICES",
                                 0),
diff --git a/src/xmlproto.c b/src/xmlproto.c
index 24f0f67..b605d00 100644
--- a/src/xmlproto.c
+++ b/src/xmlproto.c
@@ -646,15 +646,16 @@ process_string (const struct EBICS_MSG_Spec *operation,
   xmlChar *text = operation->data.set_string.value;
   xmlNodePtr node;
   xmlXPathObjectPtr xpathObjPtr = xmlXPathEvalExpression(BAD_CAST 
operation->xpath, xpathCtxPtr);
-  assert(NULL != xpathObjPtr);
-  assert(NULL != xpathObjPtr->nodesetval);
+
+  LOG (EBICS_LOGLEVEL_DEBUG,
+       "process_string:"
+       " xpath: %s\n", 
+        operation->xpath);
+
+  assert (NULL != xpathObjPtr);
+  assert (NULL != xpathObjPtr->nodesetval);
   xmlNodeSetPtr nodeset = xpathObjPtr->nodesetval;
 
-  LOG(EBICS_LOGLEVEL_INFO,"process_string: \
-              xpath: %s Xpathresult: %p, \
-              nodeset: %p, nodeNr: %u", 
-              operation->xpath, xpathObjPtr, 
-              nodeset, nodeset->nodeNr);
 
 
   int i;

-- 
To stop receiving notification emails like this one, please contact
address@hidden



reply via email to

[Prev in Thread] Current Thread [Next in Thread]