Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
jami-daemon
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Iterations
Wiki
Requirements
Code
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Locked files
Deploy
Releases
Model registry
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
Repository analytics
Issue analytics
Insights
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
GitLab community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
savoirfairelinux
jami-daemon
Commits
39a2eb3f
Commit
39a2eb3f
authored
Jan 23, 2012
by
Tristan Matthews
Browse files
Options
Downloads
Patches
Plain Diff
cleanup
parent
11ceff1f
No related branches found
No related tags found
No related merge requests found
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
daemon/src/managerimpl.cpp
+26
-29
26 additions, 29 deletions
daemon/src/managerimpl.cpp
daemon/src/managerimpl.h
+2
-2
2 additions, 2 deletions
daemon/src/managerimpl.h
with
28 additions
and
31 deletions
daemon/src/managerimpl.cpp
+
26
−
29
View file @
39a2eb3f
...
...
@@ -62,6 +62,7 @@
#include
<ctime>
#include
<cstdlib>
#include
<iostream>
#include
<iterator>
#include
<fstream>
#include
<sstream>
#include
<sys/types.h>
// mkdir(2)
...
...
@@ -529,9 +530,8 @@ bool ManagerImpl::transferCall(const std::string& callId, const std::string& to)
removeParticipant
(
callId
);
Conference
*
conf
=
getConferenceFromCallID
(
callId
);
processRemainingParticipants
(
callId
,
conf
);
}
else
if
(
not
isConference
(
getCurrentCallId
()))
{
}
else
if
(
not
isConference
(
getCurrentCallId
()))
switchCall
(
""
);
}
// Direct IP to IP call
if
(
isIPToIP
(
callId
))
{
...
...
@@ -817,9 +817,9 @@ void ManagerImpl::addParticipant(const std::string& callId, const std::string& c
// reset ring buffer for all conference participant
// flush conference participants only
for
(
ParticipantSet
::
const_iterator
iter_
p
=
participants
.
begin
();
iter_
p
!=
participants
.
end
();
++
iter_
p
)
getMainBuffer
()
->
flush
(
*
iter_
p
);
for
(
ParticipantSet
::
const_iterator
p
=
participants
.
begin
();
p
!=
participants
.
end
();
++
p
)
getMainBuffer
()
->
flush
(
*
p
);
getMainBuffer
()
->
flush
(
Call
::
DEFAULT_ID
);
...
...
@@ -982,8 +982,9 @@ void ManagerImpl::createConfFromParticipantList(const std::vector< std::string >
int
successCounter
=
0
;
for
(
std
::
vector
<
std
::
string
>::
const_iterator
iter
=
participantList
.
begin
();
iter
!=
participantList
.
end
();
++
iter
)
{
std
::
string
numberaccount
(
*
iter
);
for
(
std
::
vector
<
std
::
string
>::
const_iterator
p
=
participantList
.
begin
();
p
!=
participantList
.
end
();
++
p
)
{
std
::
string
numberaccount
(
*
p
);
std
::
string
tostr
(
numberaccount
.
substr
(
0
,
numberaccount
.
find
(
","
)));
std
::
string
account
(
numberaccount
.
substr
(
numberaccount
.
find
(
","
)
+
1
,
numberaccount
.
size
()));
...
...
@@ -1134,27 +1135,26 @@ void ManagerImpl::processRemainingParticipants(const std::string ¤t_call_i
if
(
n
>
1
)
{
// Reset ringbuffer's readpointers
for
(
ParticipantSet
::
const_iterator
iter_p
=
participants
.
begin
();
iter_p
!=
participants
.
end
();
++
iter_p
)
getMainBuffer
()
->
flush
(
*
iter_p
);
for
(
ParticipantSet
::
const_iterator
p
=
participants
.
begin
();
p
!=
participants
.
end
();
++
p
)
getMainBuffer
()
->
flush
(
*
p
);
getMainBuffer
()
->
flush
(
Call
::
DEFAULT_ID
);
}
else
if
(
n
==
1
)
{
ParticipantSet
::
iterator
iter_participant
=
participants
.
begin
();
ParticipantSet
::
iterator
p
=
participants
.
begin
();
// bind main participant to remaining conference call
if
(
iter_participant
!=
participants
.
end
())
{
if
(
p
!=
participants
.
end
())
{
// this call is no longer a conference participant
std
::
string
currentAccountId
(
getAccountFromCall
(
*
iter_participant
));
Call
*
call
=
getAccountLink
(
currentAccountId
)
->
getCall
(
*
iter_participant
);
std
::
string
currentAccountId
(
getAccountFromCall
(
*
p
));
Call
*
call
=
getAccountLink
(
currentAccountId
)
->
getCall
(
*
p
);
if
(
call
)
{
call
->
setConfId
(
""
);
// if we are not listening to this conference
if
(
current_call_id
!=
conf
->
getConfID
())
onHoldCall
(
call
->
getCallId
());
else
switchCall
(
*
iter_participant
);
switchCall
(
*
p
);
}
}
...
...
@@ -1187,10 +1187,10 @@ void ManagerImpl::joinConference(const std::string& conf_id1,
Conference
*
conf
=
iter
->
second
;
ParticipantSet
participants
(
conf
->
getParticipantList
());
for
(
ParticipantSet
::
const_iterator
iter_
p
=
participants
.
begin
();
iter_
p
!=
participants
.
end
();
++
iter_
p
)
{
detachParticipant
(
*
iter_
p
,
""
);
addParticipant
(
*
iter_
p
,
conf_id2
);
for
(
ParticipantSet
::
const_iterator
p
=
participants
.
begin
();
p
!=
participants
.
end
();
++
p
)
{
detachParticipant
(
*
p
,
""
);
addParticipant
(
*
p
,
conf_id2
);
}
}
}
...
...
@@ -1341,7 +1341,7 @@ void ManagerImpl::playDtmf(char code)
}
// Multi-thread
bool
ManagerImpl
::
incomingCallWaiting
()
bool
ManagerImpl
::
incomingCallWaiting
()
const
{
return
nbIncomingWaitingCall_
>
0
;
}
...
...
@@ -1361,7 +1361,7 @@ void ManagerImpl::removeWaitingCall(const std::string& id)
nbIncomingWaitingCall_
--
;
}
bool
ManagerImpl
::
isWaitingCall
(
const
std
::
string
&
id
)
bool
ManagerImpl
::
isWaitingCall
(
const
std
::
string
&
id
)
const
{
return
waitingCall_
.
find
(
id
)
!=
waitingCall_
.
end
();
}
...
...
@@ -1865,12 +1865,9 @@ std::vector<std::string> ManagerImpl::unserialize(std::string s)
std
::
string
ManagerImpl
::
serialize
(
const
std
::
vector
<
std
::
string
>
&
v
)
{
std
::
string
res
;
for
(
std
::
vector
<
std
::
string
>::
const_iterator
iter
=
v
.
begin
();
iter
!=
v
.
end
();
++
iter
)
res
+=
*
iter
+
"/"
;
return
res
;
std
::
ostringstream
os
;
std
::
copy
(
v
.
begin
(),
v
.
end
(),
std
::
ostream_iterator
<
std
::
string
>
(
os
,
"/"
));
return
os
.
str
();
}
std
::
string
ManagerImpl
::
getCurrentCodecName
(
const
std
::
string
&
id
)
...
...
This diff is collapsed.
Click to expand it.
daemon/src/managerimpl.h
+
2
−
2
View file @
39a2eb3f
...
...
@@ -847,7 +847,7 @@ class ManagerImpl {
* @return true is there is one or many incoming call waiting
* new call, not anwsered or refused
*/
bool
incomingCallWaiting
();
bool
incomingCallWaiting
()
const
;
/*
* Inline functions to manage speaker volume control
...
...
@@ -1033,7 +1033,7 @@ class ManagerImpl {
* @param id std::string to test
* @return bool True if the call is waiting
*/
bool
isWaitingCall
(
const
std
::
string
&
id
);
bool
isWaitingCall
(
const
std
::
string
&
id
)
const
;
/** Remove a CallID/std::string association
* Protected by mutex
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
sign in
to comment