<html>
<body>
<div style="font-family: Verdana, Arial, Helvetica, Sans-Serif;">
<table bgcolor="#f9f3c9" width="100%" cellpadding="8" style="border: 1px #c9c399 solid;">
<tr>
<td>
This is an automatically generated e-mail. To reply, visit:
<a href="https://reviewboard.asterisk.org/r/3588/">https://reviewboard.asterisk.org/r/3588/</a>
</td>
</tr>
</table>
<br />
<p>Ship it!</p>
<pre style="white-space: pre-wrap; white-space: -moz-pre-wrap; white-space: -pre-wrap; white-space: -o-pre-wrap; word-wrap: break-word;">Ship It!</pre>
<br />
<p>- Mark Michelson</p>
<br />
<p>On June 6th, 2014, 9:08 p.m. UTC, Jonathan Rose wrote:</p>
<table bgcolor="#fefadf" width="100%" cellspacing="0" cellpadding="8" style="background-image: url('https://reviewboard.asterisk.org/static/rb/images/review_request_box_top_bg.ab6f3b1072c9.png'); background-position: left top; background-repeat: repeat-x; border: 1px black solid;">
<tr>
<td>
<div>Review request for Asterisk Developers, Matt Jordan and Mark Michelson.</div>
<div>By Jonathan Rose.</div>
<p style="color: grey;"><i>Updated June 6, 2014, 9:08 p.m.</i></p>
<div style="margin-top: 1.5em;">
<b style="color: #575012; font-size: 10pt;">Repository: </b>
Asterisk
</div>
<h1 style="color: #575012; font-size: 10pt; margin-top: 1.5em;">Description </h1>
<table width="100%" bgcolor="#ffffff" cellspacing="0" cellpadding="10" style="border: 1px solid #b8b5a0">
<tr>
<td>
<pre style="margin: 0; padding: 0; white-space: pre-wrap; white-space: -moz-pre-wrap; white-space: -pre-wrap; white-space: -o-pre-wrap; word-wrap: break-word;">While working on https://reviewboard.asterisk.org/r/3587/ I noticed a problem with the following Action:
Action: PJSIPNotify
Endpoint: pj123
Variable: var1=val1
Variable: var2=val2
Variable: var3=val3,var4=val4,var5=val5
When this was received, the order of the variables was reversed.
This alone wouldn't be a big deal, but it means that if multiple Content variables are specified, they also will be reversed and that is unlikely to be anticipated.
I checked this problem against SIPNotify as well, and it occurs there too, so I'm fixing it there first.
This patch keeps the existing functionality of astman_get_variables so that people who use that API don't have their own work-arounds mangled. I've turned the original function into a wrapper to a more fully featured function that allows the intended order to be specified. The original function will still return the list in its current (reversed) order.</pre>
</td>
</tr>
</table>
<h1 style="color: #575012; font-size: 10pt; margin-top: 1.5em;">Testing </h1>
<table width="100%" bgcolor="#ffffff" cellspacing="0" cellpadding="10" style="border: 1px solid #b8b5a0">
<tr>
<td>
<pre style="margin: 0; padding: 0; white-space: pre-wrap; white-space: -moz-pre-wrap; white-space: -pre-wrap; white-space: -o-pre-wrap; word-wrap: break-word;">Tested the following action:
Action: SIPNotify
Channel: 123
Variable: var1=val1
Variable: var2=val2
Variable: var3=val3,var4=val4,var5=val5
to confirm correct order of the additional headers. Also checked
Action: SIPNotify
Channel: 123
Variable: Content=item1
Variable: Content=item2
Variable: Content=item3,Content=item4,Content=item5
to verify that the order of items in the body was correct.</pre>
</td>
</tr>
</table>
<h1 style="color: #575012; font-size: 10pt; margin-top: 1.5em;">Diffs</b> </h1>
<ul style="margin-left: 3em; padding-left: 0;">
<li>/branches/1.8/main/manager.c <span style="color: grey">(415300)</span></li>
<li>/branches/1.8/main/config.c <span style="color: grey">(415300)</span></li>
<li>/branches/1.8/include/asterisk/manager.h <span style="color: grey">(415300)</span></li>
<li>/branches/1.8/include/asterisk/config.h <span style="color: grey">(415300)</span></li>
<li>/branches/1.8/channels/chan_sip.c <span style="color: grey">(415300)</span></li>
</ul>
<p><a href="https://reviewboard.asterisk.org/r/3588/diff/" style="margin-left: 3em;">View Diff</a></p>
</td>
</tr>
</table>
</div>
</body>
</html>