<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/3689/">https://reviewboard.asterisk.org/r/3689/</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 Matt Jordan.</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 performs the renaming discussed on the asterisk-dev list [1]. As usual, as I was going through it some other cleanups occurred, and in order to make sure I didn't make memory leaks worse, some parts of Corey's memory leak cleanups made their way in as well.

[1] http://lists.digium.com/pipermail/asterisk-dev/2014-June/068133.html

The great renaming:

 * ast_format_cap_add             => ast_format_cap_append
 * ast_format_cap_add_all_by_type => ast_format_cap_append_all_by_type
 * ast_parse_allow_disallow       => ast_format_cap_update_by_allow_disallow
 * ast_cap_remove_bytype          => ast_format_cap_remove_by_type
 * ast_getformatname_multiple     => ast_format_cap_get_names, and now uses an ast_str ** instead of a char *buf/size_t len
 * ast_format_sdp_generate        => ast_format_generate_sdp_fmtp
 * ast_format_sdp_parse           => ast_format_parse_sdp_fmtp

Functions removed:
 * ast_format_compatibility_get_original_id - no longer used

Note that chan_h323, chan_gtalk, and chan_jingle did not get all of the re-namings (particularly ast_getformatname_multiple => ast_format_cap_get_names), and will not compile with this patch. These modules should be removed, per the discussion on the -dev list.

Functions that support REF_DEBUG:
 * ast_format_cap_alloc
 * ast_format_cap_append
 * ast_format_cache_get

Memory leak cleanups (many of which came from Corey's patches):
 * Channel technology struct capabilities leak their format capabilities on off nominal exit paths (chan_motif, chan_pjsip, chan_unistim, chan_skinny)
 * Format capabilities leak in chan_pjsip_new nominal path
 * Leak of nativeformats format_cap in nominal path of channel.c's ast_channel_alloc
 * Leak of format_cap in channel.c's set_format
 * Leak of format_cap in channel.c's ast_request
 * Usage of ao2_replace in translate.c to avoid overwriting a ref
 * Clean up of frame format cache in RTP instance in res_rtp_asterisk destructor

Unit tests
 * Remove test for ast_getformatname_multiple, add test for ast_format_cap_get_names




</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;">Negotiation using PJSIP still works.

The most prevalent memory leak that still occurs happens when a statically allocated frame ref bumps a format. This happens a lot when generating translator tables, and in various other places as well.</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>/team/group/media_formats-reviewed-trunk/tests/test_voicemail_api.c <span style="color: grey">(417740)</span></li>

 <li>/team/group/media_formats-reviewed-trunk/tests/test_format_cap.c <span style="color: grey">(417740)</span></li>

 <li>/team/group/media_formats-reviewed-trunk/tests/test_format_api.c <span style="color: grey">(417740)</span></li>

 <li>/team/group/media_formats-reviewed-trunk/tests/test_core_format.c <span style="color: grey">(417740)</span></li>

 <li>/team/group/media_formats-reviewed-trunk/tests/test_config.c <span style="color: grey">(417740)</span></li>

 <li>/team/group/media_formats-reviewed-trunk/res/res_stasis_snoop.c <span style="color: grey">(417740)</span></li>

 <li>/team/group/media_formats-reviewed-trunk/res/res_stasis.c <span style="color: grey">(417740)</span></li>

 <li>/team/group/media_formats-reviewed-trunk/res/res_rtp_asterisk.c <span style="color: grey">(417740)</span></li>

 <li>/team/group/media_formats-reviewed-trunk/res/res_pjsip_sdp_rtp.c <span style="color: grey">(417740)</span></li>

 <li>/team/group/media_formats-reviewed-trunk/res/res_pjsip/pjsip_configuration.c <span style="color: grey">(417740)</span></li>

 <li>/team/group/media_formats-reviewed-trunk/res/res_clioriginate.c <span style="color: grey">(417740)</span></li>

 <li>/team/group/media_formats-reviewed-trunk/res/res_calendar.c <span style="color: grey">(417740)</span></li>

 <li>/team/group/media_formats-reviewed-trunk/res/res_agi.c <span style="color: grey">(417740)</span></li>

 <li>/team/group/media_formats-reviewed-trunk/res/parking/parking_applications.c <span style="color: grey">(417740)</span></li>

 <li>/team/group/media_formats-reviewed-trunk/res/ari/resource_channels.c <span style="color: grey">(417740)</span></li>

 <li>/team/group/media_formats-reviewed-trunk/res/ari/resource_bridges.c <span style="color: grey">(417740)</span></li>

 <li>/team/group/media_formats-reviewed-trunk/pbx/pbx_spool.c <span style="color: grey">(417740)</span></li>

 <li>/team/group/media_formats-reviewed-trunk/main/translate.c <span style="color: grey">(417740)</span></li>

 <li>/team/group/media_formats-reviewed-trunk/main/sorcery.c <span style="color: grey">(417740)</span></li>

 <li>/team/group/media_formats-reviewed-trunk/main/rtp_engine.c <span style="color: grey">(417740)</span></li>

 <li>/team/group/media_formats-reviewed-trunk/main/media_index.c <span style="color: grey">(417740)</span></li>

 <li>/team/group/media_formats-reviewed-trunk/main/manager.c <span style="color: grey">(417740)</span></li>

 <li>/team/group/media_formats-reviewed-trunk/main/frame.c <span style="color: grey">(417740)</span></li>

 <li>/team/group/media_formats-reviewed-trunk/main/format_compatibility.c <span style="color: grey">(417740)</span></li>

 <li>/team/group/media_formats-reviewed-trunk/main/format_cap.c <span style="color: grey">(417740)</span></li>

 <li>/team/group/media_formats-reviewed-trunk/main/format_cache.c <span style="color: grey">(417740)</span></li>

 <li>/team/group/media_formats-reviewed-trunk/main/format.c <span style="color: grey">(417740)</span></li>

 <li>/team/group/media_formats-reviewed-trunk/main/file.c <span style="color: grey">(417740)</span></li>

 <li>/team/group/media_formats-reviewed-trunk/main/dial.c <span style="color: grey">(417740)</span></li>

 <li>/team/group/media_formats-reviewed-trunk/main/core_local.c <span style="color: grey">(417740)</span></li>

 <li>/team/group/media_formats-reviewed-trunk/main/config_options.c <span style="color: grey">(417740)</span></li>

 <li>/team/group/media_formats-reviewed-trunk/main/cli.c <span style="color: grey">(417740)</span></li>

 <li>/team/group/media_formats-reviewed-trunk/main/channel.c <span style="color: grey">(417740)</span></li>

 <li>/team/group/media_formats-reviewed-trunk/main/ccss.c <span style="color: grey">(417740)</span></li>

 <li>/team/group/media_formats-reviewed-trunk/main/bridge_basic.c <span style="color: grey">(417740)</span></li>

 <li>/team/group/media_formats-reviewed-trunk/main/bridge.c <span style="color: grey">(417740)</span></li>

 <li>/team/group/media_formats-reviewed-trunk/main/astobj2_container.c <span style="color: grey">(417740)</span></li>

 <li>/team/group/media_formats-reviewed-trunk/include/asterisk/slin.h <span style="color: grey">(417740)</span></li>

 <li>/team/group/media_formats-reviewed-trunk/include/asterisk/rtp_engine.h <span style="color: grey">(417740)</span></li>

 <li>/team/group/media_formats-reviewed-trunk/include/asterisk/frame.h <span style="color: grey">(417740)</span></li>

 <li>/team/group/media_formats-reviewed-trunk/include/asterisk/format_compatibility.h <span style="color: grey">(417740)</span></li>

 <li>/team/group/media_formats-reviewed-trunk/include/asterisk/format_cap.h <span style="color: grey">(417740)</span></li>

 <li>/team/group/media_formats-reviewed-trunk/include/asterisk/format_cache.h <span style="color: grey">(417740)</span></li>

 <li>/team/group/media_formats-reviewed-trunk/include/asterisk/format.h <span style="color: grey">(417740)</span></li>

 <li>/team/group/media_formats-reviewed-trunk/funcs/func_channel.c <span style="color: grey">(417740)</span></li>

 <li>/team/group/media_formats-reviewed-trunk/codecs/ex_ulaw.h <span style="color: grey">(417740)</span></li>

 <li>/team/group/media_formats-reviewed-trunk/codecs/ex_gsm.h <span style="color: grey">(417740)</span></li>

 <li>/team/group/media_formats-reviewed-trunk/codecs/ex_alaw.h <span style="color: grey">(417740)</span></li>

 <li>/team/group/media_formats-reviewed-trunk/codecs/ex_adpcm.h <span style="color: grey">(417740)</span></li>

 <li>/team/group/media_formats-reviewed-trunk/channels/pjsip/dialplan_functions.c <span style="color: grey">(417740)</span></li>

 <li>/team/group/media_formats-reviewed-trunk/channels/dahdi/bridge_native_dahdi.c <span style="color: grey">(417740)</span></li>

 <li>/team/group/media_formats-reviewed-trunk/channels/chan_unistim.c <span style="color: grey">(417740)</span></li>

 <li>/team/group/media_formats-reviewed-trunk/channels/chan_skinny.c <span style="color: grey">(417740)</span></li>

 <li>/team/group/media_formats-reviewed-trunk/channels/chan_sip.c <span style="color: grey">(417740)</span></li>

 <li>/team/group/media_formats-reviewed-trunk/channels/chan_pjsip.c <span style="color: grey">(417740)</span></li>

 <li>/team/group/media_formats-reviewed-trunk/channels/chan_phone.c <span style="color: grey">(417740)</span></li>

 <li>/team/group/media_formats-reviewed-trunk/channels/chan_oss.c <span style="color: grey">(417740)</span></li>

 <li>/team/group/media_formats-reviewed-trunk/channels/chan_nbs.c <span style="color: grey">(417740)</span></li>

 <li>/team/group/media_formats-reviewed-trunk/channels/chan_multicast_rtp.c <span style="color: grey">(417740)</span></li>

 <li>/team/group/media_formats-reviewed-trunk/channels/chan_motif.c <span style="color: grey">(417740)</span></li>

 <li>/team/group/media_formats-reviewed-trunk/channels/chan_misdn.c <span style="color: grey">(417740)</span></li>

 <li>/team/group/media_formats-reviewed-trunk/channels/chan_mgcp.c <span style="color: grey">(417740)</span></li>

 <li>/team/group/media_formats-reviewed-trunk/channels/chan_jingle.c <span style="color: grey">(417740)</span></li>

 <li>/team/group/media_formats-reviewed-trunk/channels/chan_iax2.c <span style="color: grey">(417740)</span></li>

 <li>/team/group/media_formats-reviewed-trunk/channels/chan_h323.c <span style="color: grey">(417740)</span></li>

 <li>/team/group/media_formats-reviewed-trunk/channels/chan_gtalk.c <span style="color: grey">(417740)</span></li>

 <li>/team/group/media_formats-reviewed-trunk/channels/chan_dahdi.c <span style="color: grey">(417740)</span></li>

 <li>/team/group/media_formats-reviewed-trunk/channels/chan_console.c <span style="color: grey">(417740)</span></li>

 <li>/team/group/media_formats-reviewed-trunk/channels/chan_bridge_media.c <span style="color: grey">(417740)</span></li>

 <li>/team/group/media_formats-reviewed-trunk/channels/chan_alsa.c <span style="color: grey">(417740)</span></li>

 <li>/team/group/media_formats-reviewed-trunk/bridges/bridge_softmix.c <span style="color: grey">(417740)</span></li>

 <li>/team/group/media_formats-reviewed-trunk/bridges/bridge_simple.c <span style="color: grey">(417740)</span></li>

 <li>/team/group/media_formats-reviewed-trunk/bridges/bridge_native_rtp.c <span style="color: grey">(417740)</span></li>

 <li>/team/group/media_formats-reviewed-trunk/bridges/bridge_holding.c <span style="color: grey">(417740)</span></li>

 <li>/team/group/media_formats-reviewed-trunk/apps/confbridge/conf_chan_record.c <span style="color: grey">(417740)</span></li>

 <li>/team/group/media_formats-reviewed-trunk/apps/app_voicemail.c <span style="color: grey">(417740)</span></li>

 <li>/team/group/media_formats-reviewed-trunk/apps/app_originate.c <span style="color: grey">(417740)</span></li>

 <li>/team/group/media_formats-reviewed-trunk/apps/app_meetme.c <span style="color: grey">(417740)</span></li>

 <li>/team/group/media_formats-reviewed-trunk/apps/app_dumpchan.c <span style="color: grey">(417740)</span></li>

 <li>/team/group/media_formats-reviewed-trunk/apps/app_confbridge.c <span style="color: grey">(417740)</span></li>

 <li>/team/group/media_formats-reviewed-trunk/addons/chan_ooh323.c <span style="color: grey">(417740)</span></li>

 <li>/team/group/media_formats-reviewed-trunk/addons/chan_mobile.c <span style="color: grey">(417740)</span></li>

</ul>

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







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




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