From 02a6d180f3ee22ca3e79ab8fce552dd393beae12 Mon Sep 17 00:00:00 2001 From: Jeffrey Altman Date: Mon, 19 Dec 2005 12:35:15 +0000 Subject: [PATCH] windows-rx-debug-disable-20051219 Provide a method to enable/disable rx debugging along as a part of "fs trace -on/-off" --- src/WINNT/afsd/cm_ioctl.c | 3 +++ src/libafsrpc/afsrpc.def | 1 + src/rx/rx.c | 10 ++++++++++ src/rx/rx_prototypes.h | 3 +++ 4 files changed, 17 insertions(+) diff --git a/src/WINNT/afsd/cm_ioctl.c b/src/WINNT/afsd/cm_ioctl.c index ee70d7def..d3ce8476c 100644 --- a/src/WINNT/afsd/cm_ioctl.c +++ b/src/WINNT/afsd/cm_ioctl.c @@ -43,6 +43,7 @@ #include #include #include <..\afsrdr\kif.h> +#include #ifdef _DEBUG #include @@ -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); } } diff --git a/src/libafsrpc/afsrpc.def b/src/libafsrpc/afsrpc.def index 98f09e6e1..b5d637cbc 100644 --- a/src/libafsrpc/afsrpc.def +++ b/src/libafsrpc/afsrpc.def @@ -215,5 +215,6 @@ EXPORTS rx_StartClientThread @220 rxkad_global_stats_lock @221 DATA rxkad_stats_key @222 DATA + rx_DebugOnOff @223 diff --git a/src/rx/rx.c b/src/rx/rx.c index a324150c8..dce1f5f4a 100644 --- a/src/rx/rx.c +++ b/src/rx/rx.c @@ -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 diff --git a/src/rx/rx_prototypes.h b/src/rx/rx_prototypes.h index 6fcbcd892..fa88a619a 100644 --- a/src/rx/rx_prototypes.h +++ b/src/rx/rx_prototypes.h @@ -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 -- 2.39.5