machdb-send_hwid_error.patch

nathan, 04/05/2009 01:36 AM

Download (642 Bytes)

 
machdb-send 2009-04-05 01:34:30.000000000 -0700
24 24
use strict;
25 25
use warnings;
26 26
use LWP 5.64;
27
use XML::Simple qw(:strict);
27 28
my $browser = LWP::UserAgent->new;
28 29
$browser->agent("MachDB/0.5-$hostname");
29 30

  
......
32 33
  [ 'xml' => $xml,
33 34
    'hostname' => $hostname ]
34 35
);
36
# quick error check
37
my $host = XMLin($xmlfile,ForceArray => 1,KeyAttr => [],noattr => 1);
38
die "no HWID found"
39
 unless defined $host->{hwid};
35 40
die "$url error: ", $response->status_line
36 41
 unless $response->is_success;
37 42
die "Weird content type at $url -- ", $response->content_type