Skip to content
Snippets Groups Projects
Commit a3a5311f authored by Guillaume Roguez's avatar Guillaume Roguez Committed by gerrit2
Browse files

sip: factorize dialog and invite session creation

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
parent 3ae6811c
No related branches found
No related tags found
No related merge requests found
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment