diff options
author | markster <markster@f38db490-d61c-443f-a65b-d21fe96a405b> | 2004-06-06 22:22:48 +0000 |
---|---|---|
committer | markster <markster@f38db490-d61c-443f-a65b-d21fe96a405b> | 2004-06-06 22:22:48 +0000 |
commit | 72dffa22a26cf7697e71c19763cb2088b2a36548 (patch) | |
tree | 06a7b6c3e1740f8b3e09a2f9a11d8f48055fba70 /channels/chan_zap.c | |
parent | a66fb09453220204926eda116742865c37966a0a (diff) |
Must call spanstat before checking number of channels (bug #1796)
git-svn-id: http://svn.digium.com/svn/asterisk/trunk@3159 f38db490-d61c-443f-a65b-d21fe96a405b
Diffstat (limited to 'channels/chan_zap.c')
-rwxr-xr-x | channels/chan_zap.c | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/channels/chan_zap.c b/channels/chan_zap.c index eea2ab31d..666dec0fe 100755 --- a/channels/chan_zap.c +++ b/channels/chan_zap.c @@ -5687,12 +5687,6 @@ static struct zt_pvt *mkintf(int channel, int signalling, int radio, struct zt_p int offset; int myswitchtype; offset = 0; - pri_resolve_span(&span, channel, (channel - p.chanpos), &si); - if (span < 0) { - ast_log(LOG_WARNING, "Channel %d: Unable to find locate channel/trunk group!\n", channel); - free(tmp); - return NULL; - } if ((signalling == SIG_PRI) && ioctl(tmp->subs[SUB_REAL].zfd, ZT_AUDIOMODE, &offset)) { ast_log(LOG_ERROR, "Unable to set clear mode on clear channel %d of span %d: %s\n", channel, p.spanno, strerror(errno)); free(tmp); @@ -5709,6 +5703,12 @@ static struct zt_pvt *mkintf(int channel, int signalling, int radio, struct zt_p free(tmp); return NULL; } + pri_resolve_span(&span, channel, (channel - p.chanpos), &si); + if (span < 0) { + ast_log(LOG_WARNING, "Channel %d: Unable to find locate channel/trunk group!\n", channel); + free(tmp); + return NULL; + } if (signalling == SIG_PRI) myswitchtype = switchtype; else |