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
783eb72d
Commit
783eb72d
authored
Apr 01, 2010
by
Alexandre Savard
Browse files
[#3114] Make sure conference ID are valid in joinConference method
parent
962079de
Changes
1
Hide whitespace changes
Inline
Side-by-side
sflphone-common/src/managerimpl.cpp
View file @
783eb72d
...
...
@@ -420,12 +420,11 @@ bool ManagerImpl::hangupCall (const CallID& call_id) {
else
{
account_id
=
getAccountFromCall
(
call_id
);
// Account may be NULL if call have not been sent yet
if
(
account_id
==
AccountNULL
)
{
_error
(
"Manager: Error: account id is NULL in hangup"
);
returnValue
=
false
;
}
else
{
returnValue
=
getAccountLink
(
account_id
)
->
hangup
(
call_id
);
removeCallAccount
(
call_id
);
}
...
...
@@ -1222,7 +1221,7 @@ void ManagerImpl::detachParticipant (const CallID& call_id,
}
void
ManagerImpl
::
removeParticipant
(
const
CallID
&
call_id
)
{
_debug
(
"Manager
Impl::r
emove
P
articipant
(
%s
)
"
,
call_id
.
c_str
());
_debug
(
"Manager
: R
emove
p
articipant
%s"
,
call_id
.
c_str
());
// TODO: add conference_id as a second parameter
Conference
*
conf
;
...
...
@@ -1311,7 +1310,7 @@ void ManagerImpl::processRemainingParticipant (CallID current_call_id,
void
ManagerImpl
::
joinConference
(
const
CallID
&
conf_id1
,
const
CallID
&
conf_id2
)
{
_debug
(
"Manager
Impl::j
oin
C
onference
(
%s, %s
)
"
,
conf_id1
.
c_str
(),
conf_id2
.
c_str
());
_debug
(
"Manager
: J
oin
c
onference
%s, %s"
,
conf_id1
.
c_str
(),
conf_id2
.
c_str
());
ConferenceMap
::
iterator
iter
;
...
...
@@ -1320,13 +1319,23 @@ void ManagerImpl::joinConference (const CallID& conf_id1,
iter
=
_conferencemap
.
find
(
conf_id1
);
if
(
iter
!=
_conferencemap
.
end
())
if
(
iter
!=
_conferencemap
.
end
())
{
conf1
=
iter
->
second
;
}
else
{
_error
(
"Manager: Error: Not a valid conference ID"
);
return
;
}
iter
=
_conferencemap
.
find
(
conf_id2
);
if
(
iter
!=
_conferencemap
.
end
())
if
(
iter
!=
_conferencemap
.
end
())
{
conf2
=
iter
->
second
;
}
else
{
_error
(
"Manager: Error: Not a valid conference ID"
);
return
;
}
ParticipantSet
participants
=
conf1
->
getParticipantList
();
...
...
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