aboutsummaryrefslogtreecommitdiffstats
path: root/apps/app_chanspy.c
diff options
context:
space:
mode:
authorseanbright <seanbright@f38db490-d61c-443f-a65b-d21fe96a405b>2008-04-15 17:54:38 +0000
committerseanbright <seanbright@f38db490-d61c-443f-a65b-d21fe96a405b>2008-04-15 17:54:38 +0000
commit8ac781fccefd4347ba9c027fa8b73264386393e3 (patch)
treecf977e6e51026c7bddfc3b5ca7d22f849ed693a0 /apps/app_chanspy.c
parent9c4904b708a90afe284f98309c7806049dbbb52c (diff)
I'm not sure why, but "this" bothers me. Ba dum dum.
git-svn-id: http://svn.digium.com/svn/asterisk/trunk@114143 f38db490-d61c-443f-a65b-d21fe96a405b
Diffstat (limited to 'apps/app_chanspy.c')
-rw-r--r--apps/app_chanspy.c23
1 files changed, 11 insertions, 12 deletions
diff --git a/apps/app_chanspy.c b/apps/app_chanspy.c
index 66a2d214e..c764f029f 100644
--- a/apps/app_chanspy.c
+++ b/apps/app_chanspy.c
@@ -496,30 +496,29 @@ static struct chanspy_ds *next_channel(struct ast_channel *chan,
const struct ast_channel *last, const char *spec,
const char *exten, const char *context, struct chanspy_ds *chanspy_ds)
{
- struct ast_channel *this;
+ struct ast_channel *next;
redo:
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))
- this = ast_walk_channel_by_exten_locked(last, exten, context);
+ next = ast_walk_channel_by_exten_locked(last, exten, context);
else
- this = ast_channel_walk_locked(last);
+ next = ast_channel_walk_locked(last);
- if (!this)
+ if (!next)
return NULL;
- if (!strncmp(this->name, "Zap/pseudo", 10)) {
- ast_channel_unlock(this);
+ if (!strncmp(next->name, "Zap/pseudo", 10)) {
+ ast_channel_unlock(next);
goto redo;
- } else if (this == chan) {
- last = this;
- ast_channel_unlock(this);
+ } else if (next == chan) {
+ last = next;
+ ast_channel_unlock(next);
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,