]> git.ipfire.org Git - thirdparty/dovecot/core.git/commitdiff
global: Rename service_count to restart_request_count
authorKarl Fleischmann <karl.fleischmann@open-xchange.com>
Thu, 8 Feb 2024 15:31:20 +0000 (16:31 +0100)
committerAki Tuomi <aki.tuomi@open-xchange.com>
Wed, 12 Feb 2025 10:34:12 +0000 (12:34 +0200)
29 files changed:
src/auth/auth-worker-server.c
src/auth/auth-worker-server.h
src/auth/main.c
src/doveadm/doveadm-settings.c
src/imap-login/imap-login-settings.c
src/imap-urlauth-login/imap-urlauth-login-settings.c
src/imap-urlauth/imap-urlauth-settings.c
src/imap-urlauth/imap-urlauth-worker-settings.c
src/imap/imap-settings.c
src/lib-login/login-server.c
src/lib-master/master-service-private.h
src/lib-master/master-service.c
src/lib-master/master-service.h
src/lib-master/service-settings.h
src/login-common/client-common.c
src/login-common/login-common.h
src/login-common/main.c
src/master/master-settings.c
src/master/service-monitor.c
src/master/service-process.c
src/master/service.c
src/pop3-login/pop3-login-settings.c
src/pop3/pop3-settings.c
src/stats/test-client-reader.c
src/stats/test-client-writer.c
src/submission-login/submission-login-settings.c
src/submission/submission-settings.c
src/util/script-login.c
src/util/script.c

index b7874e9c4162f16a2dd02da4692ab8a141362016..34b8e6dc551cfae0fc3c566a7d2e9c78727391f6 100644 (file)
@@ -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;
        }
 
index b2fb2418d4dffec5d5706dfb709f2cbcc8ab5699..79e47e8d3a7affd2cde2796992c7b897f14fcaea 100644 (file)
@@ -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
index bcac68354f4cd87cfe06f3093dd76984609ef979..d4e0f88ae33bed1f57f1fb28fdac4fc21abecc79 100644 (file)
@@ -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);
index 0a836b811c2e95a002dddcd587c6ee78946da5c4..9484702d0d2b966eb37dec04936848b3a5d11dc4 100644 (file)
@@ -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,
index 1d8746cfa1d4077cde5464424d6672788ae14381..c4c53909ab9d687d9d381a1e5c7821ecb577fe83 100644 (file)
@@ -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,
index 48bd33d00ab14870b25dafdfd21d13acda53acb2..10be716ef9930cf348ea464af6c22172c191614a 100644 (file)
@@ -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,
index af64be78ef635818c455b5951212c7276c874422..44ceef6a4710bd1ed04ed76767c4239167c1eea1 100644 (file)
@@ -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,
index ebc8e4c772a5097efeb2f155ef8920534642b34a..2b38a8324b5f26251627b3910fd244a9a0f3685f 100644 (file)
@@ -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,
index 98d58399cd0f9e96ee98bbc27e7012373c738fae..547efac490ec5379a4a39520e566f42494910d41 100644 (file)
@@ -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,
index d8ce13d373045e0a5714fa02a6b55b7f513b8842..f564e56629331b5783a6a866c014cb41e8157098 100644 (file)
@@ -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);
index 5a20d85e85a0c08c2246a7e32026f7e3c56bbcd1..fc41b06db054f18c1b13406498963452d57230bf 100644 (file)
@@ -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;
index aef332cfabd582a23616cb720f98bc325bf89276..c321c3f480d8b6f1fbd5f772ac15428eb15fe4ff 100644 (file)
@@ -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;
index c4dccf761f8bb64725c4d273d0f2bf97dcce9c7a..b023f3a77c75adc160c0d8e3b1d368a75c350b17 100644 (file)
@@ -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. */
index c1faff2f21aa9241e604fa63b21f720d565219e2..ee4cf1110ae58450334da07e58d536df161f0b9e 100644 (file)
@@ -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;
 
index a771a175d2f47afab17ccc2636393b3feec39c9e..cf80e60d55cffd43a43e2c59bbf24442b37c6834 100644 (file)
@@ -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();
index fea3d2577e04fb910f7b0215625a6b3f04b789dd..37726757607f721aab9c1e6192258194a4af1b39 100644 (file)
@@ -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;
index 58ede05ceb0547438ea32df186e0eb05dccb8d61..b87e877d4db4a3b73a3b7b67b2b4100121afbab4 100644 (file)
@@ -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)
index 817de24bfbf14177742a6dd2b075c983f8ae568e..666dee51046fc4799cf60ce7dee86cc842b7e1f6 100644 (file)
@@ -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));
        }
index 69009acce7d178fb216f9c174663d9f6a22a2fae..c349a83b45d3a703dd27646c1e46841e09724d7c 100644 (file)
@@ -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";
index 63f4bba80b825c7728e1b008a4b82b4910fa425c..c74a7e5221c9a205ce9f6640fb0de5fa4fd39ca4 100644 (file)
@@ -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);
index 55221bd1cb3bf5cd2f8bcd0a2a1579bbed374f06..0aceedcac895923c3fc198309278c2cf0203e2ed 100644 (file)
@@ -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;
index edd73877bab897e445d79e5e2ad00d24721e5b20..7dbbebac71584e7fa913f7c79ab5028747aa0141 100644 (file)
@@ -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,
index 40658b9e8ba1d6b447e6e3e4fc4943911a049316..0a6f6f98a62136cf5a24dcbd5721b25f53ccfab3 100644 (file)
@@ -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,
index 7fe55bb0b8a738f60ee5d83a326e85ee0285eed2..9678ce6fea8b534a545c3f433792a4a807815b08 100644 (file)
@@ -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,
index a08e4c9f0a480be33d43a6cc77ac47f293c7103f..0ab3bdfb39f8c55320c10eedef9aecd4d3e3214f 100644 (file)
@@ -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,
index a0adfb0e62c144157b40e20cf708579c6f4014f9..7a3b6fe8f68c693f75ce54aa8ebf3205c92f12a7 100644 (file)
@@ -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,
index 533b42a9ab75fca20861332e3218234c5e11dd75..bf042d5d3e88df151a5e1cbdb44d9e44ed7c5d54 100644 (file)
@@ -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,
index 62d40a501c67b79b97c7c6c3630fe33601d65e1e..ed356747dc468fe8576805b9458817e85f8ff613 100644 (file)
@@ -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 */
index c32d3ec309b9036171db922559e4db9d56d2412c..5838cdad31d0f00c755249c4845b898c0c8b6232 100644 (file)
@@ -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];