diff options
author | russell <russell@f38db490-d61c-443f-a65b-d21fe96a405b> | 2007-11-28 00:20:13 +0000 |
---|---|---|
committer | russell <russell@f38db490-d61c-443f-a65b-d21fe96a405b> | 2007-11-28 00:20:13 +0000 |
commit | ae76caf40eb8c72c297c0ed3d1f83001bcfaf799 (patch) | |
tree | 992b2950abc245eb33a35abdc216ac44a38d4687 /main/pbx.c | |
parent | 286f581f4e8e0d1493f7551a35b47ce935675fa6 (diff) |
- update documentation for some of the goto functions to note that they
handle locking the channel as needed
- update ast_explicit_goto() to lock the channel as needed
git-svn-id: http://svn.digium.com/svn/asterisk/branches/1.4@89893 f38db490-d61c-443f-a65b-d21fe96a405b
Diffstat (limited to 'main/pbx.c')
-rw-r--r-- | main/pbx.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/main/pbx.c b/main/pbx.c index 025bcef21..fc3ccb15e 100644 --- a/main/pbx.c +++ b/main/pbx.c @@ -4581,6 +4581,8 @@ int ast_explicit_goto(struct ast_channel *chan, const char *context, const char if (!chan) return -1; + ast_channel_lock(chan); + if (!ast_strlen_zero(context)) ast_copy_string(chan->context, context, sizeof(chan->context)); if (!ast_strlen_zero(exten)) @@ -4592,6 +4594,8 @@ int ast_explicit_goto(struct ast_channel *chan, const char *context, const char chan->priority--; } + ast_channel_unlock(chan); + return 0; } |