summaryrefslogtreecommitdiff
path: root/protocols/Tlen
diff options
context:
space:
mode:
authorGeorge Hazan <ghazan@miranda.im>2017-01-11 22:23:57 +0300
committerGeorge Hazan <ghazan@miranda.im>2017-01-11 22:24:06 +0300
commitd958e3fb847813075cc059bd5a7aa28252982268 (patch)
treed9c02a7ddee830628248219e9c83c7de3c335140 /protocols/Tlen
parentc8e1c429321ed8aa2efce0fc00b6dfd08f1b2735 (diff)
strong typization - better typization
Diffstat (limited to 'protocols/Tlen')
-rw-r--r--protocols/Tlen/src/tlen_ws.cpp15
1 files changed, 7 insertions, 8 deletions
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);