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
|
static int
|
||||||
JSON_write(int fd, cJSON *json)
|
JSON_write(int fd, cJSON *json)
|
||||||
{
|
{
|
||||||
unsigned int hsize, nsize;
|
uint32_t hsize, nsize;
|
||||||
char *str;
|
char *str;
|
||||||
int r = 0;
|
int r = 0;
|
||||||
|
|
||||||
@ -1256,7 +1256,7 @@ JSON_write(int fd, cJSON *json)
|
|||||||
static cJSON *
|
static cJSON *
|
||||||
JSON_read(int fd)
|
JSON_read(int fd)
|
||||||
{
|
{
|
||||||
unsigned int hsize, nsize;
|
uint32_t hsize, nsize;
|
||||||
char *str;
|
char *str;
|
||||||
cJSON *json = NULL;
|
cJSON *json = NULL;
|
||||||
|
|
||||||
|
Загрузка…
x
Ссылка в новой задаче
Block a user