bareos: master f4b8d165

Author Committer Branch Timestamp Parent
pstorz arogge master 2021-04-22 12:57 master 13e8237e Pending
Changeset core: make "alist" and "dlist" type safe templates

The two data structures "alist" and "dlist" that are used widely in the
code are not type safe as they only handle void* pointers that are
cast-ed from and to the required datatype manually. This is both
error-prone and leads to code that is hard to understand.

This commit changes the two types to templates that are type safe.

As the usage of dlist in the chunked-device backend was totally misused
so that the change to the template dlist was not possible, the old dlist
still exists there as "old_dlist" which needs to be removed in a later
step.
mod - core/src/cats/bdb_mysql.h Diff File
mod - core/src/cats/bdb_postgresql.h Diff File
mod - core/src/cats/bdb_sqlite.h Diff File
mod - core/src/cats/bvfs.cc Diff File
mod - core/src/cats/cats.h Diff File
mod - core/src/cats/cats_backends.cc Diff File
mod - core/src/cats/mysql.cc Diff File
mod - core/src/cats/postgresql.cc Diff File
mod - core/src/cats/sqlite.cc Diff File
mod - core/src/console/console.cc Diff File
mod - core/src/dird/dir_plugins.cc Diff File
mod - core/src/dird/dir_plugins.h Diff File
mod - core/src/dird/dird.cc Diff File
mod - core/src/dird/dird.h Diff File
mod - core/src/dird/dird_conf.cc Diff File
mod - core/src/dird/dird_conf.h Diff File
mod - core/src/dird/fd_cmds.cc Diff File
mod - core/src/dird/jcr_private.h Diff File
mod - core/src/dird/job.cc Diff File
mod - core/src/dird/jobq.cc Diff File
mod - core/src/dird/jobq.h Diff File
mod - core/src/dird/migrate.cc Diff File
mod - core/src/dird/msgchan.cc Diff File
mod - core/src/dird/msgchan.h Diff File
mod - core/src/dird/ndmp_dma_storage.cc Diff File
mod - core/src/dird/ndmp_dma_storage.h Diff File
mod - core/src/dird/sd_cmds.cc Diff File
mod - core/src/dird/sd_cmds.h Diff File
mod - core/src/dird/socket_server.cc Diff File
mod - core/src/dird/socket_server.h Diff File
mod - core/src/dird/storage.cc Diff File
mod - core/src/dird/storage.h Diff File
mod - core/src/dird/ua_acl.cc Diff File
mod - core/src/dird/ua_cmds.cc Diff File
mod - core/src/dird/ua_impexp.cc Diff File
mod - core/src/dird/ua_prune.cc Diff File
mod - core/src/dird/ua_run.cc Diff File
mod - core/src/dird/ua_select.cc Diff File
mod - core/src/dird/ua_select.h Diff File
mod - core/src/dird/ua_status.cc Diff File
mod - core/src/filed/dir_cmd.cc Diff File
mod - core/src/filed/fd_plugins.cc Diff File
mod - core/src/filed/fd_plugins.h Diff File
mod - core/src/filed/filed.cc Diff File
mod - core/src/filed/filed_conf.h Diff File
mod - core/src/filed/jcr_private.h Diff File
mod - core/src/filed/restore.cc Diff File
mod - core/src/filed/restore.h Diff File
mod - core/src/filed/socket_server.cc Diff File
mod - core/src/filed/socket_server.h Diff File
mod - core/src/findlib/find.h Diff File
mod - core/src/findlib/xattr.cc Diff File
mod - core/src/findlib/xattr.h Diff File
mod - core/src/include/jcr.h Diff File
mod - core/src/lib/address_conf.cc Diff File
mod - core/src/lib/address_conf.h Diff File
mod - core/src/lib/alist.cc Diff File
mod - core/src/lib/alist.h Diff File
mod - core/src/lib/bnet.cc Diff File
mod - core/src/lib/bnet.h Diff File
mod - core/src/lib/bnet_server_tcp.cc Diff File
mod - core/src/lib/bnet_server_tcp.h Diff File
mod - core/src/lib/breg.cc Diff File
mod - core/src/lib/breg.h Diff File
mod - core/src/lib/bsock.cc Diff File
mod - core/src/lib/bsock.h Diff File
mod - core/src/lib/bsock_tcp.cc Diff File
mod - core/src/lib/connection_pool.cc Diff File
mod - core/src/lib/connection_pool.h Diff File
mod - core/src/lib/crypto.h Diff File
mod - core/src/lib/crypto_cache.cc Diff File
mod - core/src/lib/crypto_cache.h Diff File
mod - core/src/lib/crypto_none.cc Diff File
mod - core/src/lib/crypto_nss.cc Diff File
mod - core/src/lib/crypto_openssl.cc Diff File
mod - core/src/lib/dlink.h Diff File
mod - core/src/lib/dlist.cc Diff File
mod - core/src/lib/dlist.h Diff File
mod - core/src/lib/guid_to_name.cc Diff File
mod - core/src/lib/guid_to_name.h Diff File
mod - core/src/lib/ini.cc Diff File
mod - core/src/lib/ini.h Diff File
mod - core/src/lib/jcr.cc Diff File
mod - core/src/lib/message_queue_item.h Diff File
mod - core/src/lib/mntent_cache.cc Diff File
mod - core/src/lib/mntent_cache.h Diff File
mod - core/src/lib/output_formatter.cc Diff File
mod - core/src/lib/output_formatter.h Diff File
mod - core/src/lib/output_formatter_resource.cc Diff File
mod - core/src/lib/output_formatter_resource.h Diff File
mod - core/src/lib/parse_conf_init_resource.cc Diff File
mod - core/src/lib/plugins.cc Diff File
mod - core/src/lib/plugins.h Diff File
mod - core/src/lib/res.cc Diff File
mod - core/src/lib/resource_item.h Diff File
mod - core/src/lib/runscript.cc Diff File
mod - core/src/lib/runscript.h Diff File
mod - core/src/lib/watchdog.cc Diff File
mod - core/src/lib/watchdog.h Diff File
mod - core/src/plugins/filed/cephfs/cephfs-fd.cc Diff File
mod - core/src/plugins/filed/gfapi/gfapi-fd.cc Diff File
mod - core/src/stored/acquire.cc Diff File
mod - core/src/stored/autochanger_resource.cc Diff File
mod - core/src/stored/autochanger_resource.h Diff File
mod - core/src/stored/backends/CMakeLists.txt Diff File
mod - core/src/stored/backends/chunked_device.cc Diff File
mod - core/src/stored/backends/chunked_device.h Diff File
add - core/src/stored/backends/old_dlink.h Diff File
add - core/src/stored/backends/old_dlist.cc Diff File
add - core/src/stored/backends/old_dlist.h Diff File
mod - core/src/stored/backends/ordered_cbuf.cc Diff File
mod - core/src/stored/backends/ordered_cbuf.h Diff File
mod - core/src/stored/bextract.cc Diff File
mod - core/src/stored/bsr.h Diff File
mod - core/src/stored/dev.h Diff File
mod - core/src/stored/dir_cmd.cc Diff File
mod - core/src/stored/jcr_private.h Diff File
mod - core/src/stored/ndmp_tape.cc Diff File
mod - core/src/stored/ndmp_tape.h Diff File
mod - core/src/stored/read_ctx.h Diff File
mod - core/src/stored/read_record.cc Diff File
mod - core/src/stored/record.h Diff File
mod - core/src/stored/reserve.cc Diff File
mod - core/src/stored/reserve.h Diff File
mod - core/src/stored/sd_plugins.cc Diff File
mod - core/src/stored/sd_plugins.h Diff File
mod - core/src/stored/sd_stats.cc Diff File
mod - core/src/stored/socket_server.cc Diff File
mod - core/src/stored/socket_server.h Diff File
mod - core/src/stored/status.cc Diff File
mod - core/src/stored/stored_conf.h Diff File
mod - core/src/stored/vol_mgr.cc Diff File
mod - core/src/stored/vol_mgr.h Diff File
mod - core/src/tests/alist_test.cc Diff File
mod - core/src/tests/dlist_test.cc Diff File
mod - core/src/tests/test_config_parser_dir.cc Diff File
mod - core/src/win32/findlib/win32.cc Diff File