- static struct iochan_man_iter iter;
-
- FD_ZERO(&in);
- FD_ZERO(&out);
- FD_ZERO(&except);
- timeout = &to; /* hang on select */
- to.tv_sec = 300;
- to.tv_usec = 0;
- max = 0;
- for (p = iochan_man_get_first(&iter, man); p; p = iochan_man_get_next(&iter) )
- {
+ static struct iochan_man_iter iter;
+
+// struct yaz_poll_fd *fds;
+ int no_fds = 0;
+ FD_ZERO(&in);
+ FD_ZERO(&out);
+ FD_ZERO(&except);
+ timeout = &to; /* hang on select */
+ to.tv_sec = 300;
+ to.tv_usec = 0;
+
+ // INV: Start must no change through the loop
+
+ start = iochan_man_get_first(&iter, man);
+ IOCHAN inv_start = start;
+ for (p = start; p; p = iochan_man_get_next(&iter)) {
+ no_fds++;
+ }
+// fds = (struct yaz_poll_fd *) xmalloc(no_fds * sizeof(*fds));
+
+ max = 0;
+ for (p = start; p; p = p->next) {