summaryrefslogtreecommitdiffstats
path: root/mdkonline.pm
diff options
context:
space:
mode:
authorThierry Vignaud <tv@mandriva.org>2006-09-21 12:45:16 +0000
committerThierry Vignaud <tv@mandriva.org>2006-09-21 12:45:16 +0000
commite7901a537bc067a48411d8be68f4c9e708deabc0 (patch)
treefdda08581bb9fcdc008266567b8c60f233e26ff0 /mdkonline.pm
parent88a068d6f57529daffe4bca5bfe74685a4e9afd8 (diff)
downloadmgaonline-e7901a537bc067a48411d8be68f4c9e708deabc0.tar
mgaonline-e7901a537bc067a48411d8be68f4c9e708deabc0.tar.gz
mgaonline-e7901a537bc067a48411d8be68f4c9e708deabc0.tar.bz2
mgaonline-e7901a537bc067a48411d8be68f4c9e708deabc0.tar.xz
mgaonline-e7901a537bc067a48411d8be68f4c9e708deabc0.zip
(check_server_response) return better looking error messages when
there's no known string for the error code
Diffstat (limited to 'mdkonline.pm')
-rw-r--r--mdkonline.pm2
1 files changed, 1 insertions, 1 deletions
diff --git a/mdkonline.pm b/mdkonline.pm
index 6c4ddfb8..508a35c1 100644
--- a/mdkonline.pm
+++ b/mdkonline.pm
@@ -221,7 +221,7 @@ 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';
- my $answer = $response->{code} eq 0 ? 'OK' : $hash_ret->{$code}[0] . ' : ' . $hash_ret->{$code}[1] . "\n\n" . $response->{message};
+ my $answer = $response->{code} eq 0 ? 'OK' : $hash_ret->{$code} ? $hash_ret->{$code}[0] . ' : ' . $hash_ret->{$code}[1] . "\n\n" . $response->{message} : $response->{message};
$answer eq 'OK' and write_conf($response) if !$<;
log::explanations(qq(the server returned "$answer"));
return $answer;