1
0
mirror of https://github.com/moparisthebest/davmail synced 2024-11-11 03:45:03 -05:00

IMAP: send error on idle command without selected folder (Outlook)

git-svn-id: http://svn.code.sf.net/p/davmail/code/trunk@1482 3d1905a2-6b24-0410-a738-b14d5a86fcbd
This commit is contained in:
mguessan 2010-09-28 20:57:00 +00:00
parent d12bf7c8d7
commit 15e49fe372

View File

@ -467,6 +467,7 @@ public class ImapConnection extends AbstractConnection {
sendClient(commandId + " NO " + e.getMessage());
}
} else if ("idle".equalsIgnoreCase(command) && imapIdleDelay > 0) {
if (currentFolder != null) {
sendClient("+ idling ");
// clear cache before going to idle mode
currentFolder.clearCache();
@ -495,6 +496,9 @@ public class ImapConnection extends AbstractConnection {
// client connection closed
throw new SocketException(e.getMessage());
}
} else {
sendClient(commandId + " NO no folder selected");
}
} else if ("noop".equalsIgnoreCase(command) || "check".equalsIgnoreCase(command)) {
if (currentFolder != null) {
DavGatewayTray.debug(new BundleMessage("LOG_IMAP_COMMAND", command, currentFolder.folderPath));