<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/2845/">https://reviewboard.asterisk.org/r/2845/</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/2845/diff/1/?file=45807#file45807line478" style="color: black; font-weight: bold; text-decoration: underline;">/branches/12/include/asterisk/bridge.h</a>
    <span style="font-weight: normal;">

     (Diff revision 1)

    </span>
   </th>
  </tr>
 </thead>



 
 

 <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">478</font></th>
    <td bgcolor="#c5ffc4" width="50%"><pre style="font-size: 8pt; line-height: 140%; margin: 0; "><span class="tb">        </span><span class="n">AST_BRIDGE_IMPART_DEPARTABLE</span> <span class="o">=</span> <span class="p">(</span><span class="mi">0</span> <span class="o">&lt;&lt;</span> <span class="mi">0</span><span class="p">),</span></pre></td>
  </tr>

  <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">479</font></th>
    <td bgcolor="#c5ffc4" width="50%"><pre style="font-size: 8pt; line-height: 140%; margin: 0; "><span class="tb">        </span><span class="cm">/*! The caller is passing channel control entirely to the bridging system. */</span></pre></td>
  </tr>

  <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">480</font></th>
    <td bgcolor="#c5ffc4" width="50%"><pre style="font-size: 8pt; line-height: 140%; margin: 0; "><span class="tb">        </span><span class="n">AST_BRIDGE_IMPART_INDEPENDENT</span> <span class="o">=</span> <span class="p">(</span><span class="mi">1</span> <span class="o">&lt;&lt;</span> <span class="mi">0</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;">Defining AST_BRIDGE_IMPART_DEPARTABLE as 0 is potentially error-prone. As it is, the flag cannot be tested directly, since ast_test_flag(flags, AST_BRIDGE_IMPART_DEPARTABLE) will always return false.

See my comment later in ast_bridge_impart().</pre>
</div>
<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/2845/diff/1/?file=45810#file45810line1594" style="color: black; font-weight: bold; text-decoration: underline;">/branches/12/main/bridge.c</a>
    <span style="font-weight: normal;">

     (Diff revision 1)

    </span>
   </th>
  </tr>
 </thead>

 <tbody style="background-color: #e4d9cb; padding: 4px 8px; text-align: center;">
  <tr>

   <td colspan="2"><pre style="font-size: 8pt; line-height: 140%; margin: 0; ">int ast_bridge_impart(struct ast_bridge *bridge, struct ast_channel *chan, struct ast_channel *swap, struct ast_bridge_features *features, int independent)</pre></td>
   <td colspan="2"><pre style="font-size: 8pt; line-height: 140%; margin: 0; ">int ast_bridge_impart(struct ast_bridge *bridge,</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">1594</font></th>
    <td bgcolor="#c5ffc4" width="50%"><pre style="font-size: 8pt; line-height: 140%; margin: 0; "><span class="tb">        </span><span class="n">bridge_channel</span><span class="o">-&gt;</span><span class="n">depart_wait</span> <span class="o">=</span> <span class="o">!</span><span class="p">(</span><span class="n">flags</span> <span class="o">&amp;</span> <span class="n">AST_BRIDGE_IMPART_INDEPENDENT</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;">This is where the definition of AST_BRIDGE_IMPART_DEPARTABLE causes awkward code to be written. This would be much more plain as

bridge_channel-&gt;depart_wait = (flags &amp; AST_BRIDGE_IMPART_DEPARTABLE);

but such a statement is not possible at the moment.

The other option would be to create a mask for the DEPARTABLE/INDEPENDENT values and have

bridge_channel-&gt;depart_wait = (flags &amp; AST_BRIDGE_IMPART_MASK) == AST_BRIDGE_IMPART_DEPARTABLE;</pre>
</div>
<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/2845/diff/1/?file=45813#file45813line4427" style="color: black; font-weight: bold; text-decoration: underline;">/branches/12/main/channel.c</a>
    <span style="font-weight: normal;">

     (Diff revision 1)

    </span>
   </th>
  </tr>
 </thead>



 
 

 <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">4427</font></th>
    <td bgcolor="#c5ffc4" width="50%"><pre style="font-size: 8pt; line-height: 140%; margin: 0; "><span class="tb">        </span><span class="tb">        </span>ast_verb(3, &quot;%s: Dropping redundant connected line update \&quot;%s\&quot; &lt;%s&gt;.\n&quot;,</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;">I think this should be a debug rather than a verbose message.</pre>
</div>
<br />



<p>- Mark</p>


<br />
<p>On September 11th, 2013, 9:31 p.m. UTC, rmudgett 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.png'); background-position: left top; background-repeat: repeat-x; border: 1px black solid;">
 <tr>
  <td>

<div>Review request for Asterisk Developers.</div>
<div>By rmudgett.</div>


<p style="color: grey;"><i>Updated Sept. 11, 2013, 9:31 p.m.</i></p>







<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/ASTERISK-22072">ASTERISK-22072</a>


</div>



<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;">The Dial, Queue, and FollowMe applications need to inhibit the bridging initial connected line exchange in order to support the &#39;I&#39; option.

* Replaced the pass_reference flag on ast_bridge_join() with a flags parameter to pass other flags defined by enum ast_bridge_join_flags.

* Replaced the independent flag on ast_bridge_impart() with a flags parameter to pass other flags defined by enum ast_bridge_impart_flags.

* Since the Dial, Queue, and FollowMe applications are now the only callers of ast_bridge_call() and ast_bridge_call_with_flags(), changed the calling contract to require the initial COLP exchange to already have been done by the caller.

An independent, but associated change is:
* Reduce stack usage in ast_indicate_data() and add a dropping redundant connected line verbose message.</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 Dial, Queue, and FollowMe with and without the &#39;I&#39; option.  The connected line information was as expected.

In the process of testing the Queue I option, I came across a couple of assertions which I filed as ASTERISK-22506 and ASTERISK-22507.</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/12/apps/app_agent_pool.c <span style="color: grey">(398875)</span></li>

 <li>/branches/12/apps/confbridge/conf_chan_announce.c <span style="color: grey">(398875)</span></li>

 <li>/branches/12/channels/chan_sip.c <span style="color: grey">(398875)</span></li>

 <li>/branches/12/include/asterisk/bridge.h <span style="color: grey">(398875)</span></li>

 <li>/branches/12/include/asterisk/bridge_channel.h <span style="color: grey">(398875)</span></li>

 <li>/branches/12/include/asterisk/features.h <span style="color: grey">(398875)</span></li>

 <li>/branches/12/main/bridge.c <span style="color: grey">(398875)</span></li>

 <li>/branches/12/main/bridge_basic.c <span style="color: grey">(398875)</span></li>

 <li>/branches/12/main/bridge_channel.c <span style="color: grey">(398875)</span></li>

 <li>/branches/12/main/channel.c <span style="color: grey">(398875)</span></li>

 <li>/branches/12/main/core_local.c <span style="color: grey">(398875)</span></li>

 <li>/branches/12/main/core_unreal.c <span style="color: grey">(398875)</span></li>

 <li>/branches/12/main/features.c <span style="color: grey">(398875)</span></li>

 <li>/branches/12/res/parking/parking_applications.c <span style="color: grey">(398875)</span></li>

 <li>/branches/12/res/parking/parking_bridge_features.c <span style="color: grey">(398875)</span></li>

 <li>/branches/12/res/parking/parking_tests.c <span style="color: grey">(398875)</span></li>

 <li>/branches/12/res/res_pjsip_refer.c <span style="color: grey">(398875)</span></li>

 <li>/branches/12/res/stasis/control.c <span style="color: grey">(398875)</span></li>

 <li>/branches/12/tests/test_cdr.c <span style="color: grey">(398875)</span></li>

 <li>/branches/12/tests/test_cel.c <span style="color: grey">(398875)</span></li>

</ul>

<p><a href="https://reviewboard.asterisk.org/r/2845/diff/" style="margin-left: 3em;">View Diff</a></p>







  </td>
 </tr>
</table>








  </div>
 </body>
</html>