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
b788f5a7
Commit
b788f5a7
authored
Mar 1, 2019
by
Andreas Traczyk
Committed by
Sébastien Blin
Oct 7, 2019
Browse files
Options
Downloads
Patches
Plain Diff
manager: don't put calls on hold by default
Change-Id: Ica87e58b8c731ab1b73cb74d73d66448ac182f9b
parent
9fb18d4c
Branches
Branches containing commit
No related tags found
No related merge requests found
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
src/manager.cpp
+0
-66
0 additions, 66 deletions
src/manager.cpp
with
0 additions
and
66 deletions
src/manager.cpp
+
0
−
66
View file @
b788f5a7
...
@@ -920,18 +920,6 @@ Manager::outgoingCall(const std::string& account_id,
...
@@ -920,18 +920,6 @@ Manager::outgoingCall(const std::string& account_id,
stopTone
();
stopTone
();
// in any cases we have to detach from current communication
if
(
hasCurrentCall
())
{
JAMI_DBG
(
"Has current call (%s) put it onhold"
,
current_call_id
.
c_str
());
bool
isConf
=
isConference
(
current_call_id
);
// if this is not a conference and this and is not a conference participant
if
(
not
isConf
and
not
isConferenceParticipant
(
current_call_id
))
onHoldCall
(
current_call_id
);
else
if
(
isConf
and
not
isConferenceParticipant
(
call_id
))
detachLocalParticipant
();
}
pimpl_
->
switchCall
(
call
);
pimpl_
->
switchCall
(
call
);
call
->
setConfId
(
conf_id
);
call
->
setConfId
(
conf_id
);
...
@@ -956,22 +944,6 @@ Manager::answerCall(const std::string& call_id)
...
@@ -956,22 +944,6 @@ Manager::answerCall(const std::string& call_id)
// store the current call id
// store the current call id
const
auto
&
current_call_id
(
getCurrentCallId
());
const
auto
&
current_call_id
(
getCurrentCallId
());
// in any cases we have to detach from current communication
if
(
hasCurrentCall
()
and
call_id
!=
current_call_id
)
{
JAMI_DBG
(
"Currently conversing with %s"
,
current_call_id
.
c_str
());
bool
isConf
=
isConference
(
current_call_id
);
if
(
not
isConf
and
not
isConferenceParticipant
(
current_call_id
))
{
JAMI_DBG
(
"Answer call: Put the current call (%s) on hold"
,
current_call_id
.
c_str
());
onHoldCall
(
current_call_id
);
}
else
if
(
isConf
and
not
isConferenceParticipant
(
call_id
))
{
// if we are talking to a conference and we are answering an incoming call
JAMI_DBG
(
"Detach main participant from conference"
);
detachLocalParticipant
();
}
}
try
{
try
{
call
->
answer
();
call
->
answer
();
}
catch
(
const
std
::
runtime_error
&
e
)
{
}
catch
(
const
std
::
runtime_error
&
e
)
{
...
@@ -1128,19 +1100,6 @@ Manager::offHoldCall(const std::string& callId)
...
@@ -1128,19 +1100,6 @@ Manager::offHoldCall(const std::string& callId)
stopTone
();
stopTone
();
const
auto
&
currentCallId
=
getCurrentCallId
();
// Place current call on hold if it isn't
if
(
hasCurrentCall
()
and
currentCallId
!=
callId
)
{
bool
isConf
=
isConference
(
currentCallId
);
if
(
not
isConf
and
not
isConferenceParticipant
(
currentCallId
))
{
JAMI_DBG
(
"Has current call (%s), put on hold"
,
currentCallId
.
c_str
());
onHoldCall
(
currentCallId
);
}
else
if
(
isConf
and
not
isConferenceParticipant
(
callId
))
{
holdConference
(
currentCallId
);
detachLocalParticipant
();
}
}
std
::
shared_ptr
<
Call
>
call
=
getCallFromCallID
(
callId
);
std
::
shared_ptr
<
Call
>
call
=
getCallFromCallID
(
callId
);
if
(
!
call
)
if
(
!
call
)
return
false
;
return
false
;
...
@@ -1395,14 +1354,6 @@ Manager::addParticipant(const std::string& callId,
...
@@ -1395,14 +1354,6 @@ Manager::addParticipant(const std::string& callId,
// store the current call id (it will change in offHoldCall or in answerCall)
// store the current call id (it will change in offHoldCall or in answerCall)
auto
current_call_id
=
getCurrentCallId
();
auto
current_call_id
=
getCurrentCallId
();
// detach from prior communication and switch to this conference
if
(
current_call_id
!=
callId
)
{
if
(
isConference
(
current_call_id
))
detachLocalParticipant
();
else
onHoldCall
(
current_call_id
);
}
pimpl_
->
bindCallToConference
(
*
call
,
*
iter
->
second
);
pimpl_
->
bindCallToConference
(
*
call
,
*
iter
->
second
);
// TODO: remove this ugly hack => There should be different calls when double clicking
// TODO: remove this ugly hack => There should be different calls when double clicking
...
@@ -1420,14 +1371,6 @@ Manager::addParticipant(const std::string& callId,
...
@@ -1420,14 +1371,6 @@ Manager::addParticipant(const std::string& callId,
bool
bool
Manager
::
addMainParticipant
(
const
std
::
string
&
conference_id
)
Manager
::
addMainParticipant
(
const
std
::
string
&
conference_id
)
{
{
if
(
hasCurrentCall
())
{
std
::
string
current_call_id
(
getCurrentCallId
());
if
(
isConference
(
current_call_id
))
detachLocalParticipant
();
else
onHoldCall
(
current_call_id
);
}
{
{
std
::
lock_guard
<
std
::
mutex
>
lock
(
pimpl_
->
audioLayerMutex_
);
std
::
lock_guard
<
std
::
mutex
>
lock
(
pimpl_
->
audioLayerMutex_
);
...
@@ -1491,15 +1434,6 @@ Manager::joinParticipant(const std::string& callId1, const std::string& callId2)
...
@@ -1491,15 +1434,6 @@ Manager::joinParticipant(const std::string& callId1, const std::string& callId2)
return
false
;
return
false
;
}
}
// detach/hold current active call if it's not a participant
auto
current_call_id
=
getCurrentCallId
();
if
((
current_call_id
!=
callId1
)
and
(
current_call_id
!=
callId2
))
{
if
(
isConference
(
current_call_id
))
detachLocalParticipant
();
else
onHoldCall
(
current_call_id
);
// currently in a call
}
auto
conf
=
std
::
make_shared
<
Conference
>
();
auto
conf
=
std
::
make_shared
<
Conference
>
();
// Bind calls according to their state
// Bind calls according to their state
...
...
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
register
or
sign in
to comment