summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--src/http-svc.c3
-rw-r--r--src/main.c5
-rw-r--r--src/session.c2
3 files changed, 4 insertions, 6 deletions
diff --git a/src/http-svc.c b/src/http-svc.c
index 99c4142a..480925db 100644
--- a/src/http-svc.c
+++ b/src/http-svc.c
@@ -325,9 +325,6 @@ AFB_error httpdStart(AFB_session * session)
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);
diff --git a/src/main.c b/src/main.c
index f73cfac0..e9cddcb5 100644
--- a/src/main.c
+++ b/src/main.c
@@ -503,8 +503,6 @@ int main(int argc, char *argv[]) {
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");
@@ -515,6 +513,9 @@ int main(int argc, char *argv[]) {
exit (1);
}
+ initPlugins(session);
+ ctxStoreInit(CTX_NBCLIENTS);
+
// ------------------ Some useful default values -------------------------
if ((session->background == 0) && (session->foreground == 0)) session->foreground=1;
diff --git a/src/session.c b/src/session.c
index 9d03d0a7..3b9288f8 100644
--- a/src/session.c
+++ b/src/session.c
@@ -343,7 +343,7 @@ PUBLIC void ctxStoreInit (int nbSession) {
// 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) {