summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMarcello Stanisci <stanisci.m@gmail.com>2018-05-14 17:22:11 +0200
committerMarcello Stanisci <stanisci.m@gmail.com>2018-05-14 17:22:11 +0200
commita28e9e0d84bff40994151e6e5a3410c047b1e4bf (patch)
tree31baea0cd01b3054351255b0c29cd41285d31872
parent2e773e85b59bdf8dc2c529d9fcec1c40b0fb0e9f (diff)
downloadtwister-a28e9e0d84bff40994151e6e5a3410c047b1e4bf.tar.gz
twister-a28e9e0d84bff40994151e6e5a3410c047b1e4bf.tar.bz2
twister-a28e9e0d84bff40994151e6e5a3410c047b1e4bf.zip
Walk objects..
regardless of whether they are responses or requests.
-rw-r--r--src/twister/taler-twister-service.c13
1 files changed, 7 insertions, 6 deletions
diff --git a/src/twister/taler-twister-service.c b/src/twister/taler-twister-service.c
index 66ae9f5..ded29f0 100644
--- a/src/twister/taler-twister-service.c
+++ b/src/twister/taler-twister-service.c
@@ -879,7 +879,7 @@ static unsigned int
walk_response_object (const char *path,
json_t **parent,
char **target,
- struct HttpRequest *hr)
+ json_t *json)
{
json_t *element;
@@ -896,7 +896,7 @@ walk_response_object (const char *path,
/* Give first nondelim char. */
token = strtok (path_dup, ".");
- if (NULL == (element = hr->json))
+ if (NULL == (element = json))
{
TALER_LOG_ERROR ("Attempting to walk a non JSON response!\n");
return GNUNET_SYSERR;
@@ -973,7 +973,7 @@ modify_object (struct MHD_Connection *con,
if (GNUNET_OK != walk_response_object (modify_path,
&parent,
&target,
- hr))
+ hr->json))
return;
/* At this point, the parent and the target are pointed to. */
@@ -1036,7 +1036,7 @@ flip_object (struct MHD_Connection *con,
if (GNUNET_OK != walk_response_object (flip_path,
&parent,
&target,
- hr))
+ hr->json))
return;
/* here, element is the parent of the element to be deleted. */
@@ -1107,7 +1107,7 @@ delete_object (struct MHD_Connection *con,
if (GNUNET_OK != walk_response_object (delete_path,
&parent,
&target,
- hr))
+ hr->json))
return;
/* here, element is the parent of the element to be deleted. */
@@ -1233,7 +1233,8 @@ create_response (void *cls,
hr->io_len = malformed_size;
}
- /* Upload finished, generate curl request */
+ /* Upload (from the *client*) finished,
+ * generate curl request to the proxied service. */
if (NULL == hr->curl)
{
GNUNET_log (GNUNET_ERROR_TYPE_DEBUG,