Created
November 14, 2016 01:29
-
-
Save Stargateur/74c57b4e517c930811b79f63cfd08b92 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
diff --git a/CMakeLists.txt b/CMakeLists.txt | |
index 8e9d289..4b88e9d 100644 | |
--- a/CMakeLists.txt | |
+++ b/CMakeLists.txt | |
@@ -4,17 +4,17 @@ add_definitions( -DBOOST_ALL_NO_LIB ) | |
find_package(Threads) | |
find_package(GTest) | |
# Download and unpack googletest at configure time | |
- | |
+#set(Boost_DEBUG on) | |
+set(BOOST_ROOT "C:/local/boost_1_62_0") | |
set(Boost_USE_MULTITHREADED ON) | |
if (${WIN32}) | |
- set(Boost_USE_STATIC_LIBS OFF) | |
- set(Boost_USE_STATIC_RUNTIME OFF) | |
+ set(Boost_USE_STATIC_LIBS ON) | |
else() | |
set(Boost_USE_STATIC_LIBS OFF) | |
set(Boost_USE_STATIC_RUNTIME OFF) | |
endif() | |
find_package(Boost REQUIRED system thread) | |
- | |
+include_directories(${Boost_INCLUDE_DIRS}) | |
if (NOT ${GTest_FOUND}) | |
configure_file(cmake/googletest.cmake | |
googletest-download/CMakeLists.txt) | |
diff --git a/client/CMakeLists.txt b/client/CMakeLists.txt | |
index 5d15266..c42ddc6 100644 | |
--- a/client/CMakeLists.txt | |
+++ b/client/CMakeLists.txt | |
@@ -28,7 +28,7 @@ if (${WIN32}) | |
add_custom_command( | |
TARGET spider_client | |
POST_BUILD | |
- COMMAND "mt.exe" -manifest \"${CMAKE_CURRENT_SOURCE_DIR}/spider_client.exe.manifest\" -outputresource:\"${CMAKE_CURRENT_BINARY_DIR}/${CMAKE_BUILD_TYPE}/spider_client.exe\"\;\#1 | |
+ COMMAND "mt.exe" -manifest \"${CMAKE_CURRENT_SOURCE_DIR}/spider_client.exe.manifest\" -outputresource:\"$<TARGET_FILE:spider_client>\"\;\#1 | |
COMMENT "Embed manifest into binary..." | |
) | |
else() | |
diff --git a/lib/my_socket/include/ServerSocket.hpp b/lib/my_socket/include/ServerSocket.hpp | |
index 88680df..0837d56 100644 | |
--- a/lib/my_socket/include/ServerSocket.hpp | |
+++ b/lib/my_socket/include/ServerSocket.hpp | |
@@ -48,8 +48,9 @@ namespace spider | |
{ | |
_signals.add(SIGINT); | |
_signals.add(SIGTERM); | |
+#ifndef WIN32 | |
_signals.add(SIGQUIT); | |
- | |
+#endif | |
asyncAwaitStop(); | |
boost::asio::ip::tcp::resolver resolver(_io_service); | |
diff --git a/lib/my_socket/tests/test_socket.cpp b/lib/my_socket/tests/test_socket.cpp | |
index a605f4e..3bc82e8 100644 | |
--- a/lib/my_socket/tests/test_socket.cpp | |
+++ b/lib/my_socket/tests/test_socket.cpp | |
@@ -96,7 +96,7 @@ namespace | |
void clientThread() | |
{ | |
TestClient client; | |
- usleep(50); | |
+// usleep(50); | |
client.run(); | |
std::clog << "Client stopped" << std::endl; | |
_server->forceStop(); | |
diff --git a/server/include/Core.hpp b/server/include/Core.hpp | |
index a7b4dc7..92ca53c 100644 | |
--- a/server/include/Core.hpp | |
+++ b/server/include/Core.hpp | |
@@ -1,9 +1,9 @@ | |
#ifndef SPIDER_CORE_HPP | |
# define SPIDER_CORE_HPP | |
+# include "ServerSocket.hpp" | |
# include "IServerPlugin.hpp" | |
# include "PluginManager.hpp" | |
-# include "ServerSocket.hpp" | |
# include "SpiderConnection.hpp" | |
namespace spider | |
diff --git a/server/lib/datalogger/src/DataLogger.cpp b/server/lib/datalogger/src/DataLogger.cpp | |
index 9210a69..3db13c0 100644 | |
--- a/server/lib/datalogger/src/DataLogger.cpp | |
+++ b/server/lib/datalogger/src/DataLogger.cpp | |
@@ -44,7 +44,7 @@ void spider::server::DataLogger::logStr(const spider::server::Client &client, | |
if (client.getId() == 0) | |
return; | |
va_list va; | |
- va_start(va, format); | |
+ va_start(va, &format); | |
try { | |
fs::FS::getFS().mkdir(dataPath + fs::FS::getFS().getFileSeparator() + client.getName()); | |
} catch (...) {} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment