Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in / Register
Toggle navigation
J
jami-daemon
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Locked Files
Issues
130
Issues
130
List
Boards
Labels
Service Desk
Milestones
Iterations
Requirements
Requirements
List
Security & Compliance
Security & Compliance
Dependency List
License Compliance
Operations
Operations
Incidents
Analytics
Analytics
Insights
Issue
Repository
Value Stream
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
savoirfairelinux
jami-daemon
Commits
87230602
Commit
87230602
authored
Oct 07, 2011
by
Tristan Matthews
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
* #7101: fixed segfault in daemon on conference hangup.
gnome-client still has leftover icon that crashes when clicked on.
parent
7732cb16
Changes
23
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
23 changed files
with
382 additions
and
537 deletions
+382
-537
daemon/src/audio/audiortp/AudioRtpSession.cpp
daemon/src/audio/audiortp/AudioRtpSession.cpp
+1
-1
daemon/src/conference.cpp
daemon/src/conference.cpp
+11
-25
daemon/src/conference.h
daemon/src/conference.h
+5
-22
daemon/src/dbus/callmanager.cpp
daemon/src/dbus/callmanager.cpp
+31
-53
daemon/src/managerimpl.cpp
daemon/src/managerimpl.cpp
+49
-48
daemon/src/managerimpl.h
daemon/src/managerimpl.h
+2
-2
gnome/src/accountlist.c
gnome/src/accountlist.c
+1
-1
gnome/src/accountlist.h
gnome/src/accountlist.h
+1
-1
gnome/src/actions.c
gnome/src/actions.c
+10
-8
gnome/src/callable_obj.c
gnome/src/callable_obj.c
+1
-0
gnome/src/callable_obj.h
gnome/src/callable_obj.h
+2
-5
gnome/src/conference_obj.c
gnome/src/conference_obj.c
+21
-42
gnome/src/contacts/calllist.c
gnome/src/contacts/calllist.c
+10
-10
gnome/src/contacts/calltab.h
gnome/src/contacts/calltab.h
+2
-2
gnome/src/contacts/calltree.c
gnome/src/contacts/calltree.c
+143
-167
gnome/src/contacts/calltree.h
gnome/src/contacts/calltree.h
+12
-18
gnome/src/contacts/conferencelist.c
gnome/src/contacts/conferencelist.c
+49
-78
gnome/src/contacts/conferencelist.h
gnome/src/contacts/conferencelist.h
+10
-27
gnome/src/contacts/searchbar.c
gnome/src/contacts/searchbar.c
+1
-0
gnome/src/dbus/dbus.c
gnome/src/dbus/dbus.c
+15
-24
gnome/src/mainwindow.h
gnome/src/mainwindow.h
+3
-3
gnome/src/shortcuts.c
gnome/src/shortcuts.c
+1
-0
gnome/src/uimanager.c
gnome/src/uimanager.c
+1
-0
No files found.
daemon/src/audio/audiortp/AudioRtpSession.cpp
View file @
87230602
...
...
@@ -223,7 +223,7 @@ void AudioRtpSession::updateDestinationIpAddress (void)
// This method remove the current destination entry
if
(
!
_queue
->
forgetDestination
(
_remote_ip
,
_remote_port
,
_remote_port
+
1
))
_
warn
(
"AudioRtpSession: Coul
d not remove previous destination"
);
_
debug
(
"AudioRtpSession: Di
d not remove previous destination"
);
// new destination is stored in call
// we just need to recall this method
...
...
daemon/src/conference.cpp
View file @
87230602
...
...
@@ -43,46 +43,36 @@ Conference::Conference()
Recordable
::
initRecFileName
(
_id
);
}
Conference
::~
Conference
()
{
}
int
Conference
::
getState
()
int
Conference
::
getState
()
const
{
return
_confState
;
}
void
Conference
::
setState
(
ConferenceState
state
)
{
_confState
=
state
;
}
void
Conference
::
add
(
std
::
string
participant_id
)
void
Conference
::
add
(
const
std
::
string
&
participant_id
)
{
_participants
.
insert
(
participant_id
);
}
void
Conference
::
remove
(
std
::
string
participant_id
)
void
Conference
::
remove
(
const
std
::
string
&
participant_id
)
{
_participants
.
erase
(
participant_id
);
_participants
.
erase
(
participant_id
);
}
void
Conference
::
bindParticipant
(
std
::
string
participant_id
)
void
Conference
::
bindParticipant
(
const
std
::
string
&
participant_id
)
{
ParticipantSet
::
iterator
iter
;
for
(
iter
=
_participants
.
begin
();
iter
!=
_participants
.
end
();
++
iter
)
if
(
participant_id
!=
*
iter
)
Manager
::
instance
().
getMainBuffer
()
->
bindCallID
(
participant_id
,
*
iter
);
for
(
ParticipantSet
::
iterator
iter
=
_participants
.
begin
()
;
iter
!=
_participants
.
end
();
++
iter
)
if
(
participant_id
!=
*
iter
)
Manager
::
instance
().
getMainBuffer
()
->
bindCallID
(
participant_id
,
*
iter
);
Manager
::
instance
().
getMainBuffer
()
->
bindCallID
(
participant_id
);
Manager
::
instance
().
getMainBuffer
()
->
bindCallID
(
participant_id
);
}
std
::
string
Conference
::
getStateStr
()
{
switch
(
_confState
)
{
...
...
@@ -96,14 +86,11 @@ std::string Conference::getStateStr()
}
}
const
ParticipantSet
&
Conference
::
getParticipantList
()
ParticipantSet
Conference
::
getParticipantList
()
const
{
return
_participants
;
}
bool
Conference
::
setRecording
()
{
bool
recordStatus
=
Recordable
::
recAudio
.
isRecording
();
...
...
@@ -130,5 +117,4 @@ bool Conference::setRecording()
}
return
recordStatus
;
}
daemon/src/conference.h
View file @
87230602
...
...
@@ -34,18 +34,12 @@
#include <string>
#include "audio/recordable.h"
#include "call.h"
// class ManagerImpl;
// class Call;
typedef
std
::
set
<
std
::
string
>
ParticipantSet
;
class
Conference
:
public
Recordable
{
public:
enum
ConferenceState
{
ACTIVE_ATTACHED
,
ACTIVE_DETACHED
,
ACTIVE_ATTACHED_REC
,
ACTIVE_DETACHED_REC
,
HOLD
,
HOLD_REC
};
/**
...
...
@@ -53,11 +47,6 @@ class Conference: public Recordable
*/
Conference
();
/**
* Destructor
*/
~
Conference
();
/**
* Return the conference id
*/
...
...
@@ -68,7 +57,7 @@ class Conference: public Recordable
/**
* Return the current conference state
*/
int
getState
();
int
getState
()
const
;
/**
* Set conference state
...
...
@@ -83,22 +72,22 @@ class Conference: public Recordable
/**
* Add a new participant to the conference
*/
void
add
(
std
::
string
participant_id
);
void
add
(
const
std
::
string
&
participant_id
);
/**
* Remove a participant from the conference
*/
void
remove
(
std
::
string
participant_id
);
void
remove
(
const
std
::
string
&
participant_id
);
/**
* Bind a participant to the conference
*/
void
bindParticipant
(
std
::
string
participant_id
);
void
bindParticipant
(
const
std
::
string
&
participant_id
);
/**
* Get the participant list for this conference
*/
const
ParticipantSet
&
getParticipantList
()
;
ParticipantSet
getParticipantList
()
const
;
/**
* Get recording file ID
...
...
@@ -128,12 +117,6 @@ class Conference: public Recordable
* List of participant ids
*/
ParticipantSet
_participants
;
/**
* Number of participant
*/
int
_nbParticipant
;
};
#endif
daemon/src/dbus/callmanager.cpp
View file @
87230602
...
...
@@ -42,37 +42,34 @@
CallManager
::
CallManager
(
DBus
::
Connection
&
connection
)
:
DBus
::
ObjectAdaptor
(
connection
,
"/org/sflphone/SFLphone/CallManager"
)
{
}
{}
void
CallManager
::
placeCall
(
const
std
::
string
&
accountID
,
const
std
::
string
&
callID
,
const
std
::
string
&
to
)
// Check if a destination number is available
void
CallManager
::
placeCall
(
const
std
::
string
&
accountID
,
const
std
::
string
&
callID
,
const
std
::
string
&
to
)
{
if
(
to
==
""
)
{
// Check if a destination number is available
if
(
to
.
empty
())
_debug
(
"No number entered - Call stopped"
);
}
else
{
else
Manager
::
instance
().
outgoingCall
(
accountID
,
callID
,
to
);
}
}
void
CallManager
::
placeCallFirstAccount
(
const
std
::
string
&
callID
,
const
std
::
string
&
to
)
void
CallManager
::
placeCallFirstAccount
(
const
std
::
string
&
callID
,
const
std
::
string
&
to
)
{
if
(
to
==
""
)
{
using
std
::
vector
;
using
std
::
string
;
if
(
to
.
empty
())
{
_warn
(
"CallManager: Warning: No number entered, call stopped"
);
return
;
}
std
::
vector
<
std
::
string
>
accountList
=
Manager
::
instance
().
loadAccountOrder
(
);
if
(
accountList
.
size
()
==
0
)
vector
<
string
>
accountList
(
Manager
::
instance
().
loadAccountOrder
()
);
if
(
accountList
.
empty
()
)
accountList
=
Manager
::
instance
().
getAccountList
();
std
::
vector
<
std
::
string
>::
const_iterator
iter
;
for
(
iter
=
accountList
.
begin
();
iter
!=
accountList
.
end
();
++
iter
)
{
for
(
vector
<
string
>::
const_iterator
iter
=
accountList
.
begin
();
iter
!=
accountList
.
end
();
++
iter
)
{
if
((
*
iter
!=
IP2IP_PROFILE
)
&&
Manager
::
instance
().
getAccount
(
*
iter
)
->
isEnabled
())
{
Manager
::
instance
().
outgoingCall
(
*
iter
,
callID
,
to
);
return
;
...
...
@@ -96,7 +93,6 @@ void
CallManager
::
hangUp
(
const
std
::
string
&
callID
)
{
Manager
::
instance
().
hangupCall
(
callID
);
}
void
...
...
@@ -105,7 +101,6 @@ CallManager::hangUpConference (const std::string& confID)
Manager
::
instance
().
hangupConference
(
confID
);
}
void
CallManager
::
hold
(
const
std
::
string
&
callID
)
{
...
...
@@ -124,20 +119,17 @@ CallManager::transfer (const std::string& callID, const std::string& to)
Manager
::
instance
().
transferCall
(
callID
,
to
);
}
void
CallManager
::
attendedTransfer
(
const
std
::
string
&
transferID
,
const
std
::
string
&
targetID
)
void
CallManager
::
attendedTransfer
(
const
std
::
string
&
transferID
,
const
std
::
string
&
targetID
)
{
Manager
::
instance
().
attendedTransfer
(
transferID
,
targetID
);
}
void
CallManager
::
setVolume
(
const
std
::
string
&
device
,
const
double
&
value
)
void
CallManager
::
setVolume
(
const
std
::
string
&
device
,
const
double
&
value
)
{
if
(
device
==
"speaker"
)
{
Manager
::
instance
().
setSpkrVolume
(
(
int
)
(
value
*
100.0
));
}
else
if
(
device
==
"mic"
)
{
Manager
::
instance
().
setMicVolume
(
(
int
)
(
value
*
100.0
));
}
if
(
device
==
"speaker"
)
Manager
::
instance
().
setSpkrVolume
(
(
int
)
(
value
*
100.0
));
else
if
(
device
==
"mic"
)
Manager
::
instance
().
setMicVolume
(
(
int
)
(
value
*
100.0
));
volumeChanged
(
device
,
value
);
}
...
...
@@ -145,11 +137,10 @@ CallManager::setVolume (const std::string& device, const double& value)
double
CallManager
::
getVolume
(
const
std
::
string
&
device
)
{
if
(
device
==
"speaker"
)
{
return
Manager
::
instance
().
getSpkrVolume
()
/
100.0
;
}
else
if
(
device
==
"mic"
)
{
return
Manager
::
instance
().
getMicVolume
()
/
100.0
;
}
if
(
device
==
"speaker"
)
return
Manager
::
instance
().
getSpkrVolume
()
/
100.0
;
else
if
(
device
==
"mic"
)
return
Manager
::
instance
().
getMicVolume
()
/
100.0
;
return
0
;
}
...
...
@@ -279,7 +270,7 @@ CallManager::playDTMF (const std::string& key)
void
CallManager
::
startTone
(
const
int32_t
&
start
,
const
int32_t
&
type
)
{
if
(
start
==
true
)
{
if
(
start
)
{
if
(
type
==
0
)
Manager
::
instance
().
playTone
();
else
...
...
@@ -292,14 +283,13 @@ CallManager::startTone (const int32_t& start , const int32_t& type)
// for conferencing in order to get
// the right pointer for the given
// callID.
sfl
::
AudioZrtpSession
*
CallManager
::
getAudioZrtpSession
(
const
std
::
string
&
callID
)
sfl
::
AudioZrtpSession
*
CallManager
::
getAudioZrtpSession
(
const
std
::
string
&
callID
)
{
SIPVoIPLink
*
link
=
NULL
;
link
=
dynamic_cast
<
SIPVoIPLink
*>
(
Manager
::
instance
().
getAccountLink
(
""
));
SIPVoIPLink
*
link
=
dynamic_cast
<
SIPVoIPLink
*>
(
Manager
::
instance
().
getAccountLink
(
""
));
if
(
!
link
)
{
if
(
!
link
)
throw
CallManagerException
(
"Failed to get sip link"
);
}
SIPCall
*
call
;
try
{
...
...
@@ -324,8 +314,6 @@ CallManager::setSASVerified (const std::string& callID)
zSession
=
getAudioZrtpSession
(
callID
);
zSession
->
SASVerified
();
}
catch
(...)
{
return
;
// throw;
}
}
...
...
@@ -337,8 +325,6 @@ CallManager::resetSASVerified (const std::string& callID)
zSession
=
getAudioZrtpSession
(
callID
);
zSession
->
resetSASVerified
();
}
catch
(...)
{
return
;
// throw;
}
}
...
...
@@ -350,8 +336,6 @@ CallManager::setConfirmGoClear (const std::string& callID)
zSession
=
getAudioZrtpSession
(
callID
);
zSession
->
goClearOk
();
}
catch
(...)
{
return
;
// throw;
}
}
...
...
@@ -363,8 +347,6 @@ CallManager::requestGoClear (const std::string& callID)
zSession
=
getAudioZrtpSession
(
callID
);
zSession
->
requestGoClear
();
}
catch
(...)
{
return
;
/// throw;
}
}
...
...
@@ -376,8 +358,6 @@ CallManager::acceptEnrollment (const std::string& callID, const bool& accepted)
zSession
=
getAudioZrtpSession
(
callID
);
zSession
->
acceptEnrollment
(
accepted
);
}
catch
(...)
{
return
;
// throw;
}
}
...
...
@@ -389,14 +369,12 @@ CallManager::setPBXEnrollment (const std::string& callID, const bool& yesNo)
zSession
=
getAudioZrtpSession
(
callID
);
zSession
->
setPBXEnrollment
(
yesNo
);
}
catch
(...)
{
return
;
// throw;
}
}
void
CallManager
::
sendTextMessage
(
const
std
::
string
&
callID
,
const
std
::
string
&
message
)
{
if
(
!
Manager
::
instance
().
sendTextMessage
(
callID
,
message
,
"Me"
))
if
(
!
Manager
::
instance
().
sendTextMessage
(
callID
,
message
,
"Me"
))
throw
CallManagerException
();
}
daemon/src/managerimpl.cpp
View file @
87230602
...
...
@@ -68,7 +68,7 @@
#include <sys/stat.h> // mkdir(2)
ManagerImpl
::
ManagerImpl
(
void
)
:
_hasTriedToRegister
(
false
),
_config
(),
_currentCallId2
(),
_hasTriedToRegister
(
false
),
_config
(),
currentCallId_
(),
_currentCallMutex
(),
_audiodriver
(
0
),
_dtmfKey
(
0
),
_toneMutex
(),
_telephoneTone
(
0
),
_audiofile
(
0
),
_spkr_volume
(
0
),
...
...
@@ -159,25 +159,25 @@ void ManagerImpl::terminate ()
bool
ManagerImpl
::
isCurrentCall
(
const
std
::
string
&
callId
)
{
return
_currentCallId2
==
callId
;
return
currentCallId_
==
callId
;
}
bool
ManagerImpl
::
hasCurrentCall
()
{
return
not
_currentCallId2
.
empty
();
return
not
currentCallId_
.
empty
();
}
const
std
::
string
&
ManagerImpl
::
getCurrentCallId
()
const
{
return
_currentCallId2
;
return
currentCallId_
;
}
void
ManagerImpl
::
switchCall
(
const
std
::
string
&
id
)
{
ost
::
MutexLock
m
(
_currentCallMutex
);
_debug
(
"----- Switch current call id to %s -----"
,
id
.
c_str
());
_currentCallId2
=
id
;
currentCallId_
=
id
;
}
///////////////////////////////////////////////////////////////////////////////
...
...
@@ -360,7 +360,7 @@ void ManagerImpl::hangupCall (const std::string& callId)
if
(
conf
!=
NULL
)
{
// remove this participant
removeParticipant
(
callId
);
processRemainingParticipant
(
currentCallId
,
conf
);
processRemainingParticipant
s
(
currentCallId
,
conf
);
}
}
else
{
// we are not participating to a conference, current call switched to ""
...
...
@@ -393,18 +393,21 @@ bool ManagerImpl::hangupConference (const std::string& id)
ConferenceMap
::
iterator
iter_conf
=
_conferencemap
.
find
(
id
);
std
::
string
currentAccountId
;
if
(
iter_conf
!=
_conferencemap
.
end
())
{
Conference
*
conf
=
iter_conf
->
second
;
const
ParticipantSet
&
participants
=
conf
->
getParticipantList
();
ParticipantSet
::
const_iterator
iter
;
for
(
iter
=
participants
.
begin
();
iter
!=
participants
.
end
();
++
iter
)
hangupCall
(
*
iter
);
if
(
conf
)
{
ParticipantSet
participants
(
conf
->
getParticipantList
());
for
(
ParticipantSet
::
const_iterator
iter
=
participants
.
begin
();
iter
!=
participants
.
end
();
++
iter
)
hangupCall
(
*
iter
);
}
else
{
_error
(
"Manager: No such conference %s"
,
id
.
c_str
());
return
false
;
}
}
switchCall
(
""
);
switchCall
(
""
);
getMainBuffer
()
->
stateInfo
();
...
...
@@ -522,7 +525,7 @@ bool ManagerImpl::transferCall (const std::string& callId, const std::string& to
{
if
(
participToConference
(
callId
))
{
removeParticipant
(
callId
);
processRemainingParticipant
(
callId
,
getConferenceFromCallID
(
callId
));
processRemainingParticipant
s
(
callId
,
getConferenceFromCallID
(
callId
));
}
else
if
(
!
isConference
(
getCurrentCallId
()))
switchCall
(
""
);
...
...
@@ -561,7 +564,7 @@ bool ManagerImpl::attendedTransfer(const std::string& transferID, const std::str
return
SIPVoIPLink
::
instance
()
->
attendedTransfer
(
transferID
,
targetID
);
// Classic call, attached to an account
std
::
string
accountid
=
getAccountFromCall
(
transferID
);
std
::
string
accountid
(
getAccountFromCall
(
transferID
)
);
if
(
accountid
.
empty
())
return
false
;
...
...
@@ -627,7 +630,7 @@ void ManagerImpl::removeConference (const std::string& conference_id)
{
_debug
(
"Manager: Remove conference %s"
,
conference_id
.
c_str
());
_debug
(
"Manager: number of participant
: %d"
,
(
int
)
_conferencemap
.
size
());
_debug
(
"Manager: number of participant
s: %u"
,
_conferencemap
.
size
());
ConferenceMap
::
iterator
iter
=
_conferencemap
.
find
(
conference_id
);
Conference
*
conf
=
NULL
;
...
...
@@ -641,14 +644,14 @@ void ManagerImpl::removeConference (const std::string& conference_id)
}
// broadcast a signal over dbus
_dbus
.
getCallManager
()
->
conferenceRemoved
(
conference_id
);
_dbus
.
getCallManager
()
->
conferenceRemoved
(
conference_id
);
// We now need to bind the audio to the remain participant
// Unbind main participant audio from conference
getMainBuffer
()
->
unBindAll
(
Call
::
DEFAULT_ID
);
const
ParticipantSet
&
participants
=
conf
->
getParticipantList
(
);
ParticipantSet
participants
(
conf
->
getParticipantList
()
);
// bind main participant audio to remaining conference call
ParticipantSet
::
iterator
iter_p
=
participants
.
begin
();
...
...
@@ -657,7 +660,7 @@ void ManagerImpl::removeConference (const std::string& conference_id)
getMainBuffer
()
->
bindCallID
(
*
iter_p
,
Call
::
DEFAULT_ID
);
// Then remove the conference from the conference map
if
(
_conferencemap
.
erase
(
conference_id
)
==
1
)
if
(
_conferencemap
.
erase
(
conference_id
)
==
1
)
_debug
(
"Manager: Conference %s removed successfully"
,
conference_id
.
c_str
());
else
_error
(
"Manager: Error: Cannot remove conference: %s"
,
conference_id
.
c_str
());
...
...
@@ -668,10 +671,8 @@ void ManagerImpl::removeConference (const std::string& conference_id)
Conference
*
ManagerImpl
::
getConferenceFromCallID
(
const
std
::
string
&
call_id
)
{
std
::
string
account_id
;
account_id
=
getAccountFromCall
(
call_id
);
Call
*
call
=
getAccountLink
(
account_id
)
->
getCall
(
call_id
);
std
::
string
account_id
(
getAccountFromCall
(
call_id
));
Call
*
call
=
getAccountLink
(
account_id
)
->
getCall
(
call_id
);
ConferenceMap
::
const_iterator
iter
=
_conferencemap
.
find
(
call
->
getConfId
());
...
...
@@ -694,11 +695,11 @@ void ManagerImpl::holdConference (const std::string& id)
conf
->
getState
()
==
Conference
::
ACTIVE_DETACHED_REC
||
conf
->
getState
()
==
Conference
::
HOLD_REC
;
const
ParticipantSet
&
participants
=
conf
->
getParticipantList
(
);
ParticipantSet
::
const_iterator
iter
;
for
(
iter
=
participants
.
begin
();
iter
!=
participants
.
end
();
++
iter
)
{
switchCall
(
*
iter
);
onHoldCall
(
*
iter
);
ParticipantSet
participants
(
conf
->
getParticipantList
()
);
for
(
ParticipantSet
::
const_iterator
iter
=
participants
.
begin
()
;
iter
!=
participants
.
end
();
++
iter
)
{
switchCall
(
*
iter
);
onHoldCall
(
*
iter
);
}
conf
->
setState
(
isRec
?
Conference
::
HOLD_REC
:
Conference
::
HOLD
);
...
...
@@ -715,7 +716,7 @@ void ManagerImpl::unHoldConference (const std::string& id)
conf
->
getState
()
==
Conference
::
ACTIVE_DETACHED_REC
or
conf
->
getState
()
==
Conference
::
HOLD_REC
;
const
ParticipantSet
&
participants
(
conf
->
getParticipantList
());
ParticipantSet
participants
(
conf
->
getParticipantList
());
for
(
ParticipantSet
::
const_iterator
iter
=
participants
.
begin
();
iter
!=
participants
.
end
();
++
iter
)
{
Call
*
call
=
getAccountLink
(
getAccountFromCall
(
*
iter
))
->
getCall
(
*
iter
);
...
...
@@ -808,7 +809,7 @@ void ManagerImpl::addParticipant (const std::string& callId, const std::string&
conf
->
bindParticipant
(
callId
);
}
const
ParticipantSet
&
participants
(
conf
->
getParticipantList
());
ParticipantSet
participants
(
conf
->
getParticipantList
());
if
(
participants
.
empty
())
_error
(
"Manager: Error: Participant list is empty for this conference"
);
...
...
@@ -841,7 +842,7 @@ void ManagerImpl::addMainParticipant (const std::string& conference_id)
if
(
iter
!=
_conferencemap
.
end
())
{
Conference
*
conf
=
iter
->
second
;
const
ParticipantSet
&
participants
=
conf
->
getParticipantList
(
);
ParticipantSet
participants
(
conf
->
getParticipantList
()
);
for
(
ParticipantSet
::
const_iterator
iter_p
=
participants
.
begin
();
iter_p
!=
participants
.
end
();
++
iter_p
)
{
...
...
@@ -1051,7 +1052,7 @@ void ManagerImpl::detachParticipant (const std::string& call_id,
else
{
onHoldCall
(
call_id
);
removeParticipant
(
call_id
);
processRemainingParticipant
(
current_call_id
,
conf
);
processRemainingParticipant
s
(
current_call_id
,
conf
);
}
_dbus
.
getCallManager
()
->
conferenceChanged
(
conf
->
getConfID
(),
conf
->
getStateStr
());
}
else
{
...
...
@@ -1111,9 +1112,9 @@ void ManagerImpl::removeParticipant (const std::string& call_id)
_dbus
.
getCallManager
()
->
conferenceChanged
(
conf
->
getConfID
(),
conf
->
getStateStr
());
}
void
ManagerImpl
::
processRemainingParticipant
(
const
std
::
string
&
current_call_id
,
Conference
*
conf
)
void
ManagerImpl
::
processRemainingParticipant
s
(
const
std
::
string
&
current_call_id
,
Conference
*
conf
)
{
const
ParticipantSet
&
participants
=
conf
->
getParticipantList
(
);
ParticipantSet
participants
(
conf
->
getParticipantList
()
);
size_t
n
=
participants
.
size
();
_debug
(
"Manager: Process remaining %d participant(s) from conference %s"
,
n
,
conf
->
getConfID
().
c_str
());
...
...
@@ -1123,7 +1124,7 @@ void ManagerImpl::processRemainingParticipant (const std::string ¤t_call_i
for
(
ParticipantSet
::
const_iterator
iter_p
=
participants
.
begin
();
iter_p
!=
participants
.
end
();
++
iter_p
)
getMainBuffer
()
->
flush
(
*
iter_p
);
getMainBuffer
()
->
flush
(
*
iter_p
);
getMainBuffer
()
->
flush
(
Call
::
DEFAULT_ID
);
}
else
if
(
n
==
1
)
{
...
...
@@ -1133,7 +1134,7 @@ void ManagerImpl::processRemainingParticipant (const std::string ¤t_call_i
if
(
iter_participant
!=
participants
.
end
())
{
// this call is no more a conference participant
std
::
string
currentAccountId
(
getAccountFromCall
(
*
iter_participant
));
std
::
string
currentAccountId
(
getAccountFromCall
(
*
iter_participant
));
Call
*
call
=
getAccountLink
(
currentAccountId
)
->
getCall
(
*
iter_participant
);
call
->
setConfId
(
""
);
...
...
@@ -1146,7 +1147,7 @@ void ManagerImpl::processRemainingParticipant (const std::string ¤t_call_i
removeConference
(
conf
->
getConfID
());
}
else
{
_debug
(
"Manager: No remaining participant, remove conference"
);
_debug
(
"Manager: No remaining participant
s
, remove conference"
);
removeConference
(
conf
->
getConfID
());
switchCall
(
""
);
}
...
...
@@ -1169,7 +1170,7 @@ void ManagerImpl::joinConference (const std::string& conf_id1,
return
;
}
const
ParticipantSet
&
participants
(
conf1
->
getParticipantList
());
ParticipantSet
participants
(
conf1
->
getParticipantList
());
for
(
ParticipantSet
::
const_iterator
iter_p
=
participants
.
begin
();
iter_p
!=
participants
.
end
();
++
iter_p
)
{
...
...
@@ -1196,7 +1197,7 @@ void ManagerImpl::addStream (const std::string& call_id)
conf
->
bindParticipant
(
call_id
);
const
ParticipantSet
&
participants
(
conf
->
getParticipantList
());
ParticipantSet
participants
(
conf
->
getParticipantList
());
// reset ring buffer for all conference participant
for
(
ParticipantSet
::
const_iterator
iter_p
=
participants
.
begin
();
...
...
@@ -1407,7 +1408,7 @@ void ManagerImpl::incomingMessage (const std::string& callID,
if
(
participToConference
(
callID
))
{
Conference
*
conf
=
getConferenceFromCallID
(
callID
);
const
ParticipantSet
&
participants
=
conf
->
getParticipantList
(
);
ParticipantSet
participants
(
conf
->
getParticipantList
()
);
for
(
ParticipantSet
::
const_iterator
iter_p
=
participants
.
begin
();
iter_p
!=
participants
.
end
();
++
iter_p
)
{
...
...
@@ -1450,7 +1451,7 @@ bool ManagerImpl::sendTextMessage (const std::string& callID, const std::string&
if
(
!
conf
)
return
false
;
const
ParticipantSet
participants
=
conf
->
getParticipantList
(
);
ParticipantSet
participants
(
conf
->
getParticipantList
()
);
for
(
ParticipantSet
::
const_iterator
iter_p
=
participants
.
begin
();
iter_p
!=
participants
.
end
();
++
iter_p
)
{
...
...
@@ -1478,7 +1479,7 @@ bool ManagerImpl::sendTextMessage (const std::string& callID, const std::string&
if
(
!
conf
)
return
false
;
const
ParticipantSet
participants
(
conf
->
getParticipantList
());
ParticipantSet
participants
(
conf
->
getParticipantList
());
for
(
ParticipantSet
::
const_iterator
iter_p
=
participants
.
begin
();
iter_p
!=
participants
.
end
();
++
iter_p
)
{
...
...
@@ -1552,7 +1553,7 @@ void ManagerImpl::peerHungupCall (const std::string& call_id)
if
(
conf
!=
NULL
)
{
removeParticipant
(
call_id
);
processRemainingParticipant
(
getCurrentCallId
(),
conf
);