handle abort in proxmox_backup_register_image()

This commit is contained in:
Dietmar Maurer 2019-09-18 13:52:27 +02:00
parent 49cbfea475
commit 8926ee01d2

View File

@ -320,6 +320,9 @@ pub extern "C" fn proxmox_backup_register_image(
) -> c_int {
let task = unsafe { &mut *(handle as * mut BackupTask) };
if let Some(_reason) = &task.aborted {
raise_error_int!(error, "task already aborted");
}
let device_name = unsafe { CStr::from_ptr(device_name).to_owned() };