ftpserver.pl: Moved POP3 QUIT handler into own function
authorSteve Holme <steve_holme@hotmail.com>
Sun, 8 Sep 2013 07:35:38 +0000 (08:35 +0100)
committerSteve Holme <steve_holme@hotmail.com>
Sun, 8 Sep 2013 07:44:49 +0000 (08:44 +0100)
tests/ftpserver.pl

index ded0b04..536ea06 100755 (executable)
@@ -560,12 +560,12 @@ sub protocolsetup {
             'CAPA' => \&CAPA_pop3,
             'DELE' => \&DELE_pop3,
             'LIST' => \&LIST_pop3,
+            'QUIT' => \&QUIT_pop3,
             'RETR' => \&RETR_pop3,
         );
         %displaytext = (
             'USER' => '+OK We are happy you popped in!',
             'PASS' => '+OK Access granted',
-            'QUIT' => '+OK byebye',
             'welcome' => join("",
             '        _   _ ____  _     '."\r\n",
             '    ___| | | |  _ \| |    '."\r\n",
@@ -1310,6 +1310,12 @@ sub DELE_pop3 {
     return 0;
 }
 
+sub QUIT_pop3 {
+    sendcontrol "+OK byebye\r\n";
+
+    return 0;
+}
+
 ################
 ################ FTP commands
 ################