View | Details | Raw Unified | Return to bug 26072
Collapse All | Expand All

(-)lib/libc/rpc/clnt_generic.c (+18 lines)
Lines 143-151 Link Here
143
	struct netconfig *nconf;
143
	struct netconfig *nconf;
144
	CLIENT *clnt = NULL;
144
	CLIENT *clnt = NULL;
145
	void *handle;
145
	void *handle;
146
	struct sockaddr_un sun;
147
	int sock;
148
	static struct timeval tv;
146
	enum clnt_stat	save_cf_stat = RPC_SUCCESS;
149
	enum clnt_stat	save_cf_stat = RPC_SUCCESS;
147
	struct rpc_err	save_cf_error;
150
	struct rpc_err	save_cf_error;
148
151
152
	if (!strcmp(nettype, "unix")) {
153
		bzero((char *)&sun, sizeof(sun));
154
		sun.sun_family = AF_UNIX;
155
		strcpy(sun.sun_path, hostname);
156
		sun.sun_len = sizeof(sun.sun_len) + sizeof(sun.sun_family) +
157
		    strlen(sun.sun_path) + 1;
158
		sock = RPC_ANYSOCK;
159
		clnt = clntunix_create(&sun, prog, vers, &sock, 0, 0);
160
		if (clnt == NULL)
161
			return(NULL);
162
		tv.tv_sec = 25;
163
		tv.tv_usec = 0;
164
		clnt_control(clnt, CLSET_TIMEOUT, &tv);
165
		return(clnt);
166
	}
149
167
150
	if ((handle = __rpc_setconf(nettype)) == NULL) {
168
	if ((handle = __rpc_setconf(nettype)) == NULL) {
151
		rpc_createerr.cf_stat = RPC_UNKNOWNPROTO;
169
		rpc_createerr.cf_stat = RPC_UNKNOWNPROTO;

Return to bug 26072