bareos: master 6a10326c

Author Committer Branch Timestamp Parent
joergs joergs master 2021-04-23 22:21 master 6303918e Pending
Changeset dev.cc: do not call virtual functions in destructor

The destructor of the the Device base class can not call
cannot call close(), as close() itself calls virtual functions
but the destructors of the derived classes already have been called before
so the overridden functions are not available anymore.
Calling virtual functions of a class need to be called in the destructor
of that class and not of the base class.

Add a unittest for testing this (load and unload tape device).

Co-authored-by: Frank Ueberschar <frank.ueberschar@bareos.com>
mod - .gitignore Diff File
mod - core/src/stored/acquire.h Diff File
mod - core/src/stored/backends/cephfs_device.cc Diff File
mod - core/src/stored/backends/chunked_device.cc Diff File
mod - core/src/stored/backends/generic_tape_device.h Diff File
mod - core/src/stored/backends/gfapi_device.cc Diff File
mod - core/src/stored/backends/rados_device.cc Diff File
mod - core/src/stored/backends/unix_fifo_device.h Diff File
mod - core/src/stored/backends/unix_file_device.h Diff File
mod - core/src/stored/backends/unix_tape_device.h Diff File
mod - core/src/stored/butil.cc Diff File
mod - core/src/stored/butil.h Diff File
mod - core/src/stored/dev.cc Diff File
mod - core/src/stored/dev.h Diff File
mod - core/src/tests/CMakeLists.txt Diff File
add - core/src/tests/configs/sd_backend/bareos-sd.d/device/tape1.conf Diff File
add - core/src/tests/configs/sd_backend/bareos-sd.d/storage/myself.conf.in Diff File
add - core/src/tests/sd_backend.cc Diff File
mod - core/src/win32/stored/backends/win32_fifo_device.h Diff File
mod - core/src/win32/stored/backends/win32_file_device.cc Diff File
mod - core/src/win32/stored/backends/win32_file_device.h Diff File
mod - core/src/win32/stored/backends/win32_tape_device.cc Diff File
mod - core/src/win32/stored/backends/win32_tape_device.h Diff File