From 3a45fdfce074e38b3498316b14f986d83e204aeb Mon Sep 17 00:00:00 2001 From: Mike Yuan Date: Fri, 1 Mar 2024 21:45:32 +0800 Subject: [PATCH] core/service: reorder two functions --- src/core/service.c | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) diff --git a/src/core/service.c b/src/core/service.c index d017515c929..086404f6752 100644 --- a/src/core/service.c +++ b/src/core/service.c @@ -4311,6 +4311,16 @@ static int service_dispatch_watchdog(sd_event_source *source, usec_t usec, void return 0; } +static void service_force_watchdog(Service *s) { + if (!UNIT(s)->manager->service_watchdogs) + return; + + log_unit_error(UNIT(s), "Watchdog request (last status: %s)!", + s->status_text ?: ""); + + service_enter_signal(s, SERVICE_STOP_WATCHDOG, SERVICE_FAILURE_WATCHDOG); +} + static bool service_notify_message_authorized(Service *s, pid_t pid, FDSet *fds) { assert(s); @@ -4348,16 +4358,6 @@ static bool service_notify_message_authorized(Service *s, pid_t pid, FDSet *fds) return true; } -static void service_force_watchdog(Service *s) { - if (!UNIT(s)->manager->service_watchdogs) - return; - - log_unit_error(UNIT(s), "Watchdog request (last status: %s)!", - s->status_text ?: ""); - - service_enter_signal(s, SERVICE_STOP_WATCHDOG, SERVICE_FAILURE_WATCHDOG); -} - static void service_notify_message( Unit *u, const struct ucred *ucred, -- 2.47.3