[asterisk-commits] dlee: branch group/performance r399845 - in /team/group/performance: ./ apps/...

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


Author: dlee
Date: Wed Sep 25 15:40:29 2013
New Revision: 399845

URL: http://svnview.digium.com/svn/asterisk?view=rev&rev=399845
Log:
Merged ^/team/dlee/tp-local at 399843

Modified:
    team/group/performance/   (props changed)
    team/group/performance/apps/app_queue.c
    team/group/performance/apps/app_voicemail.c
    team/group/performance/apps/confbridge/confbridge_manager.c
    team/group/performance/channels/chan_dahdi.c
    team/group/performance/channels/chan_iax2.c
    team/group/performance/channels/chan_mgcp.c
    team/group/performance/channels/chan_sip.c
    team/group/performance/channels/chan_skinny.c
    team/group/performance/channels/sig_pri.c
    team/group/performance/funcs/func_presencestate.c
    team/group/performance/include/asterisk/stasis.h
    team/group/performance/include/asterisk/stasis_internal.h
    team/group/performance/include/asterisk/taskprocessor.h
    team/group/performance/main/ccss.c
    team/group/performance/main/cdr.c
    team/group/performance/main/cel.c
    team/group/performance/main/devicestate.c
    team/group/performance/main/endpoints.c
    team/group/performance/main/manager.c
    team/group/performance/main/manager_bridges.c
    team/group/performance/main/manager_channels.c
    team/group/performance/main/manager_endpoints.c
    team/group/performance/main/manager_mwi.c
    team/group/performance/main/pbx.c
    team/group/performance/main/sounds_index.c
    team/group/performance/main/stasis.c
    team/group/performance/main/stasis_cache.c
    team/group/performance/main/stasis_message_router.c
    team/group/performance/main/stasis_wait.c
    team/group/performance/main/taskprocessor.c
    team/group/performance/res/parking/parking_applications.c
    team/group/performance/res/parking/parking_bridge_features.c
    team/group/performance/res/parking/parking_manager.c
    team/group/performance/res/res_agi.c
    team/group/performance/res/res_pjsip_mwi.c
    team/group/performance/res/res_pjsip_refer.c
    team/group/performance/res/res_security_log.c
    team/group/performance/res/res_stasis_test.c
    team/group/performance/res/res_xmpp.c
    team/group/performance/res/stasis/app.c
    team/group/performance/tests/test_devicestate.c
    team/group/performance/tests/test_stasis.c

Propchange: team/group/performance/
------------------------------------------------------------------------------
--- svnmerge-integrated (original)
+++ svnmerge-integrated Wed Sep 25 15:40:29 2013
@@ -1,1 +1,1 @@
-/branches/12:1-399753 /team/dlee/performance:1-399659 /team/dlee/stasis-forward-optimization:1-399664 /team/dlee/taskprocessor-optimization:1-399654
+/branches/12:1-399753 /team/dlee/performance:1-399659 /team/dlee/stasis-forward-optimization:1-399664 /team/dlee/taskprocessor-optimization:1-399654 /team/dlee/tp-local:1-399843

Modified: team/group/performance/apps/app_queue.c
URL: http://svnview.digium.com/svn/asterisk/team/group/performance/apps/app_queue.c?view=diff&rev=399845&r1=399844&r2=399845
==============================================================================
--- team/group/performance/apps/app_queue.c (original)
+++ team/group/performance/apps/app_queue.c Wed Sep 25 15:40: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/group/performance/apps/app_voicemail.c
URL: http://svnview.digium.com/svn/asterisk/team/group/performance/apps/app_voicemail.c?view=diff&rev=399845&r1=399844&r2=399845
==============================================================================
--- team/group/performance/apps/app_voicemail.c (original)
+++ team/group/performance/apps/app_voicemail.c Wed Sep 25 15:40: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/group/performance/apps/confbridge/confbridge_manager.c
URL: http://svnview.digium.com/svn/asterisk/team/group/performance/apps/confbridge/confbridge_manager.c?view=diff&rev=399845&r1=399844&r2=399845
==============================================================================
--- team/group/performance/apps/confbridge/confbridge_manager.c (original)
+++ team/group/performance/apps/confbridge/confbridge_manager.c Wed Sep 25 15:40: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/group/performance/channels/chan_dahdi.c
URL: http://svnview.digium.com/svn/asterisk/team/group/performance/channels/chan_dahdi.c?view=diff&rev=399845&r1=399844&r2=399845
==============================================================================
--- team/group/performance/channels/chan_dahdi.c (original)
+++ team/group/performance/channels/chan_dahdi.c Wed Sep 25 15:40:29 2013
@@ -553,7 +553,7 @@
 
 static int dahdi_sendtext(struct ast_channel *c, const char *text);
 
-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/group/performance/channels/chan_iax2.c
URL: http://svnview.digium.com/svn/asterisk/team/group/performance/channels/chan_iax2.c?view=diff&rev=399845&r1=399844&r2=399845
==============================================================================
--- team/group/performance/channels/chan_iax2.c (original)
+++ team/group/performance/channels/chan_iax2.c Wed Sep 25 15:40: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/group/performance/channels/chan_mgcp.c
URL: http://svnview.digium.com/svn/asterisk/team/group/performance/channels/chan_mgcp.c?view=diff&rev=399845&r1=399844&r2=399845
==============================================================================
--- team/group/performance/channels/chan_mgcp.c (original)
+++ team/group/performance/channels/chan_mgcp.c Wed Sep 25 15:40: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/group/performance/channels/chan_sip.c
URL: http://svnview.digium.com/svn/asterisk/team/group/performance/channels/chan_sip.c?view=diff&rev=399845&r1=399844&r2=399845
==============================================================================
--- team/group/performance/channels/chan_sip.c (original)
+++ team/group/performance/channels/chan_sip.c Wed Sep 25 15:40: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/group/performance/channels/chan_skinny.c
URL: http://svnview.digium.com/svn/asterisk/team/group/performance/channels/chan_skinny.c?view=diff&rev=399845&r1=399844&r2=399845
==============================================================================
--- team/group/performance/channels/chan_skinny.c (original)
+++ team/group/performance/channels/chan_skinny.c Wed Sep 25 15:40: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/group/performance/channels/sig_pri.c
URL: http://svnview.digium.com/svn/asterisk/team/group/performance/channels/sig_pri.c?view=diff&rev=399845&r1=399844&r2=399845
==============================================================================
--- team/group/performance/channels/sig_pri.c (original)
+++ team/group/performance/channels/sig_pri.c Wed Sep 25 15:40:29 2013
@@ -8892,7 +8892,7 @@
  *
  * \return Nothing
  */
-static void sig_pri_mwi_event_cb(void *userdata, struct stasis_subscription *sub, struct stasis_topic *topic, struct stasis_message *msg)
+static void sig_pri_mwi_event_cb(void *userdata, struct stasis_subscription *sub, struct stasis_message *msg)
 {
 	struct sig_pri_span *pri = userdata;
 	const char *mbox_context;

Modified: team/group/performance/funcs/func_presencestate.c
URL: http://svnview.digium.com/svn/asterisk/team/group/performance/funcs/func_presencestate.c?view=diff&rev=399845&r1=399844&r2=399845
==============================================================================
--- team/group/performance/funcs/func_presencestate.c (original)
+++ team/group/performance/funcs/func_presencestate.c Wed Sep 25 15:40: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/group/performance/include/asterisk/stasis.h
URL: http://svnview.digium.com/svn/asterisk/team/group/performance/include/asterisk/stasis.h?view=diff&rev=399845&r1=399844&r2=399845
==============================================================================
--- team/group/performance/include/asterisk/stasis.h (original)
+++ team/group/performance/include/asterisk/stasis.h Wed Sep 25 15:40: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/group/performance/include/asterisk/stasis_internal.h
URL: http://svnview.digium.com/svn/asterisk/team/group/performance/include/asterisk/stasis_internal.h?view=diff&rev=399845&r1=399844&r2=399845
==============================================================================
--- team/group/performance/include/asterisk/stasis_internal.h (original)
+++ team/group/performance/include/asterisk/stasis_internal.h Wed Sep 25 15:40: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/group/performance/include/asterisk/taskprocessor.h
URL: http://svnview.digium.com/svn/asterisk/team/group/performance/include/asterisk/taskprocessor.h?view=diff&rev=399845&r1=399844&r2=399845
==============================================================================
--- team/group/performance/include/asterisk/taskprocessor.h (original)
+++ team/group/performance/include/asterisk/taskprocessor.h Wed Sep 25 15:40:29 2013
@@ -176,6 +176,18 @@
 struct ast_taskprocessor *ast_taskprocessor_create_with_listener(const char *name, struct ast_taskprocessor_listener *listener);
 
 /*!
+ * \brief Sets the local data associated with a taskprocessor.
+ *
+ * \since 12.0.0
+ *
+ * See ast_taskprocessor_push_local().
+ *
+ * \param tps Task processor.
+ * \param local_data Local data to associate with \a tps.
+ */
+void ast_taskprocessor_set_local(struct ast_taskprocessor *tps, void *local_data);
+
+/*!
  * \brief Unreference the specified taskprocessor and its reference count will decrement.
  *
  * Taskprocessors use astobj2 and will unlink from the taskprocessor singleton container and destroy
@@ -197,6 +209,32 @@
  */
 int ast_taskprocessor_push(struct ast_taskprocessor *tps, int (*task_exe)(void *datap), void *datap);
 
+/*! \brief Local data parameter */
+struct ast_taskprocessor_local {
+	/*! Local data, associated with the taskprocessor. */
+	void *local_data;
+	/*! Data pointer passed with this task. */
+	void *data;
+};
+
+/*!
+ * \brief Push a task into the specified taskprocessor queue and signal the
+ * taskprocessor thread.
+ *
+ * The callback receives a \ref ast_taskprocessor_local struct, which contains
+ * both the provided \a datap pointer, and any local data set on the
+ * taskprocessor with ast_taskprocessor_set_local().
+ *
+ * \param tps The taskprocessor structure
+ * \param task_exe The task handling function to push into the taskprocessor queue
+ * \param datap The data to be used by the task handling function
+ * \retval 0 success
+ * \retval -1 failure
+ * \since 12.0.0
+ */
+int ast_taskprocessor_push_local(struct ast_taskprocessor *tps,
+	int (*task_exe)(struct ast_taskprocessor_local *local), void *datap);
+
 /*!
  * \brief Pop a task off the taskprocessor and execute it.
  *

Modified: team/group/performance/main/ccss.c
URL: http://svnview.digium.com/svn/asterisk/team/group/performance/main/ccss.c?view=diff&rev=399845&r1=399844&r2=399845
==============================================================================
--- team/group/performance/main/ccss.c (original)
+++ team/group/performance/main/ccss.c Wed Sep 25 15:40: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/group/performance/main/cdr.c
URL: http://svnview.digium.com/svn/asterisk/team/group/performance/main/cdr.c?view=diff&rev=399845&r1=399844&r2=399845
==============================================================================
--- team/group/performance/main/cdr.c (original)
+++ team/group/performance/main/cdr.c Wed Sep 25 15:40: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/group/performance/main/cel.c
URL: http://svnview.digium.com/svn/asterisk/team/group/performance/main/cel.c?view=diff&rev=399845&r1=399844&r2=399845
==============================================================================
--- team/group/performance/main/cel.c (original)
+++ team/group/performance/main/cel.c Wed Sep 25 15:40:29 2013
@@ -1008,7 +1008,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);
@@ -1032,7 +1031,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);
@@ -1054,7 +1052,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);
@@ -1076,7 +1073,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);
@@ -1121,7 +1117,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);
@@ -1156,7 +1151,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);
@@ -1179,7 +1173,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);
@@ -1227,7 +1220,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);
@@ -1280,7 +1272,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);
@@ -1302,7 +1293,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/group/performance/main/devicestate.c
URL: http://svnview.digium.com/svn/asterisk/team/group/performance/main/devicestate.c?view=diff&rev=399845&r1=399844&r2=399845
==============================================================================
--- team/group/performance/main/devicestate.c (original)
+++ team/group/performance/main/devicestate.c Wed Sep 25 15:40: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/group/performance/main/endpoints.c
URL: http://svnview.digium.com/svn/asterisk/team/group/performance/main/endpoints.c?view=diff&rev=399845&r1=399844&r2=399845
==============================================================================
--- team/group/performance/main/endpoints.c (original)
+++ team/group/performance/main/endpoints.c Wed Sep 25 15:40: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/group/performance/main/manager.c
URL: http://svnview.digium.com/svn/asterisk/team/group/performance/main/manager.c?view=diff&rev=399845&r1=399844&r2=399845
==============================================================================
--- team/group/performance/main/manager.c (original)
+++ team/group/performance/main/manager.c Wed Sep 25 15:40: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/group/performance/main/manager_bridges.c
URL: http://svnview.digium.com/svn/asterisk/team/group/performance/main/manager_bridges.c?view=diff&rev=399845&r1=399844&r2=399845
==============================================================================
--- team/group/performance/main/manager_bridges.c (original)
+++ team/group/performance/main/manager_bridges.c Wed Sep 25 15:40: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/group/performance/main/manager_channels.c
URL: http://svnview.digium.com/svn/asterisk/team/group/performance/main/manager_channels.c?view=diff&rev=399845&r1=399844&r2=399845
==============================================================================
--- team/group/performance/main/manager_channels.c (original)
+++ team/group/performance/main/manager_channels.c Wed Sep 25 15:40: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,

[... 938 lines stripped ...]



More information about the asterisk-commits mailing list