- case FCGI_LONG_T:
- *((long*) val->value) = strtol(value, &ptr, 10);
+ case FCGI_INT_T: case FCGI_LONG_T: {
+ long parsed = strtol(value, &ptr, 10);
if (!*value || *ptr) {
snprintf(buf, BUFSIZ, "Expected int for '%s' but got '%s'", key, value);
FCGI_RejectJSON(context, FCGI_EscapeJSON(buf));
return false;
}
if (!*value || *ptr) {
snprintf(buf, BUFSIZ, "Expected int for '%s' but got '%s'", key, value);
FCGI_RejectJSON(context, FCGI_EscapeJSON(buf));
return false;
}
Log(LOGDEBUG, "First request...");
while (FCGI_Accept() >= 0) {
Log(LOGDEBUG, "First request...");
while (FCGI_Accept() >= 0) {
Log(LOGDEBUG, "Got request #%d", context.response_number);
ModuleHandler module_handler = NULL;
char module[BUFSIZ], params[BUFSIZ];
Log(LOGDEBUG, "Got request #%d", context.response_number);
ModuleHandler module_handler = NULL;
char module[BUFSIZ], params[BUFSIZ];
module_handler = Control_Handler;
} else if (!strcmp("sensors", module)) {
module_handler = Sensor_Handler;
module_handler = Control_Handler;
} else if (!strcmp("sensors", module)) {
module_handler = Sensor_Handler;