I'm not sure why, but "this" bothers me. Ba dum dum.
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@114143 65c4cc65-6c06-0410-ace0-fbb531ad65f3
This commit is contained in:
parent
b9bb0749d1
commit
98c789ad12
|
@ -496,30 +496,29 @@ static struct chanspy_ds *next_channel(struct ast_channel *chan,
|
||||||
const struct ast_channel *last, const char *spec,
|
const struct ast_channel *last, const char *spec,
|
||||||
const char *exten, const char *context, struct chanspy_ds *chanspy_ds)
|
const char *exten, const char *context, struct chanspy_ds *chanspy_ds)
|
||||||
{
|
{
|
||||||
struct ast_channel *this;
|
struct ast_channel *next;
|
||||||
|
|
||||||
redo:
|
redo:
|
||||||
if (!ast_strlen_zero(spec))
|
if (!ast_strlen_zero(spec))
|
||||||
this = ast_walk_channel_by_name_prefix_locked(last, spec, strlen(spec));
|
next = ast_walk_channel_by_name_prefix_locked(last, spec, strlen(spec));
|
||||||
|
|
||||||
else if (!ast_strlen_zero(exten))
|
else if (!ast_strlen_zero(exten))
|
||||||
this = ast_walk_channel_by_exten_locked(last, exten, context);
|
next = ast_walk_channel_by_exten_locked(last, exten, context);
|
||||||
else
|
else
|
||||||
this = ast_channel_walk_locked(last);
|
next = ast_channel_walk_locked(last);
|
||||||
|
|
||||||
if (!this)
|
if (!next)
|
||||||
return NULL;
|
return NULL;
|
||||||
|
|
||||||
if (!strncmp(this->name, "Zap/pseudo", 10)) {
|
if (!strncmp(next->name, "Zap/pseudo", 10)) {
|
||||||
ast_channel_unlock(this);
|
ast_channel_unlock(next);
|
||||||
goto redo;
|
goto redo;
|
||||||
} else if (this == chan) {
|
} else if (next == chan) {
|
||||||
last = this;
|
last = next;
|
||||||
ast_channel_unlock(this);
|
ast_channel_unlock(next);
|
||||||
goto redo;
|
goto redo;
|
||||||
}
|
}
|
||||||
|
|
||||||
return setup_chanspy_ds(this, chanspy_ds);
|
return setup_chanspy_ds(next, chanspy_ds);
|
||||||
}
|
}
|
||||||
|
|
||||||
static int common_exec(struct ast_channel *chan, const struct ast_flags *flags,
|
static int common_exec(struct ast_channel *chan, const struct ast_flags *flags,
|
||||||
|
|
Loading…
Reference in New Issue