From a6d3bfef7037ade6ce0abd1ba732e5f6c6854170 Mon Sep 17 00:00:00 2001 From: Dennis Schafroth Date: Fri, 13 Apr 2012 11:29:45 +0200 Subject: [PATCH] Debug logging --- src/client.c | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/src/client.c b/src/client.c index 02e592c..59fb027 100644 --- a/src/client.c +++ b/src/client.c @@ -589,8 +589,7 @@ static void client_record_ingest(struct client *cl) else if (ZOOM_record_error(rec, &msg, &addinfo, 0)) { yaz_log(YLOG_WARN, "Record error %s (%s): %s (rec #%d)", - msg, addinfo, client_get_id(cl), - cl->record_offset); + msg, addinfo, client_get_id(cl), cl->record_offset); } else { @@ -1329,8 +1328,11 @@ Odr_int client_get_hits(struct client *cl) Odr_int client_get_approximation(struct client *cl) { int records = cl->record_offset + cl->filtered; - if (records > 0) - return (cl->hits * cl->record_offset) / records; + if (records > 0) { + Odr_int approx = (cl->hits * cl->record_offset) / records; + yaz_log(YLOG_LOG, "%s: Approx: %lld * %d / %d = %lld ", client_get_id(cl), cl->hits, cl->record_offset, records, approx); + return approx; + } return cl->hits; } -- 1.7.10.4