MT#17709 remove only 1st occurrence of the key from the call-id list

The count argument influences the operation in the following ways:
   * count > 0: Remove elements equal to value moving from head to tail.
   * count < 0: Remove elements equal to value moving from tail to head.
   * count = 0: Remove all elements equal to value.

Change-Id: Ia77b760fcada0027fe58a48f4b335d5c264e8917
(cherry picked from commit da71d44227)
(cherry picked from commit 11c0802a13)
(cherry picked from commit 9518a66d97)
mr3.8.4
Andrew Pogrebennyk 10 years ago
parent 7acd837c73
commit b7755c09ef

@ -130,7 +130,7 @@ end
if not self._test_connection(self.pair) then
self.pair = self._connect(self.config.pair);
end
local num = self.pair:lrem(callid, 0, key);
local num = self.pair:lrem(callid, 1, key);
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);

Loading…
Cancel
Save