X-Git-Url: https://git.ucc.asn.au/?a=blobdiff_plain;ds=sidebyside;f=server%2Ffastcgi.c;h=fe461b8a7d3b5dba3c24f1c0256f0039d623f716;hb=c931502bda5042411d5757294e3a1ef8df638c44;hp=3218a589e494c9c4513a58e67647de72ea746ba5;hpb=8dfd2def9f3c84c4d85c073d07912a22e107713f;p=matches%2FMCTX3420.git diff --git a/server/fastcgi.c b/server/fastcgi.c index 3218a58..fe461b8 100644 --- a/server/fastcgi.c +++ b/server/fastcgi.c @@ -52,22 +52,22 @@ static void IdentifyHandler(FCGIContext *context, char *params) { if (ident_sensors) { FCGI_JSONKey("sensors"); FCGI_JSONValue("{\n\t\t"); - for (i = 0; i < NUMSENSORS; i++) { + for (i = 0; i < g_num_sensors; i++) { if (i > 0) { FCGI_JSONValue(",\n\t\t"); } - FCGI_JSONValue("\"%d\" : \"%s\"", i, g_sensor_names[i]); + FCGI_JSONValue("\"%d\" : \"%s\"", i, Sensor_GetName(i)); } FCGI_JSONValue("\n\t}"); } if (ident_actuators) { FCGI_JSONKey("actuators"); FCGI_JSONValue("{\n\t\t"); - for (i = 0; i < NUMACTUATORS; i++) { + for (i = 0; i < g_num_actuators; i++) { if (i > 0) { FCGI_JSONValue(",\n\t\t"); } - FCGI_JSONValue("\"%d\" : \"%s\"", i, g_actuator_names[i]); + FCGI_JSONValue("\"%d\" : \"%s\"", i, Actuator_GetName(i)); } FCGI_JSONValue("\n\t}"); } @@ -507,7 +507,8 @@ void * FCGI_RequestLoop (void *data) if (module_handler) { - if (module_handler != Login_Handler && module_handler != IdentifyHandler) + //if (module_handler != Login_Handler && module_handler != IdentifyHandler) + if (false) // Testing { if (cookie[0] == '\0') {