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




<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.</div>
<div>By Corey Farrell.</div>


<p style="color: grey;"><i>Updated April 8, 2015, 2:21 p.m.</i></p>



<h1 style="color: #575012; font-size: 10pt; margin-top: 1.5em;">Changes</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;">Improve comment about section outside the include guard.

Moved "#undef AST_API_MODULE" to happen even when OPTIONAL_API is disabled.  In main/utils.c AST_API_MODULE is defined before multiple headers, I've seen compilers complain about #define on an already defined macro.</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/ASTERISK-17608">ASTERISK-17608</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;">OPTIONAL_API has conditionals to define AST_OPTIONAL_API and AST_OPTIONAL_API_ATTR differently based on if AST_API_MODULE is defined.  Unfortunately this is inside the "#ifndef __ASTERISK_OPTIONAL_API_H" include protection block, so only the first status of AST_API_MODULE is respected.  For example res_monitor is a provider, but uses beep.h (func_periodic_hook).  This makes func_periodic_hook non-optional to res_monitor.

The patch applies cleanly to 13 and fixes the issue, but I'm not sure this should be fixed in 13.  Although there is no ABI change, it is a change in behaviour for sources that #include optional_api.h.  If this is wanted for 13 please let me know, otherwise I will follow up with a patch for 13 to make res_monitor require func_periodic_hook.</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;">Verified I could load res_monitor with or without func_periodic_hook.  Ran a couple testsuite tests.</pre>
  </td>
 </tr>
</table>


<h1 style="color: #575012; font-size: 10pt; margin-top: 1.5em;">Diffs</b> (updated)</h1>
<ul style="margin-left: 3em; padding-left: 0;">

 <li>/trunk/include/asterisk/optional_api.h <span style="color: grey">(434423)</span></li>

</ul>

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







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




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