libtirpc/libtirpc-0.1.7-clnt_raw-mutex.patch
Steve Dickson 808a248167 - Fixed mutex lock problem in clnt_raw_create()
- Ignore the return value of snprintf() and use strlen() instead to bump
    the pointer in clnt_sperror()
- A couple ntohs() were needed in bindresvport_sa()
- Added IP_RECVERR processing with to clnt_dg_call() so application will
    see errors instead of timing out
2007-07-30 11:24:01 +00:00

29 lines
863 B
Diff

commit 419d35db75ab8bd8f79c424f529a6c2f7c4f5fa7
Author: Steve Dickson <steved@redhat.com>
Date: Fri May 4 09:27:00 2007 -0400
Fixed mutex locking problem in clnt_raw.c. One should grab the
clntraw_lock before accessing at clntraw_private, not after.
Signed-off-by: Steve Dickson <steved@redhat.com>
diff --git a/src/clnt_raw.c b/src/clnt_raw.c
index 153dd87..36035c8 100644
--- a/src/clnt_raw.c
+++ b/src/clnt_raw.c
@@ -82,12 +82,13 @@ clnt_raw_create(prog, vers)
rpcprog_t prog;
rpcvers_t vers;
{
- struct clntraw_private *clp = clntraw_private;
+ struct clntraw_private *clp;
struct rpc_msg call_msg;
XDR *xdrs = &clp->xdr_stream;
CLIENT *client = &clp->client_object;
mutex_lock(&clntraw_lock);
+ clp = clntraw_private;
if (clp == NULL) {
clp = (struct clntraw_private *)calloc(1, sizeof (*clp));
if (clp == NULL) {