diff options
author | Marcello Stanisci <stanisci.m@gmail.com> | 2018-05-17 10:15:48 +0200 |
---|---|---|
committer | Marcello Stanisci <stanisci.m@gmail.com> | 2018-05-17 10:15:48 +0200 |
commit | 01d0d3f64cb0cdc33773d5f6f824914e62b887e8 (patch) | |
tree | 15eaf1149d46b45b06fbb1fc72b1ebb18617775b | |
parent | e87c597a85f0bfbe031c83f1cb47279380ffa6be (diff) | |
download | twister-01d0d3f64cb0cdc33773d5f6f824914e62b887e8.tar.gz twister-01d0d3f64cb0cdc33773d5f6f824914e62b887e8.tar.bz2 twister-01d0d3f64cb0cdc33773d5f6f824914e62b887e8.zip |
actual upload-object-modifying logic.
-rw-r--r-- | src/twister/taler-twister-service.c | 28 | ||||
-rw-r--r-- | src/twister/taler-twister.c | 2 |
2 files changed, 29 insertions, 1 deletions
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; } |