aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/core/imap
diff options
context:
space:
mode:
authorGravatar Hoa V. DINH <dinh.viet.hoa@gmail.com>2013-06-26 01:37:52 -0700
committerGravatar Hoa V. DINH <dinh.viet.hoa@gmail.com>2013-06-26 01:38:02 -0700
commit49eaf450344d73d815124bc343e92402dab5b7ab (patch)
treea7ceb39b05d7538ed85462ce459766cba508bce3 /src/core/imap
parentfe9037f4248d50c35679cea5534d6ee87e71ede6 (diff)
Implement IMAP logger. Work in progress on POP and SMTP loggers.
Diffstat (limited to 'src/core/imap')
-rw-r--r--src/core/imap/MCIMAPSession.cc8
1 files changed, 5 insertions, 3 deletions
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);
}
}