freemyip: Check entire result body, not just first line

This is simpler, and should be more resilient to bugs.
This commit is contained in:
Richard Hansen 2024-07-21 22:18:16 -04:00
parent 3ece2017e9
commit 1195a40c45

View file

@ -6425,10 +6425,8 @@ sub nic_freemyip_update {
}
next if !header_ok($h, $reply);
(my $body = $reply) =~ s/^.*?\n\n//s;
my @reply = split(/\n/, $body);
my $returned = pop(@reply);
if ($returned !~ /OK/) {
failed("$h: Server said: $returned");
if ($body !~ /OK/) {
failed("$h: Server said: $body");
next;
}
$config{$h}{'ip'} = $ip;