summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMarcello Stanisci <stanisci.m@gmail.com>2018-05-15 12:57:13 +0200
committerMarcello Stanisci <stanisci.m@gmail.com>2018-05-15 12:57:13 +0200
commitbffe839e82ae0321effc370610e1c9872e83acf0 (patch)
treeb6f99023dadbf02dd61eadf2d094b08bbfa4a070
parent0bd9dbbaaaf9661466d408409d65b8e32184212a (diff)
downloadtwister-bffe839e82ae0321effc370610e1c9872e83acf0.tar.gz
twister-bffe839e82ae0321effc370610e1c9872e83acf0.tar.bz2
twister-bffe839e82ae0321effc370610e1c9872e83acf0.zip
dumping stringified flipped object into io_buf.
-rw-r--r--src/twister/taler-twister-service.c15
1 files changed, 14 insertions, 1 deletions
diff --git a/src/twister/taler-twister-service.c b/src/twister/taler-twister-service.c
index c738507..84a5836 100644
--- a/src/twister/taler-twister-service.c
+++ b/src/twister/taler-twister-service.c
@@ -1242,9 +1242,22 @@ create_response (void *cls,
{
if ('\0' != flip_path_ul[0])
{
- /* */
GNUNET_log (GNUNET_ERROR_TYPE_DEBUG,
"Going to modify the upload object\n");
+ json_t *tmp;
+
+ tmp = json_loads (hr->io_buf,
+ JSON_REJECT_DUPLICATES,
+ NULL);
+ flip_object (con,
+ tmp,
+ flip_path_ul);
+
+ /* No need to update 'io_length', as flipping a
+ * bit does not change the data size. */
+ hr->io_buf = json_dumps (tmp,
+ JSON_COMPACT);
+ json_decref (tmp);
}
GNUNET_log (GNUNET_ERROR_TYPE_DEBUG,