aboutsummaryrefslogtreecommitdiffstats
path: root/include
diff options
context:
space:
mode:
authorFabio Comuni <fabrix.xm@gmail.com>2011-09-28 09:27:59 +0200
committerFabio Comuni <fabrix.xm@gmail.com>2011-09-28 09:27:59 +0200
commitdccd2da3563389a37ccddbb166bbb3b5ed3a0124 (patch)
tree31b646818c906339f01bd4538aee7364f5ef8c9d /include
parente986fc3e301f2a0cfb3b975fe60974fc5dcfd76b (diff)
parent44d7c6aac3548e94e35aed87ba7c06b04f374fc2 (diff)
downloadvolse-hubzilla-dccd2da3563389a37ccddbb166bbb3b5ed3a0124.tar.gz
volse-hubzilla-dccd2da3563389a37ccddbb166bbb3b5ed3a0124.tar.bz2
volse-hubzilla-dccd2da3563389a37ccddbb166bbb3b5ed3a0124.zip
Merge remote-tracking branch 'friendika/master'
Diffstat (limited to 'include')
-rw-r--r--include/diaspora.php3
-rw-r--r--include/items.php3
-rw-r--r--include/salmon.php3
3 files changed, 8 insertions, 1 deletions
diff --git a/include/diaspora.php b/include/diaspora.php
index 5b51314ac..1ae8ca800 100644
--- a/include/diaspora.php
+++ b/include/diaspora.php
@@ -1267,7 +1267,7 @@ function diaspora_transmit($owner,$contact,$slap,$public_batch) {
$return_code = $a->get_curl_code();
logger('diaspora_transmit: ' . $logid . ' returns: ' . $return_code);
- if(! $return_code) {
+ if((! $return_code) || (($curl_stat == 503) && (stristr($a->get_curl_headers(),'retry-after')))) {
logger('diaspora_transmit: queue message');
// queue message for redelivery
q("INSERT INTO `queue` ( `cid`, `created`, `last`, `content`,`batch`)
@@ -1280,5 +1280,6 @@ function diaspora_transmit($owner,$contact,$slap,$public_batch) {
);
}
+
return(($return_code) ? $return_code : (-1));
}
diff --git a/include/items.php b/include/items.php
index da5a18cad..a1baf7471 100644
--- a/include/items.php
+++ b/include/items.php
@@ -1042,6 +1042,9 @@ function dfrn_deliver($owner,$contact,$atom, $dissolve = false) {
if((! $curl_stat) || (! strlen($xml)))
return(-1); // timed out
+ if(($curl_stat == 503) && (stristr($a->get_curl_headers(),'retry-after')))
+ return(-1);
+
if(strpos($xml,'<?xml') === false) {
logger('dfrn_deliver: phase 2: no valid XML returned');
logger('dfrn_deliver: phase 2: returned XML: ' . $xml, LOGGER_DATA);
diff --git a/include/salmon.php b/include/salmon.php
index 9153f8994..3d525f51a 100644
--- a/include/salmon.php
+++ b/include/salmon.php
@@ -187,6 +187,9 @@ EOT;
logger('slapper returned ' . $return_code);
if(! $return_code)
return(-1);
+ if(($return_code == 503) && (stristr($a->get_curl_headers(),'retry-after')))
+ return(-1);
+
return ((($return_code >= 200) && ($return_code < 300)) ? 0 : 1);
}