aboutsummaryrefslogtreecommitdiffstats
path: root/main/channel.c
diff options
context:
space:
mode:
authorfile <file@f38db490-d61c-443f-a65b-d21fe96a405b>2007-06-07 18:39:52 +0000
committerfile <file@f38db490-d61c-443f-a65b-d21fe96a405b>2007-06-07 18:39:52 +0000
commit560775686e52dd88633946645e9551be46d20a4e (patch)
treea710e5e216546f9713cef9e2a24137e4e9991e63 /main/channel.c
parent01c77f4b152937156c2524f14aa82475a2c13a7f (diff)
Fix logic when doing a name based channel search for a structure when you want to start from a specific point in the channel list. (issue #9324 reported by slavon)
git-svn-id: http://svn.digium.com/svn/asterisk/branches/1.4@68157 f38db490-d61c-443f-a65b-d21fe96a405b
Diffstat (limited to 'main/channel.c')
-rw-r--r--main/channel.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/main/channel.c b/main/channel.c
index 5063e5f23..c1d3681d3 100644
--- a/main/channel.c
+++ b/main/channel.c
@@ -1046,6 +1046,11 @@ static struct ast_channel *channel_find_locked(const struct ast_channel *prev,
* want to return NULL, instead of trying to deref NULL in the
* next section.
*/
+ prev = NULL;
+ /* We want prev to be NULL in case we end up doing more searching through
+ * the channel list to find the channel (ie: name searching). If we didn't
+ * set this to NULL the logic would just blow up
+ */
}
if (name) { /* want match by name */
if ((!namelen && strcasecmp(c->name, name)) ||