json issues fixed

master
Steffen Pohle 1 week ago
parent c380a669bc
commit e9605742cc

@ -155,7 +155,7 @@ Block Blocks::GetBlockFromJSON(JSONParse *j) {
s = ""; if (j->GetValue("sensor_shortstop_1", &s)) strncpy (bl.s_shortstop[1], s.c_str(), REFERENCENAME_LEN); s = ""; if (j->GetValue("sensor_shortstop_1", &s)) strncpy (bl.s_shortstop[1], s.c_str(), REFERENCENAME_LEN);
s = ""; if (j->GetValue("secondblock", &s)) strncpy (bl.secondblock, s.c_str(), REFERENCENAME_LEN); s = ""; if (j->GetValue("secondblock", &s)) strncpy (bl.secondblock, s.c_str(), REFERENCENAME_LEN);
printf ("%s:%d block: %s flags: %d\n", __FILE__, __LINE__, bl.name, bl.flags); // printf ("%s:%d block: %s flags: %d\n", __FILE__, __LINE__, bl.name, bl.flags);
return bl; return bl;
}; };

@ -97,7 +97,11 @@ int Network::Start() {
webserver.SetupDocumentRoot("webinterface"); webserver.SetupDocumentRoot("webinterface");
webserver.SetupPorts(1080, 1081); webserver.SetupPorts(1080, 1081);
webserver.Start(); webserver.Start();
printf ("*************************************\n");
printf ("* Modelbahn Webserver started *\n");
printf ("* Port: 1080 (HTTP) *\n");
printf ("* Port: 1081 (HTTPS) *\n");
printf ("*************************************\n");
thread_running = 1; thread_running = 1;
pthread_attr_init (&attr); pthread_attr_init (&attr);
pthread_attr_setdetachstate (&attr, PTHREAD_CREATE_JOINABLE); pthread_attr_setdetachstate (&attr, PTHREAD_CREATE_JOINABLE);

Loading…
Cancel
Save