* idle (refCount == 0) after rx_idlePeerTime (60 seconds) have passed.
*/
MUTEX_ENTER(&rx_peerHashTable_lock);
- if (--conn->peer->refCount <= 0) {
+ if (conn->peer->refCount < 2) {
conn->peer->idleWhen = clock_Sec();
- if (conn->peer->refCount < 0) {
- conn->peer->refCount = 0;
+ if (conn->peer->refCount < 1) {
+ conn->peer->refCount = 1;
MUTEX_ENTER(&rx_stats_mutex);
rxi_lowPeerRefCount++;
MUTEX_EXIT(&rx_stats_mutex);
}
}
+ conn->peer->refCount--;
MUTEX_EXIT(&rx_peerHashTable_lock);
MUTEX_ENTER(&rx_stats_mutex);
/* client-- to retransmit the challenge */
struct rx_service *service; /* used by servers only */
u_short serviceId; /* To stamp on requests (clients only) */
- u_short refCount; /* Reference count */
+ afs_uint32 refCount; /* Reference count */
u_char flags; /* Defined below */
u_char type; /* Type of connection, defined below */
u_char secondsUntilPing; /* how often to ping for each active call */
/* For garbage collection */
afs_uint32 idleWhen; /* When the refcountwent to zero */
- short refCount; /* Reference count for this structure */
+ afs_uint32 refCount; /* Reference count for this structure */
/* Congestion control parameters */
u_char burstSize; /* Reinitialization size for the burst parameter */