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
3c8c73c9
Commit
3c8c73c9
authored
5 years ago
by
Kateryna Kostiuk
Committed by
Sébastien Blin
5 years ago
Browse files
Options
Downloads
Patches
Plain Diff
call: use main thread for subcall changes callback
Change-Id: I2cbc8347859136e54235a38afdbf52b5475a355b
parent
64d32828
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
src/call.cpp
+9
-5
9 additions, 5 deletions
src/call.cpp
src/call.h
+4
-1
4 additions, 1 deletion
src/call.h
with
13 additions
and
6 deletions
src/call.cpp
+
9
−
5
View file @
3c8c73c9
...
@@ -435,10 +435,14 @@ Call::addSubCall(Call& subcall)
...
@@ -435,10 +435,14 @@ Call::addSubCall(Call& subcall)
subcall
.
sendTextMessage
(
msg
.
first
,
msg
.
second
);
subcall
.
sendTextMessage
(
msg
.
first
,
msg
.
second
);
subcall
.
addStateListener
(
subcall
.
addStateListener
(
[
&
subcall
](
Call
::
CallState
new_state
,
Call
::
ConnectionState
new_cstate
,
UNUSED
int
code
)
{
[
sub
=
subcall
.
weak
(),
parent
=
weak
()](
Call
::
CallState
new_state
,
Call
::
ConnectionState
new_cstate
,
int
code
)
{
auto
parent
=
subcall
.
parent_
;
runOnMainThread
([
sub
,
parent
,
new_state
,
new_cstate
,
code
]()
{
assert
(
parent
!=
nullptr
);
// subcall cannot be "un-parented"
if
(
auto
p
=
parent
.
lock
())
{
parent
->
subcallStateChanged
(
subcall
,
new_state
,
new_cstate
);
if
(
auto
s
=
sub
.
lock
())
{
p
->
subcallStateChanged
(
*
s
,
new_state
,
new_cstate
);
}
}
});
});
});
}
}
...
...
This diff is collapsed.
Click to expand it.
src/call.h
+
4
−
1
View file @
3c8c73c9
...
@@ -94,6 +94,10 @@ class Call : public Recordable, public std::enable_shared_from_this<Call> {
...
@@ -94,6 +94,10 @@ class Call : public Recordable, public std::enable_shared_from_this<Call> {
virtual
~
Call
();
virtual
~
Call
();
std
::
weak_ptr
<
Call
>
weak
()
{
return
std
::
static_pointer_cast
<
Call
>
(
shared_from_this
());
}
/**
/**
* Return a reference on the call id
* Return a reference on the call id
* @return call id
* @return call id
...
@@ -140,7 +144,6 @@ class Call : public Recordable, public std::enable_shared_from_this<Call> {
...
@@ -140,7 +144,6 @@ class Call : public Recordable, public std::enable_shared_from_this<Call> {
std
::
string
getPeerNumber
()
const
{
std
::
string
getPeerNumber
()
const
{
return
peerNumber_
;
return
peerNumber_
;
}
}
/**
/**
* Set the display name (caller in ingoing)
* Set the display name (caller in ingoing)
* not protected by mutex (when created)
* not protected by mutex (when created)
...
...
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