Automatic commit of irc logs
[matches/MCTX3420.git] / server / fastcgi.c
index d3e4b28..4b69f89 100644 (file)
@@ -52,11 +52,11 @@ 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}");
        }
@@ -511,7 +511,7 @@ void * FCGI_RequestLoop (void *data)
                        {
                                if (cookie[0] == '\0')
                                {
-                                       FCGI_RejectJSON(&context, "Please login.");
+                                       FCGI_RejectJSONEx(&context, STATUS_UNAUTHORIZED, "Please login.");
                                        continue;
                                }
 

UCC git Repository :: git.ucc.asn.au