Change-Id: I038d5624dc2f32e2c2d54b7e6ea388cb61122ccd
Signed-off-by: José Bollo <jose.bollo@iot.bzh>
return AFB_FATAL;
}
- /* Initialise Client Session Hash Table */
- ctxStoreInit(CTX_NBCLIENTS);
-
#if defined(USE_MAGIC_MIME_TYPE)
/*TBD open libmagic cache [fail to pass EFENCE check (allocating 0 bytes)] */
init_lib_magic (session);
on_exit(closeSession, session);
parse_arguments(argc, argv, session);
- initPlugins(session);
-
// ------------------ sanity check ----------------------------------------
if ((session->background) && (session->foreground)) {
fprintf (stderr, "ERR: cannot select foreground & background at the same time\n");
exit (1);
}
+ initPlugins(session);
+ ctxStoreInit(CTX_NBCLIENTS);
+
// ------------------ Some useful default values -------------------------
if ((session->background == 0) && (session->foreground == 0)) session->foreground=1;
// let's create as store as hashtable does not have any
sessions.store = calloc (1 + (unsigned)nbSession, sizeof(AFB_clientCtx));
- sessions.max=nbSession;
+ sessions.max = nbSession;
}
STATIC AFB_clientCtx *ctxStoreSearch (const char* uuid) {