summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorThierry Vignaud <tvignaud@mandriva.org>2006-03-28 18:08:53 +0000
committerThierry Vignaud <tvignaud@mandriva.org>2006-03-28 18:08:53 +0000
commita163de6c48e7750a588bc7fa14b2a910c331a974 (patch)
tree22aae35c12f6a222f8e02bef26d30f0e7cd8eee3
parent5008224f512a74c23d5c5986a13f5bea5e255b04 (diff)
downloadmgaonline-a163de6c48e7750a588bc7fa14b2a910c331a974.tar
mgaonline-a163de6c48e7750a588bc7fa14b2a910c331a974.tar.gz
mgaonline-a163de6c48e7750a588bc7fa14b2a910c331a974.tar.bz2
mgaonline-a163de6c48e7750a588bc7fa14b2a910c331a974.tar.xz
mgaonline-a163de6c48e7750a588bc7fa14b2a910c331a974.zip
(check_server_response) rely on {code} rather than on deprecated {status}
-rw-r--r--mdkonline.pm6
1 files changed, 4 insertions, 2 deletions
diff --git a/mdkonline.pm b/mdkonline.pm
index 91453080..450e9708 100644
--- a/mdkonline.pm
+++ b/mdkonline.pm
@@ -198,8 +198,10 @@ sub check_server_response {
foreach my $num ([9, 8], [21, 20]) { $hash_ret->{$num->[0]} = $hash_ret->{$num->[1]} }
# print Dumper($response);
my $code = $response->{code} || '99';
- $response->{status} and write_conf($response);
- return $response->{status} ? 'OK' : $hash_ret->{$code}[0] . ' : ' . $hash_ret->{$code}[1] . "\n\n" . $response->{message};
+ my $answer = $response->{code} eq 0 ? 'OK' : $hash_ret->{$code}[0] . ' : ' . $hash_ret->{$code}[1] . "\n\n" . $response->{message};
+ $answer eq 'OK' and write_conf($response);
+ return $answer;
+
}
sub check_valid_email {