conn->type = RX_CLIENT_CONNECTION;
conn->cid = cid;
conn->epoch = rx_epoch;
- conn->peer = rxi_FindPeer(shost, sport, 0, 1);
+ conn->peer = rxi_FindPeer(shost, sport, 1);
conn->serviceId = sservice;
conn->securityObject = securityObject;
conn->securityData = (void *) 0;
/* Find the peer process represented by the supplied (host,port)
* combination. If there is no appropriate active peer structure, a
* new one will be allocated and initialized
- * The origPeer, if set, is a pointer to a peer structure on which the
- * refcount will be be decremented. This is used to replace the peer
- * structure hanging off a connection structure */
+ */
struct rx_peer *
-rxi_FindPeer(afs_uint32 host, u_short port,
- struct rx_peer *origPeer, int create)
+rxi_FindPeer(afs_uint32 host, u_short port, int create)
{
struct rx_peer *pp;
int hashIndex;
if (pp && create) {
pp->refCount++;
}
- if (origPeer)
- origPeer->refCount--;
MUTEX_EXIT(&rx_peerHashTable_lock);
return pp;
}
CV_INIT(&conn->conn_call_cv, "conn call cv", CV_DEFAULT, 0);
conn->next = rx_connHashTable[hashindex];
rx_connHashTable[hashindex] = conn;
- conn->peer = rxi_FindPeer(host, port, 0, 1);
+ conn->peer = rxi_FindPeer(host, port, 1);
conn->type = RX_SERVER_CONNECTION;
conn->lastSendTime = clock_Sec(); /* don't GC immediately */
conn->epoch = epoch;
struct rx_peer *peer;
/* Try to look up the peer structure, but don't create one */
- peer = rxi_FindPeer(host, port, 0, 0);
+ peer = rxi_FindPeer(host, port, 0);
/* Since this may not be associated with a connection, it may have
* no refCount, meaning we could race with ReapConnections
if (rxInterface == -1)
return;
- peer = rxi_FindPeer(peerHost, peerPort, 0, 0);
+ peer = rxi_FindPeer(peerHost, peerPort, 0);
if (!peer)
return;
if (rpcop_stat == NULL)
return NULL;
- peer = rxi_FindPeer(peerHost, peerPort, 0, 0);
+ peer = rxi_FindPeer(peerHost, peerPort, 0);
if (!peer)
return NULL;