From: Richard Mudgett Date: Tue, 17 Mar 2015 16:10:39 +0000 (+0000) Subject: res_pjsip: Add reason comment. X-Git-Tag: 13.3.0-rc1~17 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=522f0631863fb4ddf6337ecbdbf9b56c92eb757f;p=thirdparty%2Fasterisk.git res_pjsip: Add reason comment. git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/13@433005 65c4cc65-6c06-0410-ace0-fbb531ad65f3 --- diff --git a/res/res_pjsip.c b/res/res_pjsip.c index 133546126e..20ac7a03e7 100644 --- a/res/res_pjsip.c +++ b/res/res_pjsip.c @@ -2975,6 +2975,12 @@ static int sync_task(void *data) std->fail = std->task(std->task_data); + /* + * Once we unlock std->lock after signaling, we cannot access + * std again. The thread waiting within + * ast_sip_push_task_synchronous() is free to continue and + * release its local variable (std). + */ ast_mutex_lock(&std->lock); std->complete = 1; ast_cond_signal(&std->cond);