From: Adam Dickmeiss Date: Thu, 3 Nov 2011 12:40:07 +0000 (+0100) Subject: Add client_set_state_nb X-Git-Tag: mobile-beta-1~3^2~10 X-Git-Url: http://lists.indexdata.dk/?a=commitdiff_plain;h=ce3da20314686e63c6c0e2d1cbb265d09d43e248;p=pazpar2-moved-to-github.git Add client_set_state_nb Is like client_set_state, but never calls session_alert_watch. This is used in the search phase, when a show is never fired anyway and also because session is locked already so session_alert_watch would make a deal-lock. --- diff --git a/src/client.c b/src/client.c index e17e604..0a1eb61 100644 --- a/src/client.c +++ b/src/client.c @@ -162,6 +162,11 @@ enum client_state client_get_state(struct client *cl) return cl->state; } +void client_set_state_nb(struct client *cl, enum client_state st) +{ + cl->state = st; +} + void client_set_state(struct client *cl, enum client_state st) { int was_active = 0; diff --git a/src/client.h b/src/client.h index 2fb8ada..9cc9666 100644 --- a/src/client.h +++ b/src/client.h @@ -52,6 +52,7 @@ void client_show_raw_remove(struct client *cl, void *rr); const char *client_get_state_str(struct client *cl); enum client_state client_get_state(struct client *cl); void client_set_state(struct client *cl, enum client_state st); +void client_set_state_nb(struct client *cl, enum client_state st); struct connection *client_get_connection(struct client *cl); struct session_database *client_get_database(struct client *cl); void client_set_database(struct client *cl, struct session_database *db);