X-Git-Url: http://git.indexdata.com/?a=blobdiff_plain;f=src%2Fconnection.c;h=df013035a63ce9a42949d3bf035d84db8b585867;hb=57890a3d7d0eded2e7619cb1edaae129d7c8cb1d;hp=3afc75f718db8d8023c6c04f8dd553612bc865f6;hpb=2d670e10691d4d92d6e65a33d32295217cf67794;p=pazpar2-moved-to-github.git diff --git a/src/connection.c b/src/connection.c index 3afc75f..df01303 100644 --- a/src/connection.c +++ b/src/connection.c @@ -370,7 +370,8 @@ void connect_resolver_host(struct host *host, iochan_man_t iochan_man) { if (con->state == Conn_Closed) { - if (!host->ipport || !con->client) /* unresolved or no client */ + struct client *cl = con->client; + if (!host->ipport || !cl) /* unresolved or no client */ { remove_connection_from_host(con); yaz_mutex_leave(host->mutex); @@ -378,11 +379,12 @@ void connect_resolver_host(struct host *host, iochan_man_t iochan_man) } else { - struct session_database *sdb = client_get_database(con->client); - if (sdb) + struct session_database *sdb = client_get_database(cl); + struct session *se = client_get_session(cl); + if (sdb && se) { yaz_mutex_leave(host->mutex); - client_start_search(con->client); + client_start_search(cl); } else {