twister

HTTP fault injector for testing
Log | Files | Refs | README | LICENSE

commit dc19a8ed0e5e7c771b8bb05e3f89a1305a5ddb2b
parent da1ddbdce6b5fd9ff6e14423390af08cc0acf9c2
Author: Marcello Stanisci <stanisci.m@gmail.com>
Date:   Fri, 14 Jun 2019 17:08:33 +0200

strdup-ping the message payload

Diffstat:
Msrc/twister/taler-twister-service.c | 15++++++++++-----
1 file changed, 10 insertions(+), 5 deletions(-)

diff --git a/src/twister/taler-twister-service.c b/src/twister/taler-twister-service.c @@ -1567,12 +1567,13 @@ create_response (void *cls, if (NULL != flip_path_ul) { GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, - "Will try to flip: %s\n", + "Will flip path in request: %s\n", flip_path_ul); flip_object (con, hr->json, flip_path_ul); + GNUNET_free (flip_path_ul); } if ('\0' != modify_path_ul[0]) @@ -1799,11 +1800,12 @@ create_response (void *cls, if (NULL != flip_path_dl) { - TALER_LOG_DEBUG ("Will flip path: %s\n", + TALER_LOG_DEBUG ("Will flip path in response: %s\n", flip_path_dl); flip_object (con, hr->json, flip_path_dl); + GNUNET_free (flip_path_dl); } if ('\0' != delete_path[0]) @@ -2596,6 +2598,7 @@ handle_flip_path_dl (void *cls, { struct GNUNET_SERVICE_Client *c = cls; uint16_t tailsize; + char *payload; tailsize = ntohs (src->header.size) - sizeof (*src); @@ -2604,8 +2607,8 @@ handle_flip_path_dl (void *cls, ((const char *) &src[1], tailsize, 1, - &flip_path_dl)); - + &payload)); + flip_path_dl = GNUNET_strdup (payload); send_acknowledgement (c); } @@ -2647,6 +2650,7 @@ handle_flip_path_ul (void *cls, { struct GNUNET_SERVICE_Client *c = cls; uint16_t tailsize; + char *payload; tailsize = ntohs (src->header.size) - sizeof (*src); @@ -2654,7 +2658,8 @@ handle_flip_path_ul (void *cls, (tailsize == GNUNET_STRINGS_buffer_tokenize ((char *) &src[1], tailsize, 1, - &flip_path_ul)); + &payload)); + flip_path_ul = GNUNET_strdup (payload); send_acknowledgement (c); }