From: Adam Dickmeiss Date: Tue, 2 Oct 2007 10:32:03 +0000 (+0000) Subject: Ensure show watch is fired if client is disconnected. X-Git-Tag: PAZPAR2.1.0.5~18 X-Git-Url: http://git.indexdata.com/?p=pazpar2-moved-to-github.git;a=commitdiff_plain;h=c0a89e3e20189dbb2073522cc888e5b84a53df04 Ensure show watch is fired if client is disconnected. When a client is disconnected connection_destroy and, in turn, client_disconnect is invoked. This function now calls client_set_state rather than setting the state directly. --- diff --git a/src/client.c b/src/client.c index 4f87d1f..dffb359 100644 --- a/src/client.c +++ b/src/client.c @@ -1,4 +1,4 @@ -/* $Id: client.c,v 1.26 2007-10-02 10:11:56 adam Exp $ +/* $Id: client.c,v 1.27 2007-10-02 10:32:03 adam Exp $ Copyright (c) 2006-2007, Index Data. This file is part of Pazpar2. @@ -899,7 +899,7 @@ void client_set_connection(struct client *cl, struct connection *con) void client_disconnect(struct client *cl) { if (cl->state != Client_Idle) - cl->state = Client_Disconnected; + client_set_state(cl, Client_Disconnected); client_set_connection(cl, 0); }