From 5debc3f1f692c1ebafc04fe5603ef51611ec10e5 Mon Sep 17 00:00:00 2001 From: Adam Dickmeiss Date: Mon, 28 Sep 2009 23:46:26 +0200 Subject: [PATCH] Fix for non-threaded resolver. For the non-threaded host resolver, create_host may return NULL. This in turn will make database-host a NULL ptr. This fixes client_prep_connection to return if that's the case. --- src/connection.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/connection.c b/src/connection.c index cda779c..493d19d 100644 --- a/src/connection.c +++ b/src/connection.c @@ -419,6 +419,9 @@ int client_prep_connection(struct client *cl, if (zproxy && zproxy[0] == '\0') zproxy = 0; + if (!host) + return 0; + co = client_get_connection(cl); yaz_log(YLOG_DEBUG, "Client prep %s", client_get_url(cl)); -- 1.7.10.4