Changeset View
Changeset View
Standalone View
Standalone View
sys/rpc/clnt_dg.c
Show First 20 Lines • Show All 338 Lines • ▼ Show 20 Lines | clnt_dg_call( | ||||
bool_t ok; | bool_t ok; | ||||
int retrans; /* number of re-transmits so far */ | int retrans; /* number of re-transmits so far */ | ||||
int nrefreshes = 2; /* number of times to refresh cred */ | int nrefreshes = 2; /* number of times to refresh cred */ | ||||
struct timeval *tvp; | struct timeval *tvp; | ||||
int timeout; | int timeout; | ||||
int retransmit_time; | int retransmit_time; | ||||
int next_sendtime, starttime, rtt, time_waited, tv = 0; | int next_sendtime, starttime, rtt, time_waited, tv = 0; | ||||
struct sockaddr *sa; | struct sockaddr *sa; | ||||
socklen_t salen; | |||||
uint32_t xid = 0; | uint32_t xid = 0; | ||||
struct mbuf *mreq = NULL, *results; | struct mbuf *mreq = NULL, *results; | ||||
struct cu_request *cr; | struct cu_request *cr; | ||||
int error; | int error; | ||||
cs = cu->cu_socket->so_rcv.sb_upcallarg; | cs = cu->cu_socket->so_rcv.sb_upcallarg; | ||||
cr = malloc(sizeof(struct cu_request), M_RPC, M_WAITOK); | cr = malloc(sizeof(struct cu_request), M_RPC, M_WAITOK); | ||||
Show All 35 Lines | if (cu->cu_connect && !cu->cu_connected) { | ||||
mtx_lock(&cs->cs_lock); | mtx_lock(&cs->cs_lock); | ||||
if (error) { | if (error) { | ||||
errp->re_errno = error; | errp->re_errno = error; | ||||
errp->re_status = stat = RPC_CANTSEND; | errp->re_status = stat = RPC_CANTSEND; | ||||
goto out; | goto out; | ||||
} | } | ||||
cu->cu_connected = 1; | cu->cu_connected = 1; | ||||
} | } | ||||
if (cu->cu_connected) { | if (cu->cu_connected) | ||||
sa = NULL; | sa = NULL; | ||||
salen = 0; | else | ||||
} else { | |||||
sa = (struct sockaddr *)&cu->cu_raddr; | sa = (struct sockaddr *)&cu->cu_raddr; | ||||
salen = cu->cu_rlen; | |||||
} | |||||
time_waited = 0; | time_waited = 0; | ||||
retrans = 0; | retrans = 0; | ||||
if (ext && ext->rc_timers) { | if (ext && ext->rc_timers) { | ||||
rt = ext->rc_timers; | rt = ext->rc_timers; | ||||
if (!rt->rt_rtxcur) | if (!rt->rt_rtxcur) | ||||
rt->rt_rtxcur = tvtohz(&cu->cu_wait); | rt->rt_rtxcur = tvtohz(&cu->cu_wait); | ||||
retransmit_time = next_sendtime = rt->rt_rtxcur; | retransmit_time = next_sendtime = rt->rt_rtxcur; | ||||
} else { | } else { | ||||
▲ Show 20 Lines • Show All 740 Lines • Show Last 20 Lines |