/*
-****************************************************************************
-* Copyright IBM Corporation 1988, 1989 - All Rights Reserved *
-* *
-* Permission to use, copy, modify, and distribute this software and its *
-* documentation for any purpose and without fee is hereby granted, *
-* provided that the above copyright notice appear in all copies and *
-* that both that copyright notice and this permission notice appear in *
-* supporting documentation, and that the name of IBM not be used in *
-* advertising or publicity pertaining to distribution of the software *
-* without specific, written prior permission. *
-* *
-* IBM DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING ALL *
-* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO EVENT SHALL IBM *
-* BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR ANY *
-* DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER *
-* IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING *
-* OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. *
-****************************************************************************
-*/
+ * Copyright 2000, International Business Machines Corporation and others.
+ * All Rights Reserved.
+ *
+ * This software has been released under the terms of the IBM Public
+ * License. For details, see the LICENSE file in the top-level source
+ * directory or online at http://www.openafs.org/dl/license10.html
+ */
/* RX: Extended Remote Procedure Call */
+#include <afsconfig.h>
#ifdef KERNEL
#include "../afs/param.h"
+#else
+#include <afs/param.h>
+#endif
+
+RCSID("$Header$");
+
+#ifdef KERNEL
#include "../afs/sysincludes.h"
#include "../afs/afsincludes.h"
#ifndef UKERNEL
#endif /* AFS_AIX41_ENV */
# include "../afsint/rxgen_consts.h"
#else /* KERNEL */
-# include <afs/param.h>
# include <sys/types.h>
# include <errno.h>
#ifdef AFS_NT40_ENV
# include <netinet/in.h>
# include <sys/time.h>
#endif
+#ifdef HAVE_STRING_H
+#include <string.h>
+#else
+#ifdef HAVE_STRINGS_H
+#include <strings.h>
+#endif
+#endif
# include "rx.h"
# include "rx_user.h"
# include "rx_clock.h"
# include <afs/rxgen_consts.h>
#endif /* KERNEL */
+int (*registerProgram)() = 0;
+int (*swapNameProgram)() = 0;
+
#ifdef AFS_GLOBAL_RXLOCK_KERNEL
struct rx_tq_debug {
afs_int32 rxi_start_aborted; /* rxi_start awoke after rxi_Send in error. */
#define INIT_PTHREAD_LOCKS
#endif
-extern void rxi_DeleteCachedConnections(void);
-
/* Variables for handling the minProcs implementation. availProcs gives the
* number of threads available in the pool at this moment (not counting dudes
* to manipulate the queue.
*/
-extern void rxi_Delay(int);
-
-static int rxi_ServerThreadSelectingCall;
-
#ifdef RX_ENABLE_LOCKS
+static int rxi_ServerThreadSelectingCall;
static afs_kmutex_t rx_rpc_stats;
void rxi_StartUnlocked();
#endif
** pretty good that the next packet coming in is from the same connection
** as the last packet, since we're send multiple packets in a transmit window.
*/
-struct rx_connection *rxLastConn;
+struct rx_connection *rxLastConn = 0;
#ifdef RX_ENABLE_LOCKS
/* The locking hierarchy for rx fine grain locking is composed of five
#define CLEAR_CALL_QUEUE_LOCK(C)
#endif /* RX_ENABLE_LOCKS */
static void rxi_DestroyConnectionNoLock();
-void rxi_DestroyConnection();
-void rxi_CleanupConnection();
struct rx_serverQueueEntry *rx_waitForPacket = 0;
/* ------------Exported Interfaces------------- */
char *htable, *ptable;
int tmp_status;
+#if defined(AFS_DJGPP_ENV) && !defined(DEBUG)
+ __djgpp_set_quiet_socket(1);
+#endif
+
SPLVAR;
INIT_PTHREAD_LOCKS
rxi_nCalls = 0;
rx_connDeadTime = 12;
rx_tranquil = 0; /* reset flag */
- bzero((char *)&rx_stats, sizeof(struct rx_stats));
+ memset((char *)&rx_stats, 0, sizeof(struct rx_stats));
htable = (char *)
osi_Alloc(rx_hashTableSize*sizeof(struct rx_connection *));
PIN(htable, rx_hashTableSize*sizeof(struct rx_connection *)); /* XXXXX */
- bzero(htable, rx_hashTableSize*sizeof(struct rx_connection *));
+ memset(htable, 0, rx_hashTableSize*sizeof(struct rx_connection *));
ptable = (char *) osi_Alloc(rx_hashTableSize*sizeof(struct rx_peer *));
PIN(ptable, rx_hashTableSize*sizeof(struct rx_peer *)); /* XXXXX */
- bzero(ptable, rx_hashTableSize*sizeof(struct rx_peer *));
+ memset(ptable, 0, rx_hashTableSize*sizeof(struct rx_peer *));
/* Malloc up a bunch of packets & buffers */
rx_nFreePackets = 0;
#else
osi_GetTime(&tv);
#endif
- /* *Slightly* random start time for the cid. This is just to help
- * out with the hashing function at the peer */
- rx_port = port;
+ if (port) {
+ rx_port = port;
+ } else {
+#if defined(KERNEL) && !defined(UKERNEL)
+ /* Really, this should never happen in a real kernel */
+ rx_port = 0;
+#else
+ struct sockaddr_in addr;
+ int addrlen = sizeof(addr);
+ if (getsockname((int)rx_socket, (struct sockaddr *) &addr, &addrlen)) {
+ rx_Finalize();
+ return -1;
+ }
+ rx_port = addr.sin_port;
+#endif
+ }
rx_stats.minRtt.sec = 9999999;
#ifdef KERNEL
rx_SetEpoch (tv.tv_sec | 0x80000000);
MUTEX_ENTER(&rx_stats_mutex);
rxi_dataQuota += rx_extraQuota; /* + extra pkts caller asked to rsrv */
MUTEX_EXIT(&rx_stats_mutex);
+ /* *Slightly* random start time for the cid. This is just to help
+ * out with the hashing function at the peer */
rx_nextCid = ((tv.tv_sec ^ tv.tv_usec) << RX_CIDSHIFT);
rx_connHashTable = (struct rx_connection **) htable;
rx_peerHashTable = (struct rx_peer **) ptable;
}
#else /* RX_ENABLE_LOCKS */
-static QuotaOK(aservice)
+static int QuotaOK(aservice)
register struct rx_service *aservice; {
int rc=0;
/* under min quota, we're OK */
void rx_StartServer(donateMe)
{
register struct rx_service *service;
- register int i;
+ register int i, nProcs=0;
SPLVAR;
clock_NewTime();
AFS_RXGUNLOCK();
USERPRI;
- if (donateMe) rx_ServerProc(); /* Never returns */
+ if (donateMe) {
+#ifndef AFS_NT40_ENV
+#ifndef KERNEL
+ char name[32];
+#ifdef AFS_PTHREAD_ENV
+ pid_t pid;
+ pid = (pid_t) pthread_self();
+#else /* AFS_PTHREAD_ENV */
+ PROCESS pid;
+ LWP_CurrentProcess(&pid);
+#endif /* AFS_PTHREAD_ENV */
+
+ sprintf(name,"srv_%d", ++nProcs);
+ if (registerProgram)
+ (*registerProgram)(pid, name);
+#endif /* KERNEL */
+#endif /* AFS_NT40_ENV */
+ rx_ServerProc(); /* Never returns */
+ }
return;
}
MUTEX_EXIT(&rx_stats_mutex);
}
- if (conn->refCount > 0) {
+ if ((conn->refCount > 0) || (conn->flags & RX_CONN_BUSY)) {
/* Busy; wait till the last guy before proceeding */
MUTEX_EXIT(&conn->conn_data_lock);
USERPRI;
return call;
}
+int
rxi_HasActiveCalls(aconn)
register struct rx_connection *aconn; {
register int i;
NETPRI;
for(i=0; i<RX_MAXCALLS; i++) {
- if (tcall = aconn->call[i]) {
+ if ((tcall = aconn->call[i])) {
if ((tcall->state == RX_STATE_ACTIVE)
|| (tcall->state == RX_STATE_PRECALL)) {
USERPRI;
return 0;
}
+int
rxi_GetCallNumberVector(aconn, aint32s)
register struct rx_connection *aconn;
register afs_int32 *aint32s; {
return 0;
}
+int
rxi_SetCallNumberVector(aconn, aint32s)
register struct rx_connection *aconn;
register afs_int32 *aint32s; {
{
struct rx_serverQueueEntry *sq;
register struct rx_call *call = (struct rx_call *) 0, *choice2;
- struct rx_service *service;
+ struct rx_service *service = NULL;
SPLVAR;
MUTEX_ENTER(&freeSQEList_lock);
- if (sq = rx_FreeSQEList) {
+ if ((sq = rx_FreeSQEList)) {
rx_FreeSQEList = *(struct rx_serverQueueEntry **)sq;
MUTEX_EXIT(&freeSQEList_lock);
} else { /* otherwise allocate a new one and return that */
{
struct rx_serverQueueEntry *sq;
register struct rx_call *call = (struct rx_call *) 0, *choice2;
- struct rx_service *service;
+ struct rx_service *service = NULL;
SPLVAR;
NETPRI;
AFS_RXGLOCK();
MUTEX_ENTER(&freeSQEList_lock);
- if (sq = rx_FreeSQEList) {
+ if ((sq = rx_FreeSQEList)) {
rx_FreeSQEList = *(struct rx_serverQueueEntry **)sq;
MUTEX_EXIT(&freeSQEList_lock);
} else { /* otherwise allocate a new one and return that */
MUTEX_ENTER(&conn->conn_call_lock);
MUTEX_ENTER(&call->lock);
MUTEX_ENTER(&conn->conn_data_lock);
+ conn->flags |= RX_CONN_BUSY;
if (conn->flags & RX_CONN_MAKECALL_WAITING) {
conn->flags &= (~RX_CONN_MAKECALL_WAITING);
MUTEX_EXIT(&conn->conn_data_lock);
CALL_RELE(call, RX_CALL_REFCOUNT_BEGIN);
MUTEX_EXIT(&call->lock);
- if (conn->type == RX_CLIENT_CONNECTION)
+ if (conn->type == RX_CLIENT_CONNECTION) {
MUTEX_EXIT(&conn->conn_call_lock);
+ conn->flags &= ~RX_CONN_BUSY;
+ }
AFS_RXGUNLOCK();
USERPRI;
/*
p = (char *) osi_Alloc(size);
#endif
if (!p) osi_Panic("rxi_Alloc error");
- bzero(p, size);
+ memset(p, 0, size);
return p;
}
} else if (call->nSoftAcks > (u_short)rxi_SoftAckRate) {
rxevent_Cancel(call->delayedAckEvent, call, RX_CALL_REFCOUNT_DELAY);
np = rxi_SendAck(call, np, seq, serial, flags,
- RX_ACK_DELAY, istack);
+ RX_ACK_IDLE, istack);
} else if (call->nSoftAcks) {
clock_GetTime(&when);
if (haveLast && !(flags & RX_CLIENT_INITIATED)) {
afs_uint32 serial;
/* because there are CM's that are bogus, sending weird values for this. */
afs_uint32 skew = 0;
- int needRxStart = 0;
int nbytes;
int missing;
int acked;
if (rx_Log) {
fprintf( rx_Log,
"RACK: reason %x previous %u seq %u serial %u skew %d first %u",
- ap->reason, ntohl(ap->previousPacket), np->header.seq, serial,
- skew, ntohl(ap->firstPacket));
+ ap->reason, ntohl(ap->previousPacket),
+ (unsigned int) np->header.seq, (unsigned int) serial,
+ (unsigned int) skew, ntohl(ap->firstPacket));
if (nAcks) {
int offset;
for (offset = 0; offset < nAcks; offset++)
if (tp->header.seq >= first) break;
call->tfirst = tp->header.seq + 1;
if (tp->header.serial == serial) {
- rxi_ComputeRoundTripTime(tp, &tp->timeSent, peer);
+ /* Use RTT if not delayed by client. */
+ if (ap->reason != RX_ACK_DELAY)
+ rxi_ComputeRoundTripTime(tp, &tp->timeSent, peer);
#ifdef ADAPT_WINDOW
rxi_ComputeRate(peer, call, tp, np, ap->reason);
#endif
}
- else if ((tp->firstSerial == serial)) {
- rxi_ComputeRoundTripTime(tp, &tp->firstSent, peer);
+ else if (tp->firstSerial == serial) {
+ /* Use RTT if not delayed by client. */
+ if (ap->reason != RX_ACK_DELAY)
+ rxi_ComputeRoundTripTime(tp, &tp->firstSent, peer);
#ifdef ADAPT_WINDOW
rxi_ComputeRate(peer, call, tp, np, ap->reason);
#endif
#endif /* RX_ENABLE_LOCKS */
#endif /* AFS_GLOBAL_RXLOCK_KERNEL */
if (tp->header.serial == serial) {
- rxi_ComputeRoundTripTime(tp, &tp->timeSent, peer);
+ /* Use RTT if not delayed by client. */
+ if (ap->reason != RX_ACK_DELAY)
+ rxi_ComputeRoundTripTime(tp, &tp->timeSent, peer);
#ifdef ADAPT_WINDOW
rxi_ComputeRate(peer, call, tp, np, ap->reason);
#endif
}
else if ((tp->firstSerial == serial)) {
- rxi_ComputeRoundTripTime(tp, &tp->firstSent, peer);
+ /* Use RTT if not delayed by client. */
+ if (ap->reason != RX_ACK_DELAY)
+ rxi_ComputeRoundTripTime(tp, &tp->firstSent, peer);
#ifdef ADAPT_WINDOW
rxi_ComputeRate(peer, call, tp, np, ap->reason);
#endif
if (call->flags & RX_CALL_CLEARED) {
/* send an ack now to start the packet flow up again */
call->flags &= ~RX_CALL_CLEARED;
- rxi_SendAck(call, 0, 0, 0, 0, RX_ACK_DELAY, 0);
+ rxi_SendAck(call, 0, 0, 0, 0, RX_ACK_IDLE, 0);
}
#ifdef RX_ENABLE_LOCKS
CV_SIGNAL(&sq->cv);
#ifdef RXDEBUG
if (rx_Log) {
fprintf(rx_Log, "SACK: reason %x previous %u seq %u first %u",
- ap->reason, ntohl(ap->previousPacket), p->header.seq,
- ntohl(ap->firstPacket));
+ ap->reason, ntohl(ap->previousPacket),
+ (unsigned int) p->header.seq, ntohl(ap->firstPacket));
if (ap->nAcks) {
for (offset = 0; offset < ap->nAcks; offset++)
putc(ap->acks[offset] == RX_ACK_TYPE_NACK? '-' : '*', rx_Log);
}
/* Send all of the packets in the list in single datagram */
-static void rxi_SendList(call, list, len, istack, moreFlag, now, retryTime)
+static void rxi_SendList(call, list, len, istack, moreFlag, now, retryTime, resending)
struct rx_call *call;
struct rx_packet **list;
int len;
int moreFlag;
struct clock *now;
struct clock *retryTime;
+ int resending;
{
int i;
int requestAck = 0;
MUTEX_ENTER(&peer->peer_lock);
peer->nSent += len;
+ if (resending) peer->reSends += len;
MUTEX_ENTER(&rx_stats_mutex);
rx_stats.dataPacketsSent += len;
MUTEX_EXIT(&rx_stats_mutex);
MUTEX_ENTER(&peer->peer_lock);
peer->nSent++;
+ if (resending) peer->reSends++;
MUTEX_ENTER(&rx_stats_mutex);
rx_stats.dataPacketsSent++;
MUTEX_EXIT(&rx_stats_mutex);
* We always keep the last list we should have sent so we
* can set the RX_MORE_PACKETS flags correctly.
*/
-static void rxi_SendXmitList(call, list, len, istack, now, retryTime)
+static void rxi_SendXmitList(call, list, len, istack, now, retryTime, resending)
struct rx_call *call;
struct rx_packet **list;
int len;
int istack;
struct clock *now;
struct clock *retryTime;
+ int resending;
{
int i, cnt, lastCnt = 0;
struct rx_packet **listP, **lastP = 0;
|| list[i]->acked
|| list[i]->length > RX_JUMBOBUFFERSIZE)) {
if (lastCnt > 0) {
- rxi_SendList(call, lastP, lastCnt, istack, 1, now, retryTime);
+ rxi_SendList(call, lastP, lastCnt, istack, 1, now, retryTime, resending);
/* If the call enters an error state stop sending, or if
* we entered congestion recovery mode, stop sending */
if (call->error || (call->flags & RX_CALL_FAST_RECOVER_WAIT))
|| list[i]->length != RX_JUMBOBUFFERSIZE) {
if (lastCnt > 0) {
rxi_SendList(call, lastP, lastCnt, istack, 1,
- now, retryTime);
+ now, retryTime, resending);
/* If the call enters an error state stop sending, or if
* we entered congestion recovery mode, stop sending */
if (call->error || (call->flags&RX_CALL_FAST_RECOVER_WAIT))
}
if (lastCnt > 0) {
rxi_SendList(call, lastP, lastCnt, istack, morePackets,
- now, retryTime);
+ now, retryTime, resending);
/* If the call enters an error state stop sending, or if
* we entered congestion recovery mode, stop sending */
if (call->error || (call->flags & RX_CALL_FAST_RECOVER_WAIT))
return;
}
if (morePackets) {
- rxi_SendList(call, listP, cnt, istack, 0, now, retryTime);
+ rxi_SendList(call, listP, cnt, istack, 0, now, retryTime, resending);
}
} else if (lastCnt > 0) {
- rxi_SendList(call, lastP, lastCnt, istack, 0, now, retryTime);
+ rxi_SendList(call, lastP, lastCnt, istack, 0, now, retryTime, resending);
}
}
int nXmitPackets;
int maxXmitPackets;
struct rx_packet **xmitList;
+ int resending = 0;
/* If rxi_Start is being called as a result of a resend event,
* then make sure that the event pointer is removed from the call
if (event && event == call->resendEvent) {
CALL_RELE(call, RX_CALL_REFCOUNT_RESEND);
call->resendEvent = NULL;
+ resending = 1;
if (queue_IsEmpty(&call->tq)) {
/* Nothing to do */
return;
* ready to send. Now we loop to send the packets */
if (nXmitPackets > 0) {
rxi_SendXmitList(call, xmitList, nXmitPackets, istack,
- &now, &retryTime);
+ &now, &retryTime, resending);
}
osi_Free(xmitList, maxXmitPackets * sizeof(struct rx_packet *));
(char *)call, istack);
#else /* RX_ENABLE_LOCKS */
call->resendEvent = rxevent_Post(&retryTime, rxi_Start,
- (char *)call, (void*)istack);
+ (char *)call, (void*)(long)istack);
#endif /* RX_ENABLE_LOCKS */
}
}
{
struct clock thisRtt, *rttp = &thisRtt;
+#if defined(AFS_ALPHA_LINUX22_ENV) && defined(AFS_PTHREAD_ENV) && !defined(KERNEL)
+ /* making year 2038 bugs to get this running now - stroucki */
+ struct timeval temptime;
+#endif
register int rtt_timeout;
- static char id[]="@(#)adaptive RTO";
- clock_GetTime(rttp);
+#if defined(AFS_ALPHA_LINUX20_ENV) && defined(AFS_PTHREAD_ENV) && !defined(KERNEL)
+ /* yet again. This was the worst Heisenbug of the port - stroucki */
+ clock_GetTime(&temptime);
+ rttp->sec=(afs_int32)temptime.tv_sec;
+ rttp->usec=(afs_int32)temptime.tv_usec;
+#else
+ clock_GetTime(rttp);
+#endif
if (clock_Lt(rttp, sentp)) {
clock_Zero(rttp);
return; /* somebody set the clock back, don't count this time. */
{
struct clock now;
clock_GetTime(&now);
- fprintf(rx_Log, " %u.%.3u:", now.sec, now.usec/1000);
+ fprintf(rx_Log, " %u.%.3u:", (unsigned int) now.sec, (unsigned int) now.usec/1000);
fprintf(rx_Log, format, a1, a2, a3, a4, a5, a6, a7, a8, a9, a10, a11, a12, a13, a14, a15);
putc('\n', rx_Log);
}
}
fprintf(file,
- "rx stats: free packets %d, "
- "allocs %d, ",
- freePackets,
+ "rx stats: free packets %d, allocs %d, ",
+ (int) freePackets,
s->packetRequests);
if (version >= RX_DEBUGI_VERSION_W_NEWPACKETTYPES) {
" \t(these should be small) sendFailed %d, "
"fatalErrors %d\n",
s->netSendFailures,
- s->fatalErrors);
+ (int) s->fatalErrors);
if (s->nRttSamples) {
fprintf(file,
"Burst size %d, "
"burst wait %u.%d.\n",
ntohl(peer->host),
- peer->port,
- peer->burstSize,
- peer->burstWait.sec,
- peer->burstWait.usec);
+ (int) peer->port,
+ (int) peer->burstSize,
+ (int) peer->burstWait.sec,
+ (int) peer->burstWait.usec);
fprintf(file,
" Rtt %d, "
"total sent %d, "
"resent %d\n",
peer->rtt,
- peer->timeout.sec,
- peer->timeout.usec,
+ (int) peer->timeout.sec,
+ (int) peer->timeout.usec,
peer->nSent,
peer->reSends);
"max in packet skew %d, "
"max out packet skew %d\n",
peer->ifMTU,
- peer->inPacketSkew,
- peer->outPacketSkew);
+ (int) peer->inPacketSkew,
+ (int) peer->outPacketSkew);
}
#ifdef AFS_PTHREAD_ENV
theader.flags = RX_CLIENT_INITIATED | RX_LAST_PACKET;
theader.serviceId = 0;
- bcopy(&theader, tbuffer, sizeof(theader));
- bcopy(inputData, tp, inputLength);
+ memcpy(tbuffer, &theader, sizeof(theader));
+ memcpy(tp, inputData, inputLength);
code = sendto(socket, tbuffer, inputLength+sizeof(struct rx_header), 0,
(struct sockaddr *) &taddr, sizeof(struct sockaddr_in));
code = recvfrom(socket, tbuffer, sizeof(tbuffer), 0,
(struct sockaddr *) &faddr, &faddrLen);
- bcopy(tbuffer, &theader, sizeof(struct rx_header));
+ memcpy(&theader, tbuffer, sizeof(struct rx_header));
if (counter == ntohl(theader.callNumber)) break;
}
}
code -= sizeof(struct rx_header);
if (code > outputLength) code = outputLength;
- bcopy(tp, outputData, code);
+ memcpy(outputData, tp, code);
return code;
}
{
struct rx_debugIn in;
afs_int32 rc = 0;
- int i;
/*
* supportedValues is currently unused, but added to allow future
{
struct rx_serverQueueEntry *np;
register int i, j;
+ register struct rx_call *call;
+ register struct rx_serverQueueEntry *sq;
LOCK_RX_INIT
if (rxinit_status == 1) {
return; /* Already shutdown. */
}
+#ifndef KERNEL
+ rx_port = 0;
+#ifndef AFS_PTHREAD_ENV
+ FD_ZERO(&rx_selectMask);
+#endif /* AFS_PTHREAD_ENV */
+ rxi_dataQuota = RX_MAX_QUOTA;
+#ifndef AFS_PTHREAD_ENV
+ rxi_StopListener();
+#endif /* AFS_PTHREAD_ENV */
+ shutdown_rxevent();
+ rx_SetEpoch(0);
+#ifndef AFS_PTHREAD_ENV
+#ifndef AFS_USE_GETTIMEOFDAY
+ clock_UnInit();
+#endif /* AFS_USE_GETTIMEOFDAY */
+#endif /* AFS_PTHREAD_ENV */
+
+ while (!queue_IsEmpty(&rx_freeCallQueue)) {
+ call = queue_First(&rx_freeCallQueue, rx_call);
+ queue_Remove(call);
+ rxi_Free(call, sizeof(struct rx_call));
+ }
+
+ while (!queue_IsEmpty(&rx_idleServerQueue)) {
+ sq = queue_First(&rx_idleServerQueue, rx_serverQueueEntry);
+ queue_Remove(sq);
+ }
+#endif /* KERNEL */
+
{
struct rx_peer **peer_ptr, **peer_end;
for (peer_ptr = &rx_peerHashTable[0],
MUTEX_ENTER(&freeSQEList_lock);
- while (np = rx_FreeSQEList) {
+ while ((np = rx_FreeSQEList)) {
rx_FreeSQEList = *(struct rx_serverQueueEntry **)np;
MUTEX_DESTROY(&np->lock);
rxi_Free(np, sizeof(*np));
* queue.
*/
- if ((rpc_stat == NULL) ||
+ if (queue_IsEnd(stats, rpc_stat) ||
+ (rpc_stat == NULL) ||
(rpc_stat->stats[0].interfaceId != rxInterface) ||
(rpc_stat->stats[0].remote_is_server != isServer)) {
int i;
ptr = *stats = (afs_uint32 *) rxi_Alloc(space);
if (ptr != NULL) {
- register struct rx_peer *pp;
- int i;
- int num_copied = 0;
rx_interface_stat_p rpc_stat, nrpc_stat;
ptr = *stats = (afs_uint32 *) rxi_Alloc(space);
if (ptr != NULL) {
- int i;
- int num_copied = 0;
rx_interface_stat_p rpc_stat, nrpc_stat;
char *fix_offset;