From b2beaab27bcfa5c0d2fb8c67bfb01f15bbaffe86 Mon Sep 17 00:00:00 2001 From: victorrjimenezz Date: Fri, 4 Feb 2022 03:22:14 +0100 Subject: [PATCH] Fixed bug where the server did not work properly on windows --- src/utils.cpp | 21 ++------------------- 1 file changed, 2 insertions(+), 19 deletions(-) diff --git a/src/utils.cpp b/src/utils.cpp index 228fbd5..0aa917a 100644 --- a/src/utils.cpp +++ b/src/utils.cpp @@ -4,15 +4,7 @@ #include "utils.h" #include -#ifdef _WIN32 -#include -#include -#include -#include -#pragma comment(lib, "Ws2_32.lib") -#include -#include -#elif __APPLE__ +#if __APPLE__ #include #include #include @@ -24,16 +16,7 @@ #ifdef _WIN32 std::string getIP(){ - WSADATA wsa_Data; - int wsa_ReturnCode = WSAStartup(0x101,&wsa_Data); - char szHostName[255]; - gethostname(szHostName, 255); - struct hostent *host_entry; - host_entry=gethostbyname(szHostName); - char * szLocalIP; - szLocalIP = inet_ntoa (*(struct in_addr *)*host_entry->h_addr_list); - WSACleanup(); - return {szLocalIP}; + return "0.0.0.0"; } #elif __APPLE__