summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJosé Bollo <jose.bollo@iot.bzh>2017-04-21 19:00:02 +0200
committerJosé Bollo <jose.bollo@iot.bzh>2017-04-21 19:00:02 +0200
commitc6046d8d5fda932fa61e3396fdbdfc1614fbe028 (patch)
tree16dc427dd2e147a593468fad0e67a01f662915ea
parentf047a6ebb105106fd3b293681298a9fa86418b23 (diff)
main: init session module first
Change-Id: If2acee2fa6469cbfb6c2d11eb1e3fd622b093155 Signed-off-by: José Bollo <jose.bollo@iot.bzh>
-rw-r--r--src/main.c8
1 files changed, 5 insertions, 3 deletions
diff --git a/src/main.c b/src/main.c
index b5d92814..3541e44c 100644
--- a/src/main.c
+++ b/src/main.c
@@ -550,14 +550,16 @@ static void start()
}
/* configure the daemon */
+ afb_session_init(config->nbSessionMax, config->cntxTimeout, config->token);
+ if (!afb_hreq_init_cookie(config->httpdPort, config->rootapi, config->cntxTimeout)) {
+ ERROR("initialisation of cookies failed");
+ goto error;
+ }
main_apiset = afb_apiset_create("main", config->apiTimeout);
if (!main_apiset) {
ERROR("can't create main api set");
goto error;
}
- afb_session_init(config->nbSessionMax, config->cntxTimeout, config->token);
- if (!afb_hreq_init_cookie(config->httpdPort, config->rootapi, config->cntxTimeout)) {
- ERROR("initialisation of cookies failed");
goto error;
}