diff options
author | mmichelson <mmichelson@f38db490-d61c-443f-a65b-d21fe96a405b> | 2008-07-23 19:06:16 +0000 |
---|---|---|
committer | mmichelson <mmichelson@f38db490-d61c-443f-a65b-d21fe96a405b> | 2008-07-23 19:06:16 +0000 |
commit | 16cfb7953f215a1299b3933fb4d38895017cb0d2 (patch) | |
tree | 747fc3d47c4c8226a583645fd4795d84ccff6a92 | |
parent | 6a966917f0589fd125bd0e8f469cd14e40273e0d (diff) |
Zap/pseudo is ten characters, but DAHDI/pseudo is
twelve. The strncmp call in next_channel should
account for this.
git-svn-id: http://svn.digium.com/svn/asterisk/branches/1.4@133104 f38db490-d61c-443f-a65b-d21fe96a405b
-rw-r--r-- | apps/app_chanspy.c | 11 |
1 files changed, 10 insertions, 1 deletions
diff --git a/apps/app_chanspy.c b/apps/app_chanspy.c index d50680300..d9f20a177 100644 --- a/apps/app_chanspy.c +++ b/apps/app_chanspy.c @@ -55,6 +55,15 @@ ASTERISK_FILE_VERSION(__FILE__, "$Revision$") #define AST_NAME_STRLEN 256 +/* "Zap/pseudo" is ten characters. + * "DAHDI/pseudo" is twelve characters. + */ +#ifdef HAVE_ZAPTEL +#define PSEUDO_CHAN_LEN 10 +#else +#define PSEUDO_CHAN_LEN 12 +#endif + static const char *tdesc = "Listen to a channel, and optionally whisper into it"; static const char *app_chan = "ChanSpy"; static const char *desc_chan = @@ -475,7 +484,7 @@ redo: return NULL; snprintf(channel_name, AST_CHANNEL_NAME, "%s/pseudo", dahdi_chan_name); - if (!strncmp(this->name, channel_name, 10)) { + if (!strncmp(this->name, channel_name, PSEUDO_CHAN_LEN)) { last = this; ast_channel_unlock(this); goto redo; |