diff options
author | George Hazan <ghazan@miranda.im> | 2017-01-11 22:23:57 +0300 |
---|---|---|
committer | George Hazan <ghazan@miranda.im> | 2017-01-11 22:24:06 +0300 |
commit | d958e3fb847813075cc059bd5a7aa28252982268 (patch) | |
tree | d9c02a7ddee830628248219e9c83c7de3c335140 /plugins/YAMN/src | |
parent | c8e1c429321ed8aa2efce0fc00b6dfd08f1b2735 (diff) |
strong typization - better typization
Diffstat (limited to 'plugins/YAMN/src')
-rw-r--r-- | plugins/YAMN/src/proto/netlib.cpp | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/plugins/YAMN/src/proto/netlib.cpp b/plugins/YAMN/src/proto/netlib.cpp index cc8f73a602..df4dc150e6 100644 --- a/plugins/YAMN/src/proto/netlib.cpp +++ b/plugins/YAMN/src/proto/netlib.cpp @@ -10,7 +10,7 @@ //--------------------------------------------------------------------------------------------------
BOOL SSLLoaded = FALSE;
-HANDLE hNetlibUser = NULL;
+HNETLIBUSER hNetlibUser = NULL;
void __stdcall SSL_DebugLog(const char *fmt, ...)
{
@@ -27,13 +27,12 @@ void __stdcall SSL_DebugLog(const char *fmt, ...) else
str[sizeof(str) - 1] = 0;
- CallService(MS_NETLIB_LOG, (WPARAM)hNetlibUser, (LPARAM)str);
+ Netlib_Log(hNetlibUser, str);
va_end(vararg);
}
HANDLE RegisterNLClient(const char *name)
{
- static NETLIBUSER nlu = { 0 };
char desc[128];
mir_snprintf(desc, Translate("%s connection"), name);
@@ -41,11 +40,12 @@ HANDLE RegisterNLClient(const char *name) #ifdef DEBUG_COMM
DebugLog(CommFile, "<Register PROXY support>");
#endif
- nlu.cbSize = sizeof(nlu);
+
+ NETLIBUSER nlu = {};
nlu.flags = NUF_OUTGOING | NUF_HTTPCONNS;
nlu.szDescriptiveName = desc;
nlu.szSettingsModule = (char *)name;
- hNetlibUser = (HANDLE)CallService(MS_NETLIB_REGISTERUSER, 0, (LPARAM)&nlu);
+ hNetlibUser = Netlib_RegisterUser(&nlu);
#ifdef DEBUG_COMM
if (NULL == hNetlibUser)
@@ -227,7 +227,7 @@ char* CNLClient::Recv(char *buf, int buflen) throw(DWORD) void CNLClient::Disconnect()
{
Netlib_CloseHandle(hConnection);
- hConnection = (HANDLE)NULL;
+ hConnection = NULL;
}
//Uninitializes netlib library
@@ -238,7 +238,7 @@ void UnregisterNLClient() #endif
Netlib_CloseHandle(hNetlibUser);
- hNetlibUser = (HANDLE)NULL;
+ hNetlibUser = NULL;
#ifdef DEBUG_COMM
DebugLog(CommFile, "</Unregister PROXY support>\n");
#endif
|