X-Git-Url: http://git.indexdata.com/?a=blobdiff_plain;f=src%2Fclient.c;h=26d5fae89703169a56d4d4941ab82b480128eaec;hb=7dbedc4526cc8ec05c785a91b5b0dfae85791579;hp=18d7c6b9d985d7a3125b14adc799d2fc2ef08355;hpb=f047ea779e7380066483f9ab8edea5e857734ec9;p=pazpar2-moved-to-github.git diff --git a/src/client.c b/src/client.c index 18d7c6b..26d5fae 100644 --- a/src/client.c +++ b/src/client.c @@ -24,7 +24,7 @@ Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA #if HAVE_CONFIG_H #include #endif - +#include #include #include #include @@ -58,6 +58,7 @@ Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA #include #endif +#include "ppmutex.h" #include "session.h" #include "parameters.h" #include "client.h" @@ -477,15 +478,18 @@ void client_record_response(struct client *cl) if (cl->session == 0) ; else if (ZOOM_record_error(rec, &msg, &addinfo, 0)) + { yaz_log(YLOG_WARN, "Record error %s (%s): %s (rec #%d)", - error, addinfo, client_get_url(cl), + msg, addinfo, client_get_url(cl), cl->record_offset); + } else { struct session_database *sdb = client_get_database(cl); NMEM nmem = nmem_create(); const char *xmlrec; char type[80]; + if (nativesyntax_to_type(sdb, type, rec)) yaz_log(YLOG_WARN, "Failed to determine record type"); xmlrec = ZOOM_record_get(rec, type, NULL); @@ -603,7 +607,8 @@ struct client *client_create(void) r->resultset = 0; r->next = 0; r->mutex = 0; - yaz_mutex_create(&r->mutex); + pazpar2_mutex_create(&r->mutex, "client"); + r->ref_count = 1; return r;