The JSON length field should be explicitly 32 bits, not just "int",
for better interoperation.
Этот коммит содержится в:
родитель
9393606f5b
Коммит
ddb503b5a3
@ -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;
|
||||
|
||||
|
Загрузка…
x
Ссылка в новой задаче
Block a user