From 27518bf06f4e8f13aaf175b25666531d24d667eb Mon Sep 17 00:00:00 2001 From: Simo Piiroinen Date: Thu, 7 Jul 2016 09:14:28 +0300 Subject: [PATCH] [appsync] Fix condition for logging systemd service stop problems The systemd_control_service() function returns zero on success. Due to incorrect boolean check in appsync_stop() diagnostic failure messages are emitted on success and failures are ignored silently. Fix the condition so that failures are logged. Signed-off-by: Simo Piiroinen --- src/usb_moded-appsync.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/usb_moded-appsync.c b/src/usb_moded-appsync.c index e72372b..2d1136f 100644 --- a/src/usb_moded-appsync.c +++ b/src/usb_moded-appsync.c @@ -456,7 +456,7 @@ int appsync_stop(void) if(data->systemd) { - if(!systemd_control_service(data->name, SYSTEMD_STOP)) + if(systemd_control_service(data->name, SYSTEMD_STOP)) log_debug("Failed to stop %s\n", data->name); } }