<p>Joshua Colp <strong>merged</strong> this change.</p><p><a href="https://gerrit.asterisk.org/9944">View Change</a></p><div style="white-space:pre-wrap">Approvals:
George Joseph: Looks good to me, but someone else must approve
Benjamin Keith Ford: Looks good to me, but someone else must approve
Joshua Colp: Looks good to me, approved; Approved for Submit
</div><pre style="font-family: monospace,monospace; white-space: pre-wrap;">pbx_dundi: Fix debug frame decode string.<br><br>* Fixed a typo in the name of the REGREQ frame decode string array.<br>* Fixed off by one range check indexing into the frame decode string<br>array.<br>* Removed some unneeded casts associated with the decode string array.<br><br>Change-Id: I77435e81cd284bab6209d545919bf236ad7933c2<br>---<br>M pbx/dundi-parser.c<br>1 file changed, 6 insertions(+), 6 deletions(-)<br><br></pre><pre style="font-family: monospace,monospace; white-space: pre-wrap;"><span>diff --git a/pbx/dundi-parser.c b/pbx/dundi-parser.c</span><br><span>index daa7d71..15793e2 100644</span><br><span>--- a/pbx/dundi-parser.c</span><br><span>+++ b/pbx/dundi-parser.c</span><br><span>@@ -448,7 +448,7 @@</span><br><span> "INVALID ",</span><br><span> "UNKNOWN CMD ",</span><br><span> "NULL ",</span><br><span style="color: hsl(0, 100%, 40%);">- "REQREQ ",</span><br><span style="color: hsl(120, 100%, 40%);">+ "REGREQ ",</span><br><span> "REGRESPONSE ",</span><br><span> "CANCEL ",</span><br><span> "ENCRYPT ",</span><br><span>@@ -458,15 +458,15 @@</span><br><span> char subclass2[20];</span><br><span> char *subclass;</span><br><span> char tmp[256];</span><br><span style="color: hsl(0, 100%, 40%);">- if ((fhi->cmdresp & 0x3f) > (int)sizeof(commands)/(int)sizeof(char *)) {</span><br><span style="color: hsl(0, 100%, 40%);">- snprintf(class2, (int)sizeof(class2), "(%d?)", fhi->cmdresp);</span><br><span style="color: hsl(120, 100%, 40%);">+ if ((fhi->cmdresp & 0x3f) >= ARRAY_LEN(commands)) {</span><br><span style="color: hsl(120, 100%, 40%);">+ snprintf(class2, sizeof(class2), "(%d?)", fhi->cmdresp & 0x3f);</span><br><span> class = class2;</span><br><span> } else {</span><br><span style="color: hsl(0, 100%, 40%);">- class = commands[(int)(fhi->cmdresp & 0x3f)];</span><br><span style="color: hsl(120, 100%, 40%);">+ class = commands[fhi->cmdresp & 0x3f];</span><br><span> }</span><br><span style="color: hsl(0, 100%, 40%);">- snprintf(subclass2, (int)sizeof(subclass2), "%02hhx", (unsigned char)fhi->cmdflags);</span><br><span style="color: hsl(120, 100%, 40%);">+ snprintf(subclass2, sizeof(subclass2), "%02hhx", (unsigned char)fhi->cmdflags);</span><br><span> subclass = subclass2;</span><br><span style="color: hsl(0, 100%, 40%);">- snprintf(tmp, (int)sizeof(tmp),</span><br><span style="color: hsl(120, 100%, 40%);">+ snprintf(tmp, sizeof(tmp),</span><br><span> "%s-Frame -- OSeqno: %3.3d ISeqno: %3.3d Type: %s (%s)\n",</span><br><span> pref[rx],</span><br><span> fhi->oseqno, fhi->iseqno, class, fhi->cmdresp & 0x40 ? "Response" : "Command");</span><br><span></span><br></pre><p>To view, visit <a href="https://gerrit.asterisk.org/9944">change 9944</a>. To unsubscribe, or for help writing mail filters, visit <a href="https://gerrit.asterisk.org/settings">settings</a>.</p><div itemscope itemtype="http://schema.org/EmailMessage"><div itemscope itemprop="action" itemtype="http://schema.org/ViewAction"><link itemprop="url" href="https://gerrit.asterisk.org/9944"/><meta itemprop="name" content="View Change"/></div></div>
<div style="display:none"> Gerrit-Project: asterisk </div>
<div style="display:none"> Gerrit-Branch: 13 </div>
<div style="display:none"> Gerrit-MessageType: merged </div>
<div style="display:none"> Gerrit-Change-Id: I77435e81cd284bab6209d545919bf236ad7933c2 </div>
<div style="display:none"> Gerrit-Change-Number: 9944 </div>
<div style="display:none"> Gerrit-PatchSet: 1 </div>
<div style="display:none"> Gerrit-Owner: Richard Mudgett <rmudgett@digium.com> </div>
<div style="display:none"> Gerrit-Reviewer: Benjamin Keith Ford <bford@digium.com> </div>
<div style="display:none"> Gerrit-Reviewer: George Joseph <gjoseph@digium.com> </div>
<div style="display:none"> Gerrit-Reviewer: Jenkins2 </div>
<div style="display:none"> Gerrit-Reviewer: Joshua Colp <jcolp@digium.com> </div>