--- libaitrpc/src/aitrpc.c 2016/08/02 10:13:32 1.20.2.1 +++ libaitrpc/src/aitrpc.c 2016/08/02 10:26:58 1.20.2.2 @@ -3,7 +3,7 @@ * by Michael Pounov * * $Author: misho $ -* $Id: aitrpc.c,v 1.20.2.1 2016/08/02 10:13:32 misho Exp $ +* $Id: aitrpc.c,v 1.20.2.2 2016/08/02 10:26:58 misho Exp $ * ************************************************************************** The ELWIX and AITNET software is distributed under the following @@ -153,8 +153,9 @@ try2read: pfd.events = POLLIN | POLLPRI; memset(buf, 0, blen); memset(&sa2, 0, sizeof sa2); + salen = (u_char) MIN(sizeof(sockaddr_t), 0xff); #ifndef __linux__ - salen = sa2.ss.ss_len = (u_char) MIN(sizeof(sockaddr_t), 0xff); + sa2.ss.ss_len = salen; #endif if ((ret = poll(&pfd, 1, DEF_RPC_TIMEOUT * 1000)) < 1 || pfd.revents & (POLLERR | POLLHUP | POLLNVAL)) {