From 49eaf450344d73d815124bc343e92402dab5b7ab Mon Sep 17 00:00:00 2001 From: "Hoa V. DINH" Date: Wed, 26 Jun 2013 01:37:52 -0700 Subject: Implement IMAP logger. Work in progress on POP and SMTP loggers. --- src/core/imap/MCIMAPSession.cc | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) (limited to 'src/core/imap') diff --git a/src/core/imap/MCIMAPSession.cc b/src/core/imap/MCIMAPSession.cc index 0b194ff7..9bd89f69 100644 --- a/src/core/imap/MCIMAPSession.cc +++ b/src/core/imap/MCIMAPSession.cc @@ -498,15 +498,17 @@ static void logger(mailimap * imap, int log_type, const char * buffer, size_t si return; ConnectionLogType type = getConnectionType(log_type); + if ((int) type == -1) + return; + bool isBuffer = isBufferFromLogType(log_type); if (isBuffer) { Data * data = Data::dataWithBytes(buffer, (unsigned int) size); - session->connectionLogger()->logBuffer(type, data); + session->connectionLogger()->log(session->connectionLogger()->context(), session, type, data); } else { - Data * data = Data::dataWithBytes(buffer, (unsigned int) size); - session->connectionLogger()->logString(type, String::stringWithData(data)); + session->connectionLogger()->log(session->connectionLogger()->context(), session, type, NULL); } } -- cgit v1.2.3