[asterisk-commits] dlee: branch dlee/tp-local r399801 - in /team/dlee/tp-local: apps/ apps/confb...

SVN commits to the Asterisk project asterisk-commits at lists.digium.com
Wed Sep 25 14:59:31 CDT 2013


Author: dlee
Date: Wed Sep 25 14:59:29 2013
New Revision: 399801

URL: http://svnview.digium.com/svn/asterisk?view=rev&rev=399801
Log:
Removed topic param

Modified:
    team/dlee/tp-local/apps/app_queue.c
    team/dlee/tp-local/apps/app_voicemail.c
    team/dlee/tp-local/apps/confbridge/confbridge_manager.c
    team/dlee/tp-local/channels/chan_iax2.c
    team/dlee/tp-local/channels/chan_mgcp.c
    team/dlee/tp-local/channels/chan_sip.c
    team/dlee/tp-local/channels/chan_skinny.c
    team/dlee/tp-local/funcs/func_presencestate.c
    team/dlee/tp-local/include/asterisk/stasis.h
    team/dlee/tp-local/include/asterisk/stasis_internal.h
    team/dlee/tp-local/main/ccss.c
    team/dlee/tp-local/main/cdr.c
    team/dlee/tp-local/main/cel.c
    team/dlee/tp-local/main/devicestate.c
    team/dlee/tp-local/main/endpoints.c
    team/dlee/tp-local/main/manager.c
    team/dlee/tp-local/main/manager_bridges.c
    team/dlee/tp-local/main/manager_channels.c
    team/dlee/tp-local/main/stasis.c
    team/dlee/tp-local/main/stasis_cache.c
    team/dlee/tp-local/main/stasis_message_router.c
    team/dlee/tp-local/res/parking/parking_applications.c
    team/dlee/tp-local/res/parking/parking_bridge_features.c
    team/dlee/tp-local/res/parking/parking_manager.c
    team/dlee/tp-local/res/res_security_log.c
    team/dlee/tp-local/tests/test_devicestate.c
    team/dlee/tp-local/tests/test_stasis.c

Modified: team/dlee/tp-local/apps/app_queue.c
URL: http://svnview.digium.com/svn/asterisk/team/dlee/tp-local/apps/app_queue.c?view=diff&rev=399801&r1=399800&r2=399801
==============================================================================
--- team/dlee/tp-local/apps/app_queue.c (original)
+++ team/dlee/tp-local/apps/app_queue.c Wed Sep 25 14:59:29 2013
@@ -1832,7 +1832,7 @@
 STASIS_MESSAGE_TYPE_DEFN_LOCAL(queue_agent_ringnoanswer_type);
 
 static void queue_channel_manager_event(void *data,
-	struct stasis_subscription *sub, struct stasis_topic *topic,
+	struct stasis_subscription *sub,
 	struct stasis_message *message)
 {
 	const char *type = data;
@@ -1858,7 +1858,7 @@
 }
 
 static void queue_multi_channel_manager_event(void *data,
-	struct stasis_subscription *sub, struct stasis_topic *topic,
+	struct stasis_subscription *sub,
 	struct stasis_message *message)
 {
 	const char *type = data;
@@ -1894,7 +1894,7 @@
 }
 
 static void queue_member_manager_event(void *data,
-	struct stasis_subscription *sub, struct stasis_topic *topic,
+	struct stasis_subscription *sub,
 	struct stasis_message *message)
 {
 	const char *type = data;
@@ -2130,7 +2130,7 @@
 }
 
 /*! \brief set a member's status based on device state of that member's interface*/
-static void device_state_cb(void *unused, struct stasis_subscription *sub, struct stasis_topic *topic, struct stasis_message *msg)
+static void device_state_cb(void *unused, struct stasis_subscription *sub, struct stasis_message *msg)
 {
 	struct ao2_iterator miter, qiter;
 	struct ast_device_state_message *dev_state;
@@ -5178,7 +5178,7 @@
 }
 
 static void queue_agent_cb(void *userdata, struct stasis_subscription *sub,
-		struct stasis_topic *topic, struct stasis_message *msg)
+		struct stasis_message *msg)
 {
 	struct ast_channel_blob *agent_blob;
 
@@ -5394,7 +5394,7 @@
  * \param msg The stasis message for the bridge enter event
  */
 static void handle_bridge_enter(void *userdata, struct stasis_subscription *sub,
-		struct stasis_topic *topic, struct stasis_message *msg)
+		struct stasis_message *msg)
 {
 	struct queue_stasis_data *queue_data = userdata;
 	struct ast_bridge_blob *enter_blob = stasis_message_data(msg);
@@ -5427,7 +5427,7 @@
  * \param msg The stasis message for the blind transfer event
  */
 static void handle_blind_transfer(void *userdata, struct stasis_subscription *sub,
-		struct stasis_topic *topic, struct stasis_message *msg)
+		struct stasis_message *msg)
 {
 	struct queue_stasis_data *queue_data = userdata;
 	struct ast_bridge_blob *blind_blob = stasis_message_data(msg);
@@ -5496,7 +5496,7 @@
  * \param msg The stasis message for the attended transfer event.
  */
 static void handle_attended_transfer(void *userdata, struct stasis_subscription *sub,
-		struct stasis_topic *topic, struct stasis_message *msg)
+		struct stasis_message *msg)
 {
 	struct queue_stasis_data *queue_data = userdata;
 	struct ast_attended_transfer_message *atxfer_msg = stasis_message_data(msg);
@@ -5551,7 +5551,7 @@
  * subroutines for further processing.
  */
 static void queue_bridge_cb(void *userdata, struct stasis_subscription *sub,
-		struct stasis_topic *topic, struct stasis_message *msg)
+		struct stasis_message *msg)
 {
 	if (stasis_subscription_final_message(sub, msg)) {
 		ao2_cleanup(userdata);
@@ -5571,7 +5571,7 @@
  * \param msg The stasis message for the local optimization begin event
  */
 static void handle_local_optimization_begin(void *userdata, struct stasis_subscription *sub,
-		struct stasis_topic *topic, struct stasis_message *msg)
+		struct stasis_message *msg)
 {
 	struct queue_stasis_data *queue_data = userdata;
 	struct ast_multi_channel_blob *optimization_blob = stasis_message_data(msg);
@@ -5623,7 +5623,7 @@
  * \param msg The stasis message for the local optimization end event
  */
 static void handle_local_optimization_end(void *userdata, struct stasis_subscription *sub,
-		struct stasis_topic *topic, struct stasis_message *msg)
+		struct stasis_message *msg)
 {
 	struct queue_stasis_data *queue_data = userdata;
 	struct ast_multi_channel_blob *optimization_blob = stasis_message_data(msg);
@@ -5688,7 +5688,7 @@
  * \param msg The stasis message for the hangup event.
  */
 static void handle_hangup(void *userdata, struct stasis_subscription *sub,
-		struct stasis_topic *topic, struct stasis_message *msg)
+		struct stasis_message *msg)
 {
 	struct queue_stasis_data *queue_data = userdata;
 	struct ast_channel_blob *channel_blob = stasis_message_data(msg);
@@ -5749,7 +5749,7 @@
  * subroutines for further processing.
  */
 static void queue_channel_cb(void *userdata, struct stasis_subscription *sub,
-		struct stasis_topic *topic, struct stasis_message *msg)
+		struct stasis_message *msg)
 {
 	if (stasis_subscription_final_message(sub, msg)) {
 		ao2_cleanup(userdata);

Modified: team/dlee/tp-local/apps/app_voicemail.c
URL: http://svnview.digium.com/svn/asterisk/team/dlee/tp-local/apps/app_voicemail.c?view=diff&rev=399801&r1=399800&r2=399801
==============================================================================
--- team/dlee/tp-local/apps/app_voicemail.c (original)
+++ team/dlee/tp-local/apps/app_voicemail.c Wed Sep 25 14:59:29 2013
@@ -12606,7 +12606,7 @@
 	}
 }
 
-static void mwi_event_cb(void *userdata, struct stasis_subscription *sub, struct stasis_topic *topic, struct stasis_message *msg)
+static void mwi_event_cb(void *userdata, struct stasis_subscription *sub, struct stasis_message *msg)
 {
 	struct stasis_subscription_change *change;
 	/* Only looking for subscription change notices here */
@@ -12629,7 +12629,7 @@
 static int dump_cache(void *obj, void *arg, int flags)
 {
 	struct stasis_message *msg = obj;
-	mwi_event_cb(NULL, NULL, NULL, msg);
+	mwi_event_cb(NULL, NULL, msg);
 	return 0;
 }
 

Modified: team/dlee/tp-local/apps/confbridge/confbridge_manager.c
URL: http://svnview.digium.com/svn/asterisk/team/dlee/tp-local/apps/confbridge/confbridge_manager.c?view=diff&rev=399801&r1=399800&r2=399801
==============================================================================
--- team/dlee/tp-local/apps/confbridge/confbridge_manager.c (original)
+++ team/dlee/tp-local/apps/confbridge/confbridge_manager.c Wed Sep 25 14:59:29 2013
@@ -224,63 +224,54 @@
 }
 
 static void confbridge_start_cb(void *data, struct stasis_subscription *sub,
-	struct stasis_topic *topic,
 	struct stasis_message *message)
 {
 	confbridge_publish_manager_event(message, "ConfbridgeStart", NULL);
 }
 
 static void confbridge_end_cb(void *data, struct stasis_subscription *sub,
-	struct stasis_topic *topic,
 	struct stasis_message *message)
 {
 	confbridge_publish_manager_event(message, "ConfbridgeEnd", NULL);
 }
 
 static void confbridge_leave_cb(void *data, struct stasis_subscription *sub,
-	struct stasis_topic *topic,
 	struct stasis_message *message)
 {
 	confbridge_publish_manager_event(message, "ConfbridgeLeave", NULL);
 }
 
 static void confbridge_join_cb(void *data, struct stasis_subscription *sub,
-	struct stasis_topic *topic,
 	struct stasis_message *message)
 {
 	confbridge_publish_manager_event(message, "ConfbridgeJoin", NULL);
 }
 
 static void confbridge_start_record_cb(void *data, struct stasis_subscription *sub,
-	struct stasis_topic *topic,
 	struct stasis_message *message)
 {
 	confbridge_publish_manager_event(message, "ConfbridgeRecord", NULL);
 }
 
 static void confbridge_stop_record_cb(void *data, struct stasis_subscription *sub,
-	struct stasis_topic *topic,
 	struct stasis_message *message)
 {
 	confbridge_publish_manager_event(message, "ConfbridgeStopRecord", NULL);
 }
 
 static void confbridge_mute_cb(void *data, struct stasis_subscription *sub,
-	struct stasis_topic *topic,
 	struct stasis_message *message)
 {
 	confbridge_publish_manager_event(message, "ConfbridgeMute", NULL);
 }
 
 static void confbridge_unmute_cb(void *data, struct stasis_subscription *sub,
-	struct stasis_topic *topic,
 	struct stasis_message *message)
 {
 	confbridge_publish_manager_event(message, "ConfbridgeUnmute", NULL);
 }
 
 static void confbridge_talking_cb(void *data, struct stasis_subscription *sub,
-	struct stasis_topic *topic,
 	struct stasis_message *message)
 {
 	RAII_VAR(struct ast_str *, extra_text, NULL, ast_free);

Modified: team/dlee/tp-local/channels/chan_iax2.c
URL: http://svnview.digium.com/svn/asterisk/team/dlee/tp-local/channels/chan_iax2.c?view=diff&rev=399801&r1=399800&r2=399801
==============================================================================
--- team/dlee/tp-local/channels/chan_iax2.c (original)
+++ team/dlee/tp-local/channels/chan_iax2.c Wed Sep 25 14:59:29 2013
@@ -1271,8 +1271,8 @@
 static int get_unused_callno(enum callno_type type, int validated, callno_entry *entry);
 static int replace_callno(const void *obj);
 static void sched_delay_remove(struct sockaddr_in *sin, callno_entry entry);
-static void network_change_stasis_cb(void *data, struct stasis_subscription *sub, struct stasis_topic *topic, struct stasis_message *message);
-static void acl_change_stasis_cb(void *data, struct stasis_subscription *sub, struct stasis_topic *topic, struct stasis_message *message);
+static void network_change_stasis_cb(void *data, struct stasis_subscription *sub, struct stasis_message *message);
+static void acl_change_stasis_cb(void *data, struct stasis_subscription *sub, struct stasis_message *message);
 
 static struct ast_channel_tech iax2_tech = {
 	.type = "IAX2",
@@ -1332,7 +1332,7 @@
 	}
 }
 
-static void mwi_event_cb(void *userdata, struct stasis_subscription *sub, struct stasis_topic *topic, struct stasis_message *msg)
+static void mwi_event_cb(void *userdata, struct stasis_subscription *sub, struct stasis_message *msg)
 {
 	/* The MWI subscriptions exist just so the core knows we care about those
 	 * mailboxes.  However, we just grab the events out of the cache when it
@@ -1379,7 +1379,7 @@
 }
 
 static void network_change_stasis_cb(void *data, struct stasis_subscription *sub,
-	struct stasis_topic *topic, struct stasis_message *message)
+	struct stasis_message *message)
 {
 	/* This callback is only concerned with network change messages from the system topic. */
 	if (stasis_message_type(message) != ast_network_change_type()) {
@@ -1393,7 +1393,7 @@
 }
 
 static void acl_change_stasis_cb(void *data, struct stasis_subscription *sub,
-	struct stasis_topic *topic, struct stasis_message *message)
+	struct stasis_message *message)
 {
 	if (stasis_message_type(message) != ast_named_acl_change_type()) {
 		return;

Modified: team/dlee/tp-local/channels/chan_mgcp.c
URL: http://svnview.digium.com/svn/asterisk/team/dlee/tp-local/channels/chan_mgcp.c?view=diff&rev=399801&r1=399800&r2=399801
==============================================================================
--- team/dlee/tp-local/channels/chan_mgcp.c (original)
+++ team/dlee/tp-local/channels/chan_mgcp.c Wed Sep 25 14:59:29 2013
@@ -487,7 +487,7 @@
 	.func_channel_read = acf_channel_read,
 };
 
-static void mwi_event_cb(void *userdata, struct stasis_subscription *sub, struct stasis_topic *topic, struct stasis_message *msg)
+static void mwi_event_cb(void *userdata, struct stasis_subscription *sub, struct stasis_message *msg)
 {
 	/* This module does not handle MWI in an event-based manner.  However, it
 	 * subscribes to MWI for each mailbox that is configured so that the core

Modified: team/dlee/tp-local/channels/chan_sip.c
URL: http://svnview.digium.com/svn/asterisk/team/dlee/tp-local/channels/chan_sip.c?view=diff&rev=399801&r1=399800&r2=399801
==============================================================================
--- team/dlee/tp-local/channels/chan_sip.c (original)
+++ team/dlee/tp-local/channels/chan_sip.c Wed Sep 25 14:59:29 2013
@@ -1323,9 +1323,9 @@
 static int sip_poke_peer(struct sip_peer *peer, int force);
 static void sip_poke_all_peers(void);
 static void sip_peer_hold(struct sip_pvt *p, int hold);
-static void mwi_event_cb(void *, struct stasis_subscription *, struct stasis_topic *, struct stasis_message *);
-static void network_change_stasis_cb(void *data, struct stasis_subscription *sub, struct stasis_topic *topic, struct stasis_message *message);
-static void acl_change_stasis_cb(void *data, struct stasis_subscription *sub, struct stasis_topic *topic, struct stasis_message *message);
+static void mwi_event_cb(void *, struct stasis_subscription *, struct stasis_message *);
+static void network_change_stasis_cb(void *data, struct stasis_subscription *sub, struct stasis_message *message);
+static void acl_change_stasis_cb(void *data, struct stasis_subscription *sub, struct stasis_message *message);
 static void sip_keepalive_all_peers(void);
 
 /*--- Applications, functions, CLI and manager command helpers */
@@ -16834,7 +16834,7 @@
 }
 
 /*! \brief Receive MWI events that we have subscribed to */
-static void mwi_event_cb(void *userdata, struct stasis_subscription *sub, struct stasis_topic *topic, struct stasis_message *msg)
+static void mwi_event_cb(void *userdata, struct stasis_subscription *sub, struct stasis_message *msg)
 {
 	struct sip_peer *peer = userdata;
 	if (stasis_subscription_final_message(sub, msg)) {
@@ -16881,7 +16881,7 @@
 	return 0;
 }
 
-static void network_change_stasis_cb(void *data, struct stasis_subscription *sub, struct stasis_topic *topic, struct stasis_message *message)
+static void network_change_stasis_cb(void *data, struct stasis_subscription *sub, struct stasis_message *message)
 {
 	/* This callback is only concerned with network change messages from the system topic. */
 	if (stasis_message_type(message) != ast_network_change_type()) {
@@ -28940,7 +28940,7 @@
 }
 
 static void acl_change_stasis_cb(void *data, struct stasis_subscription *sub,
-	struct stasis_topic *topic, struct stasis_message *message)
+	struct stasis_message *message)
 {
 	if (stasis_message_type(message) != ast_named_acl_change_type()) {
 		return;

Modified: team/dlee/tp-local/channels/chan_skinny.c
URL: http://svnview.digium.com/svn/asterisk/team/dlee/tp-local/channels/chan_skinny.c?view=diff&rev=399801&r1=399800&r2=399801
==============================================================================
--- team/dlee/tp-local/channels/chan_skinny.c (original)
+++ team/dlee/tp-local/channels/chan_skinny.c Wed Sep 25 14:59:29 2013
@@ -1640,7 +1640,7 @@
 static int skinny_fixup(struct ast_channel *oldchan, struct ast_channel *newchan);
 static int skinny_senddigit_begin(struct ast_channel *ast, char digit);
 static int skinny_senddigit_end(struct ast_channel *ast, char digit, unsigned int duration);
-static void mwi_event_cb(void *userdata, struct stasis_subscription *sub, struct stasis_topic *topic, struct stasis_message *msg);
+static void mwi_event_cb(void *userdata, struct stasis_subscription *sub, struct stasis_message *msg);
 static int skinny_dialer_cb(const void *data);
 static int skinny_reload(void);
 
@@ -2301,7 +2301,7 @@
 				set_callforwards(l, NULL, SKINNY_CFWD_ALL|SKINNY_CFWD_BUSY|SKINNY_CFWD_NOANSWER);
 				register_exten(l);
 				/* initialize MWI on line and device */
-				mwi_event_cb(l, NULL, NULL, NULL);
+				mwi_event_cb(l, NULL, NULL);
 				AST_LIST_TRAVERSE(&l->sublines, subline, list) {
 					ast_extension_state_add(subline->context, subline->exten, skinny_extensionstate_cb, subline->container);
 				}
@@ -3530,7 +3530,7 @@
 	send_callinfo(sub);
 }
 
-static void mwi_event_cb(void *userdata, struct stasis_subscription *sub, struct stasis_topic *topic, struct stasis_message *msg)
+static void mwi_event_cb(void *userdata, struct stasis_subscription *sub, struct stasis_message *msg)
 {
 	struct skinny_line *l = userdata;
 	struct skinny_device *d = l->device;

Modified: team/dlee/tp-local/funcs/func_presencestate.c
URL: http://svnview.digium.com/svn/asterisk/team/dlee/tp-local/funcs/func_presencestate.c?view=diff&rev=399801&r1=399800&r2=399801
==============================================================================
--- team/dlee/tp-local/funcs/func_presencestate.c (original)
+++ team/dlee/tp-local/funcs/func_presencestate.c Wed Sep 25 14:59:29 2013
@@ -649,7 +649,7 @@
 	sem_t sem;
 };
 
-static void test_cb(void *userdata, struct stasis_subscription *sub, struct stasis_topic *topic, struct stasis_message *msg)
+static void test_cb(void *userdata, struct stasis_subscription *sub, struct stasis_message *msg)
 {
 	struct test_cb_data *cb_data = userdata;
 	if (stasis_message_type(msg) != ast_presence_state_message_type()) {

Modified: team/dlee/tp-local/include/asterisk/stasis.h
URL: http://svnview.digium.com/svn/asterisk/team/dlee/tp-local/include/asterisk/stasis.h?view=diff&rev=399801&r1=399800&r2=399801
==============================================================================
--- team/dlee/tp-local/include/asterisk/stasis.h (original)
+++ team/dlee/tp-local/include/asterisk/stasis.h Wed Sep 25 14:59:29 2013
@@ -348,18 +348,6 @@
 void stasis_publish(struct stasis_topic *topic, struct stasis_message *message);
 
 /*!
- * \brief Publish a message from a specified topic to all the subscribers of a
- * possibly different topic.
- * \param topic Topic to publish message to.
- * \param topic Original topic message was from.
- * \param message Message
- * \since 12
- */
-void stasis_forward_message(struct stasis_topic *topic,
-			    struct stasis_topic *publisher_topic,
-			    struct stasis_message *message);
-
-/*!
  * \brief Wait for all pending messages on a given topic to be processed.
  * \param topic Topic to await pending messages on.
  * \return 0 on success.
@@ -381,11 +369,10 @@
 /*!
  * \brief Callback function type for Stasis subscriptions.
  * \param data Data field provided with subscription.
- * \param topic Topic to which the message was published.
  * \param message Published message.
  * \since 12
  */
-typedef void (*stasis_subscription_cb)(void *data, struct stasis_subscription *sub, struct stasis_topic *topic, struct stasis_message *message);
+typedef void (*stasis_subscription_cb)(void *data, struct stasis_subscription *sub, struct stasis_message *message);
 
 /*!
  * \brief Create a subscription.
@@ -583,8 +570,6 @@
  * \since 12
  */
 struct stasis_cache_update {
-	/*! \brief Topic that published \c new_snapshot */
-	struct stasis_topic *topic;
 	/*! \brief Convenience reference to snapshot type */
 	struct stasis_message_type *type;
 	/*! \brief Old value from the cache */

Modified: team/dlee/tp-local/include/asterisk/stasis_internal.h
URL: http://svnview.digium.com/svn/asterisk/team/dlee/tp-local/include/asterisk/stasis_internal.h?view=diff&rev=399801&r1=399800&r2=399801
==============================================================================
--- team/dlee/tp-local/include/asterisk/stasis_internal.h (original)
+++ team/dlee/tp-local/include/asterisk/stasis_internal.h Wed Sep 25 14:59:29 2013
@@ -62,7 +62,7 @@
  */
 struct stasis_subscription *internal_stasis_subscribe(
 	struct stasis_topic *topic,
-	void (*stasis_subscription_cb)(void *data, struct stasis_subscription *sub, struct stasis_topic *topic, struct stasis_message *message),
+	void (*stasis_subscription_cb)(void *data, struct stasis_subscription *sub, struct stasis_message *message),
 	void *data,
 	int needs_mailbox);
 

Modified: team/dlee/tp-local/main/ccss.c
URL: http://svnview.digium.com/svn/asterisk/team/dlee/tp-local/main/ccss.c?view=diff&rev=399801&r1=399800&r2=399801
==============================================================================
--- team/dlee/tp-local/main/ccss.c (original)
+++ team/dlee/tp-local/main/ccss.c Wed Sep 25 14:59:29 2013
@@ -1397,7 +1397,7 @@
 	ast_free((char *)generic_list->device_name);
 }
 
-static void generic_monitor_devstate_cb(void *userdata, struct stasis_subscription *sub, struct stasis_topic *topic, struct stasis_message *msg);
+static void generic_monitor_devstate_cb(void *userdata, struct stasis_subscription *sub, struct stasis_message *msg);
 static struct generic_monitor_instance_list *create_new_generic_list(struct ast_cc_monitor *monitor)
 {
 	struct generic_monitor_instance_list *generic_list = ao2_t_alloc(sizeof(*generic_list),
@@ -1471,7 +1471,7 @@
 	return 0;
 }
 
-static void generic_monitor_devstate_cb(void *userdata, struct stasis_subscription *sub, struct stasis_topic *topic, struct stasis_message *msg)
+static void generic_monitor_devstate_cb(void *userdata, struct stasis_subscription *sub, struct stasis_message *msg)
 {
 	/* Wow, it's cool that we've picked up on a state change, but we really want
 	 * the actual work to be done in the core's taskprocessor execution thread
@@ -2750,7 +2750,7 @@
 	return 0;
 }
 
-static void generic_agent_devstate_cb(void *userdata, struct stasis_subscription *sub, struct stasis_topic *topic, struct stasis_message *msg)
+static void generic_agent_devstate_cb(void *userdata, struct stasis_subscription *sub, struct stasis_message *msg)
 {
 	struct ast_cc_agent *agent = userdata;
 	enum ast_device_state new_state;

Modified: team/dlee/tp-local/main/cdr.c
URL: http://svnview.digium.com/svn/asterisk/team/dlee/tp-local/main/cdr.c?view=diff&rev=399801&r1=399800&r2=399801
==============================================================================
--- team/dlee/tp-local/main/cdr.c (original)
+++ team/dlee/tp-local/main/cdr.c Wed Sep 25 14:59:29 2013
@@ -1835,7 +1835,7 @@
  * \param topic The topic this message was published for
  * \param message The message
  */
-static void handle_dial_message(void *data, struct stasis_subscription *sub, struct stasis_topic *topic, struct stasis_message *message)
+static void handle_dial_message(void *data, struct stasis_subscription *sub, struct stasis_message *message)
 {
 	RAII_VAR(struct module_config *, mod_cfg, ao2_global_obj_ref(module_configs), ao2_cleanup);
 	RAII_VAR(struct cdr_object *, cdr, NULL, ao2_cleanup);
@@ -2016,7 +2016,7 @@
  * \param topic The topic this message was published for
  * \param message The message
  */
-static void handle_channel_cache_message(void *data, struct stasis_subscription *sub, struct stasis_topic *topic, struct stasis_message *message)
+static void handle_channel_cache_message(void *data, struct stasis_subscription *sub, struct stasis_message *message)
 {
 	RAII_VAR(struct cdr_object *, cdr, NULL, ao2_cleanup);
 	RAII_VAR(struct module_config *, mod_cfg, ao2_global_obj_ref(module_configs), ao2_cleanup);
@@ -2146,7 +2146,7 @@
  * \param message The message - hopefully a bridge one!
  */
 static void handle_bridge_leave_message(void *data, struct stasis_subscription *sub,
-		struct stasis_topic *topic, struct stasis_message *message)
+		struct stasis_message *message)
 {
 	struct ast_bridge_blob *update = stasis_message_data(message);
 	struct ast_bridge_snapshot *bridge = update->bridge;
@@ -2446,7 +2446,7 @@
  * \param message The message - hopefully a bridge one!
  */
 static void handle_bridge_enter_message(void *data, struct stasis_subscription *sub,
-		struct stasis_topic *topic, struct stasis_message *message)
+		struct stasis_message *message)
 {
 	struct ast_bridge_blob *update = stasis_message_data(message);
 	struct ast_bridge_snapshot *bridge = update->bridge;
@@ -2490,7 +2490,7 @@
  * \param message The message about who got parked
  * */
 static void handle_parked_call_message(void *data, struct stasis_subscription *sub,
-		struct stasis_topic *topic, struct stasis_message *message)
+		struct stasis_message *message)
 {
 	struct ast_parked_call_payload *payload = stasis_message_data(message);
 	struct ast_channel_snapshot *channel = payload->parkee;

Modified: team/dlee/tp-local/main/cel.c
URL: http://svnview.digium.com/svn/asterisk/team/dlee/tp-local/main/cel.c?view=diff&rev=399801&r1=399800&r2=399801
==============================================================================
--- team/dlee/tp-local/main/cel.c (original)
+++ team/dlee/tp-local/main/cel.c Wed Sep 25 14:59:29 2013
@@ -1019,7 +1019,6 @@
 }
 
 static void cel_snapshot_update_cb(void *data, struct stasis_subscription *sub,
-	struct stasis_topic *topic,
 	struct stasis_message *message)
 {
 	struct stasis_cache_update *update = stasis_message_data(message);
@@ -1043,7 +1042,6 @@
 
 static void cel_bridge_enter_cb(
 	void *data, struct stasis_subscription *sub,
-	struct stasis_topic *topic,
 	struct stasis_message *message)
 {
 	struct ast_bridge_blob *blob = stasis_message_data(message);
@@ -1065,7 +1063,6 @@
 
 static void cel_bridge_leave_cb(
 	void *data, struct stasis_subscription *sub,
-	struct stasis_topic *topic,
 	struct stasis_message *message)
 {
 	struct ast_bridge_blob *blob = stasis_message_data(message);
@@ -1087,7 +1084,6 @@
 
 static void cel_parking_cb(
 	void *data, struct stasis_subscription *sub,
-	struct stasis_topic *topic,
 	struct stasis_message *message)
 {
 	struct ast_parked_call_payload *parked_payload = stasis_message_data(message);
@@ -1132,7 +1128,6 @@
 }
 
 static void cel_dial_cb(void *data, struct stasis_subscription *sub,
-	struct stasis_topic *topic,
 	struct stasis_message *message)
 {
 	struct ast_multi_channel_blob *blob = stasis_message_data(message);
@@ -1167,7 +1162,6 @@
 
 static void cel_generic_cb(
 	void *data, struct stasis_subscription *sub,
-	struct stasis_topic *topic,
 	struct stasis_message *message)
 {
 	struct ast_channel_blob *obj = stasis_message_data(message);
@@ -1190,7 +1184,6 @@
 
 static void cel_blind_transfer_cb(
 	void *data, struct stasis_subscription *sub,
-	struct stasis_topic *topic,
 	struct stasis_message *message)
 {
 	struct ast_bridge_blob *obj = stasis_message_data(message);
@@ -1238,7 +1231,6 @@
 
 static void cel_attended_transfer_cb(
 	void *data, struct stasis_subscription *sub,
-	struct stasis_topic *topic,
 	struct stasis_message *message)
 {
 	struct ast_attended_transfer_message *xfer = stasis_message_data(message);
@@ -1291,7 +1283,6 @@
 
 static void cel_pickup_cb(
 	void *data, struct stasis_subscription *sub,
-	struct stasis_topic *topic,
 	struct stasis_message *message)
 {
 	struct ast_multi_channel_blob *obj = stasis_message_data(message);
@@ -1313,7 +1304,6 @@
 
 static void cel_local_cb(
 	void *data, struct stasis_subscription *sub,
-	struct stasis_topic *topic,
 	struct stasis_message *message)
 {
 	struct ast_multi_channel_blob *obj = stasis_message_data(message);

Modified: team/dlee/tp-local/main/devicestate.c
URL: http://svnview.digium.com/svn/asterisk/team/dlee/tp-local/main/devicestate.c?view=diff&rev=399801&r1=399800&r2=399801
==============================================================================
--- team/dlee/tp-local/main/devicestate.c (original)
+++ team/dlee/tp-local/main/devicestate.c Wed Sep 25 14:59:29 2013
@@ -610,7 +610,7 @@
 	return 1;
 }
 
-static void devstate_change_collector_cb(void *data, struct stasis_subscription *sub, struct stasis_topic *topic, struct stasis_message *msg)
+static void devstate_change_collector_cb(void *data, struct stasis_subscription *sub, struct stasis_message *msg)
 {
 	enum ast_device_state aggregate_state;
 	char *device;

Modified: team/dlee/tp-local/main/endpoints.c
URL: http://svnview.digium.com/svn/asterisk/team/dlee/tp-local/main/endpoints.c?view=diff&rev=399801&r1=399800&r2=399801
==============================================================================
--- team/dlee/tp-local/main/endpoints.c (original)
+++ team/dlee/tp-local/main/endpoints.c Wed Sep 25 14:59:29 2013
@@ -152,7 +152,7 @@
 
 /*! \brief Handler for channel snapshot cache clears */
 static void endpoint_cache_clear(void *data,
-	struct stasis_subscription *sub, struct stasis_topic *topic,
+	struct stasis_subscription *sub,
 	struct stasis_message *message)
 {
 	struct ast_endpoint *endpoint = data;
@@ -174,7 +174,7 @@
 }
 
 static void endpoint_default(void *data,
-	struct stasis_subscription *sub, struct stasis_topic *topic,
+	struct stasis_subscription *sub,
 	struct stasis_message *message)
 {
 	struct stasis_endpoint *endpoint = data;

Modified: team/dlee/tp-local/main/manager.c
URL: http://svnview.digium.com/svn/asterisk/team/dlee/tp-local/main/manager.c?view=diff&rev=399801&r1=399800&r2=399801
==============================================================================
--- team/dlee/tp-local/main/manager.c (original)
+++ team/dlee/tp-local/main/manager.c Wed Sep 25 14:59:29 2013
@@ -1151,7 +1151,7 @@
 	{{ "restart", "gracefully", NULL }},
 };
 
-static void acl_change_stasis_cb(void *data, struct stasis_subscription *sub, struct stasis_topic *topic, struct stasis_message *message);
+static void acl_change_stasis_cb(void *data, struct stasis_subscription *sub, struct stasis_message *message);
 
 static void acl_change_stasis_subscribe(void)
 {
@@ -1427,7 +1427,6 @@
 }
 
 static void manager_default_msg_cb(void *data, struct stasis_subscription *sub,
-				    struct stasis_topic *topic,
 				    struct stasis_message *message)
 {
 	RAII_VAR(struct ast_manager_event_blob *, ev, NULL, ao2_cleanup);
@@ -1444,7 +1443,6 @@
 }
 
 static void manager_generic_msg_cb(void *data, struct stasis_subscription *sub,
-				    struct stasis_topic *topic,
 				    struct stasis_message *message)
 {
 	struct ast_json_payload *payload = stasis_message_data(message);
@@ -7636,7 +7634,6 @@
 #ifdef TEST_FRAMEWORK
 
 static void test_suite_event_cb(void *data, struct stasis_subscription *sub,
-		struct stasis_topic *topic,
 		struct stasis_message *message)
 {
 	struct ast_test_suite_message_payload *payload;
@@ -8340,7 +8337,7 @@
 }
 
 static void acl_change_stasis_cb(void *data, struct stasis_subscription *sub,
-	struct stasis_topic *topic, struct stasis_message *message)
+	struct stasis_message *message)
 {
 	if (stasis_message_type(message) != ast_named_acl_change_type()) {
 		return;

Modified: team/dlee/tp-local/main/manager_bridges.c
URL: http://svnview.digium.com/svn/asterisk/team/dlee/tp-local/main/manager_bridges.c?view=diff&rev=399801&r1=399800&r2=399801
==============================================================================
--- team/dlee/tp-local/main/manager_bridges.c (original)
+++ team/dlee/tp-local/main/manager_bridges.c Wed Sep 25 14:59:29 2013
@@ -180,7 +180,6 @@
 };
 
 static void bridge_snapshot_update(void *data, struct stasis_subscription *sub,
-				    struct stasis_topic *topic,
 				    struct stasis_message *message)
 {
 	RAII_VAR(struct ast_str *, bridge_event_string, NULL, ast_free);
@@ -221,7 +220,6 @@
 }
 
 static void bridge_merge_cb(void *data, struct stasis_subscription *sub,
-				    struct stasis_topic *topic,
 				    struct stasis_message *message)
 {
 	struct ast_bridge_merge_message *merge_msg = stasis_message_data(message);
@@ -254,7 +252,6 @@
 }
 
 static void channel_enter_cb(void *data, struct stasis_subscription *sub,
-				    struct stasis_topic *topic,
 				    struct stasis_message *message)
 {
 	static const char *swap_name = "SwapUniqueid: ";
@@ -283,7 +280,6 @@
 }
 
 static void channel_leave_cb(void *data, struct stasis_subscription *sub,
-				    struct stasis_topic *topic,
 				    struct stasis_message *message)
 {
 	struct ast_bridge_blob *blob = stasis_message_data(message);

Modified: team/dlee/tp-local/main/manager_channels.c
URL: http://svnview.digium.com/svn/asterisk/team/dlee/tp-local/main/manager_channels.c?view=diff&rev=399801&r1=399800&r2=399801
==============================================================================
--- team/dlee/tp-local/main/manager_channels.c (original)
+++ team/dlee/tp-local/main/manager_channels.c Wed Sep 25 14:59:29 2013
@@ -565,7 +565,6 @@
 };
 
 static void channel_snapshot_update(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);
@@ -616,7 +615,7 @@
 }
 
 static void channel_user_event_cb(void *data, struct stasis_subscription *sub,
-	struct stasis_topic *topic, struct stasis_message *message)
+	struct stasis_message *message)
 {
 	struct ast_channel_blob *obj = stasis_message_data(message);
 	RAII_VAR(struct ast_str *, channel_event_string, NULL, ast_free);
@@ -667,7 +666,7 @@
 }
 
 static void channel_hangup_request_cb(void *data,
-	struct stasis_subscription *sub, struct stasis_topic *topic,
+	struct stasis_subscription *sub,
 	struct stasis_message *message)
 {
 	struct ast_channel_blob *obj = stasis_message_data(message);
@@ -707,7 +706,7 @@
 }
 
 static void channel_chanspy_stop_cb(void *data, struct stasis_subscription *sub,
-		struct stasis_topic *topic, struct stasis_message *message)
+		struct stasis_message *message)
 {
 	RAII_VAR(struct ast_str *, spyer_channel_string, NULL, ast_free);
 	struct ast_channel_snapshot *spyer;
@@ -730,7 +729,7 @@
 }
 
 static void channel_chanspy_start_cb(void *data, struct stasis_subscription *sub,
-		struct stasis_topic *topic, struct stasis_message *message)
+		struct stasis_message *message)
 {
 	RAII_VAR(struct ast_str *, spyer_channel_string, NULL, ast_free);
 	RAII_VAR(struct ast_str *, spyee_channel_string, NULL, ast_free);
@@ -765,7 +764,7 @@
 }
 
 static void channel_dtmf_begin_cb(void *data, struct stasis_subscription *sub,
-	struct stasis_topic *topic, struct stasis_message *message)
+	struct stasis_message *message)
 {
 	struct ast_channel_blob *obj = stasis_message_data(message);
 	RAII_VAR(struct ast_str *, channel_event_string, NULL, ast_free);
@@ -806,7 +805,7 @@
 }
 
 static void channel_dtmf_end_cb(void *data, struct stasis_subscription *sub,
-	struct stasis_topic *topic, struct stasis_message *message)
+	struct stasis_message *message)
 {
 	struct ast_channel_blob *obj = stasis_message_data(message);
 	RAII_VAR(struct ast_str *, channel_event_string, NULL, ast_free);
@@ -853,7 +852,7 @@
 }
 
 static void channel_hangup_handler_cb(void *data, struct stasis_subscription *sub,
-		struct stasis_topic *topic, struct stasis_message *message)
+		struct stasis_message *message)
 {
 	RAII_VAR(struct ast_str *, channel_event_string, NULL, ast_free);
 	struct ast_channel_blob *payload = stasis_message_data(message);
@@ -884,7 +883,7 @@
 }
 
 static void channel_fax_cb(void *data, struct stasis_subscription *sub,
-		struct stasis_topic *topic, struct stasis_message *message)
+		struct stasis_message *message)
 {
 	RAII_VAR(struct ast_str *, channel_event_string, NULL, ast_free);
 	RAII_VAR(struct ast_str *, event_buffer, ast_str_create(256), ast_free);
@@ -957,7 +956,7 @@
 }
 
 static void channel_moh_start_cb(void *data, struct stasis_subscription *sub,
-		struct stasis_topic *topic, struct stasis_message *message)
+		struct stasis_message *message)
 {
 	struct ast_channel_blob *payload = stasis_message_data(message);
 	struct ast_json *blob = payload->blob;
@@ -977,7 +976,7 @@
 }
 
 static void channel_moh_stop_cb(void *data, struct stasis_subscription *sub,
-		struct stasis_topic *topic, struct stasis_message *message)
+		struct stasis_message *message)
 {
 	struct ast_channel_blob *payload = stasis_message_data(message);
 
@@ -985,7 +984,7 @@
 }
 
 static void channel_monitor_start_cb(void *data, struct stasis_subscription *sub,
-		struct stasis_topic *topic, struct stasis_message *message)
+		struct stasis_message *message)
 {
 	struct ast_channel_blob *payload = stasis_message_data(message);
 
@@ -993,7 +992,7 @@
 }
 
 static void channel_monitor_stop_cb(void *data, struct stasis_subscription *sub,
-		struct stasis_topic *topic, struct stasis_message *message)
+		struct stasis_message *message)
 {
 	struct ast_channel_blob *payload = stasis_message_data(message);
 
@@ -1004,7 +1003,7 @@
  * \brief Callback processing messages for channel dialing
  */
 static void channel_dial_cb(void *data, struct stasis_subscription *sub,
-	struct stasis_topic *topic, struct stasis_message *message)
+	struct stasis_message *message)
 {
 	struct ast_multi_channel_blob *obj = stasis_message_data(message);
 	const char *dialstatus;
@@ -1051,7 +1050,7 @@
 }
 
 static void channel_hold_cb(void *data, struct stasis_subscription *sub,
-	struct stasis_topic *topic, struct stasis_message *message)
+	struct stasis_message *message)
 {
 	struct ast_channel_blob *obj = stasis_message_data(message);
 	const char *musicclass;
@@ -1083,7 +1082,7 @@
 }
 
 static void channel_unhold_cb(void *data, struct stasis_subscription *sub,
-	struct stasis_topic *topic, struct stasis_message *message)
+	struct stasis_message *message)
 {
 	struct ast_channel_blob *obj = stasis_message_data(message);
 	RAII_VAR(struct ast_str *, channel_event_string, NULL, ast_free);

Modified: team/dlee/tp-local/main/stasis.c
URL: http://svnview.digium.com/svn/asterisk/team/dlee/tp-local/main/stasis.c?view=diff&rev=399801&r1=399800&r2=399801
==============================================================================
--- team/dlee/tp-local/main/stasis.c (original)
+++ team/dlee/tp-local/main/stasis.c Wed Sep 25 14:59:29 2013
@@ -249,7 +249,6 @@
  * \param message Message to send.
  */
 static void subscription_invoke(struct stasis_subscription *sub,
-				  struct stasis_topic *topic,
 				  struct stasis_message *message)
 {
 	/* Notify that the final message has been received */
@@ -260,7 +259,7 @@
 	}
 
 	/* Since sub is mostly immutable, no need to lock sub */
-	sub->callback(sub->data, sub, topic, message);
+	sub->callback(sub->data, sub, message);
 
 	/* Notify that the final message has been processed */
 	if (stasis_subscription_final_message(sub, message)) {
@@ -500,7 +499,7 @@
 	struct stasis_subscription *sub = local->local_data;
 	struct stasis_message *message = local->data;
 
-	subscription_invoke(sub, NULL, message);
+	subscription_invoke(sub, message);
 	ao2_cleanup(message);
 
 	return 0;
@@ -518,11 +517,11 @@
 		}
 	} else {
 		/* Dispatch directly */
-		subscription_invoke(sub, NULL, message);
-	}
-}
-
-void stasis_forward_message(struct stasis_topic *_topic, struct stasis_topic *publisher_topic, struct stasis_message *message)
+		subscription_invoke(sub, message);
+	}
+}
+
+void stasis_publish(struct stasis_topic *_topic, struct stasis_message *message)
 {
 	size_t i;
 	/* The topic may be unref'ed by the subscription invocation.
@@ -532,7 +531,6 @@
 	SCOPED_AO2LOCK(lock, topic);
 
 	ast_assert(topic != NULL);
-	ast_assert(publisher_topic != NULL);
 	ast_assert(message != NULL);
 
 	if (ast_vector_size(topic->subscribers) == 0) {
@@ -547,11 +545,6 @@
 		dispatch_message(sub, message);
 
 	}
-}
-
-void stasis_publish(struct stasis_topic *topic, struct stasis_message *message)
-{
-	stasis_forward_message(topic, topic, message);
 }
 
 struct stasis_forward {

Modified: team/dlee/tp-local/main/stasis_cache.c
URL: http://svnview.digium.com/svn/asterisk/team/dlee/tp-local/main/stasis_cache.c?view=diff&rev=399801&r1=399800&r2=399801

[... 211 lines stripped ...]



More information about the asterisk-commits mailing list