diff options
author | Marcello Stanisci <stanisci.m@gmail.com> | 2019-06-14 17:08:33 +0200 |
---|---|---|
committer | Marcello Stanisci <stanisci.m@gmail.com> | 2019-06-14 17:08:33 +0200 |
commit | dc19a8ed0e5e7c771b8bb05e3f89a1305a5ddb2b (patch) | |
tree | dfc89d61bcc80098f5553acf0714bda0880eb143 | |
parent | da1ddbdce6b5fd9ff6e14423390af08cc0acf9c2 (diff) | |
download | twister-dc19a8ed0e5e7c771b8bb05e3f89a1305a5ddb2b.tar.gz twister-dc19a8ed0e5e7c771b8bb05e3f89a1305a5ddb2b.tar.bz2 twister-dc19a8ed0e5e7c771b8bb05e3f89a1305a5ddb2b.zip |
strdup-ping the message payload
-rw-r--r-- | src/twister/taler-twister-service.c | 15 |
1 files changed, 10 insertions, 5 deletions
diff --git a/src/twister/taler-twister-service.c b/src/twister/taler-twister-service.c index 6ec1057..c06f9c6 100644 --- 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); } |