Use wp_info() on normal termination

The service is normally stopped by SIGTERM.  Using wp_info() here
means users will be more likely to notice abnormal exits.
This commit is contained in:
Andrew Sayers 2025-02-21 09:25:01 +00:00
parent 07e8248928
commit eec702e4a1
No known key found for this signature in database
GPG key ID: D44E183E68ABF38D

View file

@ -68,7 +68,7 @@ daemon_exit (WpDaemon * d, gint code)
static void static void
on_disconnected (WpCore *core, WpDaemon * d) on_disconnected (WpCore *core, WpDaemon * d)
{ {
wp_notice ("disconnected from pipewire"); wp_info ("disconnected from pipewire");
daemon_exit (d, WP_EXIT_OK); daemon_exit (d, WP_EXIT_OK);
} }
@ -76,7 +76,10 @@ static gboolean
signal_handler (int signal, gpointer data) signal_handler (int signal, gpointer data)
{ {
WpDaemon *d = data; WpDaemon *d = data;
wp_notice ("stopped by signal: %s", strsignal (signal)); if (signal == SIGTERM)
wp_info ("stopped by signal: %s", strsignal (signal));
else
wp_notice ("stopped by signal: %s", strsignal (signal));
daemon_exit (d, WP_EXIT_OK); daemon_exit (d, WP_EXIT_OK);
return G_SOURCE_CONTINUE; return G_SOURCE_CONTINUE;
} }