[Asterisk-code-review] chan iax2: Prevent deadlock between hangup and sending lagrq... (asterisk[master])
Y Ateya
asteriskteam at digium.com
Fri Apr 24 17:36:45 CDT 2015
Y Ateya has posted comments on this change.
Change subject: chan_iax2: Prevent deadlock between hangup and sending lagrq/ping
......................................................................
Patch Set 5:
(9 comments)
Thanks for you comments. BTW, does adding new flag `destroy_initiated` is better or adding new state for pvt->state?
https://gerrit.asterisk.org/#/c/169/5/channels/chan_iax2.c
File channels/chan_iax2.c:
Line 1684: static int iax_try_lock_unless_hungup(int callno){
> Guideline: Function curly on its own line.
Done
Line 1685: while (ast_mutex_trylock(&iaxsl[callno]) != 0){
> Add missing space: ) {
Done
Line 1687: if(!iaxs[callno] || (iaxs[callno] && iaxs[callno]->destroy_initiated)) {
> Add missing space: if (
Done
Line 1691: ast_debug(3,"Waiting for the callno %d hangup to finish\n", callno);
> This debug message will spam and should be removed.
Done
Line 1692: usleep(100);
> Instead of a dead wait use:
Done
Line 1708: /* callno is now locked. */
> This line is using spaces to indent when you need to use tabs.
Done
Line 1769: /* callno is now locked. */
> same here
Done
Line 2087: /* Remove scheduled (but didn't run yet) PINGs or LAGRQs */
: /* Already running tasks will be terminated because of destroy_initiated. */
> This should be one comment block.
Done
https://gerrit.asterisk.org/#/c/169/5/main/sched.c
File main/sched.c:
Line 507: ast_log(LOG_WARNING, "Waiting for sched task %d to finish to delete it.\n", id);
> This will spam the log even under normal use and by different scheduled ite
Will revert it and open separate issue for it; to get wider discussion.
--
To view, visit https://gerrit.asterisk.org/169
To unsubscribe, visit https://gerrit.asterisk.org/settings
Gerrit-MessageType: comment
Gerrit-Change-Id: I03bec1fc8faacb89630269e935fa667c6d6c080c
Gerrit-PatchSet: 5
Gerrit-Project: asterisk
Gerrit-Branch: master
Gerrit-Owner: Y Ateya <y.ateya at starkbits.com>
Gerrit-Reviewer: George Joseph <george.joseph at fairview5.com>
Gerrit-Reviewer: Richard Mudgett <rmudgett at digium.com>
Gerrit-Reviewer: Y Ateya <y.ateya at starkbits.com>
Gerrit-HasComments: Yes
More information about the asterisk-code-review
mailing list