Commit 7277ca98 authored by jan.koester's avatar jan.koester
Browse files

test

parent 3bb28e6a
Loading
Loading
Loading
Loading
+1 −1
Changes for CMakeLists.txt: 1 added line, 1 removed line.
Original line number Diff line number Diff line
@@ -30,7 +30,7 @@ if(MSVC)
endif(MSVC)

if(${CMAKE_SYSTEM_NAME} MATCHES "Windows")
    set(CMAKE_INSTALL_PREFIX "c:/Program Files")
    set(CMAKE_INSTALL_PREFIX "c:/Program Files/libnetplus")
endif()

set(LIBV "1")
+2 −2
Changes for libnetplusConfig.cmake.in: 2 added lines, 2 removed lines.
Original line number Diff line number Diff line
@@ -3,5 +3,5 @@ include(CMakeFindDependencyMacro)
include("@CMAKE_INSTALL_PREFIX@/@ConfigPackageLocation@/libnetplusTargets.cmake")
include("@CMAKE_INSTALL_PREFIX@/@ConfigPackageLocation@/libnetplusVersion.cmake")

set(NETPLUS_INCLUDE_DIR   "@CMAKE_INSTALL_PREFIX@/libnetplus/include")
set(NETPLUS_CONFIG_DIR    "@CMAKE_INSTALL_PREFIX@/libnetplus/@ConfigPackageLocation@")
set(NETPLUS_INCLUDE_DIR   "@CMAKE_INSTALL_PREFIX@/include")
set(NETPLUS_CONFIG_DIR    "@CMAKE_INSTALL_PREFIX@/@ConfigPackageLocation@")
+10 −6
Changes for src/event/iocp.cpp: 10 added lines, 6 removed lines.
Original line number Diff line number Diff line
@@ -237,10 +237,11 @@ namespace netplus {
					continue;
				}

				try {
					std::lock_guard clock(pClientContext->cltmtx);
				pClientContext->cltmtx.lock();

				try {
					con *curCon = pClientContext->CurCon;

					switch (pClientContext->State) {
						case IO_WRITE_STATE: {
							eargs->event->ResponseEvent(*curCon, tid, args);
@@ -266,21 +267,24 @@ namespace netplus {
								pClientContext->State = IO_WRITE_STATE;
						}break;
					}
					pClientContext->cltmtx.unlock();
				}
				catch (NetException& e) {
					std::cerr << e.what() << std::endl;
					if (e.getErrorType() != NetException::Note) {
						if (WSACloseEvent(pClientContext)) {
						eargs->event->DisconnectEvent(*pClientContext->CurCon, tid, args);
						delete pClientContext;
						}
						lpContext = 0;
					}else{
						pClientContext->cltmtx.unlock();
					}
					continue;
				}
				catch (...) {
					std::cerr << "unknown error close coonection !" << std::endl;
					if (WSACloseEvent(pClientContext)) {
					eargs->event->DisconnectEvent(*pClientContext->CurCon, tid, args);
					delete pClientContext;
					}
					lpContext = 0;
					continue;
				}