[Asterisk-cvs] zaptel ztcfg.c,1.23,1.24

kpfleming kpfleming
Wed Sep 28 23:54:54 CDT 2005


Update of /usr/cvsroot/zaptel
In directory mongoose.digium.com:/tmp/cvs-serv9645

Modified Files:
	ztcfg.c 
Log Message:
don't fail on channels that were not previously configured


Index: ztcfg.c
===================================================================
RCS file: /usr/cvsroot/zaptel/ztcfg.c,v
retrieving revision 1.23
retrieving revision 1.24
diff -u -d -r1.23 -r1.24
--- ztcfg.c	29 Sep 2005 02:29:17 -0000	1.23
+++ ztcfg.c	29 Sep 2005 03:51:31 -0000	1.24
@@ -1276,14 +1276,14 @@
 						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) {




More information about the svn-commits mailing list