summaryrefslogtreecommitdiff
path: root/channels
diff options
context:
space:
mode:
authorMatthew Jordan <mjordan@digium.com>2012-02-09 17:09:10 +0000
committerMatthew Jordan <mjordan@digium.com>2012-02-09 17:09:10 +0000
commitdff9b61f5c9ecee59fa2f8c73e011a8292dd158f (patch)
tree6ab89b173117722829b88dc13a302d67b0466846 /channels
parentba08e9f4d681fa30caba6addaff51cbb3b59fc84 (diff)
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/ ........ Merged revisions 354547 from http://svn.asterisk.org/svn/asterisk/branches/1.8 ........ Merged revisions 354548 from http://svn.asterisk.org/svn/asterisk/branches/10 git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@354549 65c4cc65-6c06-0410-ace0-fbb531ad65f3
Diffstat (limited to 'channels')
-rw-r--r--channels/chan_sip.c17
1 files changed, 10 insertions, 7 deletions
diff --git a/channels/chan_sip.c b/channels/chan_sip.c
index df14b2273..a96d4eaf0 100644
--- a/channels/chan_sip.c
+++ b/channels/chan_sip.c
@@ -19444,17 +19444,19 @@ static void handle_request_info(struct sip_pvt *p, struct sip_request *req)
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);
@@ -19485,7 +19487,8 @@ static void handle_request_info(struct sip_pvt *p, struct sip_request *req)
} 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;
}
@@ -19506,7 +19509,7 @@ static void handle_request_info(struct sip_pvt *p, struct sip_request *req)
f.subclass.integer = '*';
} else if (event == 11) {
f.subclass.integer = '#';
- } else if (event < 16) {
+ } else {
f.subclass.integer = 'A' + (event - 12);
}
f.len = duration;