]> git.michaelhowe.org Git - packages/o/openafs.git/commitdiff
windows-rx-debug-disable-20051219
authorJeffrey Altman <jaltman@secure-endpoints.com>
Mon, 19 Dec 2005 12:35:15 +0000 (12:35 +0000)
committerJeffrey Altman <jaltman@secure-endpoints.com>
Mon, 19 Dec 2005 12:35:15 +0000 (12:35 +0000)
Provide a method to enable/disable rx debugging along as a part
of "fs trace -on/-off"

src/WINNT/afsd/cm_ioctl.c
src/libafsrpc/afsrpc.def
src/rx/rx.c
src/rx/rx_prototypes.h

index ee70d7defabfc60637071cf6d4a7f2262a3cbfff..d3ce8476c19f5da9e27ad95e7f843f647b2923e4 100644 (file)
@@ -43,6 +43,7 @@
 #include <strsafe.h>
 #include <winioctl.h>
 #include <..\afsrdr\kif.h>
+#include <rx\rx.h>
 
 #ifdef _DEBUG
 #include <crtdbg.h>
@@ -1171,10 +1172,12 @@ long cm_IoctlTraceControl(struct smb_ioctl *ioctlp, struct cm_user *userp)
         if ((inValue & 1) == 0) {
             /* disable tracing */
             osi_LogDisable(afsd_logp);
+           rx_DebugOnOff(FALSE);
         }
         else {
             /* enable tracing */
             osi_LogEnable(afsd_logp);
+           rx_DebugOnOff(TRUE);
         }
     }
 
index 98f09e6e1bc87c139f73347fd2b83a557f111a5a..b5d637cbccfa5919d5c20c68ed0a9bfdcaac937d 100644 (file)
@@ -215,5 +215,6 @@ EXPORTS
         rx_StartClientThread                    @220
        rxkad_global_stats_lock                 @221 DATA
        rxkad_stats_key                         @222 DATA
+        rx_DebugOnOff                           @223
         
 
index a324150c8d392a49f965d4783e667417ff101307..dce1f5f4a58b2dbf3cbd69650727fa0c6a834be4 100644 (file)
@@ -6044,6 +6044,8 @@ rxi_DebugInit(void)
     DWORD TraceOption;
     long code;
 
+    rxdebug_active = 0;
+
     code = RegOpenKeyEx(HKEY_LOCAL_MACHINE, AFSREG_CLT_SVC_PARAM_SUBKEY,
                          0, KEY_QUERY_VALUE, &parmKey);
     if (code != ERROR_SUCCESS)
@@ -6059,6 +6061,14 @@ rxi_DebugInit(void)
 #endif /* AFS_NT40_ENV */
 }
 
+#ifdef AFS_NT40_ENV
+void
+rx_DebugOnOff(int on)
+{
+    rxdebug_active = on;
+}
+#endif /* AFS_NT40_ENV */
+
 
 /* Don't call this debugging routine directly; use dpf */
 void
index 6fcbcd892f863bdef0002f01d86eced90761952d..fa88a619a8b244e52d8288540345b4cb723a5a20 100644 (file)
@@ -14,6 +14,9 @@
 extern void rx_SetEpoch(afs_uint32 epoch);
 extern int rx_Init(u_int port);
 extern int rx_InitHost(u_int host, u_int port);
+#ifdef AFS_NT40_ENV
+extern void rx_DebugOnOff(int on);
+#endif
 #ifndef KERNEL
 extern void rxi_StartServerProcs(int nExistingProcs);
 #endif