From 9518a66d970483077de51f855272e09de0c8ca3e Mon Sep 17 00:00:00 2001 From: Andrew Pogrebennyk Date: Wed, 3 Feb 2016 10:07:01 +0100 Subject: [PATCH] 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 da71d4422764b98d7d729458c97f98ffa0426c31) (cherry picked from commit 11c0802a13fc1e476d4577b53a01c21de4543a66) --- ngcp/dlgcnt.lua | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ngcp/dlgcnt.lua b/ngcp/dlgcnt.lua index 016363d..37a55fd 100644 --- a/ngcp/dlgcnt.lua +++ b/ngcp/dlgcnt.lua @@ -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);