--- libaitrpc/src/cli.c 2015/01/21 00:37:04 1.23.2.4 +++ libaitrpc/src/cli.c 2015/01/21 20:28:41 1.23.2.5 @@ -3,7 +3,7 @@ * by Michael Pounov * * $Author: misho $ -* $Id: cli.c,v 1.23.2.4 2015/01/21 00:37:04 misho Exp $ +* $Id: cli.c,v 1.23.2.5 2015/01/21 20:28:41 misho Exp $ * ************************************************************************** The ELWIX and AITNET software is distributed under the following @@ -351,7 +351,7 @@ rpc_pkt_Receive(int sock, int type, sockaddr_t * __res if (type == SOCK_STREAM) ret = rpc_Read(sock, type, !estlen ? MSG_PEEK : 0, NULL, buf, blen); else if (type == SOCK_EXT) { - ret = rpc_Read(sock, type, 0, NULL, buf, blen); + ret = rpc_Read(sock, type, 0, NULL, AIT_GET_BUF(pkt), AIT_LEN(pkt)); if (ret > 0) estlen = ret; } else if (type == SOCK_BPF) { @@ -563,7 +563,7 @@ rpc_cli_execCall(rpc_cli_t *cli, int noreply, u_short rpc_SetErr(EINVAL, "Can`t execute call because parameter is null or invalid!"); return -1; } else { - if (cli->cli_id == SOCK_STREAM) + if (cli->cli_id == SOCK_STREAM || cli->cli_id == SOCK_EXT) type = cli->cli_id; buf = AIT_GET_BUF(&cli->cli_buf); }