Browse Source

server_port in json file should be integer (#1520)

* Fix #1518 config file with wrong json format

Removing trailing "," to make the configuration file compliant with JSON specification

* Remove extra "," in json file

* server_port should be integer instead of string 

server_port in generated json configuration file should be integer instead of string
pull/1379/merge
Xiandong 7 years ago
committed by Max Lv
parent
commit
195a961e97
1 changed files with 1 additions and 1 deletions
  1. 2
      src/manager.c

2
src/manager.c

@ -109,7 +109,7 @@ build_config(char *prefix, struct server *server)
return;
}
fprintf(f, "{\n");
fprintf(f, "\"server_port\":\"%s\",\n", server->port);
fprintf(f, "\"server_port\":%d,\n", atoi(server->port));
fprintf(f, "\"password\":\"%s\"", server->password);
if (server->fast_open[0]) fprintf(f, ",\n\"fast_open\": %s", server->fast_open);
if (server->mode) fprintf(f, ",\n\"mode\":\"%s\"", server->mode);

Loading…
Cancel
Save