--- mdap-server.pl 2007/11/16 19:12:08 58 +++ mdap-server.pl 2007/11/18 00:55:43 64 @@ -12,7 +12,7 @@ my $GROUP = '224.0.0.103'; my $PORT = '3235'; -my $debug = 0; +#my $debug = 0; # from MDAP my $quiet = 1; my $verbose = 0; my $credentials = 0; @@ -256,28 +256,31 @@ status "$waiting of $count ants still flasing upto $build\n"; } } - } else { - once "!! NO FIRMWARE for $board in $tftp_path for ant $ant, skipping update"; - } - if ( $plugins ) { - foreach my $plugin ( MDAP->plugins ) { - warn "## calling $plugin\n" if $debug; - if ( my $command = $plugin->check( $h ) ) { - - warn ">> $ant ", - $h->{'ANT-NAME'}, " ", - $h->{'_BUILD'}, " ", - "\t:$command\n"; - - mdap_send("EXEC-CLI MDAP/$mdap_ver\r\nCLI-CMD:$command\r\nSEQ-NR:1\r\nTO-ANT:$ant\r\nUSER-ID:$user_id\r\nUSER-PWD:$user_pwd\r\n"); } + if ( $plugins ) { + foreach my $plugin ( MDAP->plugins ) { + warn "## calling $plugin\n" if $debug; + if ( my $command = $plugin->check( $h ) ) { + + warn ">> $plugin $ant ", + $h->{'ANT-NAME'}, " ", + $h->{'_BUILD'}, " ", + "\t:$command\n"; + + mdap_send("EXEC-CLI MDAP/$mdap_ver\r\nCLI-CMD:$command\r\nSEQ-NR:1\r\nTO-ANT:$ant\r\nUSER-ID:$user_id\r\nUSER-PWD:$user_pwd\r\n"); + last; + } + } } + + } else { + once "!! NO FIRMWARE for $board in $tftp_path for ant $ant, skipping update"; } } elsif ( $type eq 'REPLY-EXEC-CLI' ) { print "##<< $type\n$data\n" if $debug; if ( $seq_nr == 1 ) { -# mdap_send("EXEC-CLI MDAP/$mdap_ver\r\nSEQ-NR:2\r\nTO-ANT:$ant\r\nUSER-ID:$user_id\r\nUSER-PWD:$user_pwd\r\n"); + mdap_send("EXEC-CLI MDAP/$mdap_ver\r\nSEQ-NR:2\r\nTO-ANT:$ant\r\nUSER-ID:$user_id\r\nUSER-PWD:$user_pwd\r\n"); forget_ant( $ant ) if ( $ant_flashing->{$ant} ); } elsif ( $seq_nr < 0 ) { warn "EXEC-CLI failed: $data\n";