From ddb503b5a3e624e72e3b4024207f39299f60ecc8 Mon Sep 17 00:00:00 2001 From: Jef Poskanzer Date: Tue, 5 Nov 2013 21:50:29 -0800 Subject: [PATCH] The JSON length field should be explicitly 32 bits, not just "int", for better interoperation. --- src/iperf_api.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/iperf_api.c b/src/iperf_api.c index f6c086a..2de3de5 100644 --- a/src/iperf_api.c +++ b/src/iperf_api.c @@ -1230,7 +1230,7 @@ get_results(struct iperf_test *test) static int JSON_write(int fd, cJSON *json) { - unsigned int hsize, nsize; + uint32_t hsize, nsize; char *str; int r = 0; @@ -1256,7 +1256,7 @@ JSON_write(int fd, cJSON *json) static cJSON * JSON_read(int fd) { - unsigned int hsize, nsize; + uint32_t hsize, nsize; char *str; cJSON *json = NULL;