[asterisk-commits] rmudgett: branch rmudgett/ect r247649 - /team/rmudgett/ect/channels/sig_pri.c

SVN commits to the Asterisk project asterisk-commits at lists.digium.com
Thu Feb 18 13:30:05 CST 2010


Author: rmudgett
Date: Thu Feb 18 13:30:02 2010
New Revision: 247649

URL: http://svnview.digium.com/svn/asterisk?view=rev&rev=247649
Log:
*  Eliminate the need for sig_pri_attempt_disconnect_transfer().
*  Change order of parameters to sig_pri_attempt_transfer().

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

Modified: team/rmudgett/ect/channels/sig_pri.c
URL: http://svnview.digium.com/svn/asterisk/team/rmudgett/ect/channels/sig_pri.c?view=diff&rev=247649&r1=247648&r2=247649
==============================================================================
--- team/rmudgett/ect/channels/sig_pri.c (original)
+++ team/rmudgett/ect/channels/sig_pri.c Thu Feb 18 13:30:02 2010
@@ -1483,8 +1483,8 @@
  *
  * \param pri sig_pri PRI control structure.
  * \param call_1 First call involved in the transfer.
+ * \param call_1_held TRUE if call_1 is on hold.
  * \param call_2 Second call involved in the transfer.
- * \param call_1_held TRUE if call_1 is on hold.
  * \param call_2_held TRUE if call_2 is on hold.
  *
  * \note Assumes the pri->lock is already obtained.
@@ -1492,7 +1492,7 @@
  * \retval 0 on success.
  * \retval -1 on error.
  */
-static int sig_pri_attempt_transfer(struct sig_pri_pri *pri, q931_call *call_1, q931_call *call_2, int call_1_held, int call_2_held)
+static int sig_pri_attempt_transfer(struct sig_pri_pri *pri, q931_call *call_1, int call_1_held, q931_call *call_2, int call_2_held)
 {
 	int retval;
 	int call_1_chanpos;
@@ -1755,9 +1755,10 @@
 
 			sig_pri_unlock_private(pri->pvts[chanpos]);
 			pri_transfer_rsp(pri->pri, call_rsp, subcmd->u.transfer.invoke_id,
-				sig_pri_attempt_transfer(pri, subcmd->u.transfer.call_1,
-				subcmd->u.transfer.call_2, subcmd->u.transfer.is_call_1_held,
-				subcmd->u.transfer.is_call_2_held) ? 0 : 1);
+				sig_pri_attempt_transfer(pri,
+					subcmd->u.transfer.call_1, subcmd->u.transfer.is_call_1_held,
+					subcmd->u.transfer.call_2, subcmd->u.transfer.is_call_2_held)
+				? 0 : 1);
 			sig_pri_lock_private(pri->pvts[chanpos]);
 			break;
 #endif	/* defined(HAVE_PRI_TRANSFER) */
@@ -1770,27 +1771,6 @@
 		}
 	}
 }
-
-#if defined(HAVE_PRI_CALL_HOLD)
-/*!
- * \internal
- * \brief Attempt to transfer the active call to the held call on disconnect.
- * \since 1.8
- *
- * \param pri sig_pri PRI control structure.
- * \param active_call Active call to transfer.
- * \param held_call Held call to transfer.
- *
- * \note Assumes the pri->lock is already obtained.
- *
- * \retval 0 on success.
- * \retval -1 on error.
- */
-static int sig_pri_attempt_disconnect_transfer(struct sig_pri_pri *pri, q931_call *active_call, q931_call *held_call)
-{
-	return sig_pri_attempt_transfer(pri, active_call, held_call, 0, 1);
-}
-#endif	/* defined(HAVE_PRI_CALL_HOLD) */
 
 #if defined(HAVE_PRI_CALL_HOLD)
 /*!
@@ -2985,8 +2965,8 @@
 							&& pri->hold_disconnect_transfer) {
 							/* We are to transfer the call instead of simply hanging up. */
 							sig_pri_unlock_private(pri->pvts[chanpos]);
-							if (!sig_pri_attempt_disconnect_transfer(pri, e->hangup.call_active,
-								e->hangup.call_held)) {
+							if (!sig_pri_attempt_transfer(pri, e->hangup.call_active, 0,
+								e->hangup.call_held, 1)) {
 								break;
 							}
 							sig_pri_lock_private(pri->pvts[chanpos]);




More information about the asterisk-commits mailing list