[asterisk-commits] moy: branch moy/mfcr2-1.6-progress r298174 - /team/moy/mfcr2-1.6-progress/cha...

SVN commits to the Asterisk project asterisk-commits at lists.digium.com
Sun Dec 12 18:28:18 CST 2010


Author: moy
Date: Sun Dec 12 18:28:12 2010
New Revision: 298174

URL: http://svnview.digium.com/svn/asterisk?view=rev&rev=298174
Log:
enqueue AST_CONTROL_PROGRESS instead of setting .needringing when the call has been accepted

Modified:
    team/moy/mfcr2-1.6-progress/channels/chan_dahdi.c

Modified: team/moy/mfcr2-1.6-progress/channels/chan_dahdi.c
URL: http://svnview.digium.com/svn/asterisk/team/moy/mfcr2-1.6-progress/channels/chan_dahdi.c?view=diff&rev=298174&r1=298173&r2=298174
==============================================================================
--- team/moy/mfcr2-1.6-progress/channels/chan_dahdi.c (original)
+++ team/moy/mfcr2-1.6-progress/channels/chan_dahdi.c Sun Dec 12 18:28:12 2010
@@ -1838,9 +1838,14 @@
 {
 	struct dahdi_pvt *p = NULL;
 	struct ast_channel *c = NULL;
+	struct ast_frame f = { AST_FRAME_CONTROL, AST_CONTROL_PROGRESS, };
+
 	p = openr2_chan_get_client_data(r2chan);
+
 	dahdi_enable_ec(p);
+
 	p->mfcr2_call_accepted = 1;
+
 	/* if it's an incoming call ... */
 	if (OR2_DIR_BACKWARD == openr2_chan_get_direction(r2chan)) {
 		ast_verbose("MFC/R2 call has been accepted on backward channel %d\n", openr2_chan_get_number(r2chan));
@@ -1870,8 +1875,12 @@
 	}
 	/* this is an outgoing call, no need to launch the PBX thread, most likely we're in one already */
 	ast_verbose("MFC/R2 call has been accepted on forward channel %d\n", p->channel);
-	p->subs[SUB_REAL].needringing = 1;
+
+	/* no need to lock p since this function is called implicitly from dahdi_read which already has the chan and pvt locked in that order */
+	ast_queue_frame(p->owner, &f);
+	p->progress = 1;
 	p->dialing = 0;
+
 	/* chan_dahdi will take care of reading from now on in the PBX thread, tell the library to forget about it */
 	openr2_chan_disable_read(r2chan);
 }




More information about the asterisk-commits mailing list