res_pjsip_session.c: Restructure ast_sip_session_alloc()
authorRichard Mudgett <rmudgett@digium.com>
Fri, 21 Apr 2017 17:07:39 +0000 (12:07 -0500)
committerRichard Mudgett <rmudgett@digium.com>
Fri, 21 Apr 2017 19:14:08 +0000 (14:14 -0500)
commit835c20944512db77f5366c4d9e3002b0dfdbd805
tree376f6844ee1504ab910e22b910dd15121ae6eb96
parentd373ebc428f23cb37dcbcafac37295f4be1e1a9e
res_pjsip_session.c: Restructure ast_sip_session_alloc()

* Restructure ast_sip_session_alloc() to need less cleanup on off nominal
error paths.

* Made ast_sip_session_alloc() and ast_sip_session_create_outgoing() avoid
unnecessary ref manipulation to return a session.  This is faster than
calling a function.  That function may do logging of the ref changes with
REF_DEBUG enabled.

Change-Id: I2a0affc4be51013d3f0485782c96b8fee3ddb00a
res/res_pjsip_session.c