Remove unused client code
[pazpar2-moved-to-github.git] / src / client.c
index d349103..27a32f3 100644 (file)
@@ -221,11 +221,6 @@ struct session *client_get_session(struct client *cl)
     return cl->session;
 }
 
-const char *client_get_pquery(struct client *cl)
-{
-    return cl->pquery;
-}
-
 static void client_send_raw_present(struct client *cl);
 static int nativesyntax_to_type(const char *s, char *type, ZOOM_record rec);
 
@@ -359,7 +354,7 @@ void client_show_raw_remove(struct client *cl, void *data)
     }
 }
 
-void client_show_raw_dequeue(struct client *cl)
+static void client_show_raw_dequeue(struct client *cl)
 {
     struct show_raw *rr = cl->show_raw;
 
@@ -455,7 +450,7 @@ static int nativesyntax_to_type(const char *s, char *type,
  * TODO Consider thread safety!!!
  *
  */
-void client_report_facets(struct client *cl, ZOOM_resultset rs)
+static void client_report_facets(struct client *cl, ZOOM_resultset rs)
 {
     struct session_database *sdb = client_get_database(cl);
     ZOOM_facet_field *facets = ZOOM_resultset_facets(rs);
@@ -779,15 +774,17 @@ int client_fetch_more(struct client *cl)
     int extend_recs = 0;
     int number;
 
+    str = session_setting_oneval(sdb, PZ_EXTENDRECS);
+    if (!str || !*str)
+        return 0;
+
+    extend_recs = atoi(str);
+
     yaz_log(YLOG_LOG, "cl=%s show_stat_no=%d got=%d",
             client_get_id(cl), cl->show_stat_no, cl->record_offset);
     if (cl->show_stat_no < cl->record_offset)
         return 0;
-    yaz_log(YLOG_LOG, "cl=%s Trying to get more", client_get_id(cl));
-
-    str = session_setting_oneval(sdb, PZ_EXTENDRECS);
-    if (str && *str)
-        extend_recs = atoi(str);
+    yaz_log(YLOG_LOG, "cl=%s Trying to fetch more", client_get_id(cl));
 
     if (extend_recs > cl->hits)
         extend_recs = cl->hits;
@@ -1707,11 +1704,6 @@ static void client_suggestions_destroy(struct client *cl)
     nmem_destroy(nmem);
 }
 
-int client_test_sort_order(struct client *cl, struct reclist_sortparms *sp)
-{
-    //TODO implement correctly.
-    return 1;
-}
 /*
  * Local variables:
  * c-basic-offset: 4