[asterisk-commits] rmudgett: branch rmudgett/dahdi_ccss r243775 - /team/rmudgett/dahdi_ccss/chan...

SVN commits to the Asterisk project asterisk-commits at lists.digium.com
Wed Jan 27 16:09:04 CST 2010


Author: rmudgett
Date: Wed Jan 27 16:09:00 2010
New Revision: 243775

URL: http://svnview.digium.com/svn/asterisk?view=rev&rev=243775
Log:
Still allow generic CC if libpri does not support CC.

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

Modified: team/rmudgett/dahdi_ccss/channels/sig_pri.c
URL: http://svnview.digium.com/svn/asterisk/team/rmudgett/dahdi_ccss/channels/sig_pri.c?view=diff&rev=243775&r1=243774&r2=243775
==============================================================================
--- team/rmudgett/dahdi_ccss/channels/sig_pri.c (original)
+++ team/rmudgett/dahdi_ccss/channels/sig_pri.c Wed Jan 27 16:09:00 2010
@@ -153,7 +153,6 @@
 		p->calls->set_digital(p->chan_pvt, flag);
 }
 
-#if defined(HAVE_PRI_CCSS)
 static const char *sig_pri_get_orig_dialstring(struct sig_pri_chan *p)
 {
 	if (p->calls->get_orig_dialstring) {
@@ -162,7 +161,6 @@
 	ast_log(LOG_ERROR, "get_orig_dialstring callback not defined\n");
 	return "";
 }
-#endif	/* defined(HAVE_PRI_CCSS) */
 
 #if defined(HAVE_PRI_CCSS)
 static void sig_pri_make_cc_dialstring(struct sig_pri_chan *p, char *buf, size_t buf_size)
@@ -1798,7 +1796,6 @@
 }
 #endif	/* defined(HAVE_PRI_CCSS) */
 
-#if defined(HAVE_PRI_CCSS)
 /*!
  * \internal
  * \brief Check if generic CC monitor is needed and request it.
@@ -1817,7 +1814,9 @@
 {
 	struct ast_channel *owner;
 	struct ast_cc_config_params *cc_params;
+#if defined(HAVE_PRI_CCSS)
 	struct sig_pri_cc_monitor_instance *monitor;
+#endif	/* defined(HAVE_PRI_CCSS) */
 	enum ast_cc_monitor_policies monitor_policy;
 	int core_id;
 
@@ -1843,12 +1842,14 @@
 		goto done;
 	}
 
+#if defined(HAVE_PRI_CCSS)
 	monitor = sig_pri_find_cc_monitor_by_core_id(core_id);
 	if (monitor) {
 		/* CC monitor is already present so no need for generic CC. */
 		ao2_ref(monitor, -1);
 		goto done;
 	}
+#endif	/* defined(HAVE_PRI_CCSS) */
 
 	monitor_policy = ast_get_cc_monitor_policy(cc_params);
 	switch (monitor_policy) {
@@ -1891,7 +1892,6 @@
 done:
 	ast_channel_unlock(owner);
 }
-#endif	/* defined(HAVE_PRI_CCSS) */
 
 #if defined(HAVE_PRI_CCSS)
 /*!
@@ -3434,9 +3434,7 @@
 
 						sig_pri_handle_subcmds(pri, chanpos, e->e, e->ringing.channel,
 							e->ringing.subcmds, e->ringing.call);
-#if defined(HAVE_PRI_CCSS)
 						sig_pri_cc_generic_check(pri, chanpos, AST_CC_CCNR);
-#endif	/* defined(HAVE_PRI_CCSS) */
 						sig_pri_set_echocanceller(pri->pvts[chanpos], 1);
 						pri_queue_control(pri->pvts[chanpos], AST_CONTROL_RINGING, pri);
 						pri->pvts[chanpos]->alerting = 1;
@@ -3644,7 +3642,6 @@
 						if (!pri->pvts[chanpos]->alreadyhungup) {
 							/* we're calling here dahdi_hangup so once we get there we need to clear p->call after calling pri_hangup */
 							pri->pvts[chanpos]->alreadyhungup = 1;
-#if defined(HAVE_PRI_CCSS)
 							switch (e->hangup.cause) {
 							case PRI_CAUSE_USER_BUSY:
 							case PRI_CAUSE_NORMAL_CIRCUIT_CONGESTION:
@@ -3653,7 +3650,6 @@
 							default:
 								break;
 							}
-#endif	/* defined(HAVE_PRI_CCSS) */
 							if (pri->pvts[chanpos]->owner) {
 								/* Queue a BUSY instead of a hangup if our cause is appropriate */
 								pri->pvts[chanpos]->owner->hangupcause = e->hangup.cause;
@@ -3748,7 +3744,6 @@
 							sig_pri_lock_private(pri->pvts[chanpos]);
 						}
 #endif	/* defined(HAVE_PRI_CALL_HOLD) */
-#if defined(HAVE_PRI_CCSS)
 						switch (e->hangup.cause) {
 						case PRI_CAUSE_USER_BUSY:
 						case PRI_CAUSE_NORMAL_CIRCUIT_CONGESTION:
@@ -3757,7 +3752,6 @@
 						default:
 							break;
 						}
-#endif	/* defined(HAVE_PRI_CCSS) */
 						if (pri->pvts[chanpos]->owner) {
 							pri->pvts[chanpos]->owner->hangupcause = e->hangup.cause;
 							switch (pri->pvts[chanpos]->owner->_state) {




More information about the asterisk-commits mailing list