From: Karl Fleischmann Date: Thu, 8 Feb 2024 15:31:20 +0000 (+0100) Subject: global: Rename service_count to restart_request_count X-Git-Tag: 2.4.1~1039 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=525dbd9bc392540348429d0c349d2f94e2f4e47c;p=thirdparty%2Fdovecot%2Fcore.git global: Rename service_count to restart_request_count --- diff --git a/src/auth/auth-worker-server.c b/src/auth/auth-worker-server.c index b7874e9c41..34b8e6dc55 100644 --- a/src/auth/auth-worker-server.c +++ b/src/auth/auth-worker-server.c @@ -24,8 +24,8 @@ #define WORKER_STATE_IDLE "idling" #define WORKER_STATE_STOP "waiting for shutdown" -static unsigned int auth_worker_max_service_count = 0; -static unsigned int auth_worker_service_count = 0; +static unsigned int auth_worker_max_restart_request_count = 0; +static unsigned int auth_worker_restart_request_count = 0; struct auth_worker_server { struct connection conn; @@ -59,9 +59,9 @@ static int auth_worker_output(struct auth_worker_server *server); static void auth_worker_server_destroy(struct connection *conn); static void auth_worker_server_unref(struct auth_worker_server **_client); -void auth_worker_set_max_service_count(unsigned int count) +void auth_worker_set_max_restart_request_count(unsigned int count) { - auth_worker_max_service_count = count; + auth_worker_max_restart_request_count = count; } static struct auth_worker_server *auth_worker_get_client(void) @@ -817,10 +817,10 @@ auth_worker_server_input_args(struct connection *conn, const char *const *args) server->refcount++; e_debug(cmd->event, "Handling %s request", args[1]); - /* Check if we have reached service_count */ - if (auth_worker_max_service_count > 0) { - auth_worker_service_count++; - if (auth_worker_service_count >= auth_worker_max_service_count) + /* Check if we have reached restart_request_count */ + if (auth_worker_max_restart_request_count > 0) { + auth_worker_restart_request_count++; + if (auth_worker_restart_request_count >= auth_worker_max_restart_request_count) worker_restart_request = TRUE; } diff --git a/src/auth/auth-worker-server.h b/src/auth/auth-worker-server.h index b2fb2418d4..79e47e8d3a 100644 --- a/src/auth/auth-worker-server.h +++ b/src/auth/auth-worker-server.h @@ -24,6 +24,6 @@ void auth_worker_server_send_shutdown(void); void auth_worker_connections_destroy_all(void); /* Stop master service after this many requests. 0 is unlimited. */ -void auth_worker_set_max_service_count(unsigned int count); +void auth_worker_set_max_restart_request_count(unsigned int count); #endif diff --git a/src/auth/main.c b/src/auth/main.c index bcac68354f..d4e0f88ae3 100644 --- a/src/auth/main.c +++ b/src/auth/main.c @@ -230,10 +230,10 @@ static void main_init(void) /* workers have only a single connection from the master auth process */ master_service_set_client_limit(master_service, 1); - auth_worker_set_max_service_count( - master_service_get_service_count(master_service)); + auth_worker_set_max_restart_request_count( + master_service_get_restart_request_count(master_service)); /* make sure this process cycles if auth connection drops */ - master_service_set_service_count(master_service, 1); + master_service_set_restart_request_count(master_service, 1); } else { /* caching is handled only by the main auth process */ passdb_cache_init(global_auth_settings); diff --git a/src/doveadm/doveadm-settings.c b/src/doveadm/doveadm-settings.c index 0a836b811c..9484702d0d 100644 --- a/src/doveadm/doveadm-settings.c +++ b/src/doveadm/doveadm-settings.c @@ -31,7 +31,7 @@ struct service_settings doveadm_service_settings = { .drop_priv_before_exec = FALSE, .client_limit = 1, - .service_count = 1, + .restart_request_count = 1, .unix_listeners = ARRAY_INIT, .fifo_listeners = ARRAY_INIT, diff --git a/src/imap-login/imap-login-settings.c b/src/imap-login/imap-login-settings.c index 1d8746cfa1..c4c53909ab 100644 --- a/src/imap-login/imap-login-settings.c +++ b/src/imap-login/imap-login-settings.c @@ -20,7 +20,7 @@ struct service_settings imap_login_service_settings = { .drop_priv_before_exec = FALSE, - .service_count = 1, + .restart_request_count = 1, .unix_listeners = ARRAY_INIT, .fifo_listeners = ARRAY_INIT, diff --git a/src/imap-urlauth-login/imap-urlauth-login-settings.c b/src/imap-urlauth-login/imap-urlauth-login-settings.c index 48bd33d00a..10be716ef9 100644 --- a/src/imap-urlauth-login/imap-urlauth-login-settings.c +++ b/src/imap-urlauth-login/imap-urlauth-login-settings.c @@ -19,7 +19,7 @@ struct service_settings imap_urlauth_login_service_settings = { .drop_priv_before_exec = FALSE, - .service_count = 1, + .restart_request_count = 1, .unix_listeners = ARRAY_INIT, .fifo_listeners = ARRAY_INIT, diff --git a/src/imap-urlauth/imap-urlauth-settings.c b/src/imap-urlauth/imap-urlauth-settings.c index af64be78ef..44ceef6a47 100644 --- a/src/imap-urlauth/imap-urlauth-settings.c +++ b/src/imap-urlauth/imap-urlauth-settings.c @@ -23,7 +23,7 @@ struct service_settings imap_urlauth_service_settings = { .process_limit = 1024, .client_limit = 1, - .service_count = 1, + .restart_request_count = 1, .unix_listeners = ARRAY_INIT, .fifo_listeners = ARRAY_INIT, diff --git a/src/imap-urlauth/imap-urlauth-worker-settings.c b/src/imap-urlauth/imap-urlauth-worker-settings.c index ebc8e4c772..2b38a8324b 100644 --- a/src/imap-urlauth/imap-urlauth-worker-settings.c +++ b/src/imap-urlauth/imap-urlauth-worker-settings.c @@ -25,7 +25,7 @@ struct service_settings imap_urlauth_worker_service_settings = { .process_limit = 1024, .client_limit = 1, - .service_count = 1, + .restart_request_count = 1, .unix_listeners = ARRAY_INIT, .fifo_listeners = ARRAY_INIT, diff --git a/src/imap/imap-settings.c b/src/imap/imap-settings.c index 98d58399cd..547efac490 100644 --- a/src/imap/imap-settings.c +++ b/src/imap/imap-settings.c @@ -25,7 +25,7 @@ struct service_settings imap_service_settings = { .process_limit = 1024, .client_limit = 1, - .service_count = 1, + .restart_request_count = 1, .unix_listeners = ARRAY_INIT, .fifo_listeners = ARRAY_INIT, diff --git a/src/lib-login/login-server.c b/src/lib-login/login-server.c index d8ce13d373..f564e56629 100644 --- a/src/lib-login/login-server.c +++ b/src/lib-login/login-server.c @@ -267,7 +267,7 @@ static void login_server_auth_finish(struct login_server_request *request, bool close_sockets; close_sockets = service->master_status.available_count == 0 && - service->service_count_left == 1; + service->restart_request_count_left == 1; request->conn->login_success = TRUE; server->callback(request, auth_args[0], auth_args+1); diff --git a/src/lib-master/master-service-private.h b/src/lib-master/master-service-private.h index 5a20d85e85..fc41b06db0 100644 --- a/src/lib-master/master-service-private.h +++ b/src/lib-master/master-service-private.h @@ -47,7 +47,7 @@ struct master_service { unsigned int socket_count; struct io *io_status_write, *io_status_error; - unsigned int service_count_left; + unsigned int restart_request_count_left; unsigned int total_available_count; unsigned int process_limit; unsigned int process_min_avail; diff --git a/src/lib-master/master-service.c b/src/lib-master/master-service.c index aef332cfab..c321c3f480 100644 --- a/src/lib-master/master-service.c +++ b/src/lib-master/master-service.c @@ -535,7 +535,7 @@ master_service_init(const char *name, enum master_service_flags flags, i_strconcat(getopt_str, master_service_getopt_string(), NULL); service->flags = flags; service->ioloop = io_loop_create(); - service->service_count_left = UINT_MAX; + service->restart_request_count_left = UINT_MAX; service->datastack_frame_id = datastack_frame_id; service->config_path = i_strdup(getenv(MASTER_CONFIG_FILE_SOCKET_ENV)); @@ -624,7 +624,7 @@ master_service_init(const char *name, enum master_service_flags flags, value = getenv(MASTER_SERVICE_COUNT_ENV); if (value != NULL && str_to_uint(value, &count) == 0 && count > 0) - master_service_set_service_count(service, count); + master_service_set_restart_request_count(service, count); /* set the idle kill timeout */ value = getenv(MASTER_SERVICE_IDLE_KILL_ENV); @@ -632,7 +632,7 @@ master_service_init(const char *name, enum master_service_flags flags, service->idle_kill_secs = count; } else { master_service_set_client_limit(service, 1); - master_service_set_service_count(service, 1); + master_service_set_restart_request_count(service, 1); } if ((flags & MASTER_SERVICE_FLAG_DONT_SEND_STATS) == 0) { /* Initialize stats-client early so it can see all events. */ @@ -1119,8 +1119,8 @@ unsigned int master_service_get_idle_kill_secs(struct master_service *service) return service->idle_kill_secs; } -void master_service_set_service_count(struct master_service *service, - unsigned int count) +void master_service_set_restart_request_count(struct master_service *service, + unsigned int count) { unsigned int used; @@ -1132,12 +1132,12 @@ void master_service_set_service_count(struct master_service *service, service->total_available_count = count; service->master_status.available_count = count - used; } - service->service_count_left = count; + service->restart_request_count_left = count; } -unsigned int master_service_get_service_count(struct master_service *service) +unsigned int master_service_get_restart_request_count(struct master_service *service) { - return service->service_count_left; + return service->restart_request_count_left; } unsigned int master_service_get_socket_count(struct master_service *service) @@ -1235,7 +1235,7 @@ void master_service_stop_new_connections(struct master_service *service) /* make sure we stop after servicing current connections */ current_count = service->total_available_count - service->master_status.available_count; - service->service_count_left = current_count; + service->restart_request_count_left = current_count; service->total_available_count = current_count; if (current_count == 0) @@ -1413,7 +1413,7 @@ static bool master_service_want_listener(struct master_service *service) /* more concurrent clients can still be added */ return TRUE; } - if (service->service_count_left == 1) { + if (service->restart_request_count_left == 1) { /* after handling this client, the whole process will stop. */ return FALSE; } @@ -1442,7 +1442,7 @@ void master_service_client_connection_handled(struct master_service *service, if (!master_service_want_listener(service)) { i_assert(service->listeners != NULL); master_service_io_listeners_remove(service); - if (service->service_count_left == 1 && + if (service->restart_request_count_left == 1 && service->avail_overflow_callback == NULL) { /* we're not going to accept any more connections after this. go ahead and close the connection early. don't @@ -1451,11 +1451,12 @@ void master_service_client_connection_handled(struct master_service *service, permissions). Don't do this if overflow callback is set, because - otherwise it's never called with service_count=1. - Actually this isn't important anymore to do with - any service, since nowadays master can request the - listeners to be closed via SIGQUIT. Still, closing - the fd when possible saves a little bit of memory. */ + otherwise it's never called with + restart_request_count=1. Actually this isn't + important anymore to do with any service, since + nowadays master can request the listeners to be + closed via SIGQUIT. Still, closing the fd when + possible saves a little bit of memory. */ master_service_io_listeners_close(service); } } @@ -1480,21 +1481,21 @@ void master_service_client_connection_destroyed(struct master_service *service) master_service_io_listeners_add(service); i_assert(service->total_available_count > 0); - i_assert(service->service_count_left > 0); + i_assert(service->restart_request_count_left > 0); - if (service->service_count_left == service->total_available_count) { + if (service->restart_request_count_left == service->total_available_count) { service->total_available_count--; - service->service_count_left--; + service->restart_request_count_left--; } else { - if (service->service_count_left != UINT_MAX) - service->service_count_left--; + if (service->restart_request_count_left != UINT_MAX) + service->restart_request_count_left--; i_assert(service->master_status.available_count < service->total_available_count); service->master_status.available_count++; } - if (service->service_count_left == 0) { + if (service->restart_request_count_left == 0) { i_assert(service->master_status.available_count == service->total_available_count); master_service_stop(service); @@ -1696,11 +1697,11 @@ static void master_service_overflow(struct master_service *service) return; } if (service->master_status.available_count == 0) { - /* Client was destroyed, but service_count is now 0. + /* Client was destroyed, but restart_request_count is now 0. The servive was already stopped, so the process will shutdown and a new process can handle the waiting client connection. */ - i_assert(service->service_count_left == 0); + i_assert(service->restart_request_count_left == 0); i_assert(!io_loop_is_running(service->ioloop)); return; } @@ -1756,12 +1757,12 @@ static bool master_service_full(struct master_service *service) } /* This process can't create more than a single client. Most likely - running with service_count=1. Check the overflow again after a short - delay before killing anything. This way only some of the connections - get killed instead of all of them. The delay is based on the - connection age with a bit of randomness, so the oldest connections - should die first, but even if all the connections have time same - timestamp they still don't all die at once. */ + running with restart_request_count=1. Check the overflow again after + a short delay before killing anything. This way only some of the + connections get killed instead of all of them. The delay is based on + the connection age with a bit of randomness, so the oldest + connections should die first, but even if all the connections have + time same timestamp they still don't all die at once. */ if (!service->avail_overflow_callback(FALSE, &created)) { /* can't kill any clients */ return TRUE; diff --git a/src/lib-master/master-service.h b/src/lib-master/master-service.h index c4dccf761f..b023f3a77c 100644 --- a/src/lib-master/master-service.h +++ b/src/lib-master/master-service.h @@ -217,11 +217,11 @@ unsigned int master_service_get_idle_kill_secs(struct master_service *service); /* Set maximum number of client connections we will handle before shutting down. */ -void master_service_set_service_count(struct master_service *service, - unsigned int count); +void master_service_set_restart_request_count(struct master_service *service, + unsigned int count); /* Returns the number of client connections we will handle before shutting down. The value is decreased only after connection has been closed. */ -unsigned int master_service_get_service_count(struct master_service *service); +unsigned int master_service_get_restart_request_count(struct master_service *service); /* Return the number of listener sockets. */ unsigned int master_service_get_socket_count(struct master_service *service); /* Returns the name of the listener socket, or "" if none is specified. */ diff --git a/src/lib-master/service-settings.h b/src/lib-master/service-settings.h index c1faff2f21..ee4cf1110a 100644 --- a/src/lib-master/service-settings.h +++ b/src/lib-master/service-settings.h @@ -69,7 +69,7 @@ struct service_settings { unsigned int process_min_avail; unsigned int process_limit; unsigned int client_limit; - unsigned int service_count; + unsigned int restart_request_count; unsigned int idle_kill; uoff_t vsz_limit; diff --git a/src/login-common/client-common.c b/src/login-common/client-common.c index a771a175d2..cf80e60d55 100644 --- a/src/login-common/client-common.c +++ b/src/login-common/client-common.c @@ -492,12 +492,12 @@ void client_destroy(struct client *client, const char *reason) login_proxy_free(&client->login_proxy); if (client->v.destroy != NULL) client->v.destroy(client); - if (client_unref(&client) && initial_service_count == 1) { + if (client_unref(&client) && initial_restart_request_count == 1) { /* as soon as this connection is done with proxying (or whatever), the process will die. there's no need for authentication anymore, so close the connection. - do this only with initial service_count=1, in case there - are other clients with pending authentications */ + do this only with initial restart_request_count=1, in case + there are other clients with pending authentications */ auth_client_disconnect(auth_client, "unnecessary connection"); } login_client_destroyed(); diff --git a/src/login-common/login-common.h b/src/login-common/login-common.h index fea3d2577e..3772675760 100644 --- a/src/login-common/login-common.h +++ b/src/login-common/login-common.h @@ -52,7 +52,7 @@ extern struct login_client_list *login_client_list; extern bool closing_down, login_debug; extern struct anvil_client *anvil; extern const char *login_rawlog_dir; -extern unsigned int initial_service_count; +extern unsigned int initial_restart_request_count; /* NULL-terminated array of all alt_usernames seen so far. Existing fields are never removed. */ extern ARRAY_TYPE(string) global_alt_usernames; diff --git a/src/login-common/main.c b/src/login-common/main.c index 58ede05ceb..b87e877d4d 100644 --- a/src/login-common/main.c +++ b/src/login-common/main.c @@ -36,7 +36,7 @@ struct login_client_list *login_client_list; bool closing_down, login_debug; struct anvil_client *anvil; const char *login_rawlog_dir = NULL; -unsigned int initial_service_count; +unsigned int initial_restart_request_count; struct login_module_register login_module_register; ARRAY_TYPE(string) global_alt_usernames; bool login_ssl_initialized; @@ -395,7 +395,7 @@ static void main_preinit(void) /etc/hosts */ parse_login_source_ips(global_login_settings->login_source_ips); if (login_source_v4_ips_count > 0) { - /* randomize the initial index in case service_count=1 + /* randomize the initial index in case restart_service_count=1 (although in that case it's unlikely this setting is even used..) */ login_source_v4_ips_idx = i_rand_limit(login_source_v4_ips_count); @@ -408,7 +408,7 @@ static void main_preinit(void) restrict_access_by_env(0, NULL); if (login_debug) restrict_access_allow_coredumps(TRUE); - initial_service_count = master_service_get_service_count(master_service); + initial_restart_request_count = master_service_get_restart_request_count(master_service); if (restrict_access_get_current_chroot() == NULL) { if (chdir("login") < 0) diff --git a/src/master/master-settings.c b/src/master/master-settings.c index 817de24bfb..666dee5104 100644 --- a/src/master/master-settings.c +++ b/src/master/master-settings.c @@ -131,7 +131,7 @@ static const struct setting_define service_setting_defines[] = { DEF(UINT, process_min_avail), DEF(UINT, process_limit), DEF(UINT, client_limit), - DEF(UINT, service_count), + DEF(UINT, restart_request_count), DEF(TIME, idle_kill), DEF(SIZE, vsz_limit), @@ -164,7 +164,7 @@ static const struct service_settings service_default_settings = { .process_min_avail = 0, .process_limit = 100, .client_limit = 1000, - .service_count = 0, + .restart_request_count = 0, .idle_kill = 60, .vsz_limit = 256*1024*1024, @@ -718,9 +718,9 @@ master_settings_ext_check(struct event *event, void *_set, if (*service->protocol != '\0') { /* each imap/pop3/lmtp process can use up a connection, - although if service_count=1 it's only temporary. + although if restart_request_count=1 it's only temporary. imap-hibernate doesn't do any auth lookups. */ - if ((service->service_count != 1 || + if ((service->restart_request_count != 1 || strcmp(service->type, "login") == 0) && strcmp(service->name, "imap-hibernate") != 0) { str_printfa(max_auth_client_processes_reason, @@ -758,7 +758,7 @@ master_settings_ext_check(struct event *event, void *_set, str_delete(max_auth_client_processes_reason, 0, 3); i_warning("service auth { client_limit=%u } is lower than " "required under max. load (%u). " - "Counted for protocol services with service_count != 1: %s", + "Counted for protocol services with restart_request_count != 1: %s", client_limit, max_auth_client_processes, str_c(max_auth_client_processes_reason)); } diff --git a/src/master/service-monitor.c b/src/master/service-monitor.c index 69009acce7..c349a83b45 100644 --- a/src/master/service-monitor.c +++ b/src/master/service-monitor.c @@ -72,8 +72,8 @@ static void service_kill_idle(struct service *service) (It's actually not important which processes get killed. A better way could be to kill the oldest processes since they might have to - be restarted anyway soon due to reaching service_count, but we'd - have to use priority queue for tracking that, which is more + be restarted anyway soon due to reaching restart_request_count, but + we'd have to use priority queue for tracking that, which is more expensive and probably not worth it.) */ for (; processes_to_kill > 0; processes_to_kill--) { struct service_process *process = service->idle_processes_head; @@ -282,9 +282,9 @@ static void service_log_drop_warning(struct service *service) if (service->process_limit > 1) { limit_name = "process_limit"; limit = service->process_limit; - } else if (service->set->service_count == 1) { + } else if (service->set->restart_request_count == 1) { i_assert(service->client_limit == 1); - limit_name = "client_limit/service_count"; + limit_name = "client_limit/restart_request_count"; limit = 1; } else { limit_name = "client_limit"; diff --git a/src/master/service-process.c b/src/master/service-process.c index 63f4bba80b..c74a7e5221 100644 --- a/src/master/service-process.c +++ b/src/master/service-process.c @@ -307,9 +307,9 @@ service_process_setup_environment(struct service *service, unsigned int uid, env_put(MASTER_PROCESS_MIN_AVAIL_ENV, dec2str(service->set->process_min_avail)); env_put(MASTER_SERVICE_IDLE_KILL_ENV, dec2str(service->idle_kill)); - if (service->set->service_count != 0) { + if (service->set->restart_request_count != 0) { env_put(MASTER_SERVICE_COUNT_ENV, - dec2str(service->set->service_count)); + dec2str(service->set->restart_request_count)); } env_put(MASTER_UID_ENV, dec2str(uid)); env_put(MY_HOSTNAME_ENV, my_hostname); diff --git a/src/master/service.c b/src/master/service.c index 55221bd1cb..0aceedcac8 100644 --- a/src/master/service.c +++ b/src/master/service.c @@ -206,9 +206,9 @@ service_create_real(pool_t pool, struct event *event, service->throttle_msecs = SERVICE_STARTUP_FAILURE_THROTTLE_MIN_MSECS; service->client_limit = set->client_limit; - if (set->service_count > 0 && - service->client_limit > set->service_count) - service->client_limit = set->service_count; + if (set->restart_request_count > 0 && + service->client_limit > set->restart_request_count) + service->client_limit = set->restart_request_count; service->vsz_limit = set->vsz_limit; service->idle_kill = set->idle_kill; diff --git a/src/pop3-login/pop3-login-settings.c b/src/pop3-login/pop3-login-settings.c index edd73877ba..7dbbebac71 100644 --- a/src/pop3-login/pop3-login-settings.c +++ b/src/pop3-login/pop3-login-settings.c @@ -20,7 +20,7 @@ struct service_settings pop3_login_service_settings = { .drop_priv_before_exec = FALSE, - .service_count = 1, + .restart_request_count = 1, .unix_listeners = ARRAY_INIT, .fifo_listeners = ARRAY_INIT, diff --git a/src/pop3/pop3-settings.c b/src/pop3/pop3-settings.c index 40658b9e8b..0a6f6f98a6 100644 --- a/src/pop3/pop3-settings.c +++ b/src/pop3/pop3-settings.c @@ -27,7 +27,7 @@ struct service_settings pop3_service_settings = { .process_limit = 1024, .client_limit = 1, - .service_count = 1, + .restart_request_count = 1, .unix_listeners = ARRAY_INIT, .fifo_listeners = ARRAY_INIT, diff --git a/src/stats/test-client-reader.c b/src/stats/test-client-reader.c index 7fe55bb0b8..9678ce6fea 100644 --- a/src/stats/test-client-reader.c +++ b/src/stats/test-client-reader.c @@ -221,7 +221,7 @@ int main(void) { struct master_service local_master_service = { .stopping = TRUE, .total_available_count = 100, - .service_count_left = 100, + .restart_request_count_left = 100, }; void (*const test_functions[])(void) = { test_client_reader, diff --git a/src/stats/test-client-writer.c b/src/stats/test-client-writer.c index a08e4c9f0a..0ab3bdfb39 100644 --- a/src/stats/test-client-writer.c +++ b/src/stats/test-client-writer.c @@ -138,7 +138,7 @@ int main(void) { struct master_service local_master_service = { .stopping = TRUE, .total_available_count = 100, - .service_count_left = 100, + .restart_request_count_left = 100, }; void (*const test_functions[])(void) = { test_client_writer, diff --git a/src/submission-login/submission-login-settings.c b/src/submission-login/submission-login-settings.c index a0adfb0e62..7a3b6fe8f6 100644 --- a/src/submission-login/submission-login-settings.c +++ b/src/submission-login/submission-login-settings.c @@ -24,7 +24,7 @@ struct service_settings submission_login_service_settings = { .drop_priv_before_exec = FALSE, - .service_count = 1, + .restart_request_count = 1, .unix_listeners = ARRAY_INIT, .fifo_listeners = ARRAY_INIT, diff --git a/src/submission/submission-settings.c b/src/submission/submission-settings.c index 533b42a9ab..bf042d5d3e 100644 --- a/src/submission/submission-settings.c +++ b/src/submission/submission-settings.c @@ -28,7 +28,7 @@ struct service_settings submission_service_settings = { .process_limit = 1024, .client_limit = 1, - .service_count = 1, + .restart_request_count = 1, .unix_listeners = ARRAY_INIT, .fifo_listeners = ARRAY_INIT, diff --git a/src/util/script-login.c b/src/util/script-login.c index 62d40a501c..ed356747dc 100644 --- a/src/util/script-login.c +++ b/src/util/script-login.c @@ -224,7 +224,7 @@ int main(int argc, char *argv[]) } master_service_init_finish(master_service); - master_service_set_service_count(master_service, 1); + master_service_set_restart_request_count(master_service, 1); if ((flags & MASTER_SERVICE_FLAG_STANDALONE) != 0) { /* The last post-login script is calling us to finish login */ diff --git a/src/util/script.c b/src/util/script.c index c32d3ec309..5838cdad31 100644 --- a/src/util/script.c +++ b/src/util/script.c @@ -298,7 +298,7 @@ int main(int argc, char *argv[]) restrict_access_allow_coredumps(TRUE); master_service_init_finish(master_service); - master_service_set_service_count(master_service, 1); + master_service_set_restart_request_count(master_service, 1); if (argv[0][0] == '/') binary = argv[0];