X-Git-Url: https://gerrit.automotivelinux.org/gerrit/gitweb?a=blobdiff_plain;ds=sidebyside;f=src%2Fsession.c;h=da2294bc2a285dc0153029a24a7f709ae0201b52;hb=21974dca8364f3d267dd912e92521f6252dddf02;hp=e9cf298e7f10e878bca2974af624a7a9dc17ab1c;hpb=f113d2b31333538f5784de5ee5f02bc19cc603e4;p=src%2Fapp-framework-binder.git diff --git a/src/session.c b/src/session.c index e9cf298e..da2294bc 100644 --- a/src/session.c +++ b/src/session.c @@ -168,7 +168,7 @@ static void ctxStoreCleanUp (time_t now) } // This function will return exiting client context or newly created client context -struct AFB_clientCtx *ctxClientGet (const char *uuid) +struct AFB_clientCtx *ctxClientGetForUuid (const char *uuid) { uuid_t newuuid; struct AFB_clientCtx *clientCtx; @@ -215,6 +215,13 @@ struct AFB_clientCtx *ctxClientGet (const char *uuid) return NULL; } +struct AFB_clientCtx *ctxClientGet(struct AFB_clientCtx *clientCtx) +{ + if (clientCtx != NULL) + clientCtx->refcount++; + return clientCtx; +} + void ctxClientPut(struct AFB_clientCtx *clientCtx) { if (clientCtx != NULL) {