summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorkpfleming <kpfleming@5390a7c7-147a-4af0-8ec9-7488f05a26cb>2005-09-29 03:51:31 +0000
committerkpfleming <kpfleming@5390a7c7-147a-4af0-8ec9-7488f05a26cb>2005-09-29 03:51:31 +0000
commit4f2415a627eb827d8ad6ec8e06f890957535ecaa (patch)
treefdd8b4874311228f6013d22aee5f7abd4ef40118
parentdc21e8e7aae9e191aa9ac0a3d5fe1d4b64876a0d (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-xztcfg.c12
1 files 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(&current_state, 0, sizeof(current_state));
current_state.channo = cc[x].chan | ZT_GET_PARAMS_RETURN_MASTER;
- if (ioctl(fd, ZT_GET_PARAMS, &current_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, &current_state))
+ needupdate = 1;
+ }
+
+ if (!needupdate) {
master = current_state.channo >> 16;
if (cc[x].sigtype != current_state.sigtype) {