X-Git-Url: https://gerrit.automotivelinux.org/gerrit/gitweb?a=blobdiff_plain;f=src%2Fafb-session.c;h=8b566838c758f901bc25a03a431d66b6c997e62b;hb=5659246230cef16abae4b1edda9791a1f25fc03d;hp=7c8f91c4307bffeadc97d07816a52e1dddb84bdd;hpb=4ecf37c1899349e6ef7ac08813ebb52fc80b2677;p=src%2Fapp-framework-binder.git diff --git a/src/afb-session.c b/src/afb-session.c index 7c8f91c4..8b566838 100644 --- a/src/afb-session.c +++ b/src/afb-session.c @@ -120,7 +120,7 @@ static void free_data (struct afb_session *session) void afb_session_init (int max_session_count, int timeout, const char *initok) { // let's create as store as hashtable does not have any - sessions.store = calloc (1 + (unsigned)max_session_count, sizeof(struct afb_session)); + sessions.store = calloc (1 + (unsigned)max_session_count, sizeof *sessions.store); pthread_mutex_init(&sessions.mutex, NULL); sessions.max = max_session_count; sessions.timeout = timeout; @@ -135,6 +135,11 @@ void afb_session_init (int max_session_count, int timeout, const char *initok) } } +const char *afb_session_initial_token() +{ + return sessions.initok; +} + static struct afb_session *search (const char* uuid) { int idx;