[asterisk-commits] kpfleming: trunk r155066 - /trunk/channels/chan_dahdi.c

SVN commits to the Asterisk project asterisk-commits at lists.digium.com
Thu Nov 6 14:51:26 CST 2008


Author: kpfleming
Date: Thu Nov  6 14:51:26 2008
New Revision: 155066

URL: http://svn.digium.com/view/asterisk?view=rev&rev=155066
Log:
put ifdef protection around the rest of the libpri function calls that were added at the same time as progress_with_cause

move parsing of the qsig channel mapping configuration option outside ifdef HAVE_PRI_INBANDDISCONNECT and into a properly ifdef'd block


Modified:
    trunk/channels/chan_dahdi.c

Modified: trunk/channels/chan_dahdi.c
URL: http://svn.digium.com/view/asterisk/trunk/channels/chan_dahdi.c?view=diff&rev=155066&r1=155065&r2=155066
==============================================================================
--- trunk/channels/chan_dahdi.c (original)
+++ trunk/channels/chan_dahdi.c Thu Nov  6 14:51:26 2008
@@ -2988,6 +2988,8 @@
 	return 0;
 }
 
+#ifdef HAVE_PRI_PROG_W_CAUSE
+
 static char *dahdi_send_callrerouting_facility_app = "DAHDISendCallreroutingFacility";
 
 static int dahdi_send_callrerouting_facility_exec(struct ast_channel *chan, void *data)
@@ -3062,6 +3064,8 @@
 
 	return res;
 }
+
+#endif
 
 static int pri_is_up(struct dahdi_pri *pri)
 {
@@ -11684,7 +11688,7 @@
 		if (pri->switchtype == PRI_SWITCH_GR303_TMC)
 			pri->overlapdial |= DAHDI_OVERLAPDIAL_BOTH;
 		pri_set_overlapdial(pri->dchans[i],(pri->overlapdial & DAHDI_OVERLAPDIAL_OUTGOING)?1:0);
-#ifdef PRI_SET_CHAN_MAPPING_LOGICAL
+#ifdef HAVE_PRI_PROG_W_CAUSE
 		pri_set_chan_mapping_logical(pri->dchans[i], pri->qsigchannelmapping == DAHDI_CHAN_MAPPING_LOGICAL);
 #endif
 #ifdef HAVE_PRI_INBANDDISCONNECT
@@ -13534,7 +13538,9 @@
 	}
 	ast_cli_unregister_multiple(dahdi_pri_cli, ARRAY_LEN(dahdi_pri_cli));
 	ast_unregister_application(dahdi_send_keypad_facility_app);
+#ifdef HAVE_PRI_PROG_W_CAUSE
 	ast_unregister_application(dahdi_send_callrerouting_facility_app);
+#endif
 #endif
 #if defined(HAVE_SS7)
 	for (i = 0; i < NUM_SPANS; i++) {
@@ -14324,7 +14330,7 @@
 				} else {
 					confp->pri.overlapdial = DAHDI_OVERLAPDIAL_NONE;
 				}
-#ifdef HAVE_PRI_INBANDDISCONNECT
+#ifdef HAVE_PRI_PROG_W_CAUSE
 			} else if (!strcasecmp(v->name, "qsigchannelmapping")) {
 				if (!strcasecmp(v->value, "logical")) {
 					confp->pri.qsigchannelmapping = DAHDI_CHAN_MAPPING_LOGICAL;
@@ -14333,8 +14339,10 @@
 				} else {
 					confp->pri.qsigchannelmapping = DAHDI_CHAN_MAPPING_PHYSICAL;
 				}
+#endif
 			} else if (!strcasecmp(v->name, "discardremoteholdretrieval")) {
 				confp->pri.discardremoteholdretrieval = ast_true(v->value);
+#ifdef HAVE_PRI_INBANDDISCONNECT
 			} else if (!strcasecmp(v->name, "inbanddisconnect")) {
 				confp->pri.inbanddisconnect = ast_true(v->value);
 #endif
@@ -14834,7 +14842,9 @@
 	pri_set_error(dahdi_pri_error);
 	pri_set_message(dahdi_pri_message);
 	ast_register_application_xml(dahdi_send_keypad_facility_app, dahdi_send_keypad_facility_exec);
+#ifdef HAVE_PRI_PROG_W_CAUSE
 	ast_register_application_xml(dahdi_send_callrerouting_facility_app, dahdi_send_callrerouting_facility_exec);
+#endif
 #endif
 #ifdef HAVE_SS7
 	memset(linksets, 0, sizeof(linksets));




More information about the asterisk-commits mailing list