Add clever pz:pqf_strftime example from
[pazpar2-moved-to-github.git] / src / client.c
index 9a81190..5ca81fe 100644 (file)
@@ -1,5 +1,5 @@
 /* This file is part of Pazpar2.
-   Copyright (C) 2006-2011 Index Data
+   Copyright (C) 2006-2012 Index Data
 
 Pazpar2 is free software; you can redistribute it and/or modify it under
 the terms of the GNU General Public License as published by the Free
@@ -583,8 +583,9 @@ static void client_record_ingest(struct client *cl)
     if ((rec = ZOOM_resultset_record_immediate(resultset, offset)))
     {
         cl->record_offset++;
-        if (cl->session == 0)
-            ;
+        if (cl->session == 0) {
+            /* no operation */
+        }
         else if (ZOOM_record_error(rec, &msg, &addinfo, 0))
         {
             yaz_log(YLOG_WARN, "Record error %s (%s): %s (rec #%d)",
@@ -768,7 +769,6 @@ void client_start_search(struct client *cl)
             yaz_log(YLOG_LOG, "Target %s has preferred status: %d",
                     client_get_id(cl), cl->preferred);
     }
-    client_set_state(cl, Client_Working);
 
     if (*opt_piggyback)
         ZOOM_connection_option_set(link, "piggyback", opt_piggyback);
@@ -849,11 +849,11 @@ void client_start_search(struct client *cl)
             if (se->sorted_results->next)
             {
                 ZOOM_query_destroy(q);
-                client_set_state_nb(cl, Client_Idle);
                 return;
             }
         }
     }
+    client_set_state(cl, Client_Working);
     cl->hits = 0;
     cl->record_offset = 0;
     rs = ZOOM_connection_search(link, q);
@@ -1137,8 +1137,9 @@ static int apply_limit(struct session_database *sdb,
                     wrbuf_puts(w_ccl, ")");
 
                 }
-                else if (!strncmp(s->value, "local:", 6))
-                    ;
+                else if (!strncmp(s->value, "local:", 6)) {
+                    /* no operation */
+                }
                 else
                 {
                     yaz_log(YLOG_WARN, "Target %s: Bad limitmap '%s'",