• Guillaume Roguez's avatar
    sip: factorize dialog and invite session creation · a3a5311f
    Guillaume Roguez authored
    SIP dialog and invite session creation code is duplicated
    in SIPAccount and RingAccount call creation code.
    This patch factorizes this code by moving identical parts
    into SIPAccountBase base class.
    The new common method is now CreateClientDialogAndInvite().
    
    By the way notice that previous duplicated code was locked
    the dialog. This extra lock it uneeded and wrong:
    - wrong because pjsip_dlg_inc_lock() was used, but it should
    be used only temporarily [1]
    - uneeded as the dialog session counter is increased by the invite
    session itself
    The correct way is to call pjsip_dlg_inc_session if we need long
    lock, that not our case here as we manage the invite session.
    
    [1] http://www.pjsip.org/pjsip/docs/html/group__PJSIP__DIALOG.htm#ga5d87304615303ffbe20a09e0a3ff59df)
    
    Change-Id: I8c2042b4c0278315cf76ea38affa8b90cab5cc7f
    Tuleap: #64
    a3a5311f
ringaccount.cpp 121 KB