*
* Version $Id$
*/
-
/*
- Copyright (C) 2000-2005 Kern Sibbald
+ Copyright (C) 2000-2006 Kern Sibbald
This program is free software; you can redistribute it and/or
- modify it under the terms of the GNU General Public License as
- published by the Free Software Foundation; either version 2 of
- the License, or (at your option) any later version.
+ modify it under the terms of the GNU General Public License
+ version 2 as amended with additional clauses defined in the
+ file LICENSE in the main source directory.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- General Public License for more details.
-
- You should have received a copy of the GNU General Public
- License along with this program; if not, write to the Free
- Software Foundation, Inc., 59 Temple Place - Suite 330, Boston,
- MA 02111-1307, USA.
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ the file LICENSE for additional details.
*/
*
* -----------------------------------------------------------------------
*/
-/* Update the attributes record by adding the MD5 signature */
+/* Update the attributes record by adding the file digest */
int
-db_add_SIG_to_file_record(JCR *jcr, B_DB *mdb, FileId_t FileId, char *SIG,
+db_add_digest_to_file_record(JCR *jcr, B_DB *mdb, FileId_t FileId, char *digest,
int type)
{
int stat;
char ed1[50];
db_lock(mdb);
- Mmsg(mdb->cmd, "UPDATE File SET MD5='%s' WHERE FileId=%s", SIG,
+ Mmsg(mdb->cmd, "UPDATE File SET MD5='%s' WHERE FileId=%s", digest,
edit_int64(FileId, ed1));
stat = UPDATE_DB(jcr, mdb, mdb->cmd);
db_unlock(mdb);
struct tm tm;
btime_t JobTDate;
int stat;
- char ed1[50], ed2[50], ed3[50];
+ char ed1[50], ed2[50], ed3[50], ed4[50];
stime = jr->StartTime;
localtime_r(&stime, &tm);
db_lock(mdb);
Mmsg(mdb->cmd, "UPDATE Job SET JobStatus='%c',Level='%c',StartTime='%s',"
-"ClientId=%s,JobTDate=%s WHERE JobId=%s",
+"ClientId=%s,JobTDate=%s,PoolId=%s WHERE JobId=%s",
(char)(jcr->JobStatus),
(char)(jr->JobLevel), dt,
edit_int64(jr->ClientId, ed1),
edit_uint64(JobTDate, ed2),
- edit_int64(jr->JobId, ed3));
+ edit_int64(jr->JobId, ed3),
+ edit_int64(jr->PoolId, ed4));
stat = UPDATE_DB(jcr, mdb, mdb->cmd);
mdb->changes = 0;
time_t ttime;
struct tm tm;
int stat;
- char ed1[50], ed2[50], ed3[50], ed4[50], ed5[50];
+ char ed1[50], ed2[50], ed3[50], ed4[50];
+ char ed5[50], ed6[50], ed7[50], ed8[50];
Dmsg1(100, "update_media: FirstWritten=%d\n", mr->FirstWritten);
"VolFiles=%u,VolBlocks=%u,VolBytes=%s,VolMounts=%u,VolErrors=%u,"
"VolWrites=%u,MaxVolBytes=%s,VolStatus='%s',"
"Slot=%d,InChanger=%d,VolReadTime=%s,VolWriteTime=%s,VolParts=%d,"
- "LabelType=%d,StorageId=%s"
+ "LabelType=%d,StorageId=%s,PoolId=%s,VolRetention=%s,VolUseDuration=%s,"
+ "MaxVolJobs=%d,MaxVolFiles=%d"
" WHERE VolumeName='%s'",
mr->VolJobs, mr->VolFiles, mr->VolBlocks, edit_uint64(mr->VolBytes, ed1),
mr->VolMounts, mr->VolErrors, mr->VolWrites,
mr->VolParts,
mr->LabelType,
edit_int64(mr->StorageId, ed5),
+ edit_int64(mr->PoolId, ed6),
+ edit_uint64(mr->VolRetention, ed7),
+ edit_uint64(mr->VolUseDuration, ed8),
+ mr->MaxVolJobs, mr->MaxVolFiles,
mr->VolumeName);
Dmsg1(400, "%s\n", mdb->cmd);
mr->Recycle,edit_uint64(mr->VolRetention, ed1),
edit_uint64(mr->VolUseDuration, ed2),
mr->MaxVolJobs, mr->MaxVolFiles,
- edit_uint64(mr->VolBytes, ed3),
+ edit_uint64(mr->MaxVolBytes, ed3),
mr->VolumeName);
} else {
Mmsg(mdb->cmd, "UPDATE Media SET "
mr->Recycle,edit_uint64(mr->VolRetention, ed1),
edit_uint64(mr->VolUseDuration, ed2),
mr->MaxVolJobs, mr->MaxVolFiles,
- edit_uint64(mr->VolBytes, ed3),
+ edit_uint64(mr->MaxVolBytes, ed3),
edit_int64(mr->PoolId, ed4));
}