[Mon-commit] mon/mon.d ftp.monitor,1.1.1.1,1.1.1.1.4.1
Brought to you by:
trockij
From: Jim T. <tr...@us...> - 2007-05-08 11:25:46
|
Update of /cvsroot/mon/mon/mon.d In directory sc8-pr-cvs16:/tmp/cvs-serv25704/mon.d Modified Files: Tag: mon-1-2-branch ftp.monitor Log Message: added fix to ftp.monitor to handle multiline reply after quit command by Arkadiusz Miskiewicz Index: ftp.monitor =================================================================== RCS file: /cvsroot/mon/mon/mon.d/ftp.monitor,v retrieving revision 1.1.1.1 retrieving revision 1.1.1.1.4.1 diff -C2 -d -r1.1.1.1 -r1.1.1.1.4.1 *** ftp.monitor 9 Jun 2004 05:18:05 -0000 1.1.1.1 --- ftp.monitor 8 May 2007 11:25:42 -0000 1.1.1.1.4.1 *************** *** 172,183 **** $result->{"detail"} .= " > quit\n"; ! $in = <S>; ! $result->{"detail"} .= " < $in"; ! if ($in !~ /^221 /) { ! alarm 0; ! $result->{"ok"} = 0; ! $result->{"error"} = "FTP server error after quit"; ! close(S); ! return undef; } --- 172,185 ---- $result->{"detail"} .= " > quit\n"; ! while ($in = <S>) { ! $result->{"detail"} .= " < $in"; ! next if ($in =~ /^[0-9]{3}\-/); ! if ($in !~ /^221 /) { ! alarm 0; ! $result->{"ok"} = 0; ! $result->{"error"} = "FTP server error after quit"; ! close(S); ! return undef; ! } } |