diff options
author | zotlabs <mike@macgirvin.com> | 2017-08-31 23:21:06 -0700 |
---|---|---|
committer | zotlabs <mike@macgirvin.com> | 2017-08-31 23:21:06 -0700 |
commit | 5bffae621979f37740cbfc7d97adf15f95e6c6e8 (patch) | |
tree | 950cec9c031dd4f1248289a334a92233fdc9dc08 | |
parent | ae8cdc3b42a01bfa6a8a7baf80bad2544c3821a7 (diff) | |
download | volse-hubzilla-5bffae621979f37740cbfc7d97adf15f95e6c6e8.tar.gz volse-hubzilla-5bffae621979f37740cbfc7d97adf15f95e6c6e8.tar.bz2 volse-hubzilla-5bffae621979f37740cbfc7d97adf15f95e6c6e8.zip |
cut down on a few extraneous gprobe processes
-rw-r--r-- | Zotlabs/Daemon/Gprobe.php | 2 | ||||
-rw-r--r-- | include/channel.php | 4 |
2 files changed, 4 insertions, 2 deletions
diff --git a/Zotlabs/Daemon/Gprobe.php b/Zotlabs/Daemon/Gprobe.php index 43cce93c3..f1ffb2d81 100644 --- a/Zotlabs/Daemon/Gprobe.php +++ b/Zotlabs/Daemon/Gprobe.php @@ -17,7 +17,7 @@ class Gprobe { if(! strpos($url,'@')) return; - $r = q("select * from xchan where xchan_addr = '%s' limit 1", + $r = q("select * from hubloc where hubloc_addr = '%s' limit 1", dbesc($url) ); diff --git a/include/channel.php b/include/channel.php index efa39dcac..faf28df28 100644 --- a/include/channel.php +++ b/include/channel.php @@ -1616,13 +1616,15 @@ function get_my_address() { function zid_init() { $tmp_str = get_my_address(); if(validate_email($tmp_str)) { - Zotlabs\Daemon\Master::Summon(array('Gprobe',bin2hex($tmp_str))); $arr = array('zid' => $tmp_str, 'url' => App::$cmd); call_hooks('zid_init',$arr); if(! local_channel()) { $r = q("select * from hubloc where hubloc_addr = '%s' order by hubloc_connected desc limit 1", dbesc($tmp_str) ); + if(! $r) { + Zotlabs\Daemon\Master::Summon(array('Gprobe',bin2hex($tmp_str))); + } if($r && remote_channel() && remote_channel() === $r[0]['hubloc_hash']) return; logger('zid_init: not authenticated. Invoking reverse magic-auth for ' . $tmp_str); |