summaryrefslogtreecommitdiff
path: root/plugins/HTTPServer/src
diff options
context:
space:
mode:
authorGeorge Hazan <ghazan@miranda.im>2017-01-14 01:22:55 +0300
committerGeorge Hazan <ghazan@miranda.im>2017-01-14 01:22:55 +0300
commitd3cb19278d60ac6f7963379254546cdca36a90e2 (patch)
treef2fa018b343d5460419c1b323f5f3ce04a393d00 /plugins/HTTPServer/src
parentd5a6c0666a8d8d2055a3f4402f67f91e8548ec3a (diff)
separate handle types for HNETLIBCONN & HNETLIBBIND
Diffstat (limited to 'plugins/HTTPServer/src')
-rw-r--r--plugins/HTTPServer/src/FileShareNode.cpp2
-rw-r--r--plugins/HTTPServer/src/FileShareNode.h4
-rw-r--r--plugins/HTTPServer/src/HttpUser.cpp2
-rw-r--r--plugins/HTTPServer/src/HttpUser.h2
-rw-r--r--plugins/HTTPServer/src/main.cpp3
5 files changed, 6 insertions, 7 deletions
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;