aboutsummaryrefslogtreecommitdiffstats
path: root/mod/admin.php
diff options
context:
space:
mode:
authorMichael Meer <michael@meer.name>2014-01-30 20:41:40 +0100
committerMichael Meer <michael@meer.name>2014-01-30 20:41:40 +0100
commitc0f02d774a0af0f0959a7690dadb30586ee0b6b1 (patch)
tree670e6bc3fdd9604acd8b21a3ea48dda1b18cde7a /mod/admin.php
parentda1e7cc211b7d74c81c942c4eece392b603ecc59 (diff)
downloadvolse-hubzilla-c0f02d774a0af0f0959a7690dadb30586ee0b6b1.tar.gz
volse-hubzilla-c0f02d774a0af0f0959a7690dadb30586ee0b6b1.tar.bz2
volse-hubzilla-c0f02d774a0af0f0959a7690dadb30586ee0b6b1.zip
started analysis of ping response and clean up more logger
Diffstat (limited to 'mod/admin.php')
-rw-r--r--mod/admin.php13
1 files changed, 11 insertions, 2 deletions
diff --git a/mod/admin.php b/mod/admin.php
index 12b847b03..76decae09 100644
--- a/mod/admin.php
+++ b/mod/admin.php
@@ -483,14 +483,23 @@ function admin_page_hubloc_post(&$a){
//perform ping
$m = zot_build_packet($a->get_channel(),'ping');
$r = zot_zot($hublocurl,$m);
- logger('ping answer: ' . print_r($r,true), LOGGER_DEBUG);
+ //handle results and set the hubloc flags in db to make results visible
+ $r2 = $r[body];
+ $r3 = $r2[success];
+ if ( $r3[success] == True ){
+ //set HUBLOC_OFFLINE to 0
+ logger(' success = true ',LOGGER_DEBUG);
+ } else {
+ //set HUBLOC_OFFLINE to 1
+ logger(' success = false ', LOGGER_DEBUG);
+
+ }
//unfotunatly zping wont work, I guess return format is not correct
//require_once('mod/zping.php');
//$r = zping_content($hublocurl);
//logger('zping answer: ' . $r, LOGGER_DEBUG);
- //handle results and set the hubloc flags in db to make results visible
//in case of repair store new pub key for tested hubloc (all channel with this hubloc) in db
//after repair set hubloc flags to 0