diff options
author | fabrixxm <fabrix.xm@gmail.com> | 2011-02-08 18:13:41 +0100 |
---|---|---|
committer | fabrixxm <fabrix.xm@gmail.com> | 2011-02-08 18:13:41 +0100 |
commit | 26dfb73f48d4fcd4671d136e53f52bb81995ea34 (patch) | |
tree | 36902abc509c4dbf6abc27fb5ba7997ee921f437 /include/poller.php | |
parent | 97b608db38edac6e4989c7343e9de8f32f46f263 (diff) | |
parent | 9a1e5aaf09c1b940f4615f7dc2999e16b019ab18 (diff) | |
download | volse-hubzilla-26dfb73f48d4fcd4671d136e53f52bb81995ea34.tar.gz volse-hubzilla-26dfb73f48d4fcd4671d136e53f52bb81995ea34.tar.bz2 volse-hubzilla-26dfb73f48d4fcd4671d136e53f52bb81995ea34.zip |
Merge branch 'friendika-master'
Diffstat (limited to 'include/poller.php')
-rw-r--r-- | include/poller.php | 17 |
1 files changed, 13 insertions, 4 deletions
diff --git a/include/poller.php b/include/poller.php index 20c84990e..66df080a9 100644 --- a/include/poller.php +++ b/include/poller.php @@ -28,7 +28,6 @@ function poller_run($argv, $argc){ // run queue delivery process in the background $php_path = ((x($a->config,'php_path') && strlen($a->config['php_path'])) ? $a->config['php_path'] : 'php'); - //proc_close(proc_open("\"$php_path\" \"include/queue.php\" &", array(), $foo)); proc_run($php_path,"include/queue.php"); // clear old cache @@ -239,6 +238,7 @@ function poller_run($argv, $argc){ $xml = post_url($contact['poll'],$postvars); } else { + // $contact['network'] !== 'dfrn' $xml = fetch_url($contact['poll']); @@ -246,8 +246,14 @@ function poller_run($argv, $argc){ logger('poller: received xml : ' . $xml, LOGGER_DATA); - if(! strlen($xml)) + if(! strstr($xml,'<?xml')) { + logger('poller: post_handshake: response from ' . $url . ' did not contain XML.'); + $r = q("UPDATE `contact` SET `last-update` = '%s' WHERE `id` = %d LIMIT 1", + dbesc(datetime_convert()), + intval($contact['id']) + ); continue; + } consume_feed($xml,$importer,$contact,$hub,1); @@ -271,8 +277,11 @@ function poller_run($argv, $argc){ } - $r = q("UPDATE `contact` SET `last-update` = '%s' WHERE `id` = %d LIMIT 1", - dbesc(datetime_convert()), + $updated = datetime_convert(); + + $r = q("UPDATE `contact` SET `last-update` = '%s', `success_update` = '%s' WHERE `id` = %d LIMIT 1", + dbesc($updated), + dbesc($updated), intval($contact['id']) ); |