From 6237ea0537bb06c5ae1a715132f145601cbd71c8 Mon Sep 17 00:00:00 2001 From: Andrew Dolgov Date: Thu, 11 Nov 2010 22:59:01 +0300 Subject: [PATCH] implement sequence numbers for counter rpc requests --- feedlist.js | 2 +- modules/backend-rpc.php | 4 ++++ tt-rss.js | 24 +++++++++++++++++++++++- 3 files changed, 28 insertions(+), 2 deletions(-) diff --git a/feedlist.js b/feedlist.js index 9032ba02..33fdb891 100644 --- a/feedlist.js +++ b/feedlist.js @@ -607,7 +607,7 @@ function request_counters_real() { console.log("requesting counters..."); - var query = "?op=rpc&subop=getAllCounters"; + var query = "?op=rpc&subop=getAllCounters&seq=" + next_seq(); if (tagsAreDisplayed()) { query = query + "&omode=tl"; diff --git a/modules/backend-rpc.php b/modules/backend-rpc.php index 6792fae7..e5c92232 100644 --- a/modules/backend-rpc.php +++ b/modules/backend-rpc.php @@ -2,6 +2,7 @@ function handle_rpc_request($link) { $subop = $_REQUEST["subop"]; + $seq = (int) $_REQUEST["seq"]; if ($subop == "setprofile") { $id = db_escape_string($_REQUEST["id"]); @@ -285,6 +286,9 @@ print ""; + if ($seq) + print "$seq"; + if ($last_article_id != getLastArticleId($link)) { print "