From: Adam Dickmeiss Date: Mon, 28 Sep 2009 21:46:26 +0000 (+0200) Subject: Fix for non-threaded resolver. X-Git-Tag: v1.2.1~9^2~6^2 X-Git-Url: http://lists.indexdata.dk/?a=commitdiff_plain;h=5debc3f1f692c1ebafc04fe5603ef51611ec10e5;p=pazpar2-moved-to-github.git 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. --- 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));