aboutsummaryrefslogtreecommitdiffstats
path: root/include
diff options
context:
space:
mode:
authorMike Macgirvin <mike@macgirvin.com>2010-10-12 20:29:04 -0700
committerMike Macgirvin <mike@macgirvin.com>2010-10-12 20:29:04 -0700
commit033935c19406c8468ed75fdd15a3a532f4e25319 (patch)
treead73289f296bf14d6cc6977e41af88fd2f1909d6 /include
parent3c440f70c66953735d01841453fa6a7ed244ef1c (diff)
downloadvolse-hubzilla-033935c19406c8468ed75fdd15a3a532f4e25319.tar.gz
volse-hubzilla-033935c19406c8468ed75fdd15a3a532f4e25319.tar.bz2
volse-hubzilla-033935c19406c8468ed75fdd15a3a532f4e25319.zip
cleanup to ensure protocol version is passed properly. We will need it if/when any incompatible protocol changes are introduced.
Diffstat (limited to 'include')
-rw-r--r--include/items.php8
-rw-r--r--include/poller.php11
2 files changed, 11 insertions, 8 deletions
diff --git a/include/items.php b/include/items.php
index ab2fd644a..7958c78c3 100644
--- a/include/items.php
+++ b/include/items.php
@@ -517,10 +517,10 @@ function dfrn_deliver($contact,$atom,$debugging = false) {
if($contact['duplex'] && $contact['issued-id'])
$idtosend = '1:' . $orig_id;
- $url = $contact['notify'] . '?dfrn_id=' . $idtosend;
+ $url = $contact['notify'] . '?dfrn_id=' . $idtosend . '&dfrn_version=' . DFRN_PROTOCOL_VERSION ;
if($debugging)
- echo "URL: $url";
+ echo "URL: $url\n";
$xml = fetch_url($url);
@@ -560,8 +560,8 @@ function dfrn_deliver($contact,$atom,$debugging = false) {
return 3;
}
- $postvars['dfrn_id'] = $idtosend;
-
+ $postvars['dfrn_id'] = $idtosend;
+ $postvars['dfrn_version'] = DFRN_PROTOCOL_VERSION;
if(($contact['rel']) && ($contact['rel'] != REL_FAN) && (! $contact['blocked']) && (! $contact['readonly'])) {
$postvars['data'] = $atom;
diff --git a/include/poller.php b/include/poller.php
index ff141484b..bf2803b63 100644
--- a/include/poller.php
+++ b/include/poller.php
@@ -94,12 +94,15 @@
if(intval($contact['duplex']) && $contact['issued-id'])
$idtosend = '1:' . $orig_id;
- $url = $contact['poll'] . '?dfrn_id=' . $idtosend . '&type=data&last_update=' . $last_update ;
+ $url = $contact['poll'] . '?dfrn_id=' . $idtosend
+ . '&dfrn_version=' . DFRN_PROTOCOL_VERSION
+ . '&type=data&last_update=' . $last_update ;
+
$xml = fetch_url($url);
if($debugging) {
- echo "URL: " . $url . "\r\n";
- echo "XML: " . $xml . "\r\n";
+ echo "URL: " . $url . "\n";
+ echo "XML: " . $xml . "\n";
}
if(! $xml) {
@@ -154,7 +157,7 @@
}
$postvars['dfrn_id'] = $idtosend;
-
+ $postvars['dfrn_version'] = DFRN_PROTOCOL_VERSION;
$xml = post_url($contact['poll'],$postvars);