X-Git-Url: https://git.ucc.asn.au/?a=blobdiff_plain;ds=sidebyside;f=server%2Ffastcgi.c;h=62978eabf2cfc12339a4ae2ac6de656cf1bd5c3a;hb=e98b2d71aa507c8656b47752a529a3a2a619875a;hp=34c337a6732be41af5d95327cd194d37b07c9db0;hpb=54d8526bce34af6b0d3a08c84e9d0bdfa6963224;p=matches%2FMCTX3420.git diff --git a/server/fastcgi.c b/server/fastcgi.c index 34c337a..62978ea 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!"); + fwrite(data, size, num_elem, 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;