From a173395b5a793418f444bb97a3cb7108d29823b0 Mon Sep 17 00:00:00 2001 From: Olga Kornievskaia Date: Wed, 27 Apr 2011 15:56:01 -0400 Subject: [PATCH] [libtirpc] fix for async rpc + krb5p don't release the lock if this is krb5p when the receiver finds nothing in the socket during the recv --- libtirpc/src/clnt_vc.c | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/libtirpc/src/clnt_vc.c b/libtirpc/src/clnt_vc.c index 8662096..29d68d0 100644 --- a/libtirpc/src/clnt_vc.c +++ b/libtirpc/src/clnt_vc.c @@ -514,7 +514,9 @@ clnt_vc_call(cl, proc, xdr_args, args_ptr, xdr_results, results_ptr, timeout) #else /* XXX Need Windows signal/event stuff XXX */ #endif + acquire_fd_lock(ct->ct_fd); + if (!ct->ct_waitset) { /* If time is not within limits, we ignore it. */ if (time_not_ok(&timeout) == FALSE) @@ -577,7 +579,10 @@ call_again: ct->reply_msg.acpted_rply.ar_results.proc = (xdrproc_t)xdr_void; if (!ct->use_stored_reply_msg) { if (!xdrrec_skiprecord(xdrs)) { - release_fd_lock(ct->ct_fd, mask); +#ifdef NO_CB_4_KRB5P + if (cl->cb_thread != INVALID_HANDLE_VALUE) +#endif + release_fd_lock(ct->ct_fd, mask); SwitchToThread(); continue; }