[Asterisk-code-review] res rtp asterisk: Prevent simultaneous access to DTLS SSL co... (asterisk[11])

Joshua Colp asteriskteam at digium.com
Mon Jul 6 07:52:42 CDT 2015


Joshua Colp has posted comments on this change.

Change subject: res_rtp_asterisk: Prevent simultaneous access to DTLS SSL context.
......................................................................


Patch Set 1:

(2 comments)

https://gerrit.asterisk.org/#/c/786/1/res/res_rtp_asterisk.c
File res/res_rtp_asterisk.c:

Line 1767: 
         : 	dtls->timeout_timer = -1;
> If we aren't -1, that would imply that we scheduled something with ast_sche
This is invoked from the scheduler callback, we can't cancel. If it's not -1 then it's ourselves.


Line 1823: 	ast_mutex_lock(&dtls->lock);
         : 	AST_SCHED_DEL_UNREF(rtp->sched, dtls->timeout_timer, ao2_ref(instance, -1));
         : 	ast_mutex_unlock(&dtls->lock);
> I'd add an assert in here that dtls->timeout_timer != -1, for the same reas
It's okay for the timeout_timer to be -1 here, as this function may get called after the timeout timer has been stopped.


-- 
To view, visit https://gerrit.asterisk.org/786
To unsubscribe, visit https://gerrit.asterisk.org/settings

Gerrit-MessageType: comment
Gerrit-Change-Id: Ib75ea2546f29d6efc3d2d37c58df6986c7bd9b91
Gerrit-PatchSet: 1
Gerrit-Project: asterisk
Gerrit-Branch: 11
Gerrit-Owner: Joshua Colp <jcolp at digium.com>
Gerrit-Reviewer: Joshua Colp <jcolp at digium.com>
Gerrit-Reviewer: Matt Jordan <mjordan at digium.com>
Gerrit-HasComments: Yes



More information about the asterisk-code-review mailing list