Fix setting of last event#
[yaz-moved-to-github.git] / zutil / zoom-c.c
index 7ce62e7..29950e8 100644 (file)
@@ -2,7 +2,7 @@
  * Copyright (c) 2000-2003, Index Data
  * See the file LICENSE for details.
  *
- * $Id: zoom-c.c,v 1.32 2003-04-28 11:04:52 adam Exp $
+ * $Id: zoom-c.c,v 1.34 2003-05-14 20:58:07 adam Exp $
  *
  * ZOOM layer for C, connections, result sets, queries.
  */
@@ -68,7 +68,10 @@ static ZOOM_Event ZOOM_connection_get_event(ZOOM_connection c)
 {
     ZOOM_Event event = c->m_queue_front;
     if (!event)
+    {
+        c->last_event = ZOOM_EVENT_NONE;
        return 0;
+    }
     assert (c->m_queue_back);
     c->m_queue_front = event->prev;
     if (c->m_queue_front)
@@ -106,11 +109,13 @@ static void set_dset_error (ZOOM_connection c, int error,
                 addinfo2 ? addinfo2 : "");
 }
 
+#if HAVE_XML2
 static void set_HTTP_error (ZOOM_connection c, int error,
                             const char *addinfo, const char *addinfo2)
 {
     set_dset_error(c, error, "HTTP", addinfo, addinfo2);
 }
+#endif
 
 static void set_ZOOM_error (ZOOM_connection c, int error,
                            const char *addinfo)