From 2058959fc0a6888b55f23586cd3f1d173b2a46b5 Mon Sep 17 00:00:00 2001 From: Sebastian Hammer Date: Tue, 28 Aug 2007 21:11:21 +0000 Subject: [PATCH] Eliminated exits. Pointer type change, to remove warning --- src/connection.c | 8 ++++---- src/reclists.c | 6 +++--- 2 files changed, 7 insertions(+), 7 deletions(-) diff --git a/src/connection.c b/src/connection.c index e399161..149709a 100644 --- a/src/connection.c +++ b/src/connection.c @@ -1,4 +1,4 @@ -/* $Id: connection.c,v 1.10 2007-08-14 14:03:02 adam Exp $ +/* $Id: connection.c,v 1.11 2007-08-28 21:11:21 quinn Exp $ Copyright (c) 2006-2007, Index Data. This file is part of Pazpar2. @@ -335,7 +335,7 @@ int connection_send_apdu(struct connection *co, Z_APDU *a) else if (r == 1) { fprintf(stderr, "cs_put incomplete (ParaZ does not handle that)\n"); - exit(1); + return -1;; } odr_reset(global_parameters.odr_out); /* release the APDU structure */ co->state = Conn_Waiting; @@ -356,7 +356,7 @@ int connection_connect(struct connection *con) int res; struct session_database *sdb = client_get_database(con->client); - char *zproxy = session_setting_oneval(sdb, PZ_ZPROXY); + const char *zproxy = session_setting_oneval(sdb, PZ_ZPROXY); assert(host->ipport); assert(con); @@ -433,7 +433,7 @@ int client_prep_connection(struct client *cl) struct session *se = client_get_session(cl); struct host *host = client_get_host(cl); struct session_database *sdb = client_get_database(cl); - char *zproxy = session_setting_oneval(sdb, PZ_ZPROXY); + const char *zproxy = session_setting_oneval(sdb, PZ_ZPROXY); if (zproxy && zproxy[0] == '\0') zproxy = 0; diff --git a/src/reclists.c b/src/reclists.c index 048914d..f9785a8 100644 --- a/src/reclists.c +++ b/src/reclists.c @@ -1,4 +1,4 @@ -/* $Id: reclists.c,v 1.21 2007-08-13 12:42:45 adam Exp $ +/* $Id: reclists.c,v 1.22 2007-08-28 21:11:21 quinn Exp $ Copyright (c) 2006-2007, Index Data. This file is part of Pazpar2. @@ -207,8 +207,8 @@ static int reclist_cmp(const void *p1, const void *p2) res = 0; break; default: - yaz_log(YLOG_FATAL, "Bad sort type: %d", s->type); - exit(1); + yaz_log(YLOG_WARN, "Bad sort type: %d", s->type); + res = 0; } } return res; -- 1.7.10.4