Skip to content
GitLab
Menu
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in / Register
Toggle navigation
Menu
Open sidebar
savoirfairelinux
jami-daemon
Commits
4b6b752c
Commit
4b6b752c
authored
Feb 04, 2009
by
Emmanuel Milou
Browse files
Disable PJsip shutdown when changing STUN parameters
parent
97c84363
Changes
2
Hide whitespace changes
Inline
Side-by-side
src/managerimpl.cpp
View file @
4b6b752c
...
...
@@ -2247,20 +2247,24 @@ AccountMap ManagerImpl::getSipAccountMap( void )
void
ManagerImpl
::
restartPJSIP
(
void
)
{
SIPVoIPLink
*
siplink
;
//SIPVoIPLink *siplink;
//unloadAccountMap ();
/* First unregister all SIP accounts */
this
->
unregisterCurSIPAccounts
();
//
this->unregisterCurSIPAccounts();
/* Terminate and initialize the PJSIP library */
siplink
=
dynamic_cast
<
SIPVoIPLink
*>
(
getSIPAccountLink
());
if
(
siplink
)
{
siplink
->
terminate
();
_debug
(
"*************************************************Terminate done
\n
"
);
//
siplink = dynamic_cast<SIPVoIPLink*> (getSIPAccountLink ());
//
if (siplink)
//
{
//
siplink->terminate ();
//
_debug ("*************************************************Terminate done\n");
//siplink = SIPVoIPLink::instance("");
siplink
->
init
();
}
_debug
(
"***************************************************Init Done
\n
"
);
//siplink->init ();
//}
//_debug("***************************************************Init Done\n");
//loadAccountMap();
//initRegisterAccounts ();
/* Then register all enabled SIP accounts */
//this->registerCurSIPAccounts(siplink);
}
...
...
@@ -2326,7 +2330,7 @@ void ManagerImpl::registerCurSIPAccounts(VoIPLink *link)
current
=
iter
->
second
;
if
(
current
)
{
if
(
current
->
isEnabled
()
&&
current
->
getType
()
==
"sip"
)
{
current
->
setVoIPLink
(
link
);
//
current->setVoIPLink(link);
current
->
registerVoIPLink
();
}
}
...
...
src/sipvoiplink.cpp
View file @
4b6b752c
...
...
@@ -233,7 +233,6 @@ SIPVoIPLink::terminateSIPCall()
void
SIPVoIPLink
::
getEvent
()
{
_debug
(
"a"
);
// We have to register the external thread so it could access the pjsip framework
if
(
!
pj_thread_is_registered
())
pj_thread_register
(
NULL
,
desc
,
&
thread
);
...
...
@@ -1326,10 +1325,13 @@ std::string SIPVoIPLink::getSipTo(const std::string& to_url, std::string hostnam
bool
SIPVoIPLink
::
pjsip_shutdown
(
void
)
{
/*
if (_endpt) {
if
(
_endpt
)
{
_debug
(
"UserAgent: Shutting down...
\n
"
);
busy_sleep
(
1000
);
}*/
}
pj_thread_destroy
(
thread
);
thread
=
NULL
;
/* Destroy endpoint. */
if
(
_endpt
)
{
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment