X-Git-Url: https://git.ucc.asn.au/?a=blobdiff_plain;f=server%2Ffastcgi.c;h=4b69f89bb00eebb4bc3f1cc3b13f658a91afc1b0;hb=417b7e54a0123ffae25a62ce99288abaccdde805;hp=d3e4b2869ff7fe5846df37160f7d5a3f5e4ce055;hpb=826791abc3a3bb383c2908d7d39618b99ad7665c;p=matches%2FMCTX3420.git diff --git a/server/fastcgi.c b/server/fastcgi.c index d3e4b28..4b69f89 100644 --- a/server/fastcgi.c +++ b/server/fastcgi.c @@ -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; }