diff options
author | George Hazan <ghazan@miranda.im> | 2018-07-05 16:14:23 +0300 |
---|---|---|
committer | George Hazan <ghazan@miranda.im> | 2018-07-05 16:14:23 +0300 |
commit | 24fe627656e2f1c14294da5c654f270922ae1479 (patch) | |
tree | 2efa5648467b7b94ed078fb0f033fece7a5d53e2 /plugins | |
parent | 92d38f1424b4ecc7f4792915799c8922a270baac (diff) |
fixes #1454 (ProxySwitch: remove debug messages from langpack)
Diffstat (limited to 'plugins')
-rw-r--r-- | plugins/ProxySwitch/src/ip.cpp | 14 | ||||
-rw-r--r-- | plugins/ProxySwitch/src/stdafx.h | 2 |
2 files changed, 7 insertions, 9 deletions
diff --git a/plugins/ProxySwitch/src/ip.cpp b/plugins/ProxySwitch/src/ip.cpp index 7ae87a8d3d..e36f4ae444 100644 --- a/plugins/ProxySwitch/src/ip.cpp +++ b/plugins/ProxySwitch/src/ip.cpp @@ -18,9 +18,7 @@ void IP_WatchDog(void*) HANDLE hResult; DWORD ret = NotifyAddrChange(&hResult, &overlap); if (ret != NO_ERROR && WSAGetLastError() != WSA_IO_PENDING) { - wchar_t err[100]; - mir_snwprintf(err, L"NotifyAddrChange Error: %d/nRestart Miranda NG to restore IP monitor.", WSAGetLastError()); - ERRORMSG(err); + Netlib_Logf(0, "NotifyAddrChange Error: %d/nRestart Miranda NG to restore IP monitor.", WSAGetLastError()); break; } @@ -124,7 +122,7 @@ int Create_NIF_List_Ex(NETWORK_INTERFACE_LIST *list) delay++; } if (out == -2) - ERRORMSG(TranslateT("Cannot retrieve IP or adapter data.")); + Netlib_Logf(0, "Cannot retrieve IP or adapter data."); return out < 0 ? -1 : out; } @@ -152,7 +150,7 @@ int Create_NIF_List(NETWORK_INTERFACE_LIST *list) if (GetAdaptersAddresses(AF_INET, 0, NULL, NULL, &outBufLen) == ERROR_BUFFER_OVERFLOW) { pAddresses = (PIP_ADAPTER_ADDRESSES)mir_alloc(outBufLen); if (pAddresses == NULL) { - ERRORMSG(TranslateT("Cannot allocate memory for pAddresses")); + Netlib_Logf(0, "Cannot allocate memory for pAddresses"); return -1; } if ((out = GetAdaptersAddresses(AF_INET, 0, NULL, pAddresses, &outBufLen)) != ERROR_SUCCESS) { @@ -161,7 +159,7 @@ int Create_NIF_List(NETWORK_INTERFACE_LIST *list) } } else { - ERRORMSG(TranslateT("GetAdaptersAddresses sizing failed")); + Netlib_Logf(0, "GetAdaptersAddresses sizing failed"); return -1; } @@ -170,7 +168,7 @@ int Create_NIF_List(NETWORK_INTERFACE_LIST *list) if (GetAdaptersInfo(NULL, &outBufLen) == ERROR_BUFFER_OVERFLOW) { pAdapterInfo = (PIP_ADAPTER_INFO)mir_alloc(outBufLen); if (pAdapterInfo == NULL) { - ERRORMSG(TranslateT("Cannot allocate memory for pAdapterInfo")); + Netlib_Logf(0, "Cannot allocate memory for pAdapterInfo"); mir_free(pAddresses); return -1; } @@ -181,7 +179,7 @@ int Create_NIF_List(NETWORK_INTERFACE_LIST *list) } } else { - ERRORMSG(TranslateT("GetAdaptersInfo sizing failed")); + Netlib_Logf(0, "GetAdaptersInfo sizing failed"); mir_free(pAddresses); return -1; } diff --git a/plugins/ProxySwitch/src/stdafx.h b/plugins/ProxySwitch/src/stdafx.h index 5e73cc2a6c..550d21f8ad 100644 --- a/plugins/ProxySwitch/src/stdafx.h +++ b/plugins/ProxySwitch/src/stdafx.h @@ -44,7 +44,7 @@ struct CMPlugin : public PLUGIN<CMPlugin> #define NVL(x) x == NULL ? "" : x #define NVLW(x) x == NULL ? L"" : x -#define ERRORMSG(msg) MessageBox(NULL,msg,_A2T(MODULENAME),MB_OK | MB_ICONERROR); + #define MAX_IPLIST_LENGTH 500 /**** Types ********************************************************************************/ |