Changeset View
Changeset View
Standalone View
Standalone View
sys/rpc/clnt_bck.c
Show First 20 Lines • Show All 560 Lines • ▼ Show 20 Lines | clnt_bck_destroy(CLIENT *cl) | ||||
if (cl->cl_tp && cl->cl_tp[0]) | if (cl->cl_tp && cl->cl_tp[0]) | ||||
mem_free(cl->cl_tp, strlen(cl->cl_tp) +1); | mem_free(cl->cl_tp, strlen(cl->cl_tp) +1); | ||||
mem_free(cl, sizeof(CLIENT)); | mem_free(cl, sizeof(CLIENT)); | ||||
} | } | ||||
/* | /* | ||||
* This call is done by the svc code when a backchannel RPC reply is | * This call is done by the svc code when a backchannel RPC reply is | ||||
* received. | * received. | ||||
* For the server end, where callback RPCs to the client are performed, | |||||
* xp_p2 points to the "CLIENT" and not the associated "struct ct_data" | |||||
* so that svc_vc_destroy() can CLNT_RELEASE() the reference count on it. | |||||
*/ | */ | ||||
void | void | ||||
clnt_bck_svccall(void *arg, struct mbuf *mrep, uint32_t xid) | clnt_bck_svccall(void *arg, struct mbuf *mrep, uint32_t xid) | ||||
{ | { | ||||
struct ct_data *ct = (struct ct_data *)arg; | CLIENT *cl = (CLIENT *)arg; | ||||
struct ct_data *ct; | |||||
struct ct_request *cr; | struct ct_request *cr; | ||||
int foundreq; | int foundreq; | ||||
ct = (struct ct_data *)cl->cl_private; | |||||
mtx_lock(&ct->ct_lock); | mtx_lock(&ct->ct_lock); | ||||
if (ct->ct_closing || ct->ct_closed) { | |||||
mtx_unlock(&ct->ct_lock); | |||||
m_freem(mrep); | |||||
return; | |||||
} | |||||
ct->ct_upcallrefs++; | ct->ct_upcallrefs++; | ||||
/* | /* | ||||
* See if we can match this reply to a request. | * See if we can match this reply to a request. | ||||
*/ | */ | ||||
foundreq = 0; | foundreq = 0; | ||||
TAILQ_FOREACH(cr, &ct->ct_pending, cr_link) { | TAILQ_FOREACH(cr, &ct->ct_pending, cr_link) { | ||||
if (cr->cr_xid == xid) { | if (cr->cr_xid == xid) { | ||||
/* | /* | ||||
Show All 23 Lines |