[libpri-commits] rmudgett: branch 1.4 r2335 - /branches/1.4/q931.c

SVN commits to the libpri project libpri-commits at lists.digium.com
Tue Feb 9 15:46:32 CST 2016


Author: rmudgett
Date: Tue Feb  9 15:46:26 2016
New Revision: 2335

URL: http://svnview.digium.com/svn/libpri?view=rev&rev=2335
Log:
q931.c: Update ALERTING_NO_PROGRESS conditional code.

The conditional is to only remove the Progress Indicator ie from being
added to select messages.

* Made so the ALERTING message can have the User-User ie if needed when
ALERTING_NO_PROGRESS is defined.

Modified:
    branches/1.4/q931.c

Modified: branches/1.4/q931.c
URL: http://svnview.digium.com/svn/libpri/branches/1.4/q931.c?view=diff&rev=2335&r1=2334&r2=2335
==============================================================================
--- branches/1.4/q931.c (original)
+++ branches/1.4/q931.c Tue Feb  9 15:46:26 2016
@@ -5637,11 +5637,12 @@
 	return q931_notify_redirection(ctrl, c, info, NULL, NULL);
 }
 
-#ifdef ALERTING_NO_PROGRESS
-static int call_progress_ies[] = { -1 };
-#else
-static int call_progress_ies[] = { Q931_PROGRESS_INDICATOR, -1 };
+static int call_progress_ies[] = {
+#ifndef ALERTING_NO_PROGRESS
+	Q931_PROGRESS_INDICATOR,
 #endif
+	-1
+};
 
 int q931_call_progress(struct pri *ctrl, q931_call *c, int channel, int info)
 {
@@ -5669,11 +5670,13 @@
 	return send_message(ctrl, c, Q931_PROGRESS, call_progress_ies);
 }
 
-#ifdef ALERTING_NO_PROGRESS
-static int call_progress_with_cause_ies[] = { Q931_CAUSE, -1 };
-#else
-static int call_progress_with_cause_ies[] = { Q931_CAUSE, Q931_PROGRESS_INDICATOR, -1 };
+static int call_progress_with_cause_ies[] = {
+	Q931_CAUSE,
+#ifndef ALERTING_NO_PROGRESS
+	Q931_PROGRESS_INDICATOR,
 #endif
+	-1
+};
 
 int q931_call_progress_with_cause(struct pri *ctrl, q931_call *c, int channel, int info, int cause)
 {
@@ -5705,11 +5708,13 @@
 	return send_message(ctrl, c, Q931_PROGRESS, call_progress_with_cause_ies);
 }
 
-#ifdef ALERTING_NO_PROGRESS
-static int call_proceeding_ies[] = { Q931_CHANNEL_IDENT, -1 };
-#else
-static int call_proceeding_ies[] = { Q931_CHANNEL_IDENT, Q931_PROGRESS_INDICATOR, -1 };
+static int call_proceeding_ies[] = {
+	Q931_CHANNEL_IDENT,
+#ifndef ALERTING_NO_PROGRESS
+	Q931_PROGRESS_INDICATOR,
 #endif
+	-1
+};
 
 int q931_call_proceeding(struct pri *ctrl, q931_call *c, int channel, int info)
 {
@@ -5740,11 +5745,15 @@
 	c->alive = 1;
 	return send_message(ctrl, c, Q931_CALL_PROCEEDING, call_proceeding_ies);
 }
+
+static int alerting_ies[] = {
+	Q931_IE_FACILITY,
 #ifndef ALERTING_NO_PROGRESS
-static int alerting_ies[] = { Q931_IE_FACILITY, Q931_PROGRESS_INDICATOR, Q931_IE_USER_USER, -1 };
-#else
-static int alerting_ies[] = { Q931_IE_FACILITY, -1 };
+	Q931_PROGRESS_INDICATOR,
 #endif
+	Q931_IE_USER_USER,
+	-1
+};
 
 int q931_alerting(struct pri *ctrl, q931_call *c, int channel, int info)
 {




More information about the libpri-commits mailing list