Merged revisions 96449 via svnmerge from
authorRussell Bryant <russell@russellbryant.com>
Fri, 4 Jan 2008 16:21:08 +0000 (16:21 +0000)
committerRussell Bryant <russell@russellbryant.com>
Fri, 4 Jan 2008 16:21:08 +0000 (16:21 +0000)
https://origsvn.digium.com/svn/asterisk/branches/1.4

........
r96449 | russell | 2008-01-04 10:19:22 -0600 (Fri, 04 Jan 2008) | 7 lines

Make use of the temporary channel pointer while the pvt is unlocked.

(closes issue #11675)
Reported by: flefoll
Patches:
      chan_zap.c.patch-store-owner-before-unlock uploaded by flefoll (license 244)

........

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

channels/chan_zap.c

index f9c02d2..1654301 100644 (file)
@@ -10495,7 +10495,7 @@ static void *pri_dchannel(void *vpri)
                                                if (!ast_strlen_zero(e->ringing.useruserinfo)) {
                                                        struct ast_channel *owner = pri->pvts[chanpos]->owner;
                                                        ast_mutex_unlock(&pri->pvts[chanpos]->lock);
-                                                       pbx_builtin_setvar_helper(pri->pvts[chanpos]->owner, "USERUSERINFO", e->ringing.useruserinfo);
+                                                       pbx_builtin_setvar_helper(owner, "USERUSERINFO", e->ringing.useruserinfo);
                                                        ast_mutex_lock(&pri->pvts[chanpos]->lock);
                                                }
 #endif
@@ -10652,7 +10652,7 @@ static void *pri_dchannel(void *vpri)
                                                if (!ast_strlen_zero(e->answer.useruserinfo)) {
                                                        struct ast_channel *owner = pri->pvts[chanpos]->owner;
                                                        ast_mutex_unlock(&pri->pvts[chanpos]->lock);
-                                                       pbx_builtin_setvar_helper(pri->pvts[chanpos]->owner, "USERUSERINFO", e->answer.useruserinfo);
+                                                       pbx_builtin_setvar_helper(owner, "USERUSERINFO", e->answer.useruserinfo);
                                                        ast_mutex_lock(&pri->pvts[chanpos]->lock);
                                                }
 #endif
@@ -10718,7 +10718,7 @@ static void *pri_dchannel(void *vpri)
                                                if (pri->pvts[chanpos]->owner && !ast_strlen_zero(e->hangup.useruserinfo)) {
                                                        struct ast_channel *owner = pri->pvts[chanpos]->owner;
                                                        ast_mutex_unlock(&pri->pvts[chanpos]->lock);
-                                                       pbx_builtin_setvar_helper(pri->pvts[chanpos]->owner, "USERUSERINFO", e->hangup.useruserinfo);
+                                                       pbx_builtin_setvar_helper(owner, "USERUSERINFO", e->hangup.useruserinfo);
                                                        ast_mutex_lock(&pri->pvts[chanpos]->lock);
                                                }
 #endif
@@ -10784,7 +10784,7 @@ static void *pri_dchannel(void *vpri)
                                                if (!ast_strlen_zero(e->hangup.useruserinfo)) {
                                                        struct ast_channel *owner = pri->pvts[chanpos]->owner;
                                                        ast_mutex_unlock(&pri->pvts[chanpos]->lock);
-                                                       pbx_builtin_setvar_helper(pri->pvts[chanpos]->owner, "USERUSERINFO", e->hangup.useruserinfo);
+                                                       pbx_builtin_setvar_helper(owner, "USERUSERINFO", e->hangup.useruserinfo);
                                                        ast_mutex_lock(&pri->pvts[chanpos]->lock);
                                                }
 #endif
@@ -10814,7 +10814,7 @@ static void *pri_dchannel(void *vpri)
                                                if (!ast_strlen_zero(e->hangup.useruserinfo)) {
                                                        struct ast_channel *owner = pri->pvts[chanpos]->owner;
                                                        ast_mutex_unlock(&pri->pvts[chanpos]->lock);
-                                                       pbx_builtin_setvar_helper(pri->pvts[chanpos]->owner, "USERUSERINFO", e->hangup.useruserinfo);
+                                                       pbx_builtin_setvar_helper(owner, "USERUSERINFO", e->hangup.useruserinfo);
                                                        ast_mutex_lock(&pri->pvts[chanpos]->lock);
                                                }
 #endif