Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
A
asterisk
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Container registry
Model registry
Operate
Environments
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Issue analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Voice
asterisk
Commits
0388c40b
Commit
0388c40b
authored
9 years ago
by
zuul
Committed by
Gerrit Code Review
9 years ago
Browse files
Options
Downloads
Plain Diff
Merge "chan_pjsip: Lock channel when checking for RTP changes."
parents
f0855358
cdb7edbe
Branches
Branches containing commit
Tags
Tags containing commit
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
channels/chan_pjsip.c
+9
-0
9 additions, 0 deletions
channels/chan_pjsip.c
with
9 additions
and
0 deletions
channels/chan_pjsip.c
+
9
−
0
View file @
0388c40b
...
...
@@ -269,6 +269,9 @@ static int direct_media_mitigate_glare(struct ast_sip_session *session)
return
0
;
}
/*!
* \pre chan is locked
*/
static
int
check_for_rtp_changes
(
struct
ast_channel
*
chan
,
struct
ast_rtp_instance
*
rtp
,
struct
ast_sip_session_media
*
media
,
int
rtcp_fd
)
{
...
...
@@ -338,6 +341,11 @@ static int send_direct_media_request(void *data)
int
changed
=
0
;
int
res
=
0
;
/* The channel needs to be locked when checking for RTP changes.
* Otherwise, we could end up destroying an underlying RTCP structure
* at the same time that the channel thread is attempting to read RTCP
*/
ast_channel_lock
(
cdata
->
chan
);
if
(
pvt
->
media
[
SIP_MEDIA_AUDIO
])
{
changed
|=
check_for_rtp_changes
(
cdata
->
chan
,
cdata
->
rtp
,
pvt
->
media
[
SIP_MEDIA_AUDIO
],
1
);
...
...
@@ -346,6 +354,7 @@ static int send_direct_media_request(void *data)
changed
|=
check_for_rtp_changes
(
cdata
->
chan
,
cdata
->
vrtp
,
pvt
->
media
[
SIP_MEDIA_VIDEO
],
3
);
}
ast_channel_unlock
(
cdata
->
chan
);
if
(
direct_media_mitigate_glare
(
cdata
->
session
))
{
ast_debug
(
4
,
"Disregarding setting RTP on %s: mitigating re-INVITE glare
\n
"
,
ast_channel_name
(
cdata
->
chan
));
...
...
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