From bcfa116fb511e7f843c05b4a102a69b5ab517073 Mon Sep 17 00:00:00 2001 From: Jeffrey Altman Date: Thu, 25 Sep 2008 18:16:14 +0000 Subject: [PATCH] STABLE14-rename-rx-stats-20080925 LICENSE IPL10 avoid using the same name for the struct and the global so the windows debugger works usefully (cherry picked from commit 7a4041f9404ff27f3e446d7b523086e0938dc6b9) --- src/rx/rx.c | 10 +++++----- src/rx/rx.h | 2 +- src/rx/rx_globals.h | 2 +- src/rx/rx_prototypes.h | 4 ++-- 4 files changed, 9 insertions(+), 9 deletions(-) diff --git a/src/rx/rx.c b/src/rx/rx.c index 4e1219ff0..f3fdf4aad 100644 --- a/src/rx/rx.c +++ b/src/rx/rx.c @@ -457,7 +457,7 @@ rx_InitHost(u_int host, u_int port) rxi_nCalls = 0; rx_connDeadTime = 12; rx_tranquil = 0; /* reset flag */ - memset((char *)&rx_stats, 0, sizeof(struct rx_stats)); + memset((char *)&rx_stats, 0, sizeof(struct rx_statistics)); htable = (char *) osi_Alloc(rx_hashTableSize * sizeof(struct rx_connection *)); PIN(htable, rx_hashTableSize * sizeof(struct rx_connection *)); /* XXXXX */ @@ -6134,15 +6134,15 @@ rxi_DebugPrint(char *format, int a1, int a2, int a3, int a4, int a5, int a6, * checking. */ void -rx_PrintTheseStats(FILE * file, struct rx_stats *s, int size, +rx_PrintTheseStats(FILE * file, struct rx_statistics *s, int size, afs_int32 freePackets, char version) { int i; - if (size != sizeof(struct rx_stats)) { + if (size != sizeof(struct rx_statistics)) { fprintf(file, "Unexpected size of stats structure: was %d, expected %d\n", - size, sizeof(struct rx_stats)); + size, sizeof(struct rx_statistics)); } fprintf(file, "rx stats: free packets %d, allocs %d, ", (int)freePackets, @@ -6417,7 +6417,7 @@ rx_GetServerDebug(osi_socket socket, afs_uint32 remoteAddr, afs_int32 rx_GetServerStats(osi_socket socket, afs_uint32 remoteAddr, - afs_uint16 remotePort, struct rx_stats * stat, + afs_uint16 remotePort, struct rx_statistics * stat, afs_uint32 * supportedValues) { struct rx_debugIn in; diff --git a/src/rx/rx.h b/src/rx/rx.h index 9df696709..a0c2d541f 100644 --- a/src/rx/rx.h +++ b/src/rx/rx.h @@ -787,7 +787,7 @@ struct rx_securityClass { * Clearly we assume that ntohl will work on these structures so sizeof(int) * must equal sizeof(afs_int32). */ -struct rx_stats { /* General rx statistics */ +struct rx_statistics { /* General rx statistics */ int packetRequests; /* Number of packet allocation requests */ int receivePktAllocFailures; int sendPktAllocFailures; diff --git a/src/rx/rx_globals.h b/src/rx/rx_globals.h index 4af9e17eb..0fb936e5c 100644 --- a/src/rx/rx_globals.h +++ b/src/rx/rx_globals.h @@ -481,7 +481,7 @@ EXT afs_kcondvar_t rx_waitingForPackets_cv; #endif EXT char rx_waitingForPackets; /* Processes set and wait on this variable when waiting for packet buffers */ -EXT struct rx_stats rx_stats; +EXT struct rx_statistics rx_stats; EXT struct rx_peer **rx_peerHashTable; EXT struct rx_connection **rx_connHashTable; diff --git a/src/rx/rx_prototypes.h b/src/rx/rx_prototypes.h index 6dbd87ecd..74c59231f 100644 --- a/src/rx/rx_prototypes.h +++ b/src/rx/rx_prototypes.h @@ -168,7 +168,7 @@ extern void rxi_ComputeRoundTripTime(register struct rx_packet *p, extern void rxi_ReapConnections(void); extern int rxs_Release(struct rx_securityClass *aobj); #ifndef KERNEL -extern void rx_PrintTheseStats(FILE * file, struct rx_stats *s, int size, +extern void rx_PrintTheseStats(FILE * file, struct rx_statistics *s, int size, afs_int32 freePackets, char version); extern void rx_PrintStats(FILE * file); extern void rx_PrintPeerStats(FILE * file, struct rx_peer *peer); @@ -179,7 +179,7 @@ extern afs_int32 rx_GetServerDebug(osi_socket socket, afs_uint32 remoteAddr, afs_uint32 * supportedValues); extern afs_int32 rx_GetServerStats(osi_socket socket, afs_uint32 remoteAddr, afs_uint16 remotePort, - struct rx_stats *stat, + struct rx_statistics *stat, afs_uint32 * supportedValues); extern afs_int32 rx_GetServerVersion(osi_socket socket, afs_uint32 remoteAddr, afs_uint16 remotePort, -- 2.39.5