Deleted Added
sdiff udiff text old ( 184588 ) new ( 188142 )
full compact
1/*-
2 * Copyright (c) 2008 Isilon Inc http://www.isilon.com/
3 * Authors: Doug Rabson <dfr@rabson.org>
4 * Developed with Red Inc: Alfred Perlstein <alfred@freebsd.org>
5 *
6 * Redistribution and use in source and binary forms, with or without
7 * modification, are permitted provided that the following conditions
8 * are met:

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

21 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
22 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
23 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
24 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
25 * SUCH DAMAGE.
26 */
27
28#include <sys/cdefs.h>
29__FBSDID("$FreeBSD: head/sys/rpc/clnt_rc.c 188142 2009-02-05 11:48:10Z dfr $");
30
31#include <sys/param.h>
32#include <sys/systm.h>
33#include <sys/kernel.h>
34#include <sys/limits.h>
35#include <sys/lock.h>
36#include <sys/malloc.h>
37#include <sys/mbuf.h>

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

176 mtx_unlock(&rc->rc_lock);
177
178 so = __rpc_nconf2socket(rc->rc_nconf);
179 if (!so) {
180 stat = rpc_createerr.cf_stat = RPC_TLIERROR;
181 rpc_createerr.cf_error.re_errno = 0;
182 goto out;
183 }
184
185 oldcred = td->td_ucred;
186 td->td_ucred = rc->rc_ucred;
187 if (rc->rc_privport)
188 bindresvport(so, NULL);
189
190 if (rc->rc_nconf->nc_semantics == NC_TPI_CLTS)
191 rc->rc_client = clnt_dg_create(so,
192 (struct sockaddr *) &rc->rc_addr, rc->rc_prog, rc->rc_vers,
193 rc->rc_sendsz, rc->rc_recvsz);
194 else
195 rc->rc_client = clnt_vc_create(so,
196 (struct sockaddr *) &rc->rc_addr, rc->rc_prog, rc->rc_vers,
197 rc->rc_sendsz, rc->rc_recvsz);

--- 281 unchanged lines hidden ---