<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/2693/">https://reviewboard.asterisk.org/r/2693/</a>
     </td>
    </tr>
   </table>
   <br />










<blockquote style="margin-left: 1em; border-left: 2px solid #d0d0d0; padding-left: 10px;">
 <p style="margin-top: 0;">On August 5th, 2013, 11:10 a.m. CDT, <b>Matt Jordan</b> wrote:</p>
 <blockquote style="margin-left: 1em; border-left: 2px solid #d0d0d0; padding-left: 10px;">
  



<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/2693/diff/2/?file=43044#file43044line138" style="color: black; font-weight: bold; text-decoration: underline;">/trunk/res/stasis_recording/stored.c</a>
    <span style="font-weight: normal;">

     (Diff revision 2)

    </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">138</font></th>
    <td bgcolor="#c5ffc4" width="50%"><pre style="font-size: 8pt; line-height: 140%; margin: 0; "><span class="tb">        </span><span class="k">struct</span> <span class="n">dirent</span> <span class="n">entry</span> <span class="o">=</span> <span class="p">{};</span></pre></td>
  </tr>

 </tbody>

</table>

  <pre style="white-space: pre-wrap; white-space: -moz-pre-wrap; white-space: -pre-wrap; white-space: -o-pre-wrap; word-wrap: break-word;">I&#39;m assuming that the intent of providing an initializer list here is to set the members of entry to 0.

It&#39;s a little vague to me whether or not having an empty initializer list counts as having at least one initializer, and thus whether or not each struct member past the first initializer will be set to 0 or not becomes very murky.

If this were &quot; entry = { 0, };&quot; it&#39;d be much clearer what the intent was.</pre>
 </blockquote>





</blockquote>
<pre style="margin-left: 1em; white-space: pre-wrap; white-space: -moz-pre-wrap; white-space: -pre-wrap; white-space: -o-pre-wrap; word-wrap: break-word;">It&#39;s standard behavior that elements not listed in the initializer list
get initialized with zero&#39;s, so it stands to reason that if nothing&#39;s in
the initializer list, then everything is zero initialized.

As it turns out[1], though, an empty initializer list isn&#39;t standard C.
There&#39;s actually no really reason to initializer the struct here
anyways, so I just removed it to avoid controversy.</pre>
<br />




<p>- David</p>


<br />
<p>On July 29th, 2013, 5:21 p.m. CDT, David Lee 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 David Lee.</div>


<p style="color: grey;"><i>Updated July 29, 2013, 5:21 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-21582">ASTERISK-21582</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;">This patch implements the ARI API&#39;s for stored recordings. While the
original task only specified deleting a recording, it was simple
enough to implement the GET for all recordings, and for an individual
recording.

The recording playback operation was modified to use the same code for
accessing the recording as the REST API, so that they will behave
consistently.

There were several problems with the api-docs that were also fixed,
bringing the ARI spec in line with the implementation. There were some
&#39;wishful thinking&#39; fields on the stored recording model (duration and
timestamp) that were removed, because I ended up not implementing a
metadata file to go along with the recording to store such information.

The GET /recordings/live operation was removed, since it&#39;s not really
that useful to get a list of all recordings that are currently going
on in the system. (At least, if we did that, we&#39;d probably want to
also list all of the current playbacks. Which seems weird.)</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;">Used Swagger-UI to poke around the API. Verified that you couldn&#39;t
delete anything outside the recording&#39;s directory.</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>/trunk/include/asterisk/stasis_app_recording.h <span style="color: grey">(395718)</span></li>

 <li>/trunk/res/Makefile <span style="color: grey">(395718)</span></li>

 <li>/trunk/res/ari/ari_model_validators.h <span style="color: grey">(395718)</span></li>

 <li>/trunk/res/ari/ari_model_validators.c <span style="color: grey">(395718)</span></li>

 <li>/trunk/res/ari/resource_recordings.h <span style="color: grey">(395718)</span></li>

 <li>/trunk/res/ari/resource_recordings.c <span style="color: grey">(395718)</span></li>

 <li>/trunk/res/res_ari_recordings.c <span style="color: grey">(395718)</span></li>

 <li>/trunk/res/res_stasis_playback.c <span style="color: grey">(395718)</span></li>

 <li>/trunk/res/res_stasis_recording.c <span style="color: grey">(395718)</span></li>

 <li>/trunk/res/stasis_recording/stored.c <span style="color: grey">(PRE-CREATION)</span></li>

 <li>/trunk/rest-api/api-docs/recordings.json <span style="color: grey">(395718)</span></li>

</ul>

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







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








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