From 3832dc2402e5c9272c9cf66235c14d8ee86630aa Mon Sep 17 00:00:00 2001 From: Pierre Pronchery Date: Wed, 28 Feb 2024 02:51:46 +0100 Subject: [PATCH] desktopctl: report errors when sending messages --- src/desktop/desktopctl.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/desktop/desktopctl.c b/src/desktop/desktopctl.c index 4a889f4..262715a 100644 --- a/src/desktop/desktopctl.c +++ b/src/desktop/desktopctl.c @@ -31,6 +31,7 @@ #include #include #include +#include #include #include "../../include/Browser/desktop.h" #include "../../config.h" @@ -64,7 +65,9 @@ static int _usage(void); /* desktopctl */ static int _desktopctl(int action, int what) { - desktop_message_send(DESKTOP_CLIENT_MESSAGE, action, what, TRUE); + if(desktop_message_send(DESKTOP_CLIENT_MESSAGE, action, what, TRUE) + != 0) + return error_print(PROGNAME_DESKTOPCTL); return 0; }