/* ok, now we know them all,
* continue with reading the actual messages. */
DeleteHashPos(&RecvMsg->Pos);
-
+ StopDBWatchers(IO);
return QueueEventContext(IO, POP3_C_ReAttachToFetchMessages);
}
}
StrLength(RecvMsg->CurrMsg->MsgUID),
&ut,
sizeof(struct UseTable) );
-
+ StopDBWatchers(IO);
return QueueEventContext(&RecvMsg->IO, POP3_C_ReAttachToFetchMessages);
}
eNextState POP3C_SaveMsg(AsyncIO *IO)
EVP3CM_syslog(LOG_DEBUG, "Converting message...");
RecvMsg->CurrMsg->Msg =
convert_internet_message_buf(&RecvMsg->IO.ReadMsg->MsgBuf);
-
+ StopClientWatchers(IO);
return QueueDBOperation(&RecvMsg->IO, POP3C_SaveMsg);
}
&lPtr,
'|');
- StrBufPrintf(cptr->Url, "pop3://%s:%s@%s/%s",
- ChrPtr(cptr->pop3user),
- ChrPtr(cptr->pop3pass),
- ChrPtr(Tmp),
- ChrPtr(cptr->RoomName));
+ StrBufAppendBufPlain(cptr->Url, HKEY("pop3://"), 0);
+ StrBufUrlescUPAppend(cptr->Url, cptr->pop3user, NULL);
+ StrBufAppendBufPlain(cptr->Url, HKEY(":"), 0);
+ StrBufUrlescUPAppend(cptr->Url, cptr->pop3pass, NULL);
+ StrBufAppendBufPlain(cptr->Url, HKEY("@"), 0);
+ StrBufAppendBuf(cptr->Url, Tmp, 0);
+ StrBufAppendBufPlain(cptr->Url, HKEY("/"), 0);
+ StrBufUrlescAppend(cptr->Url, cptr->RoomName, NULL);
+
FreeStrBuf(&Tmp);
ParseURL(&cptr->IO.ConnectMe, cptr->Url, 110);
-void LogDebugEnablePOP3Client(void)
+void LogDebugEnablePOP3Client(const int n)
{
- POP3ClientDebugEnabled = 1;
+ POP3ClientDebugEnabled = n;
}
CTDL_MODULE_INIT(pop3client)
POP3FetchUrls = NewHash(1, NULL);
CtdlRegisterSessionHook(pop3client_scan, EVT_TIMER);
CtdlRegisterEVCleanupHook(pop3_cleanup);
- CtdlRegisterDebugFlagHook(HKEY("pop3client"), LogDebugEnablePOP3Client);
+ CtdlRegisterDebugFlagHook(HKEY("pop3client"), LogDebugEnablePOP3Client, &POP3ClientDebugEnabled);
}
/* return our module id for the log */