aboutsummaryrefslogtreecommitdiffstats
path: root/include
diff options
context:
space:
mode:
authorfriendica <info@friendica.com>2012-12-31 14:45:26 -0800
committerfriendica <info@friendica.com>2012-12-31 14:45:26 -0800
commit791302f317de466a079b71e548892c4ffc172005 (patch)
treeb930cf8499a93f438974f00ef7cbd57ef07f36f6 /include
parentdb16ea8527c27e9012e5683058a97f33e25eb44b (diff)
downloadvolse-hubzilla-791302f317de466a079b71e548892c4ffc172005.tar.gz
volse-hubzilla-791302f317de466a079b71e548892c4ffc172005.tar.bz2
volse-hubzilla-791302f317de466a079b71e548892c4ffc172005.zip
more delivery diagnostics
Diffstat (limited to 'include')
-rw-r--r--include/deliver.php2
-rw-r--r--include/queue.php2
-rw-r--r--include/zot.php12
3 files changed, 12 insertions, 4 deletions
diff --git a/include/deliver.php b/include/deliver.php
index 546b75785..471ea580d 100644
--- a/include/deliver.php
+++ b/include/deliver.php
@@ -32,7 +32,7 @@ function deliver_run($argv, $argc) {
else {
$result = zot_zot($r[0]['outq_posturl'],$r[0]['outq_notify']);
if($result['success']) {
- zot_process_response($result, $r[0]);
+ zot_process_response($r[0]['outq_posturl'],$result, $r[0]);
}
else {
$y = q("update outq set outq_updated = '%s' where outq_hash = '%s' limit 1",
diff --git a/include/queue.php b/include/queue.php
index 2b4e5b504..5467f2c20 100644
--- a/include/queue.php
+++ b/include/queue.php
@@ -43,7 +43,7 @@ function queue_run($argv, $argc){
continue;
$result = zot_zot($rr['outq_posturl'],$rr['outq_notify']);
if($result['success']) {
- zot_process_response($result, $rr);
+ zot_process_response($rr['outq_posturl'],$result, $rr);
}
else {
$deadguys[] = $rr['outq_hub'];
diff --git a/include/zot.php b/include/zot.php
index 94bebbd57..3a06366f6 100644
--- a/include/zot.php
+++ b/include/zot.php
@@ -607,12 +607,20 @@ function import_xchan($arr) {
return $ret;
}
-function zot_process_response($arr,$outq) {
- if(! $arr['success'])
+function zot_process_response($hub,$arr,$outq) {
+
+ if(! $arr['success']) {
+ logger('zot_process_response: failed: ' . $hub);
return;
+ }
$x = json_decode($arr['body'],true);
+ if(! $x) {
+ logger('zot_process_response: No json from ' . $hub);
+ logger('zot_process_response: headers: ' . print_r($arr['header'],true), LOGGER_DATA);
+ }
+
// synchronous message types are handled immediately
// async messages remain in the queue until processed.