--- libaitsess/src/aitsess.c 2011/08/21 14:00:43 1.2.2.3 +++ libaitsess/src/aitsess.c 2011/09/08 07:22:00 1.3.2.1 @@ -3,7 +3,7 @@ * by Michael Pounov * * $Author: misho $ -* $Id: aitsess.c,v 1.2.2.3 2011/08/21 14:00:43 misho Exp $ +* $Id: aitsess.c,v 1.3.2.1 2011/09/08 07:22:00 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; @@ -386,7 +386,7 @@ map_attachSession(tagSess * __restrict s, void *procMe if (!s) return NULL; - // Learn size of shared memory block + /* Learn size of shared memory block */ sync(); if (fstat(s->mem.fd, &sb) == -1) { LOGERR; @@ -394,7 +394,7 @@ map_attachSession(tagSess * __restrict s, void *procMe } else s->eom = sb.st_size; - // attach to memory + /* attach to memory */ s->addr = mmap(procMem, s->eom, PROT_READ | PROT_WRITE, MAP_SHARED, s->mem.fd, 0); if (s->addr == MAP_FAILED) { LOGERR;