X-Git-Url: https://git.ucc.asn.au/?a=blobdiff_plain;f=server%2Fcontrol.c;h=d9a7dc6fa9542acbdb50f290da0408577f326ce4;hb=436f212a07c30061ccca52ff0c107ccf99921d83;hp=820c37c37f37b3f3fe5661f288471ccf4b5d1652;hpb=83a3a266ff3cfecea7a6275924f3bdd15dfe6436;p=matches%2FMCTX3420.git diff --git a/server/control.c b/server/control.c index 820c37c..d9a7dc6 100644 --- a/server/control.c +++ b/server/control.c @@ -38,28 +38,21 @@ void Control_Handler(FCGIContext *context, char *params) { ControlModes desired_mode; - // Login/auth now handled entirely in fastcgi.c and login.c //TODO: Need to not have the ability for any user to stop someone else' experiment... // (achieve by storing the username of the person running the current experiment, even when they log out?) // (Our program should only realisitically support a single experiment at a time, so that should be sufficient) - FCGIValue values[4] = { + FCGIValue values[3] = { {"action", &action, FCGI_REQUIRED(FCGI_STRING_T)}, {"force", &force, FCGI_BOOL_T}, {"name", &name, FCGI_STRING_T} }; - if (!FCGI_ParseRequest(context, params, values, 4)) + if (!FCGI_ParseRequest(context, params, values, 3)) return; - if (!strcmp(action, "lock")) { - FCGI_LockControl(context, force); - return; - } else if (!strcmp(action, "emergency")) { + if (!strcmp(action, "emergency")) { desired_mode = CONTROL_EMERGENCY; - } - else if (!strcmp(action, "release")) { - FCGI_ReleaseControl(context); } else if (!strcmp(action, "start")) { desired_mode = CONTROL_START; } else if (!strcmp(action, "pause")) {