[asterisk-commits] tilghman: branch tilghman/realtime_failover r278946 - in /team/tilghman/realt...

SVN commits to the Asterisk project asterisk-commits at lists.digium.com
Fri Jul 23 11:07:47 CDT 2010


Author: tilghman
Date: Fri Jul 23 11:07:42 2010
New Revision: 278946

URL: http://svnview.digium.com/svn/asterisk?view=rev&rev=278946
Log:
Merged revisions 278942-278945 via svnmerge from 
https://origsvn.digium.com/svn/asterisk/trunk

........
  r278942 | rmudgett | 2010-07-23 10:41:44 -0500 (Fri, 23 Jul 2010) | 1 line
  
  Rename sig_pri_pri to sig_pri_span.  More descriptive of concept.
........
  r278943 | mmichelson | 2010-07-23 10:52:37 -0500 (Fri, 23 Jul 2010) | 3 lines
  
  Well, who knew chan_ooh323 used udptl? I sure didn't!
........
  r278944 | russell | 2010-07-23 10:57:01 -0500 (Fri, 23 Jul 2010) | 2 lines
  
  Disable SIP support by default for Asterisk 1.8.
........
  r278945 | russell | 2010-07-23 10:57:23 -0500 (Fri, 23 Jul 2010) | 2 lines
  
  ... just kidding.  Enable SIP by default.  :-)
........

Modified:
    team/tilghman/realtime_failover/   (props changed)
    team/tilghman/realtime_failover/addons/chan_ooh323.c
    team/tilghman/realtime_failover/channels/chan_dahdi.c
    team/tilghman/realtime_failover/channels/chan_sip.c
    team/tilghman/realtime_failover/channels/sig_pri.c
    team/tilghman/realtime_failover/channels/sig_pri.h

Propchange: team/tilghman/realtime_failover/
------------------------------------------------------------------------------
--- svnmerge-integrated (original)
+++ svnmerge-integrated Fri Jul 23 11:07:42 2010
@@ -1,1 +1,1 @@
-/trunk:1-278939
+/trunk:1-278945

Modified: team/tilghman/realtime_failover/addons/chan_ooh323.c
URL: http://svnview.digium.com/svn/asterisk/team/tilghman/realtime_failover/addons/chan_ooh323.c?view=diff&rev=278946&r1=278945&r2=278946
==============================================================================
--- team/tilghman/realtime_failover/addons/chan_ooh323.c (original)
+++ team/tilghman/realtime_failover/addons/chan_ooh323.c Fri Jul 23 11:07:42 2010
@@ -496,7 +496,7 @@
  
 	ast_rtp_instance_set_qos(pvt->rtp, gTOS, 0, "ooh323-rtp");
 
-	if (!(pvt->udptl = ast_udptl_new_with_bindaddr(sched, io, 0, ipAddr))) {
+	if (!(pvt->udptl = ast_udptl_new_with_bindaddr(sched, io, 0, &tmp))) {
 		ast_log(LOG_WARNING, "Unable to create UDPTL session: %s\n",
 				strerror(errno));
 		ast_mutex_unlock(&pvt->lock);
@@ -3915,7 +3915,10 @@
 	}
 
 	if (p->udptl) {
-		ast_udptl_get_us(p->udptl, &us);
+		struct ast_sockaddr us_tmp;
+		ast_sockaddr_from_sin(&us_tmp, &us);
+		ast_udptl_get_us(p->udptl, &us_tmp);
+		ast_sockaddr_to_sin(&us_tmp, &us);
 	}
 	ast_copy_string(mediaInfo.lMediaIP, ast_inet_ntoa(us.sin_addr), sizeof(mediaInfo.lMediaIP));
 	mediaInfo.lMediaPort = ntohs(us.sin_port);
@@ -4019,9 +4022,11 @@
 	if (!p)
 		return -1;
 	ast_mutex_lock(&p->lock);
-	if (udptl)
-		ast_udptl_get_peer(udptl, &p->udptlredirip);
-	else
+	if (udptl) {
+		struct ast_sockaddr udptl_addr;
+		ast_udptl_get_peer(udptl, &udptl_addr);
+		ast_sockaddr_to_sin(&udptl_addr, &p->udptlredirip);
+	} else
 		memset(&p->udptlredirip, 0, sizeof(p->udptlredirip));
 
 	ast_mutex_unlock(&p->lock);
@@ -4033,6 +4038,7 @@
 {
 	struct ooh323_pvt *p = NULL;
 	struct sockaddr_in them;
+	struct ast_sockaddr them_addr;
 
 	if (gH323Debug)
 		ast_verbose("---   setup_udptl_connection\n");
@@ -4065,7 +4071,8 @@
 	them.sin_family = AF_INET;
 	them.sin_addr.s_addr = inet_addr(remoteIp); /* only works for IPv4 */
 	them.sin_port = htons(remotePort);
-	ast_udptl_set_peer(p->udptl, &them);
+	ast_sockaddr_from_sin(&them_addr, &them);
+	ast_udptl_set_peer(p->udptl, &them_addr);
 	p->t38_tx_enable = 1;
 	p->lastTxT38 = time(NULL);
 	if (p->t38support == T38_ENABLED) {

Modified: team/tilghman/realtime_failover/channels/chan_dahdi.c
URL: http://svnview.digium.com/svn/asterisk/team/tilghman/realtime_failover/channels/chan_dahdi.c?view=diff&rev=278946&r1=278945&r2=278946
==============================================================================
--- team/tilghman/realtime_failover/channels/chan_dahdi.c (original)
+++ team/tilghman/realtime_failover/channels/chan_dahdi.c Fri Jul 23 11:07:42 2010
@@ -568,7 +568,7 @@
 	int dchannels[SIG_PRI_NUM_DCHANS];		/*!< What channel are the dchannels on */
 	int mastertrunkgroup;					/*!< What trunk group is our master */
 	int prilogicalspan;						/*!< Logical span number within trunk group */
-	struct sig_pri_pri pri;
+	struct sig_pri_span pri;
 };
 
 static struct dahdi_pri pris[NUM_SPANS];
@@ -946,7 +946,7 @@
 	unsigned int manages_span_alarms:1;
 
 #if defined(HAVE_PRI)
-	struct sig_pri_pri *pri;
+	struct sig_pri_span *pri;
 	int logicalspan;
 #endif
 	/*!
@@ -2910,7 +2910,7 @@
 #endif	/* defined(HAVE_PRI) */
 
 #if defined(HAVE_PRI)
-static void my_handle_dchan_exception(struct sig_pri_pri *pri, int index)
+static void my_handle_dchan_exception(struct sig_pri_span *pri, int index)
 {
 	int x, res;
 
@@ -3087,7 +3087,7 @@
  *
  * \note Assumes the pri->lock is already obtained.
  */
-static void dahdi_pri_update_span_devstate(struct sig_pri_pri *pri)
+static void dahdi_pri_update_span_devstate(struct sig_pri_span *pri)
 {
 	unsigned idx;
 	unsigned num_b_chans;	/* Number of B channels provisioned on the span. */
@@ -3178,9 +3178,9 @@
 
 #if defined(HAVE_PRI)
 #if defined(HAVE_PRI_CALL_WAITING)
-static void my_pri_init_config(void *priv, struct sig_pri_pri *pri);
+static void my_pri_init_config(void *priv, struct sig_pri_span *pri);
 #endif	/* defined(HAVE_PRI_CALL_WAITING) */
-static int dahdi_new_pri_nobch_channel(struct sig_pri_pri *pri);
+static int dahdi_new_pri_nobch_channel(struct sig_pri_span *pri);
 
 static struct sig_pri_callback dahdi_pri_callbacks =
 {
@@ -5320,7 +5320,7 @@
  *
  * \return Nothing
  */
-static void dahdi_nobch_insert(struct sig_pri_pri *pri, struct dahdi_pvt *pvt)
+static void dahdi_nobch_insert(struct sig_pri_span *pri, struct dahdi_pvt *pvt)
 {
 	struct dahdi_pvt *cur;
 
@@ -5373,7 +5373,7 @@
  *
  * \return Nothing
  */
-static void dahdi_nobch_extract(struct sig_pri_pri *pri, struct dahdi_pvt *pvt)
+static void dahdi_nobch_extract(struct sig_pri_span *pri, struct dahdi_pvt *pvt)
 {
 	/* Extract from the forward chain. */
 	if (pvt->prev) {
@@ -5411,7 +5411,7 @@
 static void dahdi_unlink_pri_pvt(struct dahdi_pvt *pvt)
 {
 	unsigned idx;
-	struct sig_pri_pri *pri;
+	struct sig_pri_span *pri;
 
 	pri = pvt->pri;
 	if (!pri) {
@@ -5568,7 +5568,7 @@
 	int chan;
 #if defined(HAVE_PRI)
 	unsigned span;
-	struct sig_pri_pri *pri;
+	struct sig_pri_span *pri;
 #endif	/* defined(HAVE_PRI) */
 	struct dahdi_pvt *p;
 
@@ -12677,7 +12677,7 @@
  *
  * \return Nothing
  */
-static void my_pri_init_config(void *priv, struct sig_pri_pri *pri)
+static void my_pri_init_config(void *priv, struct sig_pri_span *pri)
 {
 	struct dahdi_pvt *pvt = priv;
 
@@ -12708,7 +12708,7 @@
  * \retval array-index into private pointer array on success.
  * \retval -1 on error.
  */
-static int dahdi_new_pri_nobch_channel(struct sig_pri_pri *pri)
+static int dahdi_new_pri_nobch_channel(struct sig_pri_span *pri)
 {
 	int pvt_idx;
 	int res;

Modified: team/tilghman/realtime_failover/channels/chan_sip.c
URL: http://svnview.digium.com/svn/asterisk/team/tilghman/realtime_failover/channels/chan_sip.c?view=diff&rev=278946&r1=278945&r2=278946
==============================================================================
--- team/tilghman/realtime_failover/channels/chan_sip.c (original)
+++ team/tilghman/realtime_failover/channels/chan_sip.c Fri Jul 23 11:07:42 2010
@@ -162,7 +162,7 @@
  */
 
 /*** MODULEINFO
-        <depend>chan_local</depend>
+	<depend>chan_local</depend>
  ***/
 
 /*!  \page sip_session_timers SIP Session Timers in Asterisk Chan_sip

Modified: team/tilghman/realtime_failover/channels/sig_pri.c
URL: http://svnview.digium.com/svn/asterisk/team/tilghman/realtime_failover/channels/sig_pri.c?view=diff&rev=278946&r1=278945&r2=278946
==============================================================================
--- team/tilghman/realtime_failover/channels/sig_pri.c (original)
+++ team/tilghman/realtime_failover/channels/sig_pri.c Fri Jul 23 11:07:42 2010
@@ -59,7 +59,7 @@
 #if defined(HAVE_PRI_CCSS)
 struct sig_pri_cc_agent_prv {
 	/*! Asterisk span D channel control structure. */
-	struct sig_pri_pri *pri;
+	struct sig_pri_span *pri;
 	/*! CC id value to use with libpri. -1 if invalid. */
 	long cc_id;
 	/*! TRUE if CC has been requested and we are waiting for the response. */
@@ -68,7 +68,7 @@
 
 struct sig_pri_cc_monitor_instance {
 	/*! \brief Asterisk span D channel control structure. */
-	struct sig_pri_pri *pri;
+	struct sig_pri_span *pri;
 	/*! CC id value to use with libpri. (-1 if already canceled). */
 	long cc_id;
 	/*! CC core id value. */
@@ -107,9 +107,9 @@
 		sig_pri_lock_private(p); \
 	} while (0)
 
-static int pri_active_dchan_index(struct sig_pri_pri *pri);
-
-static inline void pri_rel(struct sig_pri_pri *pri)
+static int pri_active_dchan_index(struct sig_pri_span *pri);
+
+static inline void pri_rel(struct sig_pri_span *pri)
 {
 	ast_mutex_unlock(&pri->lock);
 }
@@ -123,7 +123,7 @@
 	return res;
 }
 
-static void sig_pri_handle_dchan_exception(struct sig_pri_pri *pri, int index)
+static void sig_pri_handle_dchan_exception(struct sig_pri_span *pri, int index)
 {
 	if (pri->calls->handle_dchan_exception)
 		pri->calls->handle_dchan_exception(pri, index);
@@ -184,7 +184,7 @@
  *
  * \note Assumes the pri->lock is already obtained.
  */
-static void sig_pri_span_devstate_changed(struct sig_pri_pri *pri)
+static void sig_pri_span_devstate_changed(struct sig_pri_span *pri)
 {
 	if (pri->calls->update_span_devstate) {
 		pri->calls->update_span_devstate(pri);
@@ -280,7 +280,7 @@
 		p->calls->lock_private(p->chan_pvt);
 }
 
-static inline int pri_grab(struct sig_pri_chan *p, struct sig_pri_pri *pri)
+static inline int pri_grab(struct sig_pri_chan *p, struct sig_pri_span *pri)
 {
 	int res;
 	/* Grab the lock first */
@@ -924,7 +924,7 @@
 	return ast;
 }
 
-int pri_is_up(struct sig_pri_pri *pri)
+int pri_is_up(struct sig_pri_span *pri)
 {
 	int x;
 	for (x = 0; x < SIG_PRI_NUM_DCHANS; x++) {
@@ -951,7 +951,7 @@
 }
 
 /* Returns index of the active dchan */
-static int pri_active_dchan_index(struct sig_pri_pri *pri)
+static int pri_active_dchan_index(struct sig_pri_span *pri)
 {
 	int x;
 
@@ -964,7 +964,7 @@
 	return -1;
 }
 
-static int pri_find_dchan(struct sig_pri_pri *pri)
+static int pri_find_dchan(struct sig_pri_span *pri)
 {
 	int oldslot = -1;
 	struct pri *old;
@@ -1005,7 +1005,7 @@
  *
  * \return Nothing
  */
-static void sig_pri_lock_owner(struct sig_pri_pri *pri, int chanpos)
+static void sig_pri_lock_owner(struct sig_pri_span *pri, int chanpos)
 {
 	for (;;) {
 		if (!pri->pvts[chanpos]->owner) {
@@ -1037,7 +1037,7 @@
  *
  * \return Nothing
  */
-static void pri_queue_frame(struct sig_pri_pri *pri, int chanpos, struct ast_frame *frame)
+static void pri_queue_frame(struct sig_pri_span *pri, int chanpos, struct ast_frame *frame)
 {
 	sig_pri_lock_owner(pri, chanpos);
 	if (pri->pvts[chanpos]->owner) {
@@ -1060,7 +1060,7 @@
  *
  * \return Nothing
  */
-static void pri_queue_control(struct sig_pri_pri *pri, int chanpos, int subclass)
+static void pri_queue_control(struct sig_pri_span *pri, int chanpos, int subclass)
 {
 	struct ast_frame f = {AST_FRAME_CONTROL, };
 	struct sig_pri_chan *p = pri->pvts[chanpos];
@@ -1073,7 +1073,7 @@
 	pri_queue_frame(pri, chanpos, &f);
 }
 
-static int pri_find_principle(struct sig_pri_pri *pri, int channel, q931_call *call)
+static int pri_find_principle(struct sig_pri_span *pri, int channel, q931_call *call)
 {
 	int x;
 	int span;
@@ -1127,7 +1127,7 @@
 	return principle;
 }
 
-static int pri_fixup_principle(struct sig_pri_pri *pri, int principle, q931_call *call)
+static int pri_fixup_principle(struct sig_pri_span *pri, int principle, q931_call *call)
 {
 	int x;
 
@@ -1271,7 +1271,7 @@
 	return (pri_plan2str(dialplan));
 }
 
-static void apply_plan_to_number(char *buf, size_t size, const struct sig_pri_pri *pri, const char *number, const int plan)
+static void apply_plan_to_number(char *buf, size_t size, const struct sig_pri_span *pri, const char *number, const int plan)
 {
 	switch (plan) {
 	case PRI_INTERNATIONAL_ISDN:		/* Q.931 dialplan == 0x11 international dialplan => prepend international prefix digits */
@@ -1296,7 +1296,7 @@
 }
 
 /*! \note Assumes the pri->lock is already obtained. */
-static int pri_check_restart(struct sig_pri_pri *pri)
+static int pri_check_restart(struct sig_pri_span *pri)
 {
 #if defined(HAVE_PRI_SERVICE_MESSAGES)
 tryanotherpos:
@@ -1343,7 +1343,7 @@
  *
  * \return Nothing
  */
-static void sig_pri_init_config(struct sig_pri_chan *pvt, struct sig_pri_pri *pri)
+static void sig_pri_init_config(struct sig_pri_chan *pvt, struct sig_pri_span *pri)
 {
 	pvt->stripmsd = pri->ch_cfg.stripmsd;
 	pvt->hidecallerid = pri->ch_cfg.hidecallerid;
@@ -1362,7 +1362,7 @@
 }
 #endif	/* defined(HAVE_PRI_CALL_WAITING) */
 
-static int pri_find_empty_chan(struct sig_pri_pri *pri, int backwards)
+static int pri_find_empty_chan(struct sig_pri_span *pri, int backwards)
 {
 	int x;
 	if (backwards)
@@ -1403,7 +1403,7 @@
  * \retval array-index into private pointer array on success.
  * \retval -1 on error.
  */
-static int pri_find_empty_nobch(struct sig_pri_pri *pri)
+static int pri_find_empty_nobch(struct sig_pri_span *pri)
 {
 	int idx;
 
@@ -1441,7 +1441,7 @@
  * \retval array-index into private pointer array on success.
  * \retval -1 on error.
  */
-static int pri_find_pri_call(struct sig_pri_pri *pri, q931_call *call)
+static int pri_find_pri_call(struct sig_pri_span *pri, q931_call *call)
 {
 	int idx;
 
@@ -1612,14 +1612,14 @@
 	return NULL;
 }
 
-void pri_event_alarm(struct sig_pri_pri *pri, int index, int before_start_pri)
+void pri_event_alarm(struct sig_pri_span *pri, int index, int before_start_pri)
 {
 	pri->dchanavail[index] &= ~(DCHAN_NOTINALARM | DCHAN_UP);
 	if (!before_start_pri)
 		pri_find_dchan(pri);
 }
 
-void pri_event_noalarm(struct sig_pri_pri *pri, int index, int before_start_pri)
+void pri_event_noalarm(struct sig_pri_span *pri, int index, int before_start_pri)
 {
 	pri->dchanavail[index] |= DCHAN_NOTINALARM;
 	if (!before_start_pri)
@@ -1661,7 +1661,7 @@
  *
  * \return Nothing
  */
-static void sig_pri_party_number_convert(struct ast_party_number *ast_number, const struct pri_party_number *pri_number, struct sig_pri_pri *pri)
+static void sig_pri_party_number_convert(struct ast_party_number *ast_number, const struct pri_party_number *pri_number, struct sig_pri_span *pri)
 {
 	char number[AST_MAX_EXTENSION];
 
@@ -1686,7 +1686,7 @@
  *
  * \return Nothing
  */
-static void sig_pri_party_id_convert(struct ast_party_id *ast_id, const struct pri_party_id *pri_id, struct sig_pri_pri *pri)
+static void sig_pri_party_id_convert(struct ast_party_id *ast_id, const struct pri_party_id *pri_id, struct sig_pri_span *pri)
 {
 	if (pri_id->name.valid) {
 		sig_pri_party_name_convert(&ast_id->name, &pri_id->name);
@@ -1719,7 +1719,7 @@
 static void sig_pri_redirecting_convert(struct ast_party_redirecting *ast_redirecting,
 	const struct pri_party_redirecting *pri_redirecting,
 	const struct ast_party_redirecting *ast_guide,
-	struct sig_pri_pri *pri)
+	struct sig_pri_span *pri)
 {
 	ast_party_redirecting_set_init(ast_redirecting, ast_guide);
 
@@ -1841,7 +1841,7 @@
  *
  * \return Nothing
  */
-static void sig_pri_mcid_event(struct sig_pri_pri *pri, const struct pri_subcmd_mcid_req *mcid, struct ast_channel *owner)
+static void sig_pri_mcid_event(struct sig_pri_span *pri, const struct pri_subcmd_mcid_req *mcid, struct ast_channel *owner)
 {
 	struct ast_channel *chans[1];
 	struct ast_str *msg;
@@ -1899,7 +1899,7 @@
  * \retval 0 on success.
  * \retval -1 on error.
  */
-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)
+static int sig_pri_attempt_transfer(struct sig_pri_span *pri, q931_call *call_1, int call_1_held, q931_call *call_2, int call_2_held)
 {
 	int retval;
 	int call_1_chanpos;
@@ -2022,7 +2022,7 @@
  * \retval agent on success.
  * \retval NULL not found.
  */
-static struct ast_cc_agent *sig_pri_find_cc_agent_by_cc_id(struct sig_pri_pri *pri, long cc_id)
+static struct ast_cc_agent *sig_pri_find_cc_agent_by_cc_id(struct sig_pri_span *pri, long cc_id)
 {
 	struct sig_pri_cc_agent_prv finder = {
 		.pri = pri,
@@ -2073,7 +2073,7 @@
  * \retval monitor_instance on success.
  * \retval NULL not found.
  */
-static struct sig_pri_cc_monitor_instance *sig_pri_find_cc_monitor_by_cc_id(struct sig_pri_pri *pri, long cc_id)
+static struct sig_pri_cc_monitor_instance *sig_pri_find_cc_monitor_by_cc_id(struct sig_pri_span *pri, long cc_id)
 {
 	struct sig_pri_cc_monitor_instance finder = {
 		.pri = pri,
@@ -2126,7 +2126,7 @@
  * \retval monitor_instance on success.
  * \retval NULL on error.
  */
-static struct sig_pri_cc_monitor_instance *sig_pri_cc_monitor_instance_init(int core_id, struct sig_pri_pri *pri, long cc_id, const char *device_name)
+static struct sig_pri_cc_monitor_instance *sig_pri_cc_monitor_instance_init(int core_id, struct sig_pri_span *pri, long cc_id, const char *device_name)
 {
 	struct sig_pri_cc_monitor_instance *monitor_instance;
 
@@ -2170,7 +2170,7 @@
  * \retval 0 on success.
  * \retval -1 on error.
  */
-static int sig_pri_cc_available(struct sig_pri_pri *pri, int chanpos, long cc_id, enum ast_cc_service_type service)
+static int sig_pri_cc_available(struct sig_pri_span *pri, int chanpos, long cc_id, enum ast_cc_service_type service)
 {
 	struct sig_pri_chan *pvt;
 	struct ast_cc_config_params *cc_params;
@@ -2243,7 +2243,7 @@
  *
  * \return Nothing
  */
-static void sig_pri_cc_generic_check(struct sig_pri_pri *pri, int chanpos, enum ast_cc_service_type service)
+static void sig_pri_cc_generic_check(struct sig_pri_span *pri, int chanpos, enum ast_cc_service_type service)
 {
 	struct ast_channel *owner;
 	struct ast_cc_config_params *cc_params;
@@ -2340,7 +2340,7 @@
  *
  * \return Nothing
  */
-static void sig_pri_cc_link_canceled(struct sig_pri_pri *pri, long cc_id, int is_agent)
+static void sig_pri_cc_link_canceled(struct sig_pri_span *pri, long cc_id, int is_agent)
 {
 	if (is_agent) {
 		struct ast_cc_agent *agent;
@@ -3332,7 +3332,7 @@
  *
  * \return Nothing
  */
-static void sig_pri_handle_cis_subcmds(struct sig_pri_pri *pri, int event_id,
+static void sig_pri_handle_cis_subcmds(struct sig_pri_span *pri, int event_id,
 	const struct pri_subcommands *subcmds, q931_call *call_rsp)
 {
 	int index;
@@ -3588,7 +3588,7 @@
  *
  * \return Nothing
  */
-static void sig_pri_handle_subcmds(struct sig_pri_pri *pri, int chanpos, int event_id,
+static void sig_pri_handle_subcmds(struct sig_pri_span *pri, int chanpos, int event_id,
 	int channel, const struct pri_subcommands *subcmds, q931_call *call_rsp)
 {
 	int index;
@@ -3923,7 +3923,7 @@
  * \retval 0 on success.
  * \retval -1 on error.
  */
-static int sig_pri_handle_hold(struct sig_pri_pri *pri, pri_event *ev)
+static int sig_pri_handle_hold(struct sig_pri_span *pri, pri_event *ev)
 {
 	int retval;
 	int chanpos_old;
@@ -4004,7 +4004,7 @@
  *
  * \return Nothing
  */
-static void sig_pri_handle_retrieve(struct sig_pri_pri *pri, pri_event *ev)
+static void sig_pri_handle_retrieve(struct sig_pri_span *pri, pri_event *ev)
 {
 	int chanpos;
 
@@ -4055,7 +4055,7 @@
 
 static void *pri_dchannel(void *vpri)
 {
-	struct sig_pri_pri *pri = vpri;
+	struct sig_pri_span *pri = vpri;
 	pri_event *e;
 	struct pollfd fds[SIG_PRI_NUM_DCHANS];
 	int res;
@@ -5622,7 +5622,7 @@
 	return NULL;
 }
 
-void sig_pri_init_pri(struct sig_pri_pri *pri)
+void sig_pri_init_pri(struct sig_pri_span *pri)
 {
 	int i;
 
@@ -6510,7 +6510,7 @@
  * \retval cw Call waiting interface to use.
  * \retval NULL if no call waiting interface available.
  */
-static struct sig_pri_chan *sig_pri_cw_available(struct sig_pri_pri *pri)
+static struct sig_pri_chan *sig_pri_cw_available(struct sig_pri_span *pri)
 {
 	struct sig_pri_chan *cw;
 	int idx;
@@ -6621,7 +6621,7 @@
  *
  * \return Nothing
  */
-static void sig_pri_send_mwi_indication(struct sig_pri_pri *pri, const char *mbox_number, const char *mbox_context, int num_messages)
+static void sig_pri_send_mwi_indication(struct sig_pri_span *pri, const char *mbox_number, const char *mbox_context, int num_messages)
 {
 	struct pri_party_id mailbox;
 
@@ -6653,7 +6653,7 @@
  */
 static void sig_pri_mwi_event_cb(const struct ast_event *event, void *userdata)
 {
-	struct sig_pri_pri *pri = userdata;
+	struct sig_pri_span *pri = userdata;
 	const char *mbox_context;
 	const char *mbox_number;
 	int num_messages;
@@ -6681,7 +6681,7 @@
  *
  * \return Nothing
  */
-static void sig_pri_mwi_cache_update(struct sig_pri_pri *pri)
+static void sig_pri_mwi_cache_update(struct sig_pri_span *pri)
 {
 	int idx;
 	int num_messages;
@@ -6717,7 +6717,7 @@
  *
  * \return Nothing
  */
-void sig_pri_stop_pri(struct sig_pri_pri *pri)
+void sig_pri_stop_pri(struct sig_pri_span *pri)
 {
 #if defined(HAVE_PRI_MWI)
 	int idx;
@@ -6777,12 +6777,12 @@
  *
  * \return Nothing
  */
-static void sig_pri_sort_pri_chans(struct sig_pri_pri *pri)
+static void sig_pri_sort_pri_chans(struct sig_pri_span *pri)
 {
 	qsort(&pri->pvts, pri->numchans, sizeof(pri->pvts[0]), sig_pri_cmp_pri_chans);
 }
 
-int sig_pri_start_pri(struct sig_pri_pri *pri)
+int sig_pri_start_pri(struct sig_pri_span *pri)
 {
 	int x;
 	int i;
@@ -6984,7 +6984,7 @@
 	}
 }
 
-struct sig_pri_chan *sig_pri_chan_new(void *pvt_data, struct sig_pri_callback *callback, struct sig_pri_pri *pri, int logicalspan, int channo, int trunkgroup)
+struct sig_pri_chan *sig_pri_chan_new(void *pvt_data, struct sig_pri_callback *callback, struct sig_pri_span *pri, int logicalspan, int channo, int trunkgroup)
 {
 	struct sig_pri_chan *p;
 
@@ -7036,7 +7036,7 @@
 	s[len - 1] = '\0';
 }
 
-void sig_pri_cli_show_spans(int fd, int span, struct sig_pri_pri *pri)
+void sig_pri_cli_show_spans(int fd, int span, struct sig_pri_span *pri)
 {
 	char status[256];
 	int x;
@@ -7048,7 +7048,7 @@
 	}
 }
 
-void sig_pri_cli_show_span(int fd, int *dchannels, struct sig_pri_pri *pri)
+void sig_pri_cli_show_span(int fd, int *dchannels, struct sig_pri_span *pri)
 {
 	int x;
 	char status[256];

Modified: team/tilghman/realtime_failover/channels/sig_pri.h
URL: http://svnview.digium.com/svn/asterisk/team/tilghman/realtime_failover/channels/sig_pri.h?view=diff&rev=278946&r1=278945&r2=278946
==============================================================================
--- team/tilghman/realtime_failover/channels/sig_pri.h (original)
+++ team/tilghman/realtime_failover/channels/sig_pri.h Fri Jul 23 11:07:42 2010
@@ -83,7 +83,7 @@
 	SIG_PRI_ALAW
 };
 
-struct sig_pri_pri;
+struct sig_pri_span;
 
 struct sig_pri_callback {
 	/* Unlock the private in the signalling private structure.  This is used for three way calling madness. */
@@ -107,7 +107,7 @@
 	void (* const fixup_chans)(void *old_chan, void *new_chan);
 
 	/* Note: Called with PRI lock held */
-	void (* const handle_dchan_exception)(struct sig_pri_pri *pri, int index);
+	void (* const handle_dchan_exception)(struct sig_pri_span *pri, int index);
 	void (* const set_alarm)(void *pvt, int in_alarm);
 	void (* const set_dialing)(void *pvt, int is_dialing);
 	void (* const set_digital)(void *pvt, int is_digital);
@@ -115,11 +115,11 @@
 	void (* const set_dnid)(void *pvt, const char *dnid);
 	void (* const set_rdnis)(void *pvt, const char *rdnis);
 	void (* const queue_control)(void *pvt, int subclass);
-	int (* const new_nobch_intf)(struct sig_pri_pri *pri);
-	void (* const init_config)(void *pvt, struct sig_pri_pri *pri);
+	int (* const new_nobch_intf)(struct sig_pri_span *pri);
+	void (* const init_config)(void *pvt, struct sig_pri_span *pri);
 	const char *(* const get_orig_dialstring)(void *pvt);
 	void (* const make_cc_dialstring)(void *pvt, char *buf, size_t buf_size);
-	void (* const update_span_devstate)(struct sig_pri_pri *pri);
+	void (* const update_span_devstate)(struct sig_pri_span *pri);
 
 	void (* const open_media)(void *pvt);
 
@@ -229,7 +229,7 @@
 
 	struct ast_channel *owner;
 
-	struct sig_pri_pri *pri;
+	struct sig_pri_span *pri;
 	q931_call *call;				/*!< opaque libpri call control structure */
 
 	int prioffset;					/*!< channel number in span */
@@ -283,7 +283,7 @@
 };
 #endif	/* defined(HAVE_PRI_MWI) */
 
-struct sig_pri_pri {
+struct sig_pri_span {
 	/* Should be set by user */
 	struct ast_cc_config_params *cc_params;			/*!< CC config parameters for each new call. */
 	int	pritimers[PRI_MAX_TIMERS];
@@ -459,31 +459,31 @@
 
 int sig_pri_available(struct sig_pri_chan **pvt, int is_specific_channel);
 
-void sig_pri_init_pri(struct sig_pri_pri *pri);
+void sig_pri_init_pri(struct sig_pri_span *pri);
 
 /* If return 0, it means this function was able to handle it (pre setup digits).  If non zero, the user of this
  * functions should handle it normally (generate inband DTMF) */
 int sig_pri_digit_begin(struct sig_pri_chan *pvt, struct ast_channel *ast, char digit);
 
-void sig_pri_stop_pri(struct sig_pri_pri *pri);
-int sig_pri_start_pri(struct sig_pri_pri *pri);
+void sig_pri_stop_pri(struct sig_pri_span *pri);
+int sig_pri_start_pri(struct sig_pri_span *pri);
 
 void sig_pri_chan_alarm_notify(struct sig_pri_chan *p, int noalarm);
 
-void pri_event_alarm(struct sig_pri_pri *pri, int index, int before_start_pri);
-
-void pri_event_noalarm(struct sig_pri_pri *pri, int index, int before_start_pri);
+void pri_event_alarm(struct sig_pri_span *pri, int index, int before_start_pri);
+
+void pri_event_noalarm(struct sig_pri_span *pri, int index, int before_start_pri);
 
 struct ast_channel *sig_pri_request(struct sig_pri_chan *p, enum sig_pri_law law, const struct ast_channel *requestor, int transfercapability);
 
-struct sig_pri_chan *sig_pri_chan_new(void *pvt_data, struct sig_pri_callback *callback, struct sig_pri_pri *pri, int logicalspan, int channo, int trunkgroup);
+struct sig_pri_chan *sig_pri_chan_new(void *pvt_data, struct sig_pri_callback *callback, struct sig_pri_span *pri, int logicalspan, int channo, int trunkgroup);
 void sig_pri_chan_delete(struct sig_pri_chan *doomed);
 
-int pri_is_up(struct sig_pri_pri *pri);
-
-void sig_pri_cli_show_spans(int fd, int span, struct sig_pri_pri *pri);
-
-void sig_pri_cli_show_span(int fd, int *dchannels, struct sig_pri_pri *pri);
+int pri_is_up(struct sig_pri_span *pri);
+
+void sig_pri_cli_show_spans(int fd, int span, struct sig_pri_span *pri);
+
+void sig_pri_cli_show_span(int fd, int *dchannels, struct sig_pri_span *pri);
 
 int pri_send_keypad_facility_exec(struct sig_pri_chan *p, const char *digits);
 int pri_send_callrerouting_facility_exec(struct sig_pri_chan *p, enum ast_channel_state chanstate, const char *destination, const char *original, const char *reason);




More information about the asterisk-commits mailing list