--- libaitrpc/src/cli.c 2011/08/19 09:20:47 1.3.2.1 +++ libaitrpc/src/cli.c 2011/08/19 12:51:50 1.3.2.2 @@ -3,7 +3,7 @@ * by Michael Pounov * * $Author: misho $ -* $Id: cli.c,v 1.3.2.1 2011/08/19 09:20:47 misho Exp $ +* $Id: cli.c,v 1.3.2.2 2011/08/19 12:51:50 misho Exp $ * ************************************************************************** The ELWIX and AITNET software is distributed under the following @@ -49,12 +49,11 @@ SUCH DAMAGE. /* * rpc_cli_openBLOBClient() Connect to BLOB Server * @rpccli = RPC Client session - * @sockType = Socket type, like SOCK_STREAM, SOCK_DGRAM or SOCK_RAW * @Port = Port for bind server, if Port == 0 default port is selected * return: NULL == error or !=NULL connection to BLOB server established */ rpc_cli_t * -rpc_cli_openBLOBClient(rpc_cli_t * __restrict rpccli, int sockType, u_short Port) +rpc_cli_openBLOBClient(rpc_cli_t * __restrict rpccli, u_short Port) { rpc_cli_t *cli = NULL; struct sockaddr sa; @@ -95,8 +94,7 @@ rpc_cli_openBLOBClient(rpc_cli_t * __restrict rpccli, } /* connect to BLOB server */ - cli->cli_type = sockType ? sockType : SOCK_STREAM; - cli->cli_sock = socket(cli->cli_sa.sa_family, cli->cli_type, 0); + cli->cli_sock = socket(cli->cli_sa.sa_family, SOCK_STREAM, 0); if (cli->cli_sock == -1) { LOGERR; free(cli); @@ -137,14 +135,13 @@ rpc_cli_closeBLOBClient(rpc_cli_t * __restrict cli) * rpc_cli_openClient() Connect to RPC Server * @ProgID = ProgramID for RPC session request * @ProcID = ProcessID for RPC session request - * @sockType = Socket type, like SOCK_STREAM, SOCK_DGRAM or SOCK_RAW * @family = Family socket type, AF_INET or AF_INET6 * @csHost = Host name or IP address for bind server * @Port = Port for bind server, if Port == 0 default port is selected * return: NULL == error or !=NULL connection to RPC server established */ rpc_cli_t * -rpc_cli_openClient(u_int ProgID, u_int ProcID, int sockType, u_short family, const char *csHost, u_short Port) +rpc_cli_openClient(u_int ProgID, u_int ProcID, u_short family, const char *csHost, u_short Port) { rpc_cli_t *cli = NULL; struct hostent *host = NULL; @@ -221,8 +218,7 @@ rpc_cli_openClient(u_int ProgID, u_int ProcID, int soc } /* connect to RPC server */ - cli->cli_type = sockType ? sockType : SOCK_STREAM; - cli->cli_sock = socket(family, cli->cli_type, 0); + cli->cli_sock = socket(family, SOCK_STREAM, 0); if (cli->cli_sock == -1) { LOGERR; free(cli->cli_parent);