hsrv = afb_hsrv_create();
if (hsrv == NULL) {
fprintf(stderr, "memory allocation failure\n");
hsrv = afb_hsrv_create();
if (hsrv == NULL) {
fprintf(stderr, "memory allocation failure\n");
int main(int argc, char *argv[]) {
struct afb_hsrv *hsrv;
struct afb_config *config;
int main(int argc, char *argv[]) {
struct afb_hsrv *hsrv;
struct afb_config *config;
// open syslog if ever needed
openlog("afb-daemon", 0, LOG_DAEMON);
// open syslog if ever needed
openlog("afb-daemon", 0, LOG_DAEMON);
- ctxStoreInit(CTX_NBCLIENTS, config->cntxTimeout, config->token);
+ ctxStoreInit(CTX_NBCLIENTS, config->cntxTimeout, config->token, afb_apis_count());
if (!afb_hreq_init_cookie(config->httpdPort, config->rootapi, DEFLT_CNTX_TIMEOUT)) {
fprintf (stderr, "ERR: initialisation of cookies failed\n");
exit (1);
if (!afb_hreq_init_cookie(config->httpdPort, config->rootapi, DEFLT_CNTX_TIMEOUT)) {
fprintf (stderr, "ERR: initialisation of cookies failed\n");
exit (1);