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 14:46:04 -0500
commitd338343dac2af045ec44ad1b19b479ed3a94c295 (patch)
tree063fe61c6494360a788032321ad12ab1c8275552 /tests
parent0388c40b8c72169f392c55beb33e0adb08d57b67 (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 0cd8c5cfa..e54fb5984 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;