[asterisk-commits] rmudgett: branch rmudgett/dahdi_facility r218865 - /team/rmudgett/dahdi_facil...

SVN commits to the Asterisk project asterisk-commits at lists.digium.com
Wed Sep 16 09:47:09 CDT 2009


Author: rmudgett
Date: Wed Sep 16 09:47:05 2009
New Revision: 218865

URL: http://svn.asterisk.org/svn-view/asterisk?view=rev&rev=218865
Log:
Fix locking problem and remember to UNHOLD the peer when we RETRIEVE a call.

Modified:
    team/rmudgett/dahdi_facility/channels/sig_pri.c

Modified: team/rmudgett/dahdi_facility/channels/sig_pri.c
URL: http://svn.asterisk.org/svn-view/asterisk/team/rmudgett/dahdi_facility/channels/sig_pri.c?view=diff&rev=218865&r1=218864&r2=218865
==============================================================================
--- team/rmudgett/dahdi_facility/channels/sig_pri.c (original)
+++ team/rmudgett/dahdi_facility/channels/sig_pri.c Wed Sep 16 09:47:05 2009
@@ -2475,10 +2475,6 @@
 						PRI_CAUSE_RESOURCE_UNAVAIL_UNSPECIFIED);
 					break;
 				}
-				sig_pri_lock_private(pri->pvts[chanpos]);
-				sig_pri_handle_subcmds(pri, chanpos, e->e, e->hold.channel,
-					e->hold.subcmds);
-				sig_pri_unlock_private(pri->pvts[chanpos]);
 				if (pri->pvts[chanpos]->no_b_channel) {
 					/* Call is already on hold or is call waiting call. */
 					pri_hold_rej(pri->pri, e->hold.call,
@@ -2497,12 +2493,16 @@
 						PRI_CAUSE_RESOURCE_UNAVAIL_UNSPECIFIED);
 					break;
 				}
+				sig_pri_lock_private(pri->pvts[chanpos]);
+				sig_pri_handle_subcmds(pri, chanpos, e->e, e->hold.channel,
+					e->hold.subcmds);
 				{
 					struct ast_frame f = { AST_FRAME_CONTROL, };
 	
 					f.subclass = AST_CONTROL_HOLD;
 					pri_queue_frame(pri->pvts[chanpos], &f, pri);
 				}
+				sig_pri_unlock_private(pri->pvts[chanpos]);
 				pri_hold_ack(pri->pri, e->hold.call);
 				break;
 #endif	/* defined(HAVE_PRI_CALL_HOLD) */
@@ -2555,6 +2555,12 @@
 				sig_pri_lock_private(pri->pvts[chanpos]);
 				sig_pri_handle_subcmds(pri, chanpos, e->e, e->retrieve.channel,
 					e->retrieve.subcmds);
+				{
+					struct ast_frame f = { AST_FRAME_CONTROL, };
+	
+					f.subclass = AST_CONTROL_UNHOLD;
+					pri_queue_frame(pri->pvts[chanpos], &f, pri);
+				}
 				sig_pri_unlock_private(pri->pvts[chanpos]);
 				pri_retrieve_ack(pri->pri, e->retrieve.call,
 					PVT_TO_CHANNEL(pri->pvts[chanpos]));




More information about the asterisk-commits mailing list