From 1b9722c65ac2169cadcf78376aaaf9d82721c9cd Mon Sep 17 00:00:00 2001 From: redmatrix Date: Thu, 17 Dec 2015 18:16:46 -0800 Subject: loop detection --- include/items.php | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) (limited to 'include/items.php') diff --git a/include/items.php b/include/items.php index 7343f7165..44f9633a9 100755 --- a/include/items.php +++ b/include/items.php @@ -3335,7 +3335,6 @@ function start_delivery_chain($channel, $item, $item_id, $parent) { if((! $private) && $new_public_policy) $private = 1; - $item_wall = 1; $item_origin = 1; $item_uplink = 0; @@ -3386,8 +3385,13 @@ function start_delivery_chain($channel, $item, $item_id, $parent) { if($r) proc_run('php','include/notifier.php','tgroup',$item_id); - else + else { logger('start_delivery_chain: failed to update item'); + // reset the source xchan to prevent loops + $r = q("update item set source_xchan = '' where id = %d", + intval($item_id) + ); + } } /** -- cgit v1.2.3