From 4f2415a627eb827d8ad6ec8e06f890957535ecaa Mon Sep 17 00:00:00 2001 From: kpfleming Date: Thu, 29 Sep 2005 03:51:31 +0000 Subject: 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 --- ztcfg.c | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/ztcfg.c b/ztcfg.c index 044e451..e5d0234 100755 --- a/ztcfg.c +++ b/ztcfg.c @@ -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) { -- cgit v1.2.3