X-Git-Url: http://rtime.felk.cvut.cz/gitweb/frescor/forb.git/blobdiff_plain/a6bca0633e6e87159482a527e07df836107e1d66..bf43ec780985baef47110ebe49e4222f4925d33a:/src/forb.c diff --git a/src/forb.c b/src/forb.c index ca720e3..dc55cbc 100644 --- a/src/forb.c +++ b/src/forb.c @@ -80,7 +80,10 @@ #ifdef CONFIG_FORB_PROTO_INET_DEFAULT #include #endif - +#ifdef CONFIG_FCB +#include +#include +#endif #ifdef DEBUG #define UL_LOGL_DEF UL_LOGL_DEB @@ -148,6 +151,23 @@ forb_execution_thread(void *arg) return NULL; } +#ifdef CONFIG_FCB +void hack_register_fcb(forb_orb orb, forb_port_t *port) +{ + forb_object fcb = forb_object_new(orb, &FCB_SERVER_ID, 1); + if (!fcb) { + ul_logerr("Cannot allocate FCB reference\n"); + return; + } + forb_register_reference(fcb, fres_contract_broker_reg_name); + forb_object_release(fcb); +} +#else +#define hack_register_fcb(orb) +#endif + + + forb_orb forb_init(int *argc, char **argv[], const struct forb_init_attr *attr) { @@ -253,6 +273,7 @@ forb_init(int *argc, char **argv[], const struct forb_init_attr *attr) free(port); goto err2; inet_ok:; + hack_register_fcb(orb, port); } #endif return orb;