res_pjsip: Add reason comment.
authorRichard Mudgett <rmudgett@digium.com>
Tue, 17 Mar 2015 16:11:36 +0000 (16:11 +0000)
committerRichard Mudgett <rmudgett@digium.com>
Tue, 17 Mar 2015 16:11:36 +0000 (16:11 +0000)
........

Merged revisions 433005 from http://svn.asterisk.org/svn/asterisk/branches/13

git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@433006 65c4cc65-6c06-0410-ace0-fbb531ad65f3

res/res_pjsip.c

index f063d79..83133b4 100644 (file)
@@ -2981,6 +2981,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);