- yaz_log (m_log, "Yaz_SocketManager::select fd=%d write", fd);
- FD_SET(fd, &out);
- }
- if (p->mask & YAZ_SOCKET_OBSERVE_EXCEPT)
- {
- yaz_log (m_log, "Yaz_SocketManager::select fd=%d except", fd);
- FD_SET(fd, &except);
- }
- if (fd > max)
- max = fd;
- if (p->timeout > 0 ||
- (p->timeout == 0 && (p->mask & YAZ_SOCKET_OBSERVE_WRITE) == 0))
- {
- int timeout_this;
- timeout_this = p->timeout;
- if (p->last_activity)
- timeout_this -= now - p->last_activity;
- else
- p->last_activity = now;
- if (timeout_this < 0 || timeout_this > 2147483646)
- timeout_this = 0;
- if (timeout == -1 || timeout_this < timeout)
- timeout = timeout_this;
+ int timeout_this;
+ timeout_this = p->timeout;
+ if (p->last_activity)
+ timeout_this -= now - p->last_activity;
+ else
+ p->last_activity = now;
+ if (timeout_this < 0 || timeout_this > 2147483646)
+ timeout_this = 0;
+ if (timeout == -1 || timeout_this < timeout)
+ timeout = timeout_this;