From: Eric Bollengier Date: Sat, 17 Feb 2007 17:31:07 +0000 (+0000) Subject: ebl add update volume=xxx recyclepool=yyyy X-Git-Tag: Release-7.0.0~6882 X-Git-Url: https://git.sur5r.net/?a=commitdiff_plain;h=32f4355ec76f5d8dd9b099a623a54a759d441768;p=bacula%2Fbacula ebl add update volume=xxx recyclepool=yyyy git-svn-id: https://bacula.svn.sourceforge.net/svnroot/bacula/trunk@4195 91ce42f0-d328-0410-95d8-f526ca767f89 --- diff --git a/bacula/src/cats/sql_update.c b/bacula/src/cats/sql_update.c index 918e571a99..c4174369eb 100644 --- a/bacula/src/cats/sql_update.c +++ b/bacula/src/cats/sql_update.c @@ -399,30 +399,32 @@ int db_update_media_defaults(JCR *jcr, B_DB *mdb, MEDIA_DBR *mr) { int stat; - char ed1[50], ed2[50], ed3[50], ed4[50]; + char ed1[50], ed2[50], ed3[50], ed4[50], ed5[50]; db_lock(mdb); if (mr->VolumeName[0]) { Mmsg(mdb->cmd, "UPDATE Media SET " "Recycle=%d,VolRetention=%s,VolUseDuration=%s," - "MaxVolJobs=%u,MaxVolFiles=%u,MaxVolBytes=%s" + "MaxVolJobs=%u,MaxVolFiles=%u,MaxVolBytes=%s,RecyclePoolId=%s" " WHERE VolumeName='%s'", mr->Recycle,edit_uint64(mr->VolRetention, ed1), edit_uint64(mr->VolUseDuration, ed2), mr->MaxVolJobs, mr->MaxVolFiles, edit_uint64(mr->MaxVolBytes, ed3), + edit_uint64(mr->RecyclePoolId, ed4), mr->VolumeName); } else { Mmsg(mdb->cmd, "UPDATE Media SET " "Recycle=%d,VolRetention=%s,VolUseDuration=%s," - "MaxVolJobs=%u,MaxVolFiles=%u,MaxVolBytes=%s" + "MaxVolJobs=%u,MaxVolFiles=%u,MaxVolBytes=%s,RecyclePoolId=%s" " WHERE PoolId=%s", mr->Recycle,edit_uint64(mr->VolRetention, ed1), edit_uint64(mr->VolUseDuration, ed2), mr->MaxVolJobs, mr->MaxVolFiles, edit_uint64(mr->MaxVolBytes, ed3), - edit_int64(mr->PoolId, ed4)); + edit_int64(mr->RecyclePoolId, ed4), + edit_int64(mr->PoolId, ed5)); } Dmsg1(400, "%s\n", mdb->cmd);