mirror of
https://github.com/asterisk/asterisk.git
synced 2025-10-25 06:00:36 +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 offset;
|
||||||
int myswitchtype;
|
int myswitchtype;
|
||||||
offset = 0;
|
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)) {
|
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));
|
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);
|
free(tmp);
|
||||||
@@ -5709,6 +5703,12 @@ static struct zt_pvt *mkintf(int channel, int signalling, int radio, struct zt_p
|
|||||||
free(tmp);
|
free(tmp);
|
||||||
return NULL;
|
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)
|
if (signalling == SIG_PRI)
|
||||||
myswitchtype = switchtype;
|
myswitchtype = switchtype;
|
||||||
else
|
else
|
||||||
|
|||||||
Reference in New Issue
Block a user