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
93a34c9a
Commit
93a34c9a
authored
4 years ago
by
Adrien Béraud
Browse files
Options
Downloads
Patches
Plain Diff
notify_one: cleanup
Change-Id: I26433e1463ecb261fb586431b6c43a3e6b931dcf
parent
e5d95eb6
No related branches found
No related tags found
No related merge requests found
Changes
3
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
src/jamidht/connectionmanager.cpp
+9
-10
9 additions, 10 deletions
src/jamidht/connectionmanager.cpp
src/media/audio/jack/jacklayer.cpp
+1
-1
1 addition, 1 deletion
src/media/audio/jack/jacklayer.cpp
src/media/audio/opensl/opensllayer.cpp
+0
-1
0 additions, 1 deletion
src/media/audio/opensl/opensllayer.cpp
with
10 additions
and
12 deletions
src/jamidht/connectionmanager.cpp
+
9
−
10
View file @
93a34c9a
...
@@ -43,10 +43,10 @@ namespace jami {
...
@@ -43,10 +43,10 @@ namespace jami {
struct
ConnectionInfo
struct
ConnectionInfo
{
{
std
::
mutex
mutex_
{};
std
::
condition_variable
responseCv_
{};
std
::
condition_variable
responseCv_
{};
std
::
atomic_
bool
responseReceived_
{
false
};
bool
responseReceived_
{
false
};
PeerConnectionRequest
response_
{};
PeerConnectionRequest
response_
{};
std
::
mutex
mutex_
{};
std
::
unique_ptr
<
IceTransport
>
ice_
{
nullptr
};
std
::
unique_ptr
<
IceTransport
>
ice_
{
nullptr
};
// Used to store currently non ready TLS Socket
// Used to store currently non ready TLS Socket
std
::
unique_ptr
<
TlsSocketEndpoint
>
tls_
{
nullptr
};
std
::
unique_ptr
<
TlsSocketEndpoint
>
tls_
{
nullptr
};
...
@@ -325,11 +325,10 @@ ConnectionManager::Impl::connectDeviceStartIce(const DeviceId& deviceId, const d
...
@@ -325,11 +325,10 @@ ConnectionManager::Impl::connectDeviceStartIce(const DeviceId& deviceId, const d
return
;
return
;
}
}
auto
&
response
=
info
->
response_
;
if
(
!
ice
)
if
(
!
ice
)
return
;
return
;
auto
sdp
=
ice
->
parseIceCandidates
(
response
.
ice_msg
);
auto
sdp
=
ice
->
parseIceCandidates
(
info
->
response
_
.
ice_msg
);
if
(
not
ice
->
startIce
({
sdp
.
rem_ufrag
,
sdp
.
rem_pwd
},
std
::
move
(
sdp
.
rem_candidates
)))
{
if
(
not
ice
->
startIce
({
sdp
.
rem_ufrag
,
sdp
.
rem_pwd
},
std
::
move
(
sdp
.
rem_candidates
)))
{
JAMI_WARN
(
"[Account:%s] start ICE failed"
,
account
.
getAccountID
().
c_str
());
JAMI_WARN
(
"[Account:%s] start ICE failed"
,
account
.
getAccountID
().
c_str
());
...
@@ -607,14 +606,14 @@ ConnectionManager::Impl::onPeerResponse(const PeerConnectionRequest& req)
...
@@ -607,14 +606,14 @@ ConnectionManager::Impl::onPeerResponse(const PeerConnectionRequest& req)
{
{
auto
device
=
req
.
from
;
auto
device
=
req
.
from
;
JAMI_INFO
()
<<
account
<<
" New response received from "
<<
device
.
to_c_str
();
JAMI_INFO
()
<<
account
<<
" New response received from "
<<
device
.
to_c_str
();
auto
info
=
getInfo
(
device
,
req
.
id
);
if
(
auto
info
=
getInfo
(
device
,
req
.
id
))
{
if
(
!
info
)
{
std
::
lock_guard
<
std
::
mutex
>
lk
{
info
->
mutex_
};
JAMI_WARN
()
<<
account
<<
" respond received, but cannot find request"
;
return
;
}
info
->
responseReceived_
=
true
;
info
->
responseReceived_
=
true
;
info
->
response_
=
std
::
move
(
req
);
info
->
response_
=
std
::
move
(
req
);
info
->
responseCv_
.
notify_one
();
info
->
responseCv_
.
notify_one
();
}
else
{
JAMI_WARN
()
<<
account
<<
" respond received, but cannot find request"
;
}
}
}
void
void
...
...
This diff is collapsed.
Click to expand it.
src/media/audio/jack/jacklayer.cpp
+
1
−
1
View file @
93a34c9a
...
@@ -413,8 +413,8 @@ void JackLayer::stopStream(AudioDeviceType)
...
@@ -413,8 +413,8 @@ void JackLayer::stopStream(AudioDeviceType)
if
(
status_
!=
Status
::
Started
)
if
(
status_
!=
Status
::
Started
)
return
;
return
;
status_
=
Status
::
Idle
;
status_
=
Status
::
Idle
;
}
data_ready_
.
notify_one
();
data_ready_
.
notify_one
();
}
if
(
jack_deactivate
(
playbackClient_
)
or
jack_deactivate
(
captureClient_
))
{
if
(
jack_deactivate
(
playbackClient_
)
or
jack_deactivate
(
captureClient_
))
{
JAMI_ERR
(
"JACK client could not deactivate"
);
JAMI_ERR
(
"JACK client could not deactivate"
);
...
...
This diff is collapsed.
Click to expand it.
src/media/audio/opensl/opensllayer.cpp
+
0
−
1
View file @
93a34c9a
...
@@ -308,7 +308,6 @@ void
...
@@ -308,7 +308,6 @@ void
OpenSLLayer
::
engineServiceRec
()
OpenSLLayer
::
engineServiceRec
()
{
{
recCv
.
notify_one
();
recCv
.
notify_one
();
return
;
}
}
void
void
...
...
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