commit be48cb5f889e3ba259165df8c6350b87804808aa
parent fd60998bfd51e90904449d2a65c5fd4d3381a747
Author: Marcello Stanisci <stanisci.m@gmail.com>
Date: Tue, 6 Mar 2018 18:05:52 +0100
fix iteration over object path's parts.
Diffstat:
2 files changed, 11 insertions(+), 5 deletions(-)
diff --git a/src/test/test_twister_webserver.c b/src/test/test_twister_webserver.c
@@ -43,7 +43,12 @@ answer_to_connection
const char *version, const char *upload_data,
size_t *upload_data_size, void **con_cls)
{
+ #if 0
const char *page = "<html><body>Hello, browser!</body></html>";
+ #endif
+
+ const char *page = "{\"hello\": \"browser!\"}";
+
struct MHD_Response *response;
int ret;
(void)cls; /* Unused. Silent compiler warning. */
diff --git a/src/twister/taler-twister-service.c b/src/twister/taler-twister-service.c
@@ -1107,13 +1107,14 @@ create_response (void *cls,
}
else
{
- GNUNET_assert (NULL != strtok (delete_path, "."));
- while (NULL != (token_path = strtok (NULL, ".")))
+ TALER_LOG_WARNING ("Got token path: %s\n", delete_path);
+ token_path = strtok (delete_path, ".");
+ do
{
- /* fill with logic */
-
+ TALER_LOG_WARNING ("Iterating over token: %s\n",
+ token_path);
}
-
+ while (NULL != (token_path = strtok (NULL, ".")));
mod_response = json_dumps (parsed_response, JSON_COMPACT);
json_decref (parsed_response);
}