summaryrefslogtreecommitdiff
path: root/protocols/YAMN/src
diff options
context:
space:
mode:
authorGeorge Hazan <george.hazan@gmail.com>2023-10-25 14:52:50 +0300
committerGeorge Hazan <george.hazan@gmail.com>2023-10-25 14:52:50 +0300
commit6a0d815559951b6725ad7241e8e159a97624d4cb (patch)
tree54987629c48638fa1c447360627645d7f6b58afa /protocols/YAMN/src
parent46987b670e11cfa512627ecae3ef701798c10f3d (diff)
YAMN: obsoleted function SSL_DebugLog removed
Diffstat (limited to 'protocols/YAMN/src')
-rw-r--r--protocols/YAMN/src/proto/netlib.cpp27
-rw-r--r--protocols/YAMN/src/proto/netlib.h2
-rw-r--r--protocols/YAMN/src/stdafx.h2
-rw-r--r--protocols/YAMN/src/synchro.cpp8
4 files changed, 8 insertions, 31 deletions
diff --git a/protocols/YAMN/src/proto/netlib.cpp b/protocols/YAMN/src/proto/netlib.cpp
index 4354b6e9be..f87e8ff49e 100644
--- a/protocols/YAMN/src/proto/netlib.cpp
+++ b/protocols/YAMN/src/proto/netlib.cpp
@@ -11,25 +11,6 @@
BOOL SSLLoaded = FALSE;
HNETLIBUSER hNetlibUser = nullptr;
-void __stdcall SSL_DebugLog(const char *fmt, ...)
-{
- char str[4096];
- va_list vararg;
-
- va_start(vararg, fmt);
- int tBytes = mir_vsnprintf(str, _countof(str), fmt, vararg);
- if (tBytes == 0)
- return;
-
- if (tBytes > 0)
- str[tBytes] = 0;
- else
- str[sizeof(str) - 1] = 0;
-
- Netlib_Log(hNetlibUser, str);
- va_end(vararg);
-}
-
HANDLE RegisterNLClient(char *name)
{
#ifdef DEBUG_COMM
@@ -55,16 +36,16 @@ HANDLE RegisterNLClient(char *name)
void CNLClient::SSLify()
{
#ifdef DEBUG_COMM
- SSL_DebugLog("Staring SSL...");
+ Netlib_Log(hNetlibUser, "Staring SSL...");
#endif
int socket = Netlib_GetSocket(hConnection);
if (socket != INVALID_SOCKET) {
#ifdef DEBUG_COMM
- SSL_DebugLog("Staring netlib core SSL");
+ Netlib_Log(hNetlibUser, "Staring netlib core SSL");
#endif
if (Netlib_StartSsl(hConnection, nullptr)) {
#ifdef DEBUG_COMM
- SSL_DebugLog("Netlib core SSL started");
+ Netlib_Log(hNetlibUser, "Netlib core SSL started");
#endif
isTLSed = true;
SSLLoaded = TRUE;
@@ -151,7 +132,7 @@ int CNLClient::LocalNetlib_Recv(HNETLIBCONN hConn, char *buf, int len, int flags
int iReturn = Netlib_Recv(hConn, buf, len, flags);
if (isTLSed) {
#ifdef DEBUG_COMM
- SSL_DebugLog("SSL recv: %s", buf);
+ Netlib_Logf(hNetlibUser, "SSL recv: %s", buf);
#endif
}
diff --git a/protocols/YAMN/src/proto/netlib.h b/protocols/YAMN/src/proto/netlib.h
index ab0ff11a4c..415ab80a17 100644
--- a/protocols/YAMN/src/proto/netlib.h
+++ b/protocols/YAMN/src/proto/netlib.h
@@ -25,8 +25,6 @@ public:
BOOL ifTLSed;
};
-void SSL_DebugLog(const char *fmt, ...);
-
enum
{
ENL_WINSOCKINIT=1, //error initializing socket //only wsock
diff --git a/protocols/YAMN/src/stdafx.h b/protocols/YAMN/src/stdafx.h
index 375d43d4ec..62c12fa179 100644
--- a/protocols/YAMN/src/stdafx.h
+++ b/protocols/YAMN/src/stdafx.h
@@ -208,8 +208,6 @@ extern HIMAGELIST CSImages;
int SetProtocolPluginFcnImportFcn(YAMN_PROTOPLUGIN *Plugin, YAMN_PROTOIMPORTFCN *YAMNFcn, YAMN_MAILIMPORTFCN *YAMNMailFcn);
-void __stdcall SSL_DebugLog(const char *fmt, ...);
-
YAMN_PROTOPLUGIN* RegisterProtocolPlugin(YAMN_PROTOREGISTRATION *Registration);
int GetCharsetFromString(char *input, size_t size);
diff --git a/protocols/YAMN/src/synchro.cpp b/protocols/YAMN/src/synchro.cpp
index d239f95434..f894049929 100644
--- a/protocols/YAMN/src/synchro.cpp
+++ b/protocols/YAMN/src/synchro.cpp
@@ -70,7 +70,7 @@ uint32_t SWMRG::WaitToWrite(uint32_t dwTimeout)
{
uint32_t dw;
HANDLE aHandles[2];
- // SSL_DebugLog("SWMRGWaitToWrite %p", this);
+ // Netlib_Logf(hNetlibUser, "SWMRGWaitToWrite %p", this);
// We can write if the following are true:
// 1. No other threads are writing.
@@ -105,7 +105,7 @@ uint32_t SWMRG::WaitToWrite(uint32_t dwTimeout)
void SWMRG::DoneWriting()
{
- // SSL_DebugLog("SWMRGDoneWriting %p", this);
+ // Netlib_Logf(hNetlibUser, "SWMRGDoneWriting %p", this);
// Allow other writer/reader threads to use
// the SWMRG synchronization object.
@@ -122,7 +122,7 @@ uint32_t SWMRG::WaitToRead(uint32_t dwTimeout)
{
uint32_t dw;
LONG lPreviousCount;
- // SSL_DebugLog("SWMRGWaitToRead %p", this);
+ // Netlib_Logf(hNetlibUser, "SWMRGWaitToRead %p", this);
// We can read if no threads are writing.
// And there's not request to delete structure
@@ -166,7 +166,7 @@ void SWMRG::DoneReading()
{
HANDLE aHandles[2];
LONG lNumReaders;
- // SSL_DebugLog("SWMRGDoneReading %p", this);
+ // Netlib_Logf(hNetlibUser, "SWMRGDoneReading %p", this);
// We can stop reading if the events are available,
// but when we stop reading we must also decrement the