--- libaitrpc/src/srv.c 2013/08/21 12:59:12 1.17.4.5 +++ libaitrpc/src/srv.c 2013/08/21 13:02:33 1.17.4.7 @@ -3,7 +3,7 @@ * by Michael Pounov * * $Author: misho $ -* $Id: srv.c,v 1.17.4.5 2013/08/21 12:59:12 misho Exp $ +* $Id: srv.c,v 1.17.4.7 2013/08/21 13:02:33 misho Exp $ * ************************************************************************** The ELWIX and AITNET software is distributed under the following @@ -494,7 +494,6 @@ rxUDPPacket(sched_task_t *task) socklen_t salen; struct timespec ts = { DEF_RPC_TIMEOUT, 0 }; - memset(buf, 0, AIT_LEN(bufz)); memset(&rpcbuf, 0, sizeof rpcbuf); /* receive connect packet */ @@ -609,7 +608,7 @@ static void * txBLOB(sched_task_t *task) { rpc_cli_t *c = TASK_ARG(task); - u_char *buf = AIT_GET_BUF(&c->cli_buf); + u_char *buf = AIT_GET_BUF(array(c->cli_buf, 0, ait_val_t*)); int wlen = sizeof(struct tagBLOBHdr); /* send reply */ @@ -701,7 +700,7 @@ rxBLOB(sched_task_t *task) } end: - memcpy(AIT_ADDR(&c->cli_buf), &blob, sizeof blob); + memcpy(AIT_ADDR(array(c->cli_buf, 0, ait_val_t*)), &blob, sizeof blob); schedWrite(TASK_ROOT(task), txBLOB, TASK_ARG(task), TASK_FD(task), NULL, 0); schedReadSelf(task); return NULL;