aboutsummaryrefslogtreecommitdiffstats
path: root/include/zot.php
diff options
context:
space:
mode:
authorfriendica <info@friendica.com>2015-01-28 01:06:56 -0800
committerfriendica <info@friendica.com>2015-01-28 01:06:56 -0800
commit9feb300f47eaff46ea78ef66379de654d3365dae (patch)
tree731732464c522d1d13d9cc1abaa842befaa6ef5b /include/zot.php
parent145b30adfc21b7f29d1431ebd1e2e0f4ebd853bf (diff)
downloadvolse-hubzilla-9feb300f47eaff46ea78ef66379de654d3365dae.tar.gz
volse-hubzilla-9feb300f47eaff46ea78ef66379de654d3365dae.tar.bz2
volse-hubzilla-9feb300f47eaff46ea78ef66379de654d3365dae.zip
more minor tweaks to the route mismatch algorithm after watching it all day.
Diffstat (limited to 'include/zot.php')
-rw-r--r--include/zot.php7
1 files changed, 5 insertions, 2 deletions
diff --git a/include/zot.php b/include/zot.php
index 43a7ad6ba..f12d1a8a8 100644
--- a/include/zot.php
+++ b/include/zot.php
@@ -1524,7 +1524,7 @@ function process_delivery($sender,$arr,$deliveries,$relay,$public = false,$reque
// sent it to us originally. Ignore it if it came from another source
// (with potentially different permissions).
// only compare the last hop since it could have arrived at the last location any number of ways.
- // Always accept empty routes.
+ // Always accept empty routes and firehose items (route contains 'undefined') .
$existing_route = explode(',', $r[0]['route']);
$routes = count($existing_route);
@@ -1536,10 +1536,13 @@ function process_delivery($sender,$arr,$deliveries,$relay,$public = false,$reque
$last_hop = '';
$last_prior_route = '';
}
+
+ if($last_hop == 'undefined' || $sender['hash'] == 'undefined')
+ $last_hop = '';
$current_route = (($arr['route']) ? $arr['route'] . ',' : '') . $sender['hash'];
- if($last_hop && $last_hop != $sender['hash'] && $sender['hash'] != 'undefined') {
+ if($last_hop && $last_hop != $sender['hash']) {
logger('comment route mismatch: parent route = ' . $r[0]['route'] . ' expected = ' . $current_route, LOGGER_DEBUG);
logger('comment route mismatch: parent msg = ' . $r[0]['id'],LOGGER_DEBUG);
$result[] = array($d['hash'],'comment route mismatch',$channel['channel_name'] . ' <' . $channel['channel_address'] . '@' . get_app()->get_hostname() . '>',$arr['mid']);