TT#34600 Fix warnings about redis counters in Call Forwarding scenarios

Change-Id: Ie01b24406ceca92b8eb378aac10a560b5eb28816
changes/29/19929/3
Andrew Pogrebennyk 8 years ago
parent 3570ee6bd2
commit ebeb5d4ca0

@ -132,6 +132,10 @@ end
self.pair = self._connect(self.config.pair);
end
local num = self.pair:lrem(callid, 1, key);
if num == 0 then
sr.log("dbg", string.format("pair:lrem[%s]=>[%s] no such key found in list, skipping decrement", callid, key));
return false;
end
sr.log("dbg", string.format("pair:lrem[%s]=>[%s] %d\n", callid, key, num));
if not self._test_connection(self.central) then
self.central = self._connect(self.config.central);

@ -129,6 +129,10 @@ end
self.pair = _connect(self.config.pair);
end
local num = self.pair:lrem("list:"..callid, 0, key);
if num == 0 then
sr.log("dbg", string.format("pair:lrem[list:%s] no such key %s found in list", callid, key));
return false;
end
sr.log("dbg", string.format("pair:lrem[%s]=>[%s] %d\n", callid, key, num));
if not _test_connection(self.central) then
self.central = _connect(self.config.central);

Loading…
Cancel
Save