]> git.ipfire.org Git - thirdparty/asterisk.git/commitdiff
Add channel locking to a function that needed to be doing it. This is just a
authorRussell Bryant <russell@russellbryant.com>
Mon, 26 Nov 2007 17:41:04 +0000 (17:41 +0000)
committerRussell Bryant <russell@russellbryant.com>
Mon, 26 Nov 2007 17:41:04 +0000 (17:41 +0000)
little something I noticed while working on a completely unrelated issue.

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

main/pbx.c

index 4df500921b393e8cb2f10b9f0ead902929d7f7f5..c6b67da3920a049bb39863ccb69ffa0a98c17b05 100644 (file)
@@ -2298,8 +2298,10 @@ int ast_spawn_extension(struct ast_channel *c, const char *context, const char *
 /* helper function to set extension and priority */
 static void set_ext_pri(struct ast_channel *c, const char *exten, int pri)
 {
+       ast_channel_lock(c);
        ast_copy_string(c->exten, exten, sizeof(c->exten));
        c->priority = pri;
+       ast_channel_unlock(c);
 }
 
 /*!