From 49c1386fdd483960135d5c194d05cb8a98736b45 Mon Sep 17 00:00:00 2001 From: Jeffrey Hutzelman Date: Mon, 18 Oct 2004 04:27:41 +0000 Subject: [PATCH] STABLE12-rx-getputconnection-20041011 FIXES 15584 add Get/PutConnection funcs to diddle conn refCounts. (cherry picked from commit 3b9cdc23b5122e371139828e557732c5e434230a) --- src/rx/rx.c | 14 ++++++++++++++ src/rx/rx.h | 2 ++ 2 files changed, 16 insertions(+) diff --git a/src/rx/rx.c b/src/rx/rx.c index 4a4ea77f0..47bf37056 100644 --- a/src/rx/rx.c +++ b/src/rx/rx.c @@ -993,6 +993,20 @@ void rx_DestroyConnection(conn) USERPRI; } +void +rx_GetConnection(register struct rx_connection *conn) +{ + SPLVAR; + + NETPRI; + AFS_RXGLOCK(); + MUTEX_ENTER(&conn->conn_data_lock); + conn->refCount++; + MUTEX_EXIT(&conn->conn_data_lock); + AFS_RXGUNLOCK(); + USERPRI; +} + /* Start a new rx remote procedure call, on the specified connection. * If wait is set to 1, wait for a free call channel; otherwise return * 0. Maxtime gives the maximum number of seconds this call may take, diff --git a/src/rx/rx.h b/src/rx/rx.h index 4c6ff9d5a..48ced3db6 100644 --- a/src/rx/rx.h +++ b/src/rx/rx.h @@ -253,6 +253,8 @@ returned with an error code of RX_CALL_DEAD ( transient error ) */ #define rx_EnableHotThread() (rx_enable_hot_thread = 1) #define rx_DisableHotThread() (rx_enable_hot_thread = 0) +#define rx_PutConnection(conn) rx_DestroyConnection(conn) + struct rx_securityObjectStats { char type; /* 0:unk 1:null,2:vab 3:kad */ char level; -- 2.39.5