summaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
authorDavid M. Lee <dlee@digium.com>2013-07-11 02:02:48 +0000
committerDavid M. Lee <dlee@digium.com>2013-07-11 02:02:48 +0000
commit31a58b2604c5f551a817f4153a32cc56e5c6da49 (patch)
tree09e3449c0658cba2af1694803f8dc990e169b407 /tests
parent5d9ac58d8efb65b1f428e624481285b4ed337790 (diff)
Fixed some CEL test crashes
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@394037 65c4cc65-6c06-0410-ace0-fbb531ad65f3
Diffstat (limited to 'tests')
-rw-r--r--tests/test_cel.c13
1 files changed, 5 insertions, 8 deletions
diff --git a/tests/test_cel.c b/tests/test_cel.c
index fa1b307af..aef62017d 100644
--- a/tests/test_cel.c
+++ b/tests/test_cel.c
@@ -1335,9 +1335,6 @@ static int cel_verify_and_cleanup_cb(struct ast_test_info *info, struct ast_test
ast_event_unsubscribe(event_sub);
event_sub = NULL;
- cel_expected_events = NULL;
- cel_received_events = NULL;
-
/* check events */
ast_test_validate(test, !check_events(local_expected, local_received));
@@ -1415,11 +1412,6 @@ static int load_module(void)
cel_test_config->events |= 1<<AST_CEL_CONF_ENTER;
cel_test_config->events |= 1<<AST_CEL_CONF_EXIT;
- ast_test_register_init(TEST_CATEGORY, test_cel_init_cb);
-
- /* Verify received vs expected events and clean things up after every test */
- ast_test_register_cleanup(TEST_CATEGORY, cel_verify_and_cleanup_cb);
-
ast_channel_register(&test_cel_chan_tech);
AST_TEST_REGISTER(test_cel_channel_creation);
@@ -1444,6 +1436,11 @@ static int load_module(void)
AST_TEST_REGISTER(test_cel_dial_answer_twoparty_bridge_b);
AST_TEST_REGISTER(test_cel_dial_answer_multiparty);
+ /* ast_test_register_* has to happen after AST_TEST_REGISTER */
+ /* Verify received vs expected events and clean things up after every test */
+ ast_test_register_init(TEST_CATEGORY, test_cel_init_cb);
+ ast_test_register_cleanup(TEST_CATEGORY, cel_verify_and_cleanup_cb);
+
return AST_MODULE_LOAD_SUCCESS;
}