Hi, I did the changes you suggested as follows:
Code: Select all
VOID Pulse(VOID)
{
if (!EQADDR_CHAR) {
DebugSpewAlways("Pulse() Exit");
return;
}
Code: Select all
DWORD WINAPI InsertCommands(LPVOID lpParameter)
{
DebugSpewAlways("InsertCommands() Entry");
PCHAR lpINIPath = (PCHAR)lpParameter;
strcpy(gszINIPath, lpINIPath);
CHAR szBuffer[MAX_STRING] = {0};
if (!ParseINIFile(lpINIPath)) {
DebugSpewAlways("ParseINIFile returned false - thread aborted.");
g_Loaded = FALSE;
free(lpINIPath);
DebugSpewAlways("InsertCommands() Exit");
return 1;
}
InitializeCriticalSection(&gDoCommand_Lock);
InitializeCriticalSection(&gTelnet_CS_Recv);
InitializeCriticalSection(&gTelnet_CS_Send);
if (gTelnetServer==1) SetupServer();
if (!TakeControlOfCommandList()) {
DebugSpewAlways("TakeControlOfCommandList returned false - thread aborted.");
gbUnload = TRUE;
if (gTelnetServer==1) CloseServer();
g_Loaded = FALSE;
free(lpINIPath);
DebugSpewAlways("InsertCommands() Exit");
return 1;
}
LoadString(ghInstance,IDS_LOADED,szBuffer,MAX_STRING);
WriteChatBuffer(szBuffer,USERCOLOR_DEFAULT);
DebugSpewAlways(szBuffer);
while (!gbUnload) {
Sleep(1000);
}
// Attempt to fix random crash while unloading
//eh... commenting this out makes unloading possible again, but I dont know why
//lets follow up on this, cant just leave it like this. if its not needed lets remove it...
// while ((gbInDInput) || (gbInChat) || (g_bInDXMouse)) Sleep(5);
ReleaseCommandList();
ClearMapAllocs();
LoadString(ghInstance,IDS_UNLOADED,szBuffer,MAX_STRING);
WriteChatBuffer(szBuffer,USERCOLOR_DEFAULT);
DebugSpewAlways(szBuffer);
FreeChatWindow();
if (gTelnetServer==1) CloseServer();
DeleteCriticalSection(&gTelnet_CS_Send);
DeleteCriticalSection(&gTelnet_CS_Recv);
DeleteCriticalSection(&gDoCommand_Lock);
free(lpINIPath);
g_Loaded = FALSE;
DebugSpewAlways("InsertCommands() Exit");
return 0;
}
And turned on debugspew = 1 in the mq ini file.
Made a clean rebuild and fired it all up, loged on, CTD as usual :) .
Went to look for a log file but there isnt anything in it. No logfile created, so i went and made a empty textfile with called debugspew.log in the logs catalogue. Still got an empty logfile
Oh yea I did a clean CVS update for this test.
So it seems like I missed something since I do not get any debug loging at all. Help please
