clnt_simple.c (f12d1a5dd0b4ac959f98fc3c418b3f1e6d77bfa6) clnt_simple.c (54edc0bbbfcc1123b31fa29f3502bb25e5769d93)
1/*
2 * Sun RPC is a product of Sun Microsystems, Inc. and is provided for
3 * unrestricted use provided that this legend is included on all tape
4 * media and as a part of the software program in whole or part. Users
5 * may copy or modify Sun RPC without charge, but are not authorized
6 * to license or distribute it to anyone else except as part of a product or
7 * program developed by the user.
8 *

--- 16 unchanged lines hidden (view full) ---

25 * Sun Microsystems, Inc.
26 * 2550 Garcia Avenue
27 * Mountain View, California 94043
28 */
29
30#if defined(LIBC_SCCS) && !defined(lint)
31/*static char *sccsid = "from: @(#)clnt_simple.c 1.35 87/08/11 Copyr 1984 Sun Micro";*/
32/*static char *sccsid = "from: @(#)clnt_simple.c 2.2 88/08/01 4.0 RPCSRC";*/
1/*
2 * Sun RPC is a product of Sun Microsystems, Inc. and is provided for
3 * unrestricted use provided that this legend is included on all tape
4 * media and as a part of the software program in whole or part. Users
5 * may copy or modify Sun RPC without charge, but are not authorized
6 * to license or distribute it to anyone else except as part of a product or
7 * program developed by the user.
8 *

--- 16 unchanged lines hidden (view full) ---

25 * Sun Microsystems, Inc.
26 * 2550 Garcia Avenue
27 * Mountain View, California 94043
28 */
29
30#if defined(LIBC_SCCS) && !defined(lint)
31/*static char *sccsid = "from: @(#)clnt_simple.c 1.35 87/08/11 Copyr 1984 Sun Micro";*/
32/*static char *sccsid = "from: @(#)clnt_simple.c 2.2 88/08/01 4.0 RPCSRC";*/
33static char *rcsid = "$Id: clnt_simple.c,v 1.3 1995/10/22 14:51:17 phk Exp $";
33static char *rcsid = "$Id: clnt_simple.c,v 1.4 1996/06/10 20:13:03 jraynard Exp $";
34#endif
35
36/*
37 * clnt_simple.c
38 * Simplified front end to rpc.
39 *
40 * Copyright (C) 1984, Sun Microsystems, Inc.
41 */

--- 46 unchanged lines hidden (view full) ---

88 if (crp->client) {
89 clnt_destroy(crp->client);
90 crp->client = NULL;
91 }
92 if ((hp = gethostbyname(host)) == NULL)
93 return ((int) RPC_UNKNOWNHOST);
94 timeout.tv_usec = 0;
95 timeout.tv_sec = 5;
34#endif
35
36/*
37 * clnt_simple.c
38 * Simplified front end to rpc.
39 *
40 * Copyright (C) 1984, Sun Microsystems, Inc.
41 */

--- 46 unchanged lines hidden (view full) ---

88 if (crp->client) {
89 clnt_destroy(crp->client);
90 crp->client = NULL;
91 }
92 if ((hp = gethostbyname(host)) == NULL)
93 return ((int) RPC_UNKNOWNHOST);
94 timeout.tv_usec = 0;
95 timeout.tv_sec = 5;
96 memset(&server_addr, 0, sizeof(server_addr));
96 bcopy(hp->h_addr, (char *)&server_addr.sin_addr, hp->h_length);
97 bcopy(hp->h_addr, (char *)&server_addr.sin_addr, hp->h_length);
98 server_addr.sin_len = sizeof(struct sockaddr_in);
97 server_addr.sin_family = AF_INET;
98 server_addr.sin_port = 0;
99 if ((crp->client = clntudp_create(&server_addr, (u_long)prognum,
100 (u_long)versnum, timeout, &crp->socket)) == NULL)
101 return ((int) rpc_createerr.cf_stat);
102 crp->valid = 1;
103 crp->oldprognum = prognum;
104 crp->oldversnum = versnum;

--- 13 unchanged lines hidden ---
99 server_addr.sin_family = AF_INET;
100 server_addr.sin_port = 0;
101 if ((crp->client = clntudp_create(&server_addr, (u_long)prognum,
102 (u_long)versnum, timeout, &crp->socket)) == NULL)
103 return ((int) rpc_createerr.cf_stat);
104 crp->valid = 1;
105 crp->oldprognum = prognum;
106 crp->oldversnum = versnum;

--- 13 unchanged lines hidden ---