1
0
Fork 0

Merge pull request #3067 from Hexagon12/wsacleanup-soc-fix

Removed duplicate calls of WSACleanup in soc_u.
This commit is contained in:
bunnei 2017-11-04 13:39:09 -04:00 committed by GitHub
commit 5885ca4503
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 6 additions and 9 deletions

View File

@ -779,11 +779,7 @@ static void Connect(Interface* self) {
} }
static void InitializeSockets(Interface* self) { static void InitializeSockets(Interface* self) {
// TODO(Subv): Implement // TODO(Subv): Implement
#ifdef _WIN32
WSADATA data;
WSAStartup(MAKEWORD(2, 2), &data);
#endif
u32* cmd_buffer = Kernel::GetCommandBuffer(); u32* cmd_buffer = Kernel::GetCommandBuffer();
cmd_buffer[0] = IPC::MakeHeader(1, 1, 0); cmd_buffer[0] = IPC::MakeHeader(1, 1, 0);
@ -794,10 +790,6 @@ static void ShutdownSockets(Interface* self) {
// TODO(Subv): Implement // TODO(Subv): Implement
CleanupSockets(); CleanupSockets();
#ifdef _WIN32
WSACleanup();
#endif
u32* cmd_buffer = Kernel::GetCommandBuffer(); u32* cmd_buffer = Kernel::GetCommandBuffer();
cmd_buffer[1] = 0; cmd_buffer[1] = 0;
} }
@ -904,6 +896,11 @@ const Interface::FunctionInfo FunctionTable[] = {
SOC_U::SOC_U() { SOC_U::SOC_U() {
Register(FunctionTable); Register(FunctionTable);
#ifdef _WIN32
WSADATA data;
WSAStartup(MAKEWORD(2, 2), &data);
#endif
} }
SOC_U::~SOC_U() { SOC_U::~SOC_U() {