config_include_HEADERS = forb/config.h
config_DEFINES = CONFIG_FORB_PROTO_UNIX \
CONFIG_FORB_RECV_BUF_SIZE \
- CONFIG_FORB_PROTO_INET_DEFAULT
+ CONFIG_FORB_PROTO_INET_DEFAULT \
+ CONFIG_FCB # To see whether we are compiled with FRSH_FORB
include-pass_HOOKS = log_domains.inc #request_gavl.inc
#ifdef CONFIG_FORB_PROTO_INET_DEFAULT
#include <forb/proto_inet.h>
#endif
-
+#ifdef CONFIG_FCB
+#include <fcb.h>
+#include <fcb_contact_info.h>
+#endif
#ifdef DEBUG
#define UL_LOGL_DEF UL_LOGL_DEB
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)
{
free(port);
goto err2;
inet_ok:;
+ hack_register_fcb(orb, port);
}
#endif
return orb;