enforce creation of contextes
authorJosé Bollo <jose.bollo@iot.bzh>
Fri, 8 Apr 2016 15:50:21 +0000 (17:50 +0200)
committerJosé Bollo <jose.bollo@iot.bzh>
Fri, 8 Apr 2016 15:50:21 +0000 (17:50 +0200)
Change-Id: I5278cf0f73a417c98d2cd4c3572efed39766b2d5
Signed-off-by: José Bollo <jose.bollo@iot.bzh>
src/session.c

index 936bb4d..e30688a 100644 (file)
@@ -184,11 +184,13 @@ struct AFB_clientCtx *ctxClientGetForUuid (const char *uuid)
         }
 
        /* mimic old behaviour */
+/*
+TODO remove? not remove?
        if (sessions.initok == NULL)
                return NULL;
-
+*/
        /* check the uuid if given */
-       if (uuid != NULL && 1 + strlen(uuid) >= sizeof clientCtx->uuid)
+       if (uuid != NULL && strlen(uuid) >= sizeof clientCtx->uuid)
                return NULL;
 
        /* returns a new one */