Changeset ac558e1e007de65993818ce12f6a20e22f10c1bb

Show
Ignore:
Timestamp:
03/22/07 03:57:24 (8 years ago)
Author:
Theo Schlossnagle <jesus@omniti.com>
git-committer:
Theo Schlossnagle <jesus@omniti.com> 1174535844 +0000
git-parent:

[6b9383265c7d699d6a9878aa3c6202cb413c73e7]

git-author:
Theo Schlossnagle <jesus@omniti.com> 1174535844 +0000
Message:

update TCPSERVICE to the dual part return

git-svn-id: https://labs.omniti.com/resmon/trunk@23 8c0face9-b7db-6ec6-c4b3-d5f7145c7d55

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • lib/Resmon/Module/TCPSERVICE.pm

    r3596d9c rac558e1  
    2121  my $handle = new IO::Handle; 
    2222  socket($handle, Socket::PF_INET, Socket::SOCK_STREAM, $proto) || 
    23     return "BAD(socket error)"; 
     23    return "BAD", "socket error"; 
    2424  $handle->autoflush(1); 
    2525  fcntl($handle, Fcntl::F_SETFL, Fcntl::O_NONBLOCK) || 
     
    3434    if($error != 0) { 
    3535      close($handle); 
    36       return "BAD(connect failed)"; 
     36      return "BAD", "connect failed"; 
    3737    } 
    3838    print $handle $self->{prepost}."\r\n" if ($self->{prepost}); 
     
    4444      close($handle); 
    4545      $banner =~ s/([^\s\d\w.,;\/\\])/sprintf "\\%o", $1/eg; 
    46       return "BAD($banner)
     46      return "BAD", "$banner
    4747        if($self->{match} && ($banner =! /$self->{match}/)); 
    48       return "OK($banner)"
     48      return "OK", $banner
    4949    } 
    5050  } 
    5151  close($handle); 
    52   return "BAD(timeout)"; 
     52  return "BAD", "timeout"; 
    5353} 
    5454