mirror of
https://git.openafs.org/openafs.git
synced 2025-01-19 23:40:13 +00:00
Windows: afslogon network provider debug registry value
create a new TransarcAFSDaemon\NetworkProvider "Debug" value to be used for activating the network provider debugging. The overlapping use of TransarcAFSDaemon\Parameters "TraceOption" is just too confusing. Permit both methods to be used. Change-Id: I4ba233b38bda547af35aa4b363edc819bcc3792c Reviewed-on: http://gerrit.openafs.org/5316 Tested-by: BuildBot <buildbot@rampaginggeek.com> Reviewed-by: Derrick Brashear <shadow@dementix.org>
This commit is contained in:
parent
971a103cd0
commit
3d4e111dd6
@ -40,6 +40,7 @@
|
||||
#include <WINNT\afsreg.h>
|
||||
|
||||
DWORD TraceOption = 0;
|
||||
DWORD Debug = 0;
|
||||
|
||||
HANDLE hDLL;
|
||||
|
||||
@ -49,7 +50,7 @@ void DebugEvent0(char *a)
|
||||
{
|
||||
HANDLE h; char *ptbuf[1];
|
||||
|
||||
if (!ISLOGONTRACE(TraceOption))
|
||||
if (!Debug && !ISLOGONTRACE(TraceOption))
|
||||
return;
|
||||
|
||||
h = RegisterEventSource(NULL, AFS_LOGON_EVENT_NAME);
|
||||
@ -66,7 +67,7 @@ void DebugEvent(char *b,...)
|
||||
HANDLE h; char *ptbuf[1],buf[MAXBUF_+1];
|
||||
va_list marker;
|
||||
|
||||
if (!ISLOGONTRACE(TraceOption))
|
||||
if (!Debug && !ISLOGONTRACE(TraceOption))
|
||||
return;
|
||||
|
||||
h = RegisterEventSource(NULL, AFS_LOGON_EVENT_NAME);
|
||||
@ -866,6 +867,14 @@ DWORD APIENTRY NPLogonNotify(
|
||||
|
||||
RegCloseKey (NPKey);
|
||||
|
||||
(void) RegOpenKeyEx(HKEY_LOCAL_MACHINE, AFSREG_CLT_SVC_PROVIDER_SUBKEY,
|
||||
0, KEY_QUERY_VALUE, &NPKey);
|
||||
LSPsize=sizeof(Debug);
|
||||
RegQueryValueEx(NPKey, REG_CLIENT_DEBUG_PARM, NULL,
|
||||
&LSPtype, (LPBYTE)&Debug, &LSPsize);
|
||||
|
||||
RegCloseKey (NPKey);
|
||||
|
||||
DebugEvent("NPLogonNotify - LoginId(%d,%d)", lpLogonId->HighPart, lpLogonId->LowPart);
|
||||
|
||||
/* Make sure the AFS Libraries are initialized */
|
||||
|
@ -45,6 +45,7 @@ SOFTWARE.
|
||||
#define REG_CLIENT_TRACE_OPTION_PARM "TraceOption"
|
||||
#define REG_CLIENT_LOGON_OPTION_PARM "LogonOptions"
|
||||
#define REG_CLIENT_LOGON_SCRIPT_PARMW L"LogonScript"
|
||||
#define REG_CLIENT_DEBUG_PARM "Debug"
|
||||
#define REG_CLIENT_REALM_PARM "Realm"
|
||||
#define REG_CLIENT_THESE_CELLS_PARM "TheseCells"
|
||||
#define REG_CLIENT_LOGOFF_TOKENS_PARM "LogoffPreserveTokens"
|
||||
|
Loading…
Reference in New Issue
Block a user