mirror of
https://github.com/asterisk/asterisk.git
synced 2025-10-22 20:56:39 +00:00
Must call spanstat before checking number of channels (bug #1796)
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@3159 65c4cc65-6c06-0410-ace0-fbb531ad65f3
This commit is contained in:
@@ -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
|
||||
|
Reference in New Issue
Block a user