[svn-commits] dlee: trunk r394089 - /trunk/tests/test_cel.c
SVN commits to the Digium repositories
svn-commits at lists.digium.com
Thu Jul 11 10:37:52 CDT 2013
Author: dlee
Date: Thu Jul 11 10:37:51 2013
New Revision: 394089
URL: http://svnview.digium.com/svn/asterisk?view=rev&rev=394089
Log:
Correct test_cel cleanup.
When I corrected the CEL test crash in r394037, I didn't quite pay attention
to how the globals and locals were being shuffled around in the cleanup
callback. I removed the nulling of the global variables, which caused them
to be double cleaned.
This patch puts the global nulling code back (since the vars are cleaned up
by RAII_VARs), and removes the explicit ao2_cleanup() (since they were no-ops,
because the variables had just been nulled).
Modified:
trunk/tests/test_cel.c
Modified: trunk/tests/test_cel.c
URL: http://svnview.digium.com/svn/asterisk/trunk/tests/test_cel.c?view=diff&rev=394089&r1=394088&r2=394089
==============================================================================
--- trunk/tests/test_cel.c (original)
+++ trunk/tests/test_cel.c Thu Jul 11 10:37:51 2013
@@ -1335,6 +1335,10 @@
ast_event_unsubscribe(event_sub);
event_sub = NULL;
+ /* cleaned up by RAII_VAR's */
+ cel_expected_events = NULL;
+ cel_received_events = NULL;
+
/* check events */
ast_test_validate(test, !check_events(local_expected, local_received));
@@ -1343,11 +1347,7 @@
ao2_cleanup(saved_config);
saved_config = NULL;
- /* get rid of events */
- ao2_cleanup(cel_received_events);
- cel_received_events = NULL;
- ao2_cleanup(cel_expected_events);
- cel_expected_events = NULL;
+ /* clean up the locks */
ast_mutex_destroy(&sync_lock);
ast_cond_destroy(&sync_out);
return 0;
More information about the svn-commits
mailing list