Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
What's new
10
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in / Register
Toggle navigation
Open sidebar
savoirfairelinux
jami-daemon
Commits
c4a7918c
Commit
c4a7918c
authored
May 07, 2020
by
Sébastien Blin
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
sipvoiplink: fix creation and shutdown
Change-Id: If1ff8a0213b9687b0899b40d17feb56e491b35ca
parent
0a37f251
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
18 additions
and
4 deletions
+18
-4
src/manager.cpp
src/manager.cpp
+7
-1
src/sip/sipvoiplink.cpp
src/sip/sipvoiplink.cpp
+6
-3
src/sip/sipvoiplink.h
src/sip/sipvoiplink.h
+5
-0
No files found.
src/manager.cpp
View file @
c4a7918c
...
...
@@ -744,6 +744,8 @@ Manager::init(const std::string &config_file)
setDhtLogLevel
();
// Manager can restart without being recreated (Unit tests)
// So only create the SipLink once
pimpl_
->
sipLink_
=
std
::
make_unique
<
SIPVoIPLink
>
();
check_rename
(
fileutils
::
get_cache_dir
(
PACKAGE_OLD
),
fileutils
::
get_cache_dir
());
...
...
@@ -757,7 +759,7 @@ Manager::init(const std::string &config_file)
bool
no_errors
=
true
;
// manager can restart without being recreated (
android
)
// manager can restart without being recreated (
Unit tests
)
pimpl_
->
finished_
=
false
;
try
{
...
...
@@ -850,6 +852,10 @@ Manager::finish() noexcept
// Also, it must be called before pj_shutdown to avoid any problem
pimpl_
->
ice_tf_
.
reset
();
// NOTE: sipLink_->shutdown() is needed because this will perform
// sipTransportBroker->shutdown(); which will call Manager::instance().sipVoIPLink()
// so the pointer MUST NOT be resetted at this point
pimpl_
->
sipLink_
->
shutdown
();
pimpl_
->
sipLink_
.
reset
();
pj_shutdown
();
...
...
src/sip/sipvoiplink.cpp
View file @
c4a7918c
...
...
@@ -627,9 +627,12 @@ SIPVoIPLink::SIPVoIPLink() : pool_(nullptr, pj_pool_release)
JAMI_DBG
(
"SIPVoIPLink@%p"
,
this
);
}
SIPVoIPLink
::~
SIPVoIPLink
()
SIPVoIPLink
::~
SIPVoIPLink
()
{}
void
SIPVoIPLink
::
shutdown
()
{
JAMI_DBG
(
"
~
SIPVoIPLink@%p"
,
this
);
JAMI_DBG
(
"
Shutdown
SIPVoIPLink@%p
...
"
,
this
);
// Remaining calls should not happen as possible upper callbacks
// may be called and another instance of SIPVoIPLink can be re-created!
...
...
@@ -647,7 +650,7 @@ SIPVoIPLink::~SIPVoIPLink()
pool_
.
reset
();
pj_caching_pool_destroy
(
&
cp_
);
JAMI_DBG
(
"
destroying
SIPVoIPLink@%p"
,
this
);
JAMI_DBG
(
"SIPVoIPLink@%p
is shutdown
"
,
this
);
}
std
::
shared_ptr
<
SIPAccountBase
>
...
...
src/sip/sipvoiplink.h
View file @
c4a7918c
...
...
@@ -68,6 +68,11 @@ class SIPVoIPLink {
SIPVoIPLink
();
~
SIPVoIPLink
();
/**
* Destroy structures
*/
void
shutdown
();
/**
* Event listener. Each event send by the call manager is received and handled from here
*/
...
...
Write
Preview
Markdown
is supported
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