stop command when error occurs in reboot attempt
authorBoyeon <boyeon.son@samsung.com>
Fri, 26 Apr 2019 04:36:37 +0000 (13:36 +0900)
committer박정훈/Tizen Platform Lab(SR)/Staff Engineer/삼성전자 <jh1979.park@samsung.com>
Fri, 26 Apr 2019 07:28:17 +0000 (16:28 +0900)
src/devicemanagerservice.c

index abf8c87..8779b21 100644 (file)
@@ -54,6 +54,7 @@ static void __reboot(void *data)
        ret = idm_command_set_power_cmd(command, IDM_CMD_POWER_REBOOT, NULL);
        if (ret != 0) {
                _E("failed to idm_command_set_power_cmd");
+               idm_command_stop(ad->command);
                idm_command_free(command);
                ad->command = NULL;
                return;
@@ -62,6 +63,7 @@ static void __reboot(void *data)
        ret = idm_command_run(command, __reboot_result_callback, ad);
        if (ret != 0) {
                _E("failed to idm_command_run");
+               idm_command_stop(ad->command);
                idm_command_free(command);
                ad->command = NULL;
                return;