/[mdap]/mdap-server.pl
This is repository of my old source code which isn't updated any more. Go to git.rot13.org for current projects!
ViewVC logotype

Diff of /mdap-server.pl

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 69 by dpavlin, Sun Nov 18 10:27:37 2007 UTC revision 83 by dpavlin, Tue Dec 4 22:05:21 2007 UTC
# Line 199  while (1) { Line 199  while (1) {
199                  my $client_version = $h->{'MDAP-VERSION'};                  my $client_version = $h->{'MDAP-VERSION'};
200                  $mdap_ver = $client_version if ($client_version);                  $mdap_ver = $client_version if ($client_version);
201    
                 print "<< $type $proto/$mdap_ver << ", length($data), " bytes: ",_dump_data($data),$/ unless $quiet;  
   
                 warn dump( $data, $h ),$/ if ($debug);  
   
202                  # we are getting our own messages (since our source port                  # we are getting our own messages (since our source port
203                  # is same as destination)                  # is same as destination)
204                  next if ( $type =~ m#^(INFO|ANT-SEARCH|EXEC-CLI)# );                  next if ( $type =~ m#^(INFO|ANT-SEARCH|EXEC-CLI)# );
205    
206                    print "<< $type $proto/$mdap_ver << ", length($data), " bytes: ",_dump_data($data),$/ unless $quiet;
207    
208                    warn dump( $data, $h ),$/ if ($debug);
209    
210                  my $ant = $h->{'ANT-ID'} || die "no ANT-ID in ", dump( $h );                  my $ant = $h->{'ANT-ID'} || die "no ANT-ID in ", dump( $h );
211                  my $seq_nr = $1 if (defined $h->{'SEQ-NR'} && $h->{'SEQ-NR'} =~ m/^-*(\d)+/);                  my $seq_nr = $1 if (defined $h->{'SEQ-NR'} && $h->{'SEQ-NR'} =~ m/^(-*\d)+/);
212                  #warn "SEQ-NR: $seq_nr ok: ",$ant_ok_password->{$ant},"\n" if ($seq_nr);                  #warn "SEQ-NR: $seq_nr ok: ",$ant_ok_password->{$ant},"\n" if ($seq_nr);
213    
214                  my ($user_id,$user_pwd) = ant_credentials( $ant );                  my ($user_id,$user_pwd) = ant_credentials( $ant );
# Line 234  while (1) { Line 234  while (1) {
234                          my $board = $h->{'_BOARD_NAME'} || die "no _BOARD_NAME?";                          my $board = $h->{'_BOARD_NAME'} || die "no _BOARD_NAME?";
235                          if ( fw_exists( $board ) ) {                          if ( fw_exists( $board ) ) {
236                                  my $build = $h->{'_BUILD'} || die "no _BUILD?";                                  my $build = $h->{'_BUILD'} || die "no _BUILD?";
237                                    $build =~ s/^(\d+)\.(\d+)\.(\d+)\.(\d+).*$/$1.$2.$3.$4/;
238                                  my $new_build = fw_build( $board );                                  my $new_build = fw_build( $board );
239                                  if ( $build ne $new_build ) {                                  if ( $build ne $new_build ) {
240                                          print "+ $ant $board version $build -> $new_build\n";                                          print "+ $ant $board version $build -> $new_build\n";
# Line 284  while (1) { Line 285  while (1) {
285                          }                          }
286    
287                  } elsif ( $type eq 'REPLY-EXEC-CLI' ) {                  } elsif ( $type eq 'REPLY-EXEC-CLI' ) {
288                          print "##<< $type\n$data\n" if $debug;                          print "##<< $type $seq_nr\n$data\n" if $debug;
289                          if ( $seq_nr == 1 ) {                          if ( $seq_nr == 1 ) {
290                                  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");
291                                  forget_ant( $ant ) if ( $ant_flashing->{$ant} );                                  forget_ant( $ant ) if ( $ant_flashing->{$ant} );

Legend:
Removed from v.69  
changed lines
  Added in v.83

  ViewVC Help
Powered by ViewVC 1.1.26