--- libaitsess/src/sess.c 2011/09/07 21:37:23 1.3.2.4 +++ libaitsess/src/sess.c 2011/09/07 23:38:39 1.3.2.5 @@ -3,7 +3,7 @@ * by Michael Pounov * * $Author: misho $ -* $Id: sess.c,v 1.3.2.4 2011/09/07 21:37:23 misho Exp $ +* $Id: sess.c,v 1.3.2.5 2011/09/07 23:38:39 misho Exp $ * ************************************************************************** The ELWIX and AITNET software is distributed under the following @@ -363,8 +363,7 @@ sess_prepareSession(tagSess * __restrict s, u_char use hdr->hdr_argc, useDirect); ADD_SEMAPHORE(s, ret); - if (!s->zcopy) - DETACH_MEMORY(s); + DETACH_MEMORY(s); return arr; } @@ -385,8 +384,6 @@ sess_doneSession(tagSess * __restrict s, array_t ** __ if (!s->zcopy) io_arrayFree(*arr); - else - DETACH_MEMORY(s); io_arrayDestroy(arr); } @@ -408,12 +405,9 @@ sess_commitSession(tagSess * __restrict s, array_t * _ return -1; } - if (!s->zcopy) - ATTACH_MEMORY(s); + ATTACH_MEMORY(s); if (!s->addr) { - if (!s->zcopy) - DETACH_MEMORY(s); - + DETACH_MEMORY(s); return -1; } else hdr = (sess_hdr_t*) s->addr; @@ -426,7 +420,6 @@ sess_commitSession(tagSess * __restrict s, array_t * _ } ADD_SEMAPHORE(s, rs); - if (!s->zcopy) - DETACH_MEMORY(s); + DETACH_MEMORY(s); return ret; }