From 497775024c4c2a670b791ef3ac11e94fb50e387b Mon Sep 17 00:00:00 2001 From: Steve Holme Date: Sat, 31 Aug 2013 18:29:15 +0100 Subject: ftpserver.pl: Added support for the IMAP CHECK command --- tests/ftpserver.pl | 12 ++++++++++++ 1 file changed, 12 insertions(+) (limited to 'tests') diff --git a/tests/ftpserver.pl b/tests/ftpserver.pl index 489c3f141..f3c84942a 100755 --- a/tests/ftpserver.pl +++ b/tests/ftpserver.pl @@ -578,6 +578,7 @@ sub protocolsetup { %commandfunc = ( 'APPEND' => \&APPEND_imap, 'CAPABILITY' => \&CAPABILITY_imap, + 'CHECK' => \&CHECK_imap, 'CREATE' => \&CREATE_imap, 'DELETE' => \&DELETE_imap, 'EXAMINE' => \&EXAMINE_imap, @@ -1162,6 +1163,17 @@ sub RENAME_imap { return 0; } +sub CHECK_imap { + if ($selected eq "") { + sendcontrol "$cmdid BAD Command received in Invalid state\r\n"; + } + else { + sendcontrol "$cmdid OK CHECK completed\r\n"; + } + + return 0; +} + sub LOGOUT_imap { sendcontrol "* BYE cURL IMAP server signing off\r\n"; sendcontrol "$cmdid OK LOGOUT completed\r\n"; -- cgit v1.2.3