fix minor cmake issue

This commit is contained in:
Eduardo Bart 2012-06-22 13:02:16 -03:00
parent 170236f822
commit 0c14a8e602
2 changed files with 4 additions and 8 deletions

View File

@ -113,10 +113,6 @@ IF(WIN32)
# fix boost thread linkage # fix boost thread linkage
ADD_DEFINITIONS(-DBOOST_THREAD_USE_LIB) ADD_DEFINITIONS(-DBOOST_THREAD_USE_LIB)
SET(framework_SOURCES ${framework_SOURCES}
${CMAKE_CURRENT_LIST_DIR}/platform/win32window.cpp
${CMAKE_CURRENT_LIST_DIR}/platform/win32crashhandler.cpp)
IF(WINDOWS_CONSOLE) IF(WINDOWS_CONSOLE)
MESSAGE(STATUS "Windows console: ON") MESSAGE(STATUS "Windows console: ON")
ELSE() ELSE()
@ -126,11 +122,7 @@ IF(WIN32)
ELSE() ELSE()
SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -pthread") SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -pthread")
SET(CMAKE_CXX_LINK_FLAGS "${CMAKE_CXX_LINK_FLAGS} -rdynamic") SET(CMAKE_CXX_LINK_FLAGS "${CMAKE_CXX_LINK_FLAGS} -rdynamic")
SET(ADDITIONAL_LIBRARIES X11 dl) SET(ADDITIONAL_LIBRARIES X11 dl)
SET(framework_SOURCES ${framework_SOURCES}
${CMAKE_CURRENT_LIST_DIR}/platform/x11window.cpp
${CMAKE_CURRENT_LIST_DIR}/platform/unixcrashhandler.cpp)
ENDIF() ENDIF()

View File

@ -32,6 +32,7 @@ Protocol::Protocol()
Protocol::~Protocol() Protocol::~Protocol()
{ {
assert(!g_app.isTermianted());
disconnect(); disconnect();
} }
@ -80,6 +81,9 @@ void Protocol::send(const OutputMessagePtr& outputMessage)
// send // send
if(m_connection) if(m_connection)
m_connection->write(outputMessage->getHeaderBuffer(), outputMessage->getMessageSize()); m_connection->write(outputMessage->getHeaderBuffer(), outputMessage->getMessageSize());
// reset message to allow reuse
outputMessage->reset();
} }
void Protocol::recv() void Protocol::recv()