aboutsummaryrefslogtreecommitdiffhomepage
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rwxr-xr-xsrc/core/imap/MCIMAPSession.cpp13
1 files changed, 11 insertions, 2 deletions
diff --git a/src/core/imap/MCIMAPSession.cpp b/src/core/imap/MCIMAPSession.cpp
index cbd94a2b..e8603114 100755
--- a/src/core/imap/MCIMAPSession.cpp
+++ b/src/core/imap/MCIMAPSession.cpp
@@ -1001,8 +1001,17 @@ String * IMAPSession::customCommand(String * command, ErrorCode * pError)
int r;
r = mailimap_custom_command(mImap, MCUTF8(command));
- if (r == MAILIMAP_ERROR_CUSTOM_COMMAND) {
- * pError = ErrorCustomCommand;
+ if (r == MAILIMAP_ERROR_STREAM) {
+ mShouldDisconnect = true;
+ * pError = ErrorConnection;
+ return NULL;
+ }
+ else if (r == MAILIMAP_ERROR_PARSE) {
+ * pError = ErrorParse;
+ return NULL;
+ }
+ else if (hasError(r)) {
+ * pError = ErrorDelete;
return NULL;
}