From d958e3fb847813075cc059bd5a7aa28252982268 Mon Sep 17 00:00:00 2001 From: George Hazan Date: Wed, 11 Jan 2017 22:23:57 +0300 Subject: strong typization - better typization --- protocols/Tlen/src/tlen_ws.cpp | 15 +++++++-------- 1 file changed, 7 insertions(+), 8 deletions(-) (limited to 'protocols/Tlen/src/tlen_ws.cpp') diff --git a/protocols/Tlen/src/tlen_ws.cpp b/protocols/Tlen/src/tlen_ws.cpp index c9008cd2ee..1bed6c9865 100644 --- a/protocols/Tlen/src/tlen_ws.cpp +++ b/protocols/Tlen/src/tlen_ws.cpp @@ -25,22 +25,21 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. BOOL TlenWsInit(TlenProtocol *proto) { - NETLIBUSER nlu = {0}; - NETLIBUSERSETTINGS nlus = {0}; wchar_t name[128]; + NETLIBUSER nlu = {}; + nlu.ptszDescriptiveName = name; + nlu.szSettingsModule = proto->m_szModuleName; - nlu.cbSize = sizeof(nlu); nlu.flags = NUF_OUTGOING | NUF_INCOMING | NUF_HTTPCONNS | NUF_UNICODE; // | NUF_HTTPGATEWAY; mir_snwprintf(name, TranslateT("%s connection"), proto->m_tszUserName); - nlu.ptszDescriptiveName = name; - nlu.szSettingsModule = proto->m_szModuleName; - proto->m_hNetlibUser = (HANDLE) CallService(MS_NETLIB_REGISTERUSER, 0, (LPARAM) &nlu); + proto->m_hNetlibUser = Netlib_RegisterUser(&nlu); nlu.flags = NUF_OUTGOING | NUF_INCOMING | NUF_NOOPTIONS | NUF_UNICODE; mir_snwprintf(name, TranslateT("%s SOCKS connection"), proto->m_tszUserName); - nlu.ptszDescriptiveName = name; - proto->hFileNetlibUser = (HANDLE) CallService(MS_NETLIB_REGISTERUSER, 0, (LPARAM) &nlu); + proto->hFileNetlibUser = Netlib_RegisterUser(&nlu); + + NETLIBUSERSETTINGS nlus = {0}; nlus.cbSize = sizeof(nlus); nlus.useProxy = 0; CallService(MS_NETLIB_SETUSERSETTINGS, (WPARAM) proto->hFileNetlibUser, (LPARAM) &nlus); -- cgit v1.2.3