[asterisk-commits] mjordan: branch 1.8 r354547 - /branches/1.8/channels/chan_sip.c

SVN commits to the Asterisk project asterisk-commits at lists.digium.com
Thu Feb 9 11:07:40 CST 2012


Author: mjordan
Date: Thu Feb  9 11:07:35 2012
New Revision: 354547

URL: http://svnview.digium.com/svn/asterisk?view=rev&rev=354547
Log:
Clean-up of minor formatting issues in r354542/3/4

rmudgett pointed out some formatting issues in the check-in for
ASTERISK-19290.  This cleans those up.

Review: https://reviewboards.asterisk.org/r/1722/

Modified:
    branches/1.8/channels/chan_sip.c

Modified: branches/1.8/channels/chan_sip.c
URL: http://svnview.digium.com/svn/asterisk/branches/1.8/channels/chan_sip.c?view=diff&rev=354547&r1=354546&r2=354547
==============================================================================
--- branches/1.8/channels/chan_sip.c (original)
+++ branches/1.8/channels/chan_sip.c Thu Feb  9 11:07:35 2012
@@ -18724,17 +18724,19 @@
 			return;
 		}
 
-		/* If dtmf-relay or vnd.nortelnetworks.digits, parse the signal and duration; otherwise use the body as the signal */
+		/* If dtmf-relay or vnd.nortelnetworks.digits, parse the signal and duration;
+		 * otherwise use the body as the signal */
 		if (strcasecmp(c, "application/dtmf")) {
 			const char *msg_body;
 
-			if (ast_strlen_zero(msg_body = get_body(req, "Signal", '=')) && ast_strlen_zero(msg_body = get_body(req, "d", '='))) {
-				ast_log(LOG_WARNING, "Unable to retrieve DTMF signal for INFO message on call %s\n", p->callid);
+			if (   ast_strlen_zero(msg_body = get_body(req, "Signal", '='))
+				&& ast_strlen_zero(msg_body = get_body(req, "d", '='))) {
+				ast_log(LOG_WARNING, "Unable to retrieve DTMF signal for INFO message on "
+						"call %s\n", p->callid);
 				transmit_response(p, "200 OK", req);
 				return;
-			} else {
-				ast_copy_string(buf, msg_body, sizeof(buf));
-			}
+			}
+			ast_copy_string(buf, msg_body, sizeof(buf));
 
 			if (!ast_strlen_zero((msg_body = get_body(req, "Duration", '=')))) {
 				sscanf(msg_body, "%30u", &duration);
@@ -18765,7 +18767,8 @@
 		} else if ('a' <= buf[0] && buf[0] <= 'd') {
 			event = 12 + buf[0] - 'a';
 		} else if ((sscanf(buf, "%30u", &event) != 1) || event > 16) {
-			ast_log(AST_LOG_WARNING, "Unable to convert DTMF event signal code to a valid value for INFO message on call %s\n", p->callid);
+			ast_log(AST_LOG_WARNING, "Unable to convert DTMF event signal code to a valid "
+					"value for INFO message on call %s\n", p->callid);
 			transmit_response(p, "200 OK", req);
 			return;
 		}
@@ -18786,7 +18789,7 @@
 				f.subclass.integer = '*';
 			} else if (event == 11) {
 				f.subclass.integer = '#';
-			} else if (event < 16) {
+			} else {
 				f.subclass.integer = 'A' + (event - 12);
 			}
 			f.len = duration;




More information about the asterisk-commits mailing list