From: Jeffrey Altman Date: Sun, 19 Sep 2010 16:14:06 +0000 (-0700) Subject: Rx: PrintTheseStats should not be dependent on RXDEBUG X-Git-Tag: upstream/1.8.0_pre1^2~4791 X-Git-Url: https://git.michaelhowe.org/gitweb/?a=commitdiff_plain;h=f1183f16285be040b7150414c9563a9bceb53210;p=packages%2Fo%2Fopenafs.git 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 --- diff --git a/src/rx/rx.c b/src/rx/rx.c index f54d5106d..998d2a632 100644 --- a/src/rx/rx.c +++ b/src/rx/rx.c @@ -6974,7 +6974,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)) { @@ -7049,9 +7048,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 b7cc832d7..4117dc86e 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