Skip to content

Commit f255f16

Browse files
committed
Added more log messages to the loading process
Also updated a forum reference.
1 parent 64cf001 commit f255f16

File tree

2 files changed

+9
-1
lines changed

2 files changed

+9
-1
lines changed

Diff for: src/core/utilities/shared_utils.h

+2-1
Original file line numberDiff line numberDiff line change
@@ -36,10 +36,11 @@
3636
// Generates a symlink without the colon symbol (":").
3737
//
3838
// Thanks to Hedgehog for this!
39-
// http://forums.sourcepython.com/showthread.php?581-Server-crash-on-SP-loading&p=2967&viewfull=1#post2967
39+
// http://forums.sourcepython.com/viewtopic.php?p=2967#p2967
4040
//-----------------------------------------------------------------------------
4141
inline void _GenerateSymlink(char* path)
4242
{
43+
DevMsg(1, MSG_PREFIX "Generating symlink: %s\n", path);
4344
#if __linux__
4445
int pathLen = V_strlen(path) + 1;
4546
char symlinkOrigin[pathLen];

Diff for: src/loader/loader_main.cpp

+7
Original file line numberDiff line numberDiff line change
@@ -77,6 +77,7 @@ CSourcePython::~CSourcePython()
7777
//---------------------------------------------------------------------------------
7878
void* SPLoadLibrary( IVEngineServer* engine, const char* libraryPath )
7979
{
80+
DevMsg(1, MSG_PREFIX "Loading library: %s\n", libraryPath);
8081
char szFullPath[MAX_PATH_LENGTH];
8182
char szGamePath[MAX_PATH_LENGTH];
8283
char szError[MAX_PATH_LENGTH];
@@ -178,7 +179,9 @@ bool CSourcePython::Load( CreateInterfaceFn interfaceFactory, CreateInterfaceFn
178179
// ------------------------------------------------------------------
179180
// Get the game directory.
180181
// ------------------------------------------------------------------
182+
DevMsg(1, MSG_PREFIX "Retrieving game directory...\n");
181183
engine->GetGameDir(szGameDir, MAX_PATH_LENGTH);
184+
DevMsg(1, MSG_PREFIX "Game directory: %s\n", szGameDir);
182185
GenerateSymlink(szGameDir);
183186

184187
// ------------------------------------------------------------------
@@ -213,6 +216,10 @@ bool CSourcePython::Load( CreateInterfaceFn interfaceFactory, CreateInterfaceFn
213216
#else
214217
#error Unsupported platform.
215218
#endif
219+
if (!pFunc) {
220+
Msg(MSG_PREFIX "Failed to retrieve %s.\n", CREATEINTERFACE_PROCNAME);
221+
return false;
222+
}
216223

217224
m_pCorePlugin = static_cast<IServerPluginCallbacks*>(pFunc(INTERFACEVERSION_ISERVERPLUGINCALLBACKS, NULL));
218225
if( !m_pCorePlugin ) {

0 commit comments

Comments
 (0)