* Copyright (c) 1998-2004, Index Data.
* See the file LICENSE for details.
*
- * $Id: yaz-proxy.cpp,v 1.95 2004-01-30 12:02:21 adam Exp $
+ * $Id: yaz-proxy.cpp,v 1.96 2004-02-02 11:17:45 adam Exp $
*/
#include <assert.h>
m_config = 0;
m_marcxml_flag = 0;
m_stylesheet_xsp = 0;
+ m_stylesheet_nprl = 0;
m_s2z_stylesheet = 0;
m_s2z_database = 0;
m_schema = 0;
* Copyright (c) 1998-2004, Index Data.
* See the file LICENSE for details.
*
- * $Id: yaz-socket-manager.cpp,v 1.25 2004-01-30 00:38:28 adam Exp $
+ * $Id: yaz-socket-manager.cpp,v 1.26 2004-02-02 11:17:45 adam Exp $
*/
#include <assert.h>
#ifdef WIN32
}
if (fd > max)
max = fd;
- if (p->timeout >= 0)
+ if (p->timeout > 0 ||
+ (p->timeout == 0 && (p->mask & YAZ_SOCKET_OBSERVE_WRITE) == 0))
{
int timeout_this;
timeout_this = p->timeout;
if (FD_ISSET(fd, &except))
mask |= YAZ_SOCKET_OBSERVE_EXCEPT;
- if (res > 0 && mask)
+ if (mask)
{
YazSocketEvent *event = new YazSocketEvent;
p->last_activity = now;
yaz_log (m_log, "putEvent I/O mask=%d", mask);
}
- else if ((now - p->last_activity) >= p->timeout)
+ else if (
+ (p->timeout > 0 ||
+ (p->timeout == 0 && (p->mask & YAZ_SOCKET_OBSERVE_WRITE) == 0))
+ &&
+ (now - p->last_activity) >= p->timeout)
{
YazSocketEvent *event = new YazSocketEvent;
assert (p->last_activity);