The JSON length field should be explicitly 32 bits, not just "int",

for better interoperation.
This commit is contained in:
Jef Poskanzer 2013-11-05 21:50:29 -08:00
parent 9393606f5b
commit ddb503b5a3

View File

@ -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;