Towards 2.1.40.
[yaz-moved-to-github.git] / src / zoom-c.c
index 4f346ee..93f807f 100644 (file)
@@ -2,7 +2,7 @@
  * Copyright (C) 1995-2006, Index Data ApS
  * See the file LICENSE for details.
  *
- * $Id: zoom-c.c,v 1.97 2006-11-06 23:21:30 adam Exp $
+ * $Id: zoom-c.c,v 1.99 2006-11-20 08:13:05 adam Exp $
  */
 /**
  * \file zoom-c.c
@@ -1276,7 +1276,7 @@ static zoom_ret ZOOM_connection_send_init(ZOOM_connection c)
                     odr_prepend(c->odr_out, "ZOOM-C",
                                 ireq->implementationName));
     
-    version = odr_strdup(c->odr_out, "$Revision: 1.97 $");
+    version = odr_strdup(c->odr_out, "$Revision: 1.99 $");
     if (strlen(version) > 10)   /* check for unexpanded CVS strings */
         version[strlen(version)-2] = '\0';
     ireq->implementationVersion = 
@@ -3306,8 +3306,6 @@ static int ZOOM_connection_exec_task(ZOOM_connection c)
             c, task->which, task->running);
     if (c->error != ZOOM_ERROR_NONE)
     {
-        yaz_log(YLOG_LOG, "%p ZOOM_connection_exec_task "
-                "removing tasks because of error = %d", c, c->error);
         yaz_log(log_details, "%p ZOOM_connection_exec_task "
                 "removing tasks because of error = %d", c, c->error);
         ZOOM_connection_remove_tasks(c);
@@ -4189,7 +4187,7 @@ ZOOM_API(int)
         ;
     }
     if (r < 0)
-        yaz_log(YLOG_WARN|YLOG_ERRNO, "ZOOM_event: poll failed");
+        yaz_log(YLOG_WARN|YLOG_ERRNO, "ZOOM_event: poll");
     for (i = 0; i<nfds; i++)
     {
         ZOOM_connection c = poll_cs[i];
@@ -4217,6 +4215,15 @@ ZOOM_API(int)
 #else
     tv.tv_sec = timeout;
     tv.tv_usec = 0;
+
+    while ((r = select(max_fd+1, &input, &output, &except,
+                       (timeout == -1 ? 0 : &tv))) < 0 && errno == EINTR)
+    {
+        ;
+    }
+    if (r < 0)
+        yaz_log(YLOG_WARN|YLOG_ERRNO, "ZOOM_event: select");
+
     r = select(max_fd+1, &input, &output, &except, (timeout == -1 ? 0 : &tv));
     for (i = 0; i<no; i++)
     {