aboutsummaryrefslogtreecommitdiffstats
path: root/include/hubloc.php
diff options
context:
space:
mode:
Diffstat (limited to 'include/hubloc.php')
-rw-r--r--include/hubloc.php11
1 files changed, 8 insertions, 3 deletions
diff --git a/include/hubloc.php b/include/hubloc.php
index 8bd6d8d68..674a3885f 100644
--- a/include/hubloc.php
+++ b/include/hubloc.php
@@ -291,13 +291,18 @@ function ping_site($url) {
$ret['message'] = 'no answer from ' . $url;
return $ret;
}
- $packet_result = $r['body'];
+ $packet_result = json_decode($r['body'],true);
if(! $packet_result['success']) {
$ret['message'] = 'packet failure from ' . $url;
return $ret;
}
- $ret['success'] = true;
- return $ret;
+ if($packet_result['success']) {
+ $ret['success'] = true;
+ }
+ else {
+ $ret['message'] = 'unknown error from ' . $url;
+ }
+ return $ret;
}