svc_generic.c (e57c2b130f2cd40967cf20698d376cc5ada95871) svc_generic.c (6b97c9f09a0184f0853280013297e288751ec76a)
1/* $NetBSD: svc_generic.c,v 1.3 2000/07/06 03:10:35 christos Exp $ */
2
3/*
4 * Sun RPC is a product of Sun Microsystems, Inc. and is provided for
5 * unrestricted use provided that this legend is included on all tape
6 * media and as a part of the software program in whole or part. Users
7 * may copy or modify Sun RPC without charge, but are not authorized
8 * to license or distribute it to anyone else except as part of a product or

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

115 }
116 }
117 }
118 mtx_unlock(&pool->sp_lock);
119 if (xprt == NULL) {
120 /* It was not found. Now create a new one */
121 xprt = svc_tp_create(pool, dispatch, prognum, versnum,
122 NULL, nconf);
1/* $NetBSD: svc_generic.c,v 1.3 2000/07/06 03:10:35 christos Exp $ */
2
3/*
4 * Sun RPC is a product of Sun Microsystems, Inc. and is provided for
5 * unrestricted use provided that this legend is included on all tape
6 * media and as a part of the software program in whole or part. Users
7 * may copy or modify Sun RPC without charge, but are not authorized
8 * to license or distribute it to anyone else except as part of a product or

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

115 }
116 }
117 }
118 mtx_unlock(&pool->sp_lock);
119 if (xprt == NULL) {
120 /* It was not found. Now create a new one */
121 xprt = svc_tp_create(pool, dispatch, prognum, versnum,
122 NULL, nconf);
123 if (xprt)
123 if (xprt) {
124 num++;
124 num++;
125 SVC_RELEASE(xprt);
126 }
125 }
126 }
127 __rpc_endconf(handle);
128 /*
129 * In case of num == 0; the error messages are generated by the
130 * underlying layers; and hence not needed here.
131 */
132 return (num);

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

174 nconfcopy = *nconf;
175 (void) rpcb_unset(prognum, versnum, &nconfcopy);
176 if (svc_reg(xprt, prognum, versnum, dispatch, nconf) == FALSE) {
177 printf(
178 "svc_tp_create: Could not register prog %u vers %u on %s\n",
179 (unsigned)prognum, (unsigned)versnum,
180 nconf->nc_netid);
181 xprt_unregister(xprt);
127 }
128 }
129 __rpc_endconf(handle);
130 /*
131 * In case of num == 0; the error messages are generated by the
132 * underlying layers; and hence not needed here.
133 */
134 return (num);

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

176 nconfcopy = *nconf;
177 (void) rpcb_unset(prognum, versnum, &nconfcopy);
178 if (svc_reg(xprt, prognum, versnum, dispatch, nconf) == FALSE) {
179 printf(
180 "svc_tp_create: Could not register prog %u vers %u on %s\n",
181 (unsigned)prognum, (unsigned)versnum,
182 nconf->nc_netid);
183 xprt_unregister(xprt);
184 SVC_RELEASE(xprt);
182 return (NULL);
183 }
184 return (xprt);
185}
186
187/*
188 * If so is NULL, then it opens a socket for the given transport
189 * provider (nconf cannot be NULL then). If the t_state is T_UNBND and

--- 129 unchanged lines hidden ---
185 return (NULL);
186 }
187 return (xprt);
188}
189
190/*
191 * If so is NULL, then it opens a socket for the given transport
192 * provider (nconf cannot be NULL then). If the t_state is T_UNBND and

--- 129 unchanged lines hidden ---