summaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
authorJoshua Colp <jcolp@digium.com>2016-06-07 20:45:37 -0300
committerJoshua Colp <jcolp@digium.com>2016-06-09 16:45:48 -0300
commitcaf6cccc5c75c310f0eedbd5b01b5d6751681e0d (patch)
treecf3a9619d44734b4be4a80665d13d6f7af6b8e4c /tests
parentc6ee4a0f44f7f5d8e3c77f63f3c56694584e28e9 (diff)
cel: Ensure only one dial status per channel exists.
CEL wrongly assumed that a channel would only have a single dial event on it. This is incorrect. Particularly in a queue each call attempt to a member will result in a dial event, adding a new dial status in CEL without removing the old one. This would cause the container to grow with only one dial status being removed when the channel went away. The other dial status entries would remain leaking memory. This change fixes the memory leak by ensuring that only one dial status will only ever exist for each channel. The behavior during the scenario where multiple events are received has also been improved. For failure cases the first failure will be the dial status. If an answer dial status is received, though, it will take priority and the dial status for the channel will be answer. Memory usage has also been decreased by storing the minimal amount of information and the code has been cleaned up slightly. ASTERISK-25262 #close Change-Id: I5944eb923db17b6a0faa7317ff6abc9307c009fe
Diffstat (limited to 'tests')
-rw-r--r--tests/test_cel.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/tests/test_cel.c b/tests/test_cel.c
index 03e243c78..9a3dc8114 100644
--- a/tests/test_cel.c
+++ b/tests/test_cel.c
@@ -1610,7 +1610,7 @@ AST_TEST_DEFINE(test_cel_dial_pickup)
ast_channel_publish_dial(chan_caller, chan_callee, NULL, "ANSWER");
- HANGUP_CHANNEL(chan_caller, AST_CAUSE_NORMAL, "CANCEL");
+ HANGUP_CHANNEL(chan_caller, AST_CAUSE_NORMAL, "ANSWER");
HANGUP_CHANNEL(chan_callee, AST_CAUSE_NORMAL, "");
return AST_TEST_PASS;