[asterisk-commits] kmoore: branch kmoore/stasis-cel_refactoring r388893 - /team/kmoore/stasis-ce...

SVN commits to the Asterisk project asterisk-commits at lists.digium.com
Wed May 15 15:58:10 CDT 2013


Author: kmoore
Date: Wed May 15 15:58:09 2013
New Revision: 388893

URL: http://svnview.digium.com/svn/asterisk?view=rev&rev=388893
Log:
Some final tweaks to make the events come out right

Modified:
    team/kmoore/stasis-cel_refactoring/main/cel.c

Modified: team/kmoore/stasis-cel_refactoring/main/cel.c
URL: http://svnview.digium.com/svn/asterisk/team/kmoore/stasis-cel_refactoring/main/cel.c?view=diff&rev=388893&r1=388892&r2=388893
==============================================================================
--- team/kmoore/stasis-cel_refactoring/main/cel.c (original)
+++ team/kmoore/stasis-cel_refactoring/main/cel.c Wed May 15 15:58:09 2013
@@ -860,22 +860,19 @@
 	struct ast_channel_snapshot *old_snapshot,
 	struct ast_channel_snapshot *new_snapshot)
 {
-	/* No app events on cache clear or creation or if the app doesn't change */
-	if (!new_snapshot || !old_snapshot
-		|| !strcmp(old_snapshot->appl, new_snapshot->appl)) {
+	if (new_snapshot && old_snapshot
+		&& !strcmp(old_snapshot->appl, new_snapshot->appl)) {
 		return;
 	}
 
 	/* old snapshot has an application, end it */
-	if (!ast_strlen_zero(old_snapshot->appl)) {
+	if (old_snapshot && !ast_strlen_zero(old_snapshot->appl)) {
 		report_event_snapshot(old_snapshot, AST_CEL_APP_END, NULL, NULL);
-		return;
 	}
 
 	/* new snapshot has an application, start it */
-	if (!ast_strlen_zero(new_snapshot->appl)) {
+	if (new_snapshot && !ast_strlen_zero(new_snapshot->appl)) {
 		report_event_snapshot(new_snapshot, AST_CEL_APP_START, NULL, NULL);
-		return;
 	}
 }
 




More information about the asterisk-commits mailing list