Time: [Mon Dec 8 16:10:32 2008] Mon Dec 8 16:10:32 2008 : Starting Monitor client Parent session Time: [Mon Dec 8 16:10:51 2008] Client: Recieved input of Time: [Mon Dec 8 16:10:51 2008] Check_Build branch: c:\buildscripts\sx_4.9.2.0\inProgress Time: [Mon Dec 8 16:11:08 2008] Get_Status: SX_4.9.2.0.124.000 5,230,792,704 Passed Thu Dec 4 21:35:48 2008 Time: [Mon Dec 8 16:11:08 2008] Client: Closing Socket and shutting down? Time: [Mon Dec 8 16:11:08 2008] Client: Recieved input of Time: [Mon Dec 8 16:11:08 2008] Check_Build branch: c:\buildscripts\sx_4.9.1.0\inProgress Time: [Mon Dec 8 16:11:19 2008] Get_Status: SX_4.9.1.0.097.000 5,230,268,416 Passed Fri Nov 7 14:28:47 2008 Time: [Mon Dec 8 16:11:19 2008] Client: Closing Socket and shutting down? Time: [Mon Dec 8 16:12:19 2008] Client: Recieved input of Time: [Mon Dec 8 16:12:19 2008] Check_Build branch: c:\buildscripts\sx_4.9.2.0\inProgress Time: [Mon Dec 8 16:12:31 2008] Get_Status: SX_4.9.2.0.124.000 5,218,193,408 Passed Thu Dec 4 21:35:48 2008 Time: [Mon Dec 8 16:12:31 2008] Client: Closing Socket and shutting down? Time: [Mon Dec 8 16:12:31 2008] Check_Build branch: c:\buildscripts\sx_4.9.1.0\inProgress sub Run ($) { my $DEBUG_LOG="c:\\buildscripts\\Monitor\\Client_log.txt"; my($self) = @_; my($line, $sock); my($result); my($rc); my($command); $sock = $self->{'socket'}; if ($self->{'debug'} eq 'ON') { open(DEBUG,">$DEBUG_LOG"); } while(1) { if (!defined($line = $sock->getline())) { if ($sock->error()) { $self->Error("Client connection error %s",$sock->error()); } eventLog("Client: Closing Socket and shutting down?"); $sock->close(); return; } $line =~ s/\s+$//; # Remove CRLF ($L_BRANCH,$command)=split(" ",$line); $U_BRANCH=uc($L_BRANCH); eventLog("Client: Recieved input of <$L_BRANCH> <$command>"); SWITCH: { if ( $command eq "Run_Build") { $result=Run_Build(); last SWITCH; } if ( $command eq "Check_Build") { $result=Check_Build(); last SWITCH; } if ( $command eq "Get_Status") { $result=Get_Status(); last SWITCH; } if ( $command eq "Get_Label") { $result=Get_Last_Build_Label(); last SWITCH; } if ( $command eq "Help") { $result=$help_statement; last SWITCH; } $result="ERROR: Input did not match expected protocol <$command>\n"; } $rc = printf $sock ("%s\n", $result); if (!$rc) { $self->Error("Client connection error %s", $sock->error()); $sock->close(); return; } } } sub new ($$;$) { my($class, $attr, $args) = @_; my($self) = $class->SUPER::new($attr, $args); if ($self->{'parent'}) { # Called via Clone() $self->{'debug'} = $self->{'parent'}->{'debug'}; } else { # Initial call if ($self->{'options'} && $self->{'options'}->{'debug'}) { $self->{'debug'} = $self->{'options'}->{'debug'} } } if (!$self->{'debug'}) { $self->{'debug'} = 'ON'; } $self; }