summaryrefslogtreecommitdiff
path: root/plugins/HTTPServer
diff options
context:
space:
mode:
authorGeorge Hazan <ghazan@miranda.im>2017-01-13 00:01:59 +0300
committerGeorge Hazan <ghazan@miranda.im>2017-01-13 00:01:59 +0300
commite145db68fb5b7d0682a4b2be0174cebfe47dd74e (patch)
treec8f9edc907876d236eb16bc8ca8b592accb9846f /plugins/HTTPServer
parent3cb3883908e3168e5f955be3143771721614307a (diff)
a bit less netlib services
Diffstat (limited to 'plugins/HTTPServer')
-rw-r--r--plugins/HTTPServer/src/main.cpp9
1 files changed, 4 insertions, 5 deletions
diff --git a/plugins/HTTPServer/src/main.cpp b/plugins/HTTPServer/src/main.cpp
index 1f9c89dc22..c9f69a61a6 100644
--- a/plugins/HTTPServer/src/main.cpp
+++ b/plugins/HTTPServer/src/main.cpp
@@ -634,12 +634,11 @@ static int nProtoAck(WPARAM /*wParam*/, LPARAM lParam)
INT_PTR nToggelAcceptConnections(WPARAM wparam, LPARAM /*lparam*/)
{
if (!hDirectBoundPort) {
- NETLIBUSERSETTINGS nus = { 0 };
+ NETLIBUSERSETTINGS nus = {};
nus.cbSize = sizeof(nus);
- if (!CallService(MS_NETLIB_GETUSERSETTINGS, (WPARAM)hNetlibUser, (LPARAM)&nus))
- Netlib_Logf(hNetlibUser, "Failed to get NETLIBUSERSETTINGS using MS_NETLIB_GETUSERSETTINGS");
+ Netlib_GetUserSettings(hNetlibUser, &nus);
- NETLIBBIND nlb = { 0 };
+ NETLIBBIND nlb = {};
nlb.cbSize = sizeof(NETLIBBIND);
nlb.pfnNewConnection = ConnectionOpen;
if (nus.specifyIncomingPorts && nus.szIncomingPorts && nus.szIncomingPorts[0])
@@ -647,7 +646,7 @@ INT_PTR nToggelAcceptConnections(WPARAM wparam, LPARAM /*lparam*/)
else
nlb.wPort = 80;
- hDirectBoundPort = (HANDLE)CallService(MS_NETLIB_BINDPORT, (WPARAM)hNetlibUser, (LPARAM)& nlb);
+ hDirectBoundPort = Netlib_BindPort(hNetlibUser, &nlb);
if (!hDirectBoundPort) {
char szTemp[200];
mir_snprintf(szTemp, Translate("Failed to bind to port %s\r\nThis is most likely because another program or service is using this port"),