summaryrefslogtreecommitdiff
path: root/ztcfg.c
diff options
context:
space:
mode:
Diffstat (limited to 'ztcfg.c')
-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) {