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

SVN commits to the Asterisk project asterisk-commits at lists.digium.com
Wed May 15 14:24:26 CDT 2013


Author: kmoore
Date: Wed May 15 14:24:24 2013
New Revision: 388888

URL: http://svnview.digium.com/svn/asterisk?view=rev&rev=388888
Log:
Do some cleanup

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=388888&r1=388887&r2=388888
==============================================================================
--- team/kmoore/stasis-cel_refactoring/main/cel.c (original)
+++ team/kmoore/stasis-cel_refactoring/main/cel.c Wed May 15 14:24:24 2013
@@ -879,17 +879,16 @@
 	}
 }
 
-cel_snapshot_monitor cel_monitors[] = {
+cel_snapshot_monitor cel_channel_monitors[] = {
 	cel_channel_state_change,
 	cel_channel_app_change,
 	cel_channel_linkedid_change,
 };
 
-static void cel_channel_snapshot_update(void *data, struct stasis_subscription *sub,
+static void cel_channel_snapshot_update_cb(void *data, struct stasis_subscription *sub,
 				    struct stasis_topic *topic,
 				    struct stasis_message *message)
 {
-	RAII_VAR(struct ast_str *, channel_event_string, NULL, ast_free);
 	struct stasis_cache_update *update;
 	struct ast_channel_snapshot *old_snapshot;
 	struct ast_channel_snapshot *new_snapshot;
@@ -904,8 +903,8 @@
 	old_snapshot = stasis_message_data(update->old_snapshot);
 	new_snapshot = stasis_message_data(update->new_snapshot);
 
-	for (i = 0; i < ARRAY_LEN(cel_monitors); ++i) {
-		cel_monitors[i](old_snapshot, new_snapshot);
+	for (i = 0; i < ARRAY_LEN(cel_channel_monitors); ++i) {
+		cel_channel_monitors[i](old_snapshot, new_snapshot);
 	}
 }
 
@@ -951,9 +950,9 @@
 	}
 
 	ret |= stasis_message_router_add(cel_channel_state_router,
-					 stasis_cache_update_type(),
-					 cel_channel_snapshot_update,
-					 NULL);
+		stasis_cache_update_type(),
+		cel_channel_snapshot_update_cb,
+		NULL);
 
 	/* If somehow we failed to add any routes, just shut down the whole
 	 * thing and fail it.




More information about the asterisk-commits mailing list