Update some comments and resolve potential memory corruption in chan_sip.
authorRussell Bryant <russell@russellbryant.com>
Wed, 8 Apr 2009 12:35:57 +0000 (12:35 +0000)
committerRussell Bryant <russell@russellbryant.com>
Wed, 8 Apr 2009 12:35:57 +0000 (12:35 +0000)
commit0fab071d13a0abe98981403fc8da078a2595b6bb
tree196c9daa0f5f9c1a1d1fd20f6f249d2f276610f8
parentb289374dfe7a7d9a2fdf655f3c070c548e7b1e94
Update some comments and resolve potential memory corruption in chan_sip.

While browsing chan_sip the other day, I noticed this dangerous code in
dialog_needdestroy().  This function is an ao2_callback.  It is absolutely
_not_ okay to unlock the container from within this function.  It's also not
clear why it was useful.  Given that it could cause memory corruption, I have
removed it.

There was also a TODO comment left describing a potential implementation of
an improvement to the needdestroy handling.  I'm not convinced that what was
described is the best choice here, so I have briefly described the way that
this function is used today that could be improved.

git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@186928 65c4cc65-6c06-0410-ace0-fbb531ad65f3
channels/chan_sip.c