mirror of
https://github.com/glest/glest-source.git
synced 2025-08-16 05:13:59 +02:00
- win32 winsock bugfixes causing havok and grief for win32 users (corrupt winsock stack due to extra call to wsacleanup)
This commit is contained in:
@@ -214,17 +214,20 @@ bool UPNP_Tools::enabledUPNP = false;
|
||||
return acErrorBuffer;
|
||||
}
|
||||
|
||||
//SocketManager Socket::socketManager;
|
||||
// keeps in scope for duration of the application
|
||||
SocketManager Socket::wsaManager;
|
||||
|
||||
SocketManager::SocketManager() {
|
||||
WSADATA wsaData;
|
||||
WORD wVersionRequested = MAKEWORD(2, 0);
|
||||
if(SystemFlags::VERBOSE_MODE_ENABLED) printf("SocketManager calling WSAStartup...\n");
|
||||
WSAStartup(wVersionRequested, &wsaData);
|
||||
//dont throw exceptions here, this is a static initializacion
|
||||
SystemFlags::OutputDebug(SystemFlags::debugNetwork,"Winsock initialized.\n");
|
||||
}
|
||||
|
||||
SocketManager::~SocketManager() {
|
||||
if(SystemFlags::VERBOSE_MODE_ENABLED) printf("SocketManager calling WSACleanup...\n");
|
||||
WSACleanup();
|
||||
SystemFlags::OutputDebug(SystemFlags::debugNetwork,"Winsock cleanup complete.\n");
|
||||
}
|
||||
|
Reference in New Issue
Block a user