From bd9f7b125fcb1f2dff350f38e57ec04c256004b1 Mon Sep 17 00:00:00 2001 From: Jeffrey Altman Date: Sun, 19 Sep 2010 09:14:06 -0700 Subject: [PATCH] Rx: PrintTheseStats should not be dependent on RXDEBUG When RXDEBUG is not defined, PrintTheseStats generates an error even though the statistics are in fact available. The global variable rx_packetTypes was not being defined without RXDEBUG. Make rx_packetTypes defined always and permit statistics to always be printed. Change-Id: Ife708d34b5d56374c8aff9aa7c941d39b37ca4a1 Reviewed-on: http://gerrit.openafs.org/2778 Reviewed-by: Derrick Brashear Tested-by: Derrick Brashear (cherry picked from commit f1183f16285be040b7150414c9563a9bceb53210) Reviewed-on: http://gerrit.openafs.org/2813 Reviewed-by: Rod Widdowson --- src/rx/rx.c | 4 ---- src/rx/rx_globals.h | 4 ++-- 2 files changed, 2 insertions(+), 6 deletions(-) diff --git a/src/rx/rx.c b/src/rx/rx.c index ca436ff4e1..6783f14903 100644 --- a/src/rx/rx.c +++ b/src/rx/rx.c @@ -6976,7 +6976,6 @@ void rx_PrintTheseStats(FILE * file, struct rx_statistics *s, int size, afs_int32 freePackets, char version) { -#ifdef RXDEBUG int i; if (size != sizeof(struct rx_statistics)) { @@ -7051,9 +7050,6 @@ rx_PrintTheseStats(FILE * file, struct rx_statistics *s, int size, #if !defined(AFS_PTHREAD_ENV) && !defined(AFS_USE_GETTIMEOFDAY) fprintf(file, " %d clock updates\n", clock_nUpdates); #endif -#else - fprintf(file, "ERROR: compiled without RXDEBUG\n"); -#endif } /* for backward compatibility */ diff --git a/src/rx/rx_globals.h b/src/rx/rx_globals.h index 26e19c697c..b7b9d8bfc1 100644 --- a/src/rx/rx_globals.h +++ b/src/rx/rx_globals.h @@ -578,12 +578,12 @@ EXT int rxdebug_active; #endif #endif #define rx_Log_event rxevent_debugFile - -EXT char *rx_packetTypes[RX_N_PACKET_TYPES] GLOBALSINIT(RX_PACKET_TYPES); /* Strings defined in rx.h */ #else #define dpf(args) #endif /* RXDEBUG */ +EXT char *rx_packetTypes[RX_N_PACKET_TYPES] GLOBALSINIT(RX_PACKET_TYPES); /* Strings defined in rx.h */ + #ifndef KERNEL /* * Counter used to implement connection specific data