Fix problem with blocked show
authorAdam Dickmeiss <adam@indexdata.dk>
Mon, 24 Dec 2012 10:32:33 +0000 (11:32 +0100)
committerAdam Dickmeiss <adam@indexdata.dk>
Mon, 24 Dec 2012 10:35:26 +0000 (11:35 +0100)
Make sure that reclist_get_num_records returns >0 result if record
list is non empty. This is to ensure that client_got_records fires
session watches (SESSIN_WATCH_SHOW, ..).

src/reclists.c

index 7662561..366ccae 100644 (file)
@@ -414,6 +414,7 @@ struct record_cluster *reclist_insert(struct reclist *l,
         cluster->relevance_explain2 = wrbuf_alloc();
         /* attach to hash list */
         *p = new;
+        l->num_records++;
     }
     yaz_mutex_leave(l->mutex);
     return cluster;