gnunet-svn
[Top][All Lists]
Advanced

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

[GNUnet-SVN] [taler-twister] 02/03: actual upload-object-modifying logic


From: gnunet
Subject: [GNUnet-SVN] [taler-twister] 02/03: actual upload-object-modifying logic.
Date: Thu, 17 May 2018 22:19:07 +0200

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

marcello pushed a commit to branch master
in repository twister.

commit 01d0d3f64cb0cdc33773d5f6f824914e62b887e8
Author: Marcello Stanisci <address@hidden>
AuthorDate: Thu May 17 10:15:48 2018 +0200

    actual upload-object-modifying logic.
---
 src/twister/taler-twister-service.c | 28 +++++++++++++++++++++++++++-
 src/twister/taler-twister.c         |  2 ++
 2 files changed, 29 insertions(+), 1 deletion(-)

diff --git a/src/twister/taler-twister-service.c 
b/src/twister/taler-twister-service.c
index f9f9c6f..01a490a 100644
--- a/src/twister/taler-twister-service.c
+++ b/src/twister/taler-twister-service.c
@@ -1256,7 +1256,7 @@ create_response (void *cls,
     if ('\0' != flip_path_ul[0])
     {
       GNUNET_log (GNUNET_ERROR_TYPE_DEBUG,
-                  "Going to modify the upload object (%s)\n",
+                  "Going to flip the upload object (%s)\n",
                   hr->io_buf);
 
       hr->json = json_loads (hr->io_buf,
@@ -1278,6 +1278,32 @@ create_response (void *cls,
       json_decref (hr->json);
     }
 
+    if ('\0' != modify_path_ul[0])
+    {
+      GNUNET_log (GNUNET_ERROR_TYPE_DEBUG,
+                  "Going to modify the upload object (%s)\n",
+                  hr->io_buf);
+
+      hr->json = json_loads (hr->io_buf,
+                             JSON_REJECT_DUPLICATES,
+                             NULL);
+      modify_object (con,
+                     hr->json,
+                     modify_path_ul);
+
+      json_dumpb (hr->json,
+                  hr->io_buf,
+/* Existing io_len is enough to accomodate this encoding.  */
+                  hr->io_len, 
+                  JSON_COMPACT);
+
+      GNUNET_log (GNUNET_ERROR_TYPE_DEBUG,
+                  "Modified (?) upload object (%s)\n",
+                  hr->io_buf);
+      json_decref (hr->json);
+    }
+
+
     GNUNET_log (GNUNET_ERROR_TYPE_DEBUG,
                 "Generating curl request\n");
     hr->curl = curl_easy_init ();
diff --git a/src/twister/taler-twister.c b/src/twister/taler-twister.c
index 83ce929..15bf77b 100644
--- a/src/twister/taler-twister.c
+++ b/src/twister/taler-twister.c
@@ -213,6 +213,7 @@ run (void *cls,
     {
       GNUNET_log (GNUNET_ERROR_TYPE_ERROR,
                   "New value not given, give -V|--value also\n");
+      GNUNET_SCHEDULER_shutdown ();
       return;
     }
 
@@ -231,6 +232,7 @@ run (void *cls,
     {
       GNUNET_log (GNUNET_ERROR_TYPE_ERROR,
                   "New value not given, give -V|--value also\n");
+      GNUNET_SCHEDULER_shutdown ();
       return;
     }
 

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



reply via email to

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