Loading tests/ftp.pm +24 −17 Original line number Diff line number Diff line Loading @@ -177,15 +177,19 @@ sub killpid { # killsockfilters kills sockfilter processes for a given server. # sub killsockfilters { my ($proto, $ipvnum, $idnum, $verbose) = @_; my ($proto, $ipvnum, $idnum, $verbose, $which) = @_; my $server; my $pidfile; my $pid; return if($proto !~ /^(ftp|imap|pop3|smtp)$/); die "unsupported sockfilter: $which" if($which && ($which !~ /^(main|data)$/)); $server = servername_id($proto, $ipvnum, $idnum) if($verbose); if(!$which || ($which eq 'main')) { $pidfile = mainsockf_pidfilename($proto, $ipvnum, $idnum); $pid = processexists($pidfile); if($pid > 0) { Loading @@ -195,9 +199,11 @@ sub killsockfilters { waitpid($pid, 0); } unlink($pidfile) if(-f $pidfile); } return if($proto ne 'ftp'); if(!$which || ($which eq 'data')) { $pidfile = datasockf_pidfilename($proto, $ipvnum, $idnum); $pid = processexists($pidfile); if($pid > 0) { Loading @@ -208,6 +214,7 @@ sub killsockfilters { } unlink($pidfile) if(-f $pidfile); } } ####################################################################### # killallsockfilters kills sockfilter processes for all servers. Loading Loading
tests/ftp.pm +24 −17 Original line number Diff line number Diff line Loading @@ -177,15 +177,19 @@ sub killpid { # killsockfilters kills sockfilter processes for a given server. # sub killsockfilters { my ($proto, $ipvnum, $idnum, $verbose) = @_; my ($proto, $ipvnum, $idnum, $verbose, $which) = @_; my $server; my $pidfile; my $pid; return if($proto !~ /^(ftp|imap|pop3|smtp)$/); die "unsupported sockfilter: $which" if($which && ($which !~ /^(main|data)$/)); $server = servername_id($proto, $ipvnum, $idnum) if($verbose); if(!$which || ($which eq 'main')) { $pidfile = mainsockf_pidfilename($proto, $ipvnum, $idnum); $pid = processexists($pidfile); if($pid > 0) { Loading @@ -195,9 +199,11 @@ sub killsockfilters { waitpid($pid, 0); } unlink($pidfile) if(-f $pidfile); } return if($proto ne 'ftp'); if(!$which || ($which eq 'data')) { $pidfile = datasockf_pidfilename($proto, $ipvnum, $idnum); $pid = processexists($pidfile); if($pid > 0) { Loading @@ -208,6 +214,7 @@ sub killsockfilters { } unlink($pidfile) if(-f $pidfile); } } ####################################################################### # killallsockfilters kills sockfilter processes for all servers. Loading