summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMark Michelson <mmichelson@digium.com>2012-05-14 20:15:33 +0000
committerMark Michelson <mmichelson@digium.com>2012-05-14 20:15:33 +0000
commit767c26b92697289bf0f217808bdfb821841cbc1c (patch)
treef1a87bcaa4aed3c427aeb5ee1b14443248336236
parentb5a6de76fc71e3f604761885dd844975a11893ee (diff)
Fix two more coverity constant expression result findings.
These correspond to findings 0 and 1 in the core findings of ASTERISK-19649. After contacting Mark Spencer, he was unsure of what the intent behind these lines of code were, so they are being axed. For Asterisk 1.8 and 10, the output of debugging DUNDi frames will not be changed, but for trunk the "Retry" portion will be omitted since it does not properly distinguish retransmissions from initial frames. (closes issue ASTERISK-19649) Reported by Matthew Jordan ........ Merged revisions 366409 from http://svn.asterisk.org/svn/asterisk/branches/1.8 ........ Merged revisions 366412 from http://svn.asterisk.org/svn/asterisk/branches/10 git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@366413 65c4cc65-6c06-0410-ace0-fbb531ad65f3
-rw-r--r--pbx/dundi-parser.c13
1 files changed, 2 insertions, 11 deletions
diff --git a/pbx/dundi-parser.c b/pbx/dundi-parser.c
index 418a28c58..6a0838a81 100644
--- a/pbx/dundi-parser.c
+++ b/pbx/dundi-parser.c
@@ -454,15 +454,6 @@ void dundi_showframe(struct dundi_hdr *fhi, int rx, struct sockaddr_in *sin, int
char subclass2[20];
char *subclass;
char tmp[256];
- char retries[20];
- if (ntohs(fhi->dtrans) & DUNDI_FLAG_RETRANS)
- strcpy(retries, "Yes");
- else
- strcpy(retries, "No");
- if ((ntohs(fhi->strans) & DUNDI_FLAG_RESERVED)) {
- /* Ignore frames with high bit set to 1 */
- return;
- }
if ((fhi->cmdresp & 0x3f) > (int)sizeof(commands)/(int)sizeof(char *)) {
snprintf(class2, (int)sizeof(class2), "(%d?)", fhi->cmdresp);
class = class2;
@@ -472,9 +463,9 @@ void dundi_showframe(struct dundi_hdr *fhi, int rx, struct sockaddr_in *sin, int
snprintf(subclass2, (int)sizeof(subclass2), "%02x", fhi->cmdflags);
subclass = subclass2;
snprintf(tmp, (int)sizeof(tmp),
- "%s-Frame Retry[%s] -- OSeqno: %3.3d ISeqno: %3.3d Type: %s (%s)\n",
+ "%s-Frame -- OSeqno: %3.3d ISeqno: %3.3d Type: %s (%s)\n",
pref[rx],
- retries, fhi->oseqno, fhi->iseqno, class, fhi->cmdresp & 0x40 ? "Response" : "Command");
+ fhi->oseqno, fhi->iseqno, class, fhi->cmdresp & 0x40 ? "Response" : "Command");
outputf(tmp);
snprintf(tmp, (int)sizeof(tmp),
"%s Flags: %s STrans: %5.5d DTrans: %5.5d [%s:%d]%s\n", (rx > 1) ? " " : "",