From: Eric Bollengier Date: Fri, 4 Nov 2022 10:17:44 +0000 (+0100) Subject: Initialize Protect when creating a new media X-Git-Tag: Beta-15.0.0~375 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=e9f0677966a39b1491c72cc92a2c3db857799fff;p=thirdparty%2Fbacula.git Initialize Protect when creating a new media --- diff --git a/bacula/src/cats/sql_create.c b/bacula/src/cats/sql_create.c index 07a91dc8a..9b9467872 100644 --- a/bacula/src/cats/sql_create.c +++ b/bacula/src/cats/sql_create.c @@ -442,7 +442,7 @@ int BDB::bdb_create_media_record(JCR *jcr, MEDIA_DBR *mr) "VolStatus,Slot,VolBytes,InChanger,VolReadTime,VolWriteTime,VolType," "VolParts,VolCloudParts,LastPartBytes," "EndFile,EndBlock,LabelType,StorageId,DeviceId,LocationId," -"ScratchPoolId,RecyclePoolId,Enabled,ActionOnPurge,CacheRetention,UseProtect)" +"ScratchPoolId,RecyclePoolId,Enabled,ActionOnPurge,CacheRetention,UseProtect,Protect)" "VALUES ('%s','%s',0,%lu,%s,%s,%ld,%s,%s,%lu,%lu,'%s',%ld,%s,%ld,%s,%s,%ld," "%ld,%ld,'%s',%ld,%ld,%ld,%s,%s,%s,%s,%s,%ld,%ld,%s,%ld)", esc_name, @@ -475,7 +475,8 @@ int BDB::bdb_create_media_record(JCR *jcr, MEDIA_DBR *mr) mr->Enabled, mr->ActionOnPurge, edit_uint64(mr->CacheRetention, ed14), - mr->UseProtect + mr->UseProtect, + mr->Protect );