diff options
author | kpfleming <kpfleming@5390a7c7-147a-4af0-8ec9-7488f05a26cb> | 2005-09-29 03:51:31 +0000 |
---|---|---|
committer | kpfleming <kpfleming@5390a7c7-147a-4af0-8ec9-7488f05a26cb> | 2005-09-29 03:51:31 +0000 |
commit | 4f2415a627eb827d8ad6ec8e06f890957535ecaa (patch) | |
tree | fdd8b4874311228f6013d22aee5f7abd4ef40118 | |
parent | dc21e8e7aae9e191aa9ac0a3d5fe1d4b64876a0d (diff) |
don't fail on channels that were not previously configured
git-svn-id: http://svn.digium.com/svn/zaptel/trunk@783 5390a7c7-147a-4af0-8ec9-7488f05a26cb
-rwxr-xr-x | ztcfg.c | 12 |
1 files changed, 6 insertions, 6 deletions
@@ -1276,14 +1276,14 @@ int main(int argc, char *argv[]) if (!cc[x].sigtype) continue; - if (!force) { + if (!needupdate) { memset(¤t_state, 0, sizeof(current_state)); current_state.channo = cc[x].chan | ZT_GET_PARAMS_RETURN_MASTER; - if (ioctl(fd, ZT_GET_PARAMS, ¤t_state)) { - fprintf(stderr, "ZT_GET_PARAMS failed on channel %d: %s (%d)\n", x, strerror(errno), errno); - close(fd); - exit(1); - } + if (ioctl(fd, ZT_GET_PARAMS, ¤t_state)) + needupdate = 1; + } + + if (!needupdate) { master = current_state.channo >> 16; if (cc[x].sigtype != current_state.sigtype) { |