X-Git-Url: https://git.ucc.asn.au/?a=blobdiff_plain;f=server%2Ffastcgi.c;h=092eaed4dcb1a53a50e6fb42585e17a29c2e4d0c;hb=14d73a4af10b05dd7d4d5e22f737a3684d0515cd;hp=34c337a6732be41af5d95327cd194d37b07c9db0;hpb=1a311e29d6b72830d62e2cba21c1b9e33433cfbf;p=matches%2FMCTX3420.git diff --git a/server/fastcgi.c b/server/fastcgi.c index 34c337a..092eaed 100644 --- a/server/fastcgi.c +++ b/server/fastcgi.c @@ -12,8 +12,10 @@ #include "common.h" #include "sensor.h" +#include "actuator.h" #include "control.h" #include "options.h" +#include "image.h" /**The time period (in seconds) before the control key expires @ */ #define CONTROL_TIMEOUT 180 @@ -432,6 +434,17 @@ void FCGI_PrintRaw(const char *format, ...) va_end(list); } + +/** + * Write binary data + * See fwrite + */ +void FCGI_WriteBinary(void * data, size_t size, size_t num_elem) +{ + Log(LOGDEBUG,"Writing!"); + FCGI_fwrite(data, size, num_elem, FCGI_stdout); +} + /** * Main FCGI request loop that receives/responds to client requests. * @param data Reserved. @@ -467,6 +480,10 @@ void * FCGI_RequestLoop (void *data) module_handler = Control_Handler; } else if (!strcmp("sensors", module)) { module_handler = Sensor_Handler; + } else if (!strcmp("actuators", module)) { + module_handler = Actuator_Handler; + } else if (!strcmp("image", module)) { + module_handler = Image_Handler; } context.current_module = module;