]> git.vomp.tv Git - vompclient.git/commitdiff
Windows fixes
authorChris Tallon <chris@vomp.tv>
Tue, 7 Apr 2020 15:45:14 +0000 (16:45 +0100)
committerChris Tallon <chris@vomp.tv>
Tue, 7 Apr 2020 15:45:14 +0000 (16:45 +0100)
dvbsubtitles.cc
log.cc
tcp.cc
vconnect.cc
winmain.cc

index e7dd28a2c503917f6d200b0bc651b5157d5a9a86..b9fac6897e41363990679d310e95fcc799f2ffe0 100644 (file)
@@ -26,7 +26,7 @@
 /*  Reference ETSI EN 300 743 V1.3.1 (2006-11) */
 
 
-#define DVBSDEBUG 0
+//#define DVBSDEBUG
 
 
 #ifdef DVBSDEBUG
diff --git a/log.cc b/log.cc
index 350db528bef3d278caa6ea1fda6962011fb79520..31db7702ffac9a9db7c7eac628a874c52c610235 100644 (file)
--- a/log.cc
+++ b/log.cc
@@ -89,9 +89,9 @@ int Log::init(int startLogLevel, const char* fileName, int tenabled)
   initted = 1;
   logLevel = startLogLevel;
   enabled = tenabled;
-  //logfile = fopen(fileName, "a");
+  logfile = fopen(fileName, "a");
 //  logfile = fopen(stdout, "a");
-  logfile = stdout;
+  //logfile = stdout;
 //  logfile = fopen("/log", "a");
 
   if (logfile) return 1;
diff --git a/tcp.cc b/tcp.cc
index 57587704bc7fbb188b98a1e51903b63eae629ff7..0f2f248caaa5fd40f98decf3059f8d480cf7f7b0 100644 (file)
--- a/tcp.cc
+++ b/tcp.cc
@@ -123,7 +123,11 @@ bool TCP::connect(const std::string& ip, USHORT port)
     return true;
   }
 
+#ifdef WIN32
+  if ((connectResult != SOCKET_ERROR) || (WSAGetLastError() != WSAEWOULDBLOCK))
+#else
   if (errno != EINPROGRESS)
+#endif
   {
     CLOSESOCKET(sockfd);
     sockfd = -1;
index 1d31768356e88ab7a058f0e7dbf383bc1619397d..3786bca9b067871474a88abe9c2b06851f2b1688 100644 (file)
@@ -94,6 +94,8 @@ void VConnect::stop()
 
 void VConnect::threadMethod()
 {
+  logger->log("VConnect", Log::DEBUG, "start threadMethod");
+
   ULONG delay = 0;
   int success;
 
@@ -112,7 +114,6 @@ void VConnect::threadMethod()
     if (!commandLineServer.empty()) // Server is specified, fake a servers array
     {
       //servers.emplace_back(commandLineServer, "", 3024, 0);
-
       vdpc.TEMPaddCLIServer(commandLineServer); // FIXME move to new config system NCONFIG
     }
     else
index 7a24e2314f08da1ee5372e7c3a3e08417ad036de..2ace4075935337a0913db874aba2412518542a69 100644 (file)
@@ -69,7 +69,7 @@ Video* video;
 Audio* audio;
 Wol* wol;
 Sleeptimer* sleeptimer;
-
+std::string commandLineServer;
 
 bool wnd_fullscreen=false;
 bool wnd_topmost=false;
@@ -941,7 +941,7 @@ std::string tp2str(const std::chrono::time_point<std::chrono::system_clock>& tp)
 
 const std::string& getCommandLineServer()
 {
-  return std::string();
+  return commandLineServer;
 }