[asterisk-commits] seanbright: trunk r114143 - /trunk/apps/app_chanspy.c
SVN commits to the Asterisk project
asterisk-commits at lists.digium.com
Tue Apr 15 12:54:39 CDT 2008
Author: seanbright
Date: Tue Apr 15 12:54:38 2008
New Revision: 114143
URL: http://svn.digium.com/view/asterisk?view=rev&rev=114143
Log:
I'm not sure why, but "this" bothers me. Ba dum dum.
Modified:
trunk/apps/app_chanspy.c
Modified: trunk/apps/app_chanspy.c
URL: http://svn.digium.com/view/asterisk/trunk/apps/app_chanspy.c?view=diff&rev=114143&r1=114142&r2=114143
==============================================================================
--- trunk/apps/app_chanspy.c (original)
+++ trunk/apps/app_chanspy.c Tue Apr 15 12:54:38 2008
@@ -496,30 +496,29 @@
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);
-
- if (!this)
+ next = ast_channel_walk_locked(last);
+
+ 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,
More information about the asterisk-commits
mailing list