X-Git-Url: https://git.ucc.asn.au/?a=blobdiff_plain;f=server%2Fcontrol.c;h=4da1f7507718de6c90e7517efa1b9542a06a6f10;hb=108a72d8b153864beb2079d54f36dfcaaad7aedf;hp=e883eb1aade3ca9ebe5173b833c8d5b4bd64bc01;hpb=7518a87e619085f9622d268dd7130726b5947dea;p=matches%2FMCTX3420.git diff --git a/server/control.c b/server/control.c index e883eb1..4da1f75 100644 --- a/server/control.c +++ b/server/control.c @@ -7,7 +7,7 @@ const char * g_actuator_names[NUMACTUATORS] = { "Pressure regulator", "Solenoid 1" -}; +}; /** * Handles control of the actuators. @@ -41,7 +41,7 @@ void ActuatorHandler(FCGIContext *context, ActuatorId id, const char *set_value) FCGI_JSONValue("\"Solenoid 1 turned %s!\"", state); FCGI_EndJSON(); } else { - FCGI_RejectJSON(context); + FCGI_RejectJSON(context, "Invalid actuator value specified"); } } break; default: @@ -81,7 +81,7 @@ void Control_Handler(FCGIContext *context, char *params) { } if (action == NULL) { //Must have an action - FCGI_RejectJSON(context); + FCGI_RejectJSON(context, "No action specified"); } else if (!strcmp(action, "start")) { FCGI_BeginControl(context, force); } else if (!strcmp(action, "stop")) { //Don't require control key to stop...