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
e658638d
Commit
e658638d
authored
Apr 19, 2012
by
Alexandre Savard
Browse files
#9898: Unregister account when leaving sflphone
parent
c97a170d
Changes
2
Hide whitespace changes
Inline
Side-by-side
daemon/src/managerimpl.cpp
View file @
e658638d
...
...
@@ -130,6 +130,8 @@ void ManagerImpl::terminate()
saveConfig
();
unregisterAllAccounts
();
SIPVoIPLink
::
destroy
();
// Unload account map AFTER destroying
// the SIPVoIPLink, the link still needs the accounts for pjsip cleanup
...
...
@@ -2598,6 +2600,11 @@ namespace {
}
}
void
unregisterAccount
(
std
::
pair
<
const
std
::
string
,
Account
*>
&
item
)
{
item
.
second
->
unregisterVoIPLink
();
}
void
unloadAccount
(
std
::
pair
<
const
std
::
string
,
Account
*>
&
item
)
{
// avoid deleting IP2IP account twice
...
...
@@ -2606,6 +2613,7 @@ namespace {
item
.
second
=
0
;
}
}
}
// end anonymous namespace
void
ManagerImpl
::
loadAccountMap
(
Conf
::
YamlParser
&
parser
)
...
...
@@ -2644,6 +2652,11 @@ void ManagerImpl::loadAccountMap(Conf::YamlParser &parser)
std
::
for_each
(
seq
->
begin
(),
seq
->
end
(),
bind
(
loadAccount
,
_1
,
ref
(
accountMap_
)));
}
void
ManagerImpl
::
unregisterAllAccounts
()
{
std
::
for_each
(
accountMap_
.
begin
(),
accountMap_
.
end
(),
unregisterAccount
);
}
void
ManagerImpl
::
unloadAccountMap
()
{
std
::
for_each
(
accountMap_
.
begin
(),
accountMap_
.
end
(),
unloadAccount
);
...
...
daemon/src/managerimpl.h
View file @
e658638d
...
...
@@ -969,6 +969,11 @@ class ManagerImpl {
*Contains a list of account (sip, aix, etc) and their respective voiplink/calls */
AccountMap
accountMap_
;
/**
* Unregister all account in accountMap_
*/
void
unregisterAllAccounts
();
/**
* Load the account map from configuration
*/
...
...
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