summaryrefslogtreecommitdiff
path: root/ztcfg.c
diff options
context:
space:
mode:
authormattf <mattf@5390a7c7-147a-4af0-8ec9-7488f05a26cb>2006-11-29 17:31:17 +0000
committermattf <mattf@5390a7c7-147a-4af0-8ec9-7488f05a26cb>2006-11-29 17:31:17 +0000
commite7da1c6365c9cc4c3c20c4fef9a6904aea8d29ed (patch)
tree8827a17007989f1771bf33b361a166b43c388478 /ztcfg.c
parent7ce8ef156d2953d9597c58626ab0aac2f150aab9 (diff)
Fix for #7860. Make sure we don't allow channel 16 to be clear if it's in E1/CAS mode.
git-svn-id: http://svn.digium.com/svn/zaptel/branches/1.4@1658 5390a7c7-147a-4af0-8ec9-7488f05a26cb
Diffstat (limited to 'ztcfg.c')
-rw-r--r--ztcfg.c10
1 files changed, 10 insertions, 0 deletions
diff --git a/ztcfg.c b/ztcfg.c
index 471ba30..611a347 100644
--- a/ztcfg.c
+++ b/ztcfg.c
@@ -1394,6 +1394,16 @@ int main(int argc, char *argv[])
current_state.channo = cc[x].chan | ZT_GET_PARAMS_RETURN_MASTER;
if (ioctl(fd, ZT_GET_PARAMS, &current_state))
needupdate = 1;
+ else if (current_state.chanpos == 16 &&
+ (cc[x].sigtype & ZT_SIG_CLEAR) &&
+ !(lc[current_state.spanno - 1].lineconfig &
+ (ZT_CONFIG_D4|ZT_CONFIG_ESF|ZT_CONFIG_B8ZS|ZT_CONFIG_CCS))) {
+ fprintf(stderr,
+ "CAS signalling on span %u conflicts with %s on channel %u.\n",
+ current_state.spanno,
+ sigtype_to_str(cc[x].sigtype), x);
+ exit(1);
+ }
}
if (!needupdate) {