From d3cb19278d60ac6f7963379254546cdca36a90e2 Mon Sep 17 00:00:00 2001 From: George Hazan Date: Sat, 14 Jan 2017 01:22:55 +0300 Subject: separate handle types for HNETLIBCONN & HNETLIBBIND --- plugins/HTTPServer/src/FileShareNode.cpp | 2 +- plugins/HTTPServer/src/FileShareNode.h | 4 ++-- plugins/HTTPServer/src/HttpUser.cpp | 2 +- plugins/HTTPServer/src/HttpUser.h | 2 +- plugins/HTTPServer/src/main.cpp | 3 +-- 5 files changed, 6 insertions(+), 7 deletions(-) (limited to 'plugins/HTTPServer') diff --git a/plugins/HTTPServer/src/FileShareNode.cpp b/plugins/HTTPServer/src/FileShareNode.cpp index fbc2d43af6..a23f0c6fe4 100644 --- a/plugins/HTTPServer/src/FileShareNode.cpp +++ b/plugins/HTTPServer/src/FileShareNode.cpp @@ -36,7 +36,7 @@ mir_cs csFileShareListAccess; // Developer : KN ///////////////////////////////////////////////////////////////////// -CLShareUser::CLShareUser(HANDLE hCon, in_addr stAdd) +CLShareUser::CLShareUser(HNETLIBCONN hCon, in_addr stAdd) { hConnection = hCon; stAddr = stAdd; diff --git a/plugins/HTTPServer/src/FileShareNode.h b/plugins/HTTPServer/src/FileShareNode.h index bea6bf9d49..7c40bcced1 100644 --- a/plugins/HTTPServer/src/FileShareNode.h +++ b/plugins/HTTPServer/src/FileShareNode.h @@ -23,7 +23,7 @@ class CLShareUser { public: - CLShareUser(HANDLE hCon, in_addr stAdd); + CLShareUser(HNETLIBCONN hCon, in_addr stAdd); virtual ~CLShareUser(); CLShareUser * pclNext; in_addr stAddr; @@ -35,7 +35,7 @@ public: virtual const char * pszCustomInfo() = NULL; void CloseSocket(); protected: - HANDLE hConnection; + HNETLIBCONN hConnection; DWORD dwSpeed; }; diff --git a/plugins/HTTPServer/src/HttpUser.cpp b/plugins/HTTPServer/src/HttpUser.cpp index ede33c5722..3ceb656f77 100644 --- a/plugins/HTTPServer/src/HttpUser.cpp +++ b/plugins/HTTPServer/src/HttpUser.cpp @@ -142,7 +142,7 @@ static int nUnescapedURI(char * pszURI) // Developer : KN ///////////////////////////////////////////////////////////////////// -CLHttpUser::CLHttpUser(HANDLE hCon, in_addr stAdd) : CLShareUser(hCon, stAdd) +CLHttpUser::CLHttpUser(HNETLIBCONN hCon, in_addr stAdd) : CLShareUser(hCon, stAdd) { memset(apszParam, 0, sizeof(apszParam)); hFile = INVALID_HANDLE_VALUE; diff --git a/plugins/HTTPServer/src/HttpUser.h b/plugins/HTTPServer/src/HttpUser.h index 00b43a76eb..a5a7b2d24c 100644 --- a/plugins/HTTPServer/src/HttpUser.h +++ b/plugins/HTTPServer/src/HttpUser.h @@ -45,7 +45,7 @@ static char * szParmStr[eLastParam] = { class CLHttpUser : public CLShareUser { public: - CLHttpUser(HANDLE hCon, in_addr stAdd); + CLHttpUser(HNETLIBCONN hCon, in_addr stAdd); virtual ~CLHttpUser(); bool bReadGetParameters(char * pszRequest); diff --git a/plugins/HTTPServer/src/main.cpp b/plugins/HTTPServer/src/main.cpp index c9f69a61a6..2670c256f0 100644 --- a/plugins/HTTPServer/src/main.cpp +++ b/plugins/HTTPServer/src/main.cpp @@ -582,7 +582,7 @@ void HandleNewConnection(void *ch) // Developer : KN ///////////////////////////////////////////////////////////////////// -void ConnectionOpen(HANDLE hNewConnection, DWORD dwRemoteIP) +void ConnectionOpen(HNETLIBCONN hNewConnection, DWORD dwRemoteIP) { in_addr stAddr; stAddr.S_un.S_addr = htonl(dwRemoteIP); @@ -639,7 +639,6 @@ INT_PTR nToggelAcceptConnections(WPARAM wparam, LPARAM /*lparam*/) Netlib_GetUserSettings(hNetlibUser, &nus); NETLIBBIND nlb = {}; - nlb.cbSize = sizeof(NETLIBBIND); nlb.pfnNewConnection = ConnectionOpen; if (nus.specifyIncomingPorts && nus.szIncomingPorts && nus.szIncomingPorts[0]) nlb.wPort = 0; -- cgit v1.2.3