Fix ZOOM_connection_Z3950_search: Assertion YAZ-750
authorAdam Dickmeiss <adam@indexdata.dk>
Mon, 10 Mar 2014 10:23:55 +0000 (11:23 +0100)
committerAdam Dickmeiss <adam@indexdata.dk>
Mon, 10 Mar 2014 10:23:55 +0000 (11:23 +0100)
The standalone ZOOM sort was completely broken since 5.0.13.

src/zoom-z3950.c

index 8afcd01..63202f3 100644 (file)
@@ -1554,7 +1554,7 @@ zoom_ret ZOOM_connection_Z3950_search(ZOOM_connection c)
     ZOOM_resultset resultset;
     int *start, *count;
 
-    if (!c->tasks)
+    if (!c->tasks || c->tasks->which == ZOOM_TASK_SORT)
         return zoom_complete;
     assert(c->tasks->which == ZOOM_TASK_SEARCH);
     resultset = c->tasks->u.search.resultset;