<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/1305/">https://reviewboard.asterisk.org/r/1305/</a>
</td>
</tr>
</table>
<br />
<div>
<table width="100%" border="0" bgcolor="white" style="border: 1px solid #C0C0C0; border-collapse: collapse; margin: 2px padding: 2px;">
<thead>
<tr>
<th colspan="4" bgcolor="#F0F0F0" style="border-bottom: 1px solid #C0C0C0; font-size: 9pt; padding: 4px 8px; text-align: left;">
<a href="https://reviewboard.asterisk.org/r/1305/diff/2/?file=17408#file17408line4419" style="color: black; font-weight: bold; text-decoration: underline;">trunk/apps/app_meetme.c</a>
<span style="font-weight: normal;">
(Diff revision 2)
</span>
</th>
</tr>
</thead>
<tbody style="background-color: #e4d9cb; padding: 4px 8px; text-align: center;">
<tr>
<td colspan="4"><pre style="font-size: 8pt; line-height: 140%; margin: 0; ">static int conf_exec(struct ast_channel *chan, const char *data)</pre></td>
</tr>
</tbody>
<tbody>
<tr>
<th bgcolor="#e9eaa8" style="border-right: 1px solid #C0C0C0;" align="right"><font size="2">4419</font></th>
<td bgcolor="#fdfebc" width="50%"><pre style="font-size: 8pt; line-height: 140%; margin: 0; ">                                <span class="k">if</span> <span class="p"><span class="hl">(</span>((</span><span class="o">!</span><span class="n">ast_strlen_zero</span><span class="p">(</span><span class="n">cnf</span><span class="o">-></span><span class="n">pin</span><span class="p">)</span> <span class="hl"> </span><span class="o"><span class="hl">&&</span></span></pre></td>
<th bgcolor="#e9eaa8" style="border-left: 1px solid #C0C0C0; border-right: 1px solid #C0C0C0;" align="right"><font size="2">4419</font></th>
<td bgcolor="#fdfebc" width="50%"><pre style="font-size: 8pt; line-height: 140%; margin: 0; ">                                <span class="k">if</span> <span class="p">((</span><span class="o">!</span><span class="n">ast_strlen_zero</span><span class="p">(</span><span class="n">cnf</span><span class="o">-></span><span class="n">pin</span><span class="p">)</span> <span class="o"><span class="hl">||</span></span></pre></td>
</tr>
<tr>
<th bgcolor="#e9eaa8" style="border-right: 1px solid #C0C0C0;" align="right"><font size="2">4420</font></th>
<td bgcolor="#fdfebc" width="50%"><pre style="font-size: 8pt; line-height: 140%; margin: 0; ">                                        <span class="o">!</span><span class="n">ast_test_flag64</span><span class="p">(</span><span class="o">&</span><span class="n">confflags</span><span class="p">,</span> <span class="n">CONFFLAG_ADMIN</span><span class="p">))</span> <span class="o">||</span></pre></td>
<th bgcolor="#e9eaa8" style="border-left: 1px solid #C0C0C0; border-right: 1px solid #C0C0C0;" align="right"><font size="2">4420</font></th>
<td bgcolor="#fdfebc" width="50%"><pre style="font-size: 8pt; line-height: 140%; margin: 0; ">                                        <span class="p">(</span><span class="o">!</span><span class="n">ast_strlen_zero</span><span class="p">(</span><span class="n">cnf</span><span class="o">-></span><span class="n">pinadmin</span><span class="p">)</span> <span class="o">&&</span></pre></td>
</tr>
</tbody>
<tbody>
<tr>
<th bgcolor="#ebb1ba" style="border-right: 1px solid #C0C0C0;" align="right"><font size="2">4421</font></th>
<td bgcolor="#ffc5ce" width="50%"><pre style="font-size: 8pt; line-height: 140%; margin: 0; ">                                 <span class="p">(</span><span class="o">!</span><span class="n">ast_strlen_zero</span><span class="p">(</span><span class="n">cnf</span><span class="o">-></span><span class="n">pinadmin</span><span class="p">)</span> <span class="o">&&</span></pre></td>
<th bgcolor="#ebb1ba" style="border-left: 1px solid #C0C0C0; border-right: 1px solid #C0C0C0;" align="right"><font size="2"></font></th>
<td bgcolor="#ffc5ce" width="50%"><pre style="font-size: 8pt; line-height: 140%; margin: 0; "></pre></td>
</tr>
<tr>
<th bgcolor="#ebb1ba" style="border-right: 1px solid #C0C0C0;" align="right"><font size="2">4422</font></th>
<td bgcolor="#ffc5ce" width="50%"><pre style="font-size: 8pt; line-height: 140%; margin: 0; ">                                                 <span class="n">ast_test_flag64</span><span class="p">(</span><span class="o">&</span><span class="n">confflags</span><span class="p">,</span> <span class="n">CONFFLAG_ADMIN</span><span class="p">))</span> <span class="o">||</span></pre></td>
<th bgcolor="#ebb1ba" style="border-left: 1px solid #C0C0C0; border-right: 1px solid #C0C0C0;" align="right"><font size="2"></font></th>
<td bgcolor="#ffc5ce" width="50%"><pre style="font-size: 8pt; line-height: 140%; margin: 0; "></pre></td>
</tr>
<tr>
<th bgcolor="#ebb1ba" style="border-right: 1px solid #C0C0C0;" align="right"><font size="2">4423</font></th>
<td bgcolor="#ffc5ce" width="50%"><pre style="font-size: 8pt; line-height: 140%; margin: 0; ">                                         <span class="p">(</span><span class="o">!</span><span class="n">ast_strlen_zero</span><span class="p">(</span><span class="n">cnf</span><span class="o">-></span><span class="n">pin</span><span class="p">)</span> <span class="o">&&</span></pre></td>
<th bgcolor="#ebb1ba" style="border-left: 1px solid #C0C0C0; border-right: 1px solid #C0C0C0;" align="right"><font size="2"></font></th>
<td bgcolor="#ffc5ce" width="50%"><pre style="font-size: 8pt; line-height: 140%; margin: 0; "></pre></td>
</tr>
<tr>
<th bgcolor="#ebb1ba" style="border-right: 1px solid #C0C0C0;" align="right"><font size="2">4424</font></th>
<td bgcolor="#ffc5ce" width="50%"><pre style="font-size: 8pt; line-height: 140%; margin: 0; ">                                                         <span class="n">ast_strlen_zero</span><span class="p">(</span><span class="n">cnf</span><span class="o">-></span><span class="n">pinadmin</span><span class="p">)</span> <span class="o">&&</span></pre></td>
<th bgcolor="#ebb1ba" style="border-left: 1px solid #C0C0C0; border-right: 1px solid #C0C0C0;" align="right"><font size="2"></font></th>
<td bgcolor="#ffc5ce" width="50%"><pre style="font-size: 8pt; line-height: 140%; margin: 0; "></pre></td>
</tr>
</tbody>
<tbody>
<tr>
<th bgcolor="#f0f0f0" style="border-right: 1px solid #C0C0C0;" align="right"><font size="2">4425</font></th>
<td bgcolor="#ffffff" width="50%"><pre style="font-size: 8pt; line-height: 140%; margin: 0; ">                                                         <span class="n">ast_test_flag64</span><span class="p">(</span><span class="o">&</span><span class="n">confflags</span><span class="p">,</span> <span class="n">CONFFLAG_ADMIN</span><span class="p">)))</span> <span class="o">&&</span></pre></td>
<th bgcolor="#f0f0f0" style="border-left: 1px solid #C0C0C0; border-right: 1px solid #C0C0C0;" align="right"><font size="2">4421</font></th>
<td bgcolor="#ffffff" width="50%"><pre style="font-size: 8pt; line-height: 140%; margin: 0; ">                                                <span class="n">ast_test_flag64</span><span class="p">(</span><span class="o">&</span><span class="n">confflags</span><span class="p">,</span> <span class="n">CONFFLAG_ADMIN</span><span class="p">)))</span> <span class="o">&&</span></pre></td>
</tr>
</tbody>
<tbody>
<tr>
<th bgcolor="#e9eaa8" style="border-right: 1px solid #C0C0C0;" align="right"><font size="2">4426</font></th>
<td bgcolor="#fdfebc" width="50%"><pre style="font-size: 8pt; line-height: 140%; margin: 0; ">                                 <span class="p"><span class="hl">((</span></span><span class="o"><span class="hl">!</span></span><span class="p">(</span><span class="n">cnf</span><span class="o">-></span><span class="n">users</span> <span class="o"><span class="hl">==</span></span><span class="hl"> </span><span class="mi"><span class="hl">0</span></span><span class="hl"> </span><span class="o"><span class="hl">&&</span></span><span class="hl"> </span><span class="n">cnf</span><span class="o">-></span><span class="n">isdynamic</span><span class="p"><span class="hl">))</span></span> <span class="o">||</span></pre></td>
<th bgcolor="#e9eaa8" style="border-left: 1px solid #C0C0C0; border-right: 1px solid #C0C0C0;" align="right"><font size="2">4422</font></th>
<td bgcolor="#fdfebc" width="50%"><pre style="font-size: 8pt; line-height: 140%; margin: 0; ">                                 <span class="p">(</span><span class="n">cnf</span><span class="o">-></span><span class="n">users</span> <span class="o"><span class="hl">||</span></span><span class="hl"> </span><span class="o"><span class="hl">!</span></span><span class="n">cnf</span><span class="o">-></span><span class="n">isdynamic</span> <span class="o">||</span></pre></td>
</tr>
<tr>
<th bgcolor="#e9eaa8" style="border-right: 1px solid #C0C0C0;" align="right"><font size="2">4427</font></th>
<td bgcolor="#fdfebc" width="50%"><pre style="font-size: 8pt; line-height: 140%; margin: 0; ">                                                <span class="n">ast_test_flag64</span><span class="p">(</span><span class="o">&</span><span class="n">confflags</span><span class="p">,</span> <span class="n">CONFFLAG_ALWAYSPROMPT</span><span class="p">)<span class="hl">))</span></span><span class="hl"> </span><span class="p"><span class="hl">{</span></span></pre></td>
<th bgcolor="#e9eaa8" style="border-left: 1px solid #C0C0C0; border-right: 1px solid #C0C0C0;" align="right"><font size="2">4423</font></th>
<td bgcolor="#fdfebc" width="50%"><pre style="font-size: 8pt; line-height: 140%; margin: 0; ">                                        <span class="p"><span class="hl">(</span></span><span class="n">ast_test_flag64</span><span class="p">(</span><span class="o">&</span><span class="n">confflags</span><span class="p">,</span> <span class="n">CONFFLAG_ALWAYSPROMPT</span><span class="p">)</span><span class="hl"> </span><span class="o"><span class="hl">&&</span></span></pre></td>
</tr>
</tbody>
<tbody>
<tr>
<th bgcolor="#b1ebb0" style="border-right: 1px solid #C0C0C0;" align="right"><font size="2"></font></th>
<td bgcolor="#c5ffc4" width="50%"><pre style="font-size: 8pt; line-height: 140%; margin: 0; "></pre></td>
<th bgcolor="#b1ebb0" style="border-left: 1px solid #C0C0C0; border-right: 1px solid #C0C0C0;" align="right"><font size="2">4424</font></th>
<td bgcolor="#c5ffc4" width="50%"><pre style="font-size: 8pt; line-height: 140%; margin: 0; ">                                                <span class="n">args</span><span class="p">.</span><span class="n">pin</span> <span class="o">&&</span> <span class="n">strlen</span><span class="p">(</span><span class="n">args</span><span class="p">.</span><span class="n">pin</span><span class="p">))))</span> <span class="p">{</span></pre></td>
</tr>
</tbody>
<tbody>
<tr>
<th bgcolor="#f0f0f0" style="border-right: 1px solid #C0C0C0;" align="right"><font size="2">4428</font></th>
<td bgcolor="#ffffff" width="50%"><pre style="font-size: 8pt; line-height: 140%; margin: 0; ">                                        <span class="kt">char</span> <span class="n">pin</span><span class="p">[</span><span class="n">MAX_PIN</span><span class="p">]</span> <span class="o">=</span> <span class="s">""</span><span class="p">;</span></pre></td>
<th bgcolor="#f0f0f0" style="border-left: 1px solid #C0C0C0; border-right: 1px solid #C0C0C0;" align="right"><font size="2">4425</font></th>
<td bgcolor="#ffffff" width="50%"><pre style="font-size: 8pt; line-height: 140%; margin: 0; ">                                        <span class="kt">char</span> <span class="n">pin</span><span class="p">[</span><span class="n">MAX_PIN</span><span class="p">]</span> <span class="o">=</span> <span class="s">""</span><span class="p">;</span></pre></td>
</tr>
</tbody>
</table>
<pre style="margin-left: 2em; white-space: pre-wrap; white-space: -moz-pre-wrap; white-space: -pre-wrap; white-space: -o-pre-wrap; word-wrap: break-word;">!ast_strlen_zero(cnf->pin) || (!ast_strlen_zero(cnf->pinadmin) && ast_test_flag64(&confflags, CONFFLAG_ADMIN))
This logic looks like it could result in prompting for an admin's pin even if we already have an admin pin just because the cnf->pin is empty. Is that the expected result?
To be honest this if statement is so complex I'm having difficulty following all the different paths it can take. Can we get some sort of comment above this statement describing the different conditions?</pre>
</div>
<br />
<p>- David</p>
<br />
<p>On July 7th, 2011, 9 a.m., opticron wrote:</p>
<table bgcolor="#fefadf" width="100%" cellspacing="0" cellpadding="8" style="background-image: url('https://reviewboard.asterisk.org/media/rb/images/review_request_box_top_bg.png'); background-position: left top; background-repeat: repeat-x; border: 1px black solid;">
<tr>
<td>
<div>Review request for Asterisk Developers.</div>
<div>By opticron.</div>
<p style="color: grey;"><i>Updated July 7, 2011, 9 a.m.</i></p>
<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;">If a call to MeetMe includes both the dynamic(D) and always request PIN(P) options, MeetMe will ask for the PIN two times: once for creating the conference and once for entering the conference. This behavior was introduced in rev 311616 when adding the CONFFLAG_ALWAYSPROMPT option to the logic branch controlling PIN entry for joining a conference.</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 with one and two SIP conference users with and without specified conference numbers.</pre>
</td>
</tr>
</table>
<div style="margin-top: 1.5em;">
<b style="color: #575012; font-size: 10pt; margin-top: 1.5em;">Bugs: </b>
<a href="https://issues.asterisk.org/jira/browse/AST-601">AST-601</a>
</div>
<h1 style="color: #575012; font-size: 10pt; margin-top: 1.5em;">Diffs</b> </h1>
<ul style="margin-left: 3em; padding-left: 0;">
<li>trunk/apps/app_meetme.c <span style="color: grey">(325090)</span></li>
</ul>
<p><a href="https://reviewboard.asterisk.org/r/1305/diff/" style="margin-left: 3em;">View Diff</a></p>
</td>
</tr>
</table>
</div>
</body>
</html>