Fix a crash due to the INVITE session being destroyed before the session.
authorJoshua Colp <jcolp@digium.com>
Thu, 23 May 2013 20:25:48 +0000 (20:25 +0000)
committerJoshua Colp <jcolp@digium.com>
Thu, 23 May 2013 20:25:48 +0000 (20:25 +0000)
commit814fa7fe114cdab78d8e8a163ea5658b97d97caf
tree523f84ce5e4cfaea5924769fa08f9f1d8f595ea6
parent557125664da831cd332b6bab9d3da219fd484c63
Fix a crash due to the INVITE session being destroyed before the session.

This change ensures that the INVITE session remains valid for the lifetime
of the session object itself by increasing the session count on the dialog that
the INVITE session is allocated from. Once this reaches zero (normally as a result
of decrementing it within the session destructor) the dialog, and INVITE session,
are destroyed.

git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@389609 65c4cc65-6c06-0410-ace0-fbb531ad65f3
res/res_sip_session.c