From e145db68fb5b7d0682a4b2be0174cebfe47dd74e Mon Sep 17 00:00:00 2001 From: George Hazan Date: Fri, 13 Jan 2017 00:01:59 +0300 Subject: a bit less netlib services --- plugins/HTTPServer/src/main.cpp | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) (limited to 'plugins/HTTPServer/src') 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"), -- cgit v1.2.3