Add code to stop asserts from tossing up dialogs

Assert dialogs can be a problem when running as a service.  This change
instructs assert info to be sent to stdout instead of a dialog.
This commit is contained in:
dkulwin 2015-11-04 18:37:13 -06:00
parent 25e52cb498
commit 39706fca9c

View File

@ -35,7 +35,9 @@
#include <fcntl.h>
#include <sys/types.h>
#include <sys/stat.h>
#include <crtdbg.h>
#ifndef __MINGW32__
#include <Crtdbg.h>
#endif
#include "sfds.h"
@ -2920,6 +2922,7 @@ void WSHELPinitialize()
winsock_initialized = 1;
#ifndef __MINGW32__
_CrtSetReportMode(_CRT_WARN, _CRTDBG_MODE_FILE);
_CrtSetReportFile(_CRT_WARN, _CRTDBG_FILE_STDOUT);
_CrtSetReportMode(_CRT_ERROR, _CRTDBG_MODE_FILE);
@ -2927,6 +2930,8 @@ void WSHELPinitialize()
_CrtSetReportMode(_CRT_ASSERT, _CRTDBG_MODE_FILE);
_CrtSetReportFile(_CRT_ASSERT, _CRTDBG_FILE_STDOUT);
#endif
DBG_MSG("<- WSHELPinitialize()...\n");
}