diff -r cfe232710027 -r f4de55f587c1 bmsd/rdconfig.c --- a/bmsd/rdconfig.c Thu May 28 14:23:14 2020 +0200 +++ b/bmsd/rdconfig.c Fri May 29 09:17:52 2020 +0200 @@ -54,6 +54,7 @@ {(char *)"mqtt_user", getstr, (char **)&Config.mqtt_user}, {(char *)"mqtt_pass", getstr, (char **)&Config.mqtt_pass}, {(char *)"web_root", getstr, (char **)&Config.web_root}, + {(char *)"websocket_port", getint, (char **)&Config.websocket_port}, {NULL, NULL, NULL} }; @@ -99,6 +100,7 @@ if (Config.web_root) free(Config.web_root); Config.web_root = NULL; + Config.websocket_port = 8010; } @@ -161,6 +163,7 @@ fprintf(fp, "web_root %s\n", Config.web_root); else fprintf(fp, "#web_root \n"); + fprintf(fp, "websocket_port %d\n", Config.websocket_port); fprintf(fp, "#\n"); fprintf(fp, "# End of generated configuration\n"); fclose(fp); @@ -198,6 +201,7 @@ Config.mysql_host = xstrcpy((char *)"localhost"); Config.mqtt_port = 1883; Config.mqtt_host = xstrcpy((char *)"localhost"); + Config.websocket_port = 8010; return wrconfig(); }