diff options
author | George Hazan <george.hazan@gmail.com> | 2023-10-16 15:22:53 +0300 |
---|---|---|
committer | George Hazan <george.hazan@gmail.com> | 2023-10-16 15:22:53 +0300 |
commit | 4a4096bf5d55b9ab033dee43ef40e84dbf34f666 (patch) | |
tree | 558113b9fe571e165eb2a9ac806683e89e228aba /protocols/YAMN/src/proto | |
parent | ba19b70f9a12bf7e3c51d44bd0a3ca787da43ffc (diff) |
YAMN: slack debug code removed
Diffstat (limited to 'protocols/YAMN/src/proto')
-rw-r--r-- | protocols/YAMN/src/proto/netlib.cpp | 30 | ||||
-rw-r--r-- | protocols/YAMN/src/proto/pop3/pop3.cpp | 2 | ||||
-rw-r--r-- | protocols/YAMN/src/proto/pop3/pop3comm.cpp | 50 |
3 files changed, 41 insertions, 41 deletions
diff --git a/protocols/YAMN/src/proto/netlib.cpp b/protocols/YAMN/src/proto/netlib.cpp index 21c1f771fa..4354b6e9be 100644 --- a/protocols/YAMN/src/proto/netlib.cpp +++ b/protocols/YAMN/src/proto/netlib.cpp @@ -33,7 +33,7 @@ void __stdcall SSL_DebugLog(const char *fmt, ...) HANDLE RegisterNLClient(char *name)
{
#ifdef DEBUG_COMM
- DebugLog(CommFile, "<Register PROXY support>");
+ mir_writeLogA(CommFile, "<Register PROXY support>");
#endif
NETLIBUSER nlu = {};
@@ -44,9 +44,9 @@ HANDLE RegisterNLClient(char *name) #ifdef DEBUG_COMM
if (NULL == hNetlibUser)
- DebugLog(CommFile, "<error></Register PROXY support>\n");
+ mir_writeLogA(CommFile, "<error></Register PROXY support>\n");
else
- DebugLog(CommFile, "</Register PROXY support>\n");
+ mir_writeLogA(CommFile, "</Register PROXY support>\n");
#endif
return hNetlibUser;
}
@@ -84,7 +84,7 @@ void CNLClient::Connect(const char *servername, const int port) isTLSed = false;
#ifdef DEBUG_COMM
- DebugLog(CommFile, "<connect>\n");
+ mir_writeLogA(CommFile, "<connect>\n");
#endif
try {
if (nullptr == (hConnection = Netlib_OpenConnection(hNetlibUser, servername, port))) {
@@ -92,13 +92,13 @@ void CNLClient::Connect(const char *servername, const int port) throw NetworkError = (uint32_t)ENL_CONNECT;
}
#ifdef DEBUG_COMM
- DebugLog(CommFile, "</connect>\n");
+ mir_writeLogA(CommFile, "</connect>\n");
#endif
return;
}
catch (...) {
#ifdef DEBUG_COMM
- DebugLog(CommFile, "<error></connect>\n");
+ mir_writeLogA(CommFile, "<error></connect>\n");
#endif
throw;
}
@@ -120,7 +120,7 @@ void CNLClient::Send(const char *query) if (hConnection == nullptr)
return;
#ifdef DEBUG_COMM
- DebugLog(CommFile, "<send>%s", query);
+ mir_writeLogA(CommFile, "<send>%s", query);
#endif
try {
if ((SOCKET_ERROR == (Sent = LocalNetlib_Send(hConnection, query, (int)mir_strlen(query), MSG_DUMPASTEXT))) || Sent != (unsigned int)mir_strlen(query)) {
@@ -128,12 +128,12 @@ void CNLClient::Send(const char *query) throw NetworkError = (uint32_t)ENL_SEND;
}
#ifdef DEBUG_COMM
- DebugLog(CommFile, "</send>\n");
+ mir_writeLogA(CommFile, "</send>\n");
#endif
}
catch (...) {
#ifdef DEBUG_COMM
- DebugLog(CommFile, "<error></send>\n");
+ mir_writeLogA(CommFile, "<error></send>\n");
#endif
throw;
}
@@ -161,7 +161,7 @@ int CNLClient::LocalNetlib_Recv(HNETLIBCONN hConn, char *buf, int len, int flags char *CNLClient::Recv(char *buf, int buflen)
{
#ifdef DEBUG_COMM
- DebugLog(CommFile, "<reading>");
+ mir_writeLogA(CommFile, "<reading>");
#endif
try {
if (buf == nullptr)
@@ -197,14 +197,14 @@ char *CNLClient::Recv(char *buf, int buflen) }
#ifdef DEBUG_COMM
*(buf + Rcv) = 0; //end the buffer to write it to file
- DebugLog(CommFile, "%s", buf);
- DebugLog(CommFile, "</reading>\n");
+ mir_writeLogA(CommFile, "%s", buf);
+ mir_writeLogA(CommFile, "</reading>\n");
#endif
return(buf);
}
catch (...) {
#ifdef DEBUG_COMM
- DebugLog(CommFile, "<error></reading>\n");
+ mir_writeLogA(CommFile, "<error></reading>\n");
#endif
throw;
}
@@ -221,12 +221,12 @@ void CNLClient::Disconnect() void UnregisterNLClient()
{
#ifdef DEBUG_COMM
- DebugLog(CommFile, "<Unregister PROXY support>");
+ mir_writeLogA(CommFile, "<Unregister PROXY support>");
#endif
Netlib_CloseHandle(hNetlibUser);
hNetlibUser = nullptr;
#ifdef DEBUG_COMM
- DebugLog(CommFile, "</Unregister PROXY support>\n");
+ mir_writeLogA(CommFile, "</Unregister PROXY support>\n");
#endif
}
diff --git a/protocols/YAMN/src/proto/pop3/pop3.cpp b/protocols/YAMN/src/proto/pop3/pop3.cpp index 8d24a5218c..31bb24314f 100644 --- a/protocols/YAMN/src/proto/pop3/pop3.cpp +++ b/protocols/YAMN/src/proto/pop3/pop3.cpp @@ -41,7 +41,7 @@ char *CPop3Client::Connect(const char *servername, const int port, BOOL UseSSL, NetClient = new CNLClient;
#ifdef DEBUG_DECODE
- DebugLog(DecodeFile, "Connect:servername: %s port:%d\n", servername, port);
+ mir_writeLogA(DecodeFile, "Connect:servername: %s port:%d\n", servername, port);
#endif
POP3Error = EPOP3_CONNECT;
NetClient->Connect(servername, port);
diff --git a/protocols/YAMN/src/proto/pop3/pop3comm.cpp b/protocols/YAMN/src/proto/pop3/pop3comm.cpp index c734847ff5..89c5c4e359 100644 --- a/protocols/YAMN/src/proto/pop3/pop3comm.cpp +++ b/protocols/YAMN/src/proto/pop3/pop3comm.cpp @@ -583,7 +583,7 @@ void MIR_CDECL SynchroPOP3(CheckParam *WhichTemp) TranslateHeaderFcn(Temp, MyClient->NetClient->Rcv - (Temp - DataRX), &MsgQueuePtr->MailData->TranslatedHeader);
#ifdef DEBUG_DECODE
- DebugLog(DecodeFile, "</New mail>\n");
+ mir_writeLogA(DecodeFile, "</New mail>\n");
#endif
MsgQueuePtr->Flags |= YAMN_MSG_NORMALNEW;
if (autoretr)
@@ -655,7 +655,7 @@ void MIR_CDECL SynchroPOP3(CheckParam *WhichTemp) if (ActualAccount->Client.POP3Error == EPOP3_STOPPED)
ActualAccount->SystemError = EACC_STOPPED;
#ifdef DEBUG_COMM
- DebugLog(CommFile, "ERROR: %x\n", ErrorCode);
+ mir_writeLogA(CommFile, "ERROR: %x\n", ErrorCode);
#endif
{
SWriteGuard swm(ActualAccount->MessagesAccessSO);
@@ -684,7 +684,7 @@ void MIR_CDECL SynchroPOP3(CheckParam *WhichTemp) }
#ifdef DEBUG_COMM
- DebugLog(CommFile, "</--------Communication-------->\n");
+ mir_writeLogA(CommFile, "</--------Communication-------->\n");
#endif
}
@@ -743,7 +743,7 @@ void __cdecl DeleteMailsPOP3(void *param) try {
SetContactStatus(ActualAccount, ID_STATUS_OCCUPIED);
#ifdef DEBUG_COMM
- DebugLog(CommFile, "<--------Communication-------->\n");
+ mir_writeLogA(CommFile, "<--------Communication-------->\n");
#endif
if ((MyClient->NetClient == nullptr) || !MyClient->NetClient->Connected()) {
SetStatusFcn(ActualAccount, TranslateT("Connecting to server"));
@@ -787,7 +787,7 @@ void __cdecl DeleteMailsPOP3(void *param) }
#ifdef DEBUG_DECODE
- DebugLog(DecodeFile, "<--------Deleting requested mails-------->\n");
+ mir_writeLogA(DecodeFile, "<--------Deleting requested mails-------->\n");
#endif
if (POP3_DELETEFROMCHECK != POP3PluginParam) // We do not need to get mails on server as we have already it from check function
{
@@ -796,13 +796,13 @@ void __cdecl DeleteMailsPOP3(void *param) char *DataRX = MyClient->Stat();
#ifdef DEBUG_DECODE
- DebugLog(DecodeFile, "<Extracting stat>\n");
+ mir_writeLogA(DecodeFile, "<Extracting stat>\n");
#endif
ExtractStat(DataRX, &mboxsize, &msgs);
#ifdef DEBUG_DECODE
- DebugLog(DecodeFile, "<MailBoxSize>%d</MailBoxSize>\n", mboxsize);
- DebugLog(DecodeFile, "<Msgs>%d</Msgs>\n", msgs);
- DebugLog(DecodeFile, "</Extracting stat>\n");
+ mir_writeLogA(DecodeFile, "<MailBoxSize>%d</MailBoxSize>\n", mboxsize);
+ mir_writeLogA(DecodeFile, "<Msgs>%d</Msgs>\n", msgs);
+ mir_writeLogA(DecodeFile, "</Extracting stat>\n");
#endif
if (DataRX != nullptr)
free(DataRX);
@@ -822,12 +822,12 @@ void __cdecl DeleteMailsPOP3(void *param) if (msgs) {
#ifdef DEBUG_DECODE
- DebugLog(DecodeFile, "<Extracting UIDL>\n");
+ mir_writeLogA(DecodeFile, "<Extracting UIDL>\n");
#endif
DataRX = MyClient->Uidl();
ExtractUIDL(DataRX, MyClient->NetClient->Rcv, NewMails);
#ifdef DEBUG_DECODE
- DebugLog(DecodeFile, "</Extracting UIDL>\n");
+ mir_writeLogA(DecodeFile, "</Extracting UIDL>\n");
#endif
if (DataRX != nullptr)
free(DataRX);
@@ -894,7 +894,7 @@ void __cdecl DeleteMailsPOP3(void *param) }
#ifdef DEBUG_DECODE
- DebugLog(DecodeFile, "</--------Deleting requested mails-------->\n");
+ mir_writeLogA(DecodeFile, "</--------Deleting requested mails-------->\n");
#endif
// TODO: now, we have in NewMails new mails. If NewMails is not NULL, we found some new mails, so Checking for new mail should be performed
@@ -931,7 +931,7 @@ void __cdecl DeleteMailsPOP3(void *param) if (ActualAccount->Client.POP3Error == EPOP3_STOPPED)
ActualAccount->SystemError = EACC_STOPPED;
#ifdef DEBUG_COMM
- DebugLog(CommFile, "ERROR %x\n", ErrorCode);
+ mir_writeLogA(CommFile, "ERROR %x\n", ErrorCode);
#endif
switch (ActualAccount->SystemError) {
@@ -951,7 +951,7 @@ void __cdecl DeleteMailsPOP3(void *param) DeleteMessagesToEndFcn(ActualAccount, DeleteMails);
#ifdef DEBUG_COMM
- DebugLog(CommFile, "</--------Communication-------->\n");
+ mir_writeLogA(CommFile, "</--------Communication-------->\n");
#endif
// WriteAccounts();
@@ -989,14 +989,14 @@ void ExtractMail(char *stream, int len, HYAMNMAIL queue) if (DOTLINE(finder + 1)) // at the end of stream
break;
#ifdef DEBUG_DECODE
- DebugLog(DecodeFile, "<Message>\n");
+ mir_writeLogA(DecodeFile, "<Message>\n");
#endif
SkipSpaces(finder); // jump whitespace
if (1 != sscanf(finder, "%d", &msgnr))
throw (uint32_t)EPOP3_UIDL;
#ifdef DEBUG_DECODE
- DebugLog(DecodeFile, "<Nr>%d</Nr>\n", msgnr);
+ mir_writeLogA(DecodeFile, "<Nr>%d</Nr>\n", msgnr);
#endif
SkipNonSpaces(finder);
@@ -1009,8 +1009,8 @@ void ExtractMail(char *stream, int len, HYAMNMAIL queue) queueptr->MailData->Body[i] = 0; // ends string
queueptr->Number = msgnr;
#ifdef DEBUG_DECODE
- DebugLog(DecodeFile, "<ID>%s</ID>\n", queueptr->MailData->Body);
- DebugLog(DecodeFile, "</Message>\n");
+ mir_writeLogA(DecodeFile, "<ID>%s</ID>\n", queueptr->MailData->Body);
+ mir_writeLogA(DecodeFile, "</Message>\n");
#endif
queueptr = queueptr->Next;
while (!ENDLINE(finder)) finder++;
@@ -1032,13 +1032,13 @@ void ExtractUIDL(char *stream, int len, HYAMNMAIL queue) if (DOTLINE(finder + 1)) // at the end of stream
break;
#ifdef DEBUG_DECODE
- DebugLog(DecodeFile, "<Message>\n");
+ mir_writeLogA(DecodeFile, "<Message>\n");
#endif
SkipSpaces(finder);
if (1 != sscanf(finder, "%d", &msgnr))
throw (uint32_t)EPOP3_UIDL;
#ifdef DEBUG_DECODE
- DebugLog(DecodeFile, "<Nr>%d</Nr>\n", msgnr);
+ mir_writeLogA(DecodeFile, "<Nr>%d</Nr>\n", msgnr);
#endif
// for (i=1,queueptr=queue;(queueptr->Next != NULL) && (i<msgnr);queueptr=queueptr->Next,i++);
// if (i != msgnr)
@@ -1053,8 +1053,8 @@ void ExtractUIDL(char *stream, int len, HYAMNMAIL queue) queueptr->ID[i] = 0; // ends string
queueptr->Number = msgnr;
#ifdef DEBUG_DECODE
- DebugLog(DecodeFile, "<ID>%s</ID>\n", queueptr->ID);
- DebugLog(DecodeFile, "</Message>\n");
+ mir_writeLogA(DecodeFile, "<ID>%s</ID>\n", queueptr->ID);
+ mir_writeLogA(DecodeFile, "</Message>\n");
#endif
queueptr = queueptr->Next;
while (!ENDLINE(finder)) finder++;
@@ -1076,13 +1076,13 @@ void ExtractList(char *stream, int len, HYAMNMAIL queue) if (DOTLINE(finder + 1)) // at the end of stream
break;
#ifdef DEBUG_DECODE
- DebugLog(DecodeFile, "<Message>\n", NULL, 0);
+ mir_writeLogA(DecodeFile, "<Message>\n", NULL, 0);
#endif
SkipSpaces(finder);
if (1 != sscanf(finder, "%d", &msgnr)) // message nr.
throw (uint32_t)EPOP3_LIST;
#ifdef DEBUG_DECODE
- DebugLog(DecodeFile, "<Nr>%d</Nr>\n", msgnr);
+ mir_writeLogA(DecodeFile, "<Nr>%d</Nr>\n", msgnr);
#endif
for (i = 1, queueptr = queue; (queueptr->Next != nullptr) && (i < msgnr); queueptr = queueptr->Next, i++);
@@ -1095,7 +1095,7 @@ void ExtractList(char *stream, int len, HYAMNMAIL queue) if (1 != sscanf(finder, "%u", &queueptr->MailData->Size))
throw (uint32_t)EPOP3_LIST;
#ifdef DEBUG_DECODE
- DebugLog(DecodeFile, "<Nr>%d</Nr>\n", queueptr->MailData->Size);
+ mir_writeLogA(DecodeFile, "<Nr>%d</Nr>\n", queueptr->MailData->Size);
#endif
while (!ENDLINE(finder)) finder++;
}
|