--- libaitsess/src/aitsess.c 2011/09/07 13:11:56 1.3 +++ libaitsess/src/aitsess.c 2011/11/03 23:23:18 1.3.2.2 @@ -3,7 +3,7 @@ * by Michael Pounov * * $Author: misho $ -* $Id: aitsess.c,v 1.3 2011/09/07 13:11:56 misho Exp $ +* $Id: aitsess.c,v 1.3.2.2 2011/11/03 23:23:18 misho Exp $ * ************************************************************************** The ELWIX and AITNET software is distributed under the following @@ -105,8 +105,8 @@ initSession(int *pnID, const char *csFName, tagSess ** LOGERR; return -1; } - } else - memset(*Sess, 0, sizeof(tagSess)); + } + memset(*Sess, 0, sizeof(tagSess)); if (pnID && *pnID) id = *pnID; @@ -228,7 +228,8 @@ map_createSession(const char *csFName, const int cnSee LOGERR; map_destroySession(csFName, Sess); return -1; - } else + } + if (!ret) sem_post((*Sess)->id.sid); /* create file for shared memory storage */