]> git.michaelhowe.org Git - packages/o/openafs.git/commitdiff
Rx: PrintTheseStats should not be dependent on RXDEBUG
authorJeffrey Altman <jaltman@your-file-system.com>
Sun, 19 Sep 2010 16:14:06 +0000 (09:14 -0700)
committerDerrick Brashear <shadow@dementia.org>
Mon, 27 Sep 2010 15:31:31 +0000 (08:31 -0700)
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 <shadow@dementia.org>
Tested-by: Derrick Brashear <shadow@dementia.org>
(cherry picked from commit f1183f16285be040b7150414c9563a9bceb53210)
Reviewed-on: http://gerrit.openafs.org/2813
Reviewed-by: Rod Widdowson <rdw@steadingsoftware.com>
src/rx/rx.c
src/rx/rx_globals.h

index ca436ff4e135e65421d2a95232450f7c55f47d2e..6783f1490348f474666ade2e160c6f359ab2cadb 100644 (file)
@@ -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 */
index 26e19c697cded04b8b33462165a604ea8ab53cd0..b7b9d8bfc12f8ebf189af0d8b7a8a252f8fd5c95 100644 (file)
@@ -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