[svn-commits] mmichelson: branch mmichelson/atxfer_features r392189 - /team/mmichelson/atxf...

SVN commits to the Digium repositories svn-commits at lists.digium.com
Tue Jun 18 15:47:42 CDT 2013


Author: mmichelson
Date: Tue Jun 18 15:47:40 2013
New Revision: 392189

URL: http://svnview.digium.com/svn/asterisk?view=rev&rev=392189
Log:
Add method for stimulating an attended transfer.


Modified:
    team/mmichelson/atxfer_features/main/bridging_basic.c

Modified: team/mmichelson/atxfer_features/main/bridging_basic.c
URL: http://svnview.digium.com/svn/asterisk/team/mmichelson/atxfer_features/main/bridging_basic.c?view=diff&rev=392189&r1=392188&r2=392189
==============================================================================
--- team/mmichelson/atxfer_features/main/bridging_basic.c (original)
+++ team/mmichelson/atxfer_features/main/bridging_basic.c Tue Jun 18 15:47:40 2013
@@ -819,6 +819,24 @@
 	},
 };
 
+static __attribute__((unused)) void stimulate_attended_transfer(struct attended_transfer_properties *props,
+		enum attended_transfer_stimulus stimulus)
+{
+	struct stimulus_list *list;
+
+	list = ast_calloc(1, sizeof(*list));
+	if (!list) {
+		ast_log(LOG_NOTICE, "Unable to push event to attended transfer queue. Expect transfer to fail\n");
+		return;
+	}
+
+	list->stimulus = stimulus;
+	ast_mutex_lock(&props->lock);
+	AST_LIST_INSERT_TAIL(&props->stimulus_queue, list, next);
+	ast_cond_signal(&props->cond);
+	ast_mutex_unlock(&props->lock);
+}
+
 static enum attended_transfer_stimulus wait_for_stimulus(struct attended_transfer_properties *props)
 {
 	RAII_VAR(struct stimulus_list *, list, NULL, ast_free_ptr);




More information about the svn-commits mailing list