cut down on a few extraneous gprobe processes
This commit is contained in:
parent
ae8cdc3b42
commit
5bffae6219
@ -17,7 +17,7 @@ class Gprobe {
|
|||||||
if(! strpos($url,'@'))
|
if(! strpos($url,'@'))
|
||||||
return;
|
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)
|
dbesc($url)
|
||||||
);
|
);
|
||||||
|
|
||||||
|
@ -1616,13 +1616,15 @@ function get_my_address() {
|
|||||||
function zid_init() {
|
function zid_init() {
|
||||||
$tmp_str = get_my_address();
|
$tmp_str = get_my_address();
|
||||||
if(validate_email($tmp_str)) {
|
if(validate_email($tmp_str)) {
|
||||||
Zotlabs\Daemon\Master::Summon(array('Gprobe',bin2hex($tmp_str)));
|
|
||||||
$arr = array('zid' => $tmp_str, 'url' => App::$cmd);
|
$arr = array('zid' => $tmp_str, 'url' => App::$cmd);
|
||||||
call_hooks('zid_init',$arr);
|
call_hooks('zid_init',$arr);
|
||||||
if(! local_channel()) {
|
if(! local_channel()) {
|
||||||
$r = q("select * from hubloc where hubloc_addr = '%s' order by hubloc_connected desc limit 1",
|
$r = q("select * from hubloc where hubloc_addr = '%s' order by hubloc_connected desc limit 1",
|
||||||
dbesc($tmp_str)
|
dbesc($tmp_str)
|
||||||
);
|
);
|
||||||
|
if(! $r) {
|
||||||
|
Zotlabs\Daemon\Master::Summon(array('Gprobe',bin2hex($tmp_str)));
|
||||||
|
}
|
||||||
if($r && remote_channel() && remote_channel() === $r[0]['hubloc_hash'])
|
if($r && remote_channel() && remote_channel() === $r[0]['hubloc_hash'])
|
||||||
return;
|
return;
|
||||||
logger('zid_init: not authenticated. Invoking reverse magic-auth for ' . $tmp_str);
|
logger('zid_init: not authenticated. Invoking reverse magic-auth for ' . $tmp_str);
|
||||||
|
Reference in New Issue
Block a user