]> git.ipfire.org Git - thirdparty/asterisk.git/commitdiff
Fix logic when doing a name based channel search for a structure when you want to...
authorJoshua Colp <jcolp@digium.com>
Thu, 7 Jun 2007 18:39:52 +0000 (18:39 +0000)
committerJoshua Colp <jcolp@digium.com>
Thu, 7 Jun 2007 18:39:52 +0000 (18:39 +0000)
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@68157 65c4cc65-6c06-0410-ace0-fbb531ad65f3

main/channel.c

index 5063e5f233835ccc5e5e84d3445a230fb550d187..c1d3681d312b762131ce28ab9a46a16e016c8240 100644 (file)
@@ -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)) ||