Skip to content

Commit

Permalink
[appsync] Fix condition for logging systemd service stop problems
Browse files Browse the repository at this point in the history
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 <simo.piiroinen@jollamobile.com>
  • Loading branch information
spiiroin committed Jul 7, 2016
1 parent 3ef00b3 commit 27518bf
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/usb_moded-appsync.c
Expand Up @@ -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);
}
}
Expand Down

0 comments on commit 27518bf

Please sign in to comment.