*/
void FCGI_RejectJSONEx(FCGIContext *context, StatusCodes status, const char *description)
{
+ description = !description ? "" : description;
+
+ Log(LOGINFO, "%s: Rejected query with: %d: %s", context->current_module, status, description);
FCGI_BeginJSON(context, status);
FCGI_JSONPair("description", description);
FCGI_JSONLong("responsenumber", context->response_number);
/** Array of sensors, initialised by Sensor_Init **/
static Sensor g_sensors[NUMSENSORS]; //global to this file
-static const char * g_sensor_names[] = {"analog_test0","analog_test1","digital_test0"};
+static const char * g_sensor_names[] = {"analog_test0","analog_test1","digital_test0","digital_test1"};
/**
* Read a data value from a sensor; block until value is read
* @param sensor_id - The ID of the sensor
return NULL;
}
// Bounds check
- if (id < 0 || id > NUMSENSORS)
+ if (id < 0 || id >= NUMSENSORS)
return NULL;