logind: clarify what the second argument of session_stop() means when calling it

This commit is contained in:
Lennart Poettering 2020-09-11 17:59:39 +02:00
parent 40771cf524
commit bda625730d
5 changed files with 7 additions and 7 deletions

View file

@ -152,7 +152,7 @@ int bus_seat_method_terminate(sd_bus_message *message, void *userdata, sd_bus_er
if (r == 0) if (r == 0)
return 1; /* Will call us back */ return 1; /* Will call us back */
r = seat_stop_sessions(s, true); r = seat_stop_sessions(s, /* force = */ true);
if (r < 0) if (r < 0)
return r; return r;

View file

@ -178,7 +178,7 @@ int bus_session_method_terminate(sd_bus_message *message, void *userdata, sd_bus
if (r == 0) if (r == 0)
return 1; /* Will call us back */ return 1; /* Will call us back */
r = session_stop(s, true); r = session_stop(s, /* force = */ true);
if (r < 0) if (r < 0)
return r; return r;

View file

@ -881,7 +881,7 @@ static int release_timeout_callback(sd_event_source *es, uint64_t usec, void *us
assert(es); assert(es);
assert(s); assert(s);
session_stop(s, false); session_stop(s, /* force = */ false);
return 0; return 0;
} }
@ -1053,7 +1053,7 @@ static int session_dispatch_fifo(sd_event_source *es, int fd, uint32_t revents,
/* EOF on the FIFO means the session died abnormally. */ /* EOF on the FIFO means the session died abnormally. */
session_remove_fifo(s); session_remove_fifo(s);
session_stop(s, false); session_stop(s, /* force = */ false);
return 1; return 1;
} }

View file

@ -216,7 +216,7 @@ int bus_user_method_terminate(sd_bus_message *message, void *userdata, sd_bus_er
if (r == 0) if (r == 0)
return 1; /* Will call us back */ return 1; /* Will call us back */
r = user_stop(u, true); r = user_stop(u, /* force */ true);
if (r < 0) if (r < 0)
return r; return r;

View file

@ -912,7 +912,7 @@ static void manager_gc(Manager *m, bool drop_not_started) {
seat->in_gc_queue = false; seat->in_gc_queue = false;
if (seat_may_gc(seat, drop_not_started)) { if (seat_may_gc(seat, drop_not_started)) {
seat_stop(seat, false); seat_stop(seat, /* force = */ false);
seat_free(seat); seat_free(seat);
} }
} }
@ -924,7 +924,7 @@ static void manager_gc(Manager *m, bool drop_not_started) {
/* First, if we are not closing yet, initiate stopping */ /* First, if we are not closing yet, initiate stopping */
if (session_may_gc(session, drop_not_started) && if (session_may_gc(session, drop_not_started) &&
session_get_state(session) != SESSION_CLOSING) session_get_state(session) != SESSION_CLOSING)
(void) session_stop(session, false); (void) session_stop(session, /* force = */ false);
/* Normally, this should make the session referenced /* Normally, this should make the session referenced
* again, if it doesn't then let's get rid of it * again, if it doesn't then let's get rid of it