--- mdap-server.pl 2007/04/23 19:40:57 20 +++ mdap-server.pl 2007/04/23 21:26:08 23 @@ -122,7 +122,7 @@ $ant_passwd->{$ant}++; if ( $ant_passwd->{$ant} > $#try_accounts ) { - print "!! ant $ant password protected\n"; + print "$ant ant with unknown password\n"; $ant_password_protected->{$ant}++; return 0; } @@ -132,7 +132,7 @@ my $once; sub once { - my $m = join(" ", @_); + my $m = join('', @_); $once->{$m}++; print $m if ($once->{$m} == 1); } @@ -188,17 +188,20 @@ my $build = $h->{'_BUILD'} || die "no _BUILD?"; my $new_build = fw_build( $board ); if ( $build ne $new_build ) { - print "UPDATE STEP 1 on ant $ant version $build -> $new_build\n"; + print "+ $ant version $build -> $new_build\n"; mdap_send("EXEC-CLI MDAP/$mdap_ver\r\nCLI-CMD:software upgrade\r\nSEQ-NR:1\r\nTO-ANT:$ant\r\nUSER-ID:$user_id\r\nUSER-PWD:$user_pwd\r\n"); } else { - once "OK ant $ant has $build\n"; + once "$ant OK version $build", + $ant_password_protected->{$ant} ? '' : ' with password', + "\n"; } } else { once "!! NO FIRMWARE for $board in $tftp_path for ant $ant, skipping update\n"; } } elsif ( $type eq 'REPLY-EXEC-CLI' && $h->{'SEQ-NR'} == 1 ) { - print "UPDATE STEP 2 on ant $ant\n"; + print "+ $ant bootp mode re-flash started\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"); + $ant_password_protected->{$ant} = 0; } else { print "!! reply ignored ", dump( $h ), $/; }