From 095152a232692fb21c7fd5553dc147fccdfad7d2 Mon Sep 17 00:00:00 2001 From: Kern Sibbald Date: Wed, 9 Jul 2003 20:59:21 +0000 Subject: [PATCH] Update manual for Win32 + ensure VolStatus values are permitted git-svn-id: https://bacula.svn.sourceforge.net/svnroot/bacula/trunk@630 91ce42f0-d328-0410-95d8-f526ca767f89 --- bacula/ChangeLog | 8 ++++++++ bacula/kernstodo | 19 +++++++++++-------- bacula/src/dird/ua_cmds.c | 34 ++++++++++++++++++++++++++++------ 3 files changed, 47 insertions(+), 14 deletions(-) diff --git a/bacula/ChangeLog b/bacula/ChangeLog index c690e0e4d3..00df4f4423 100644 --- a/bacula/ChangeLog +++ b/bacula/ChangeLog @@ -1,5 +1,13 @@ 2003-07-xx Version 1.31 Beta xxJul03 +- Update document for Win32 stuff. +- Ensure VolStatus value for update is permitted. +- Fix cached_path so that it is local to the jcr, otherwise, there + are problems from job to job. +- Fixed idcache.c which was not thread safe and didn't release memory, + and didn't always edit the userid correctly. +- Correct missing pool memory allocation in update voluseduration. +- Release mutex in pool_mem.c before triggering ASSERT. - Lock database while recycling. - Fix a bug in editing since where I forgot to update to the new size. - Implement all the command line update arguments. diff --git a/bacula/kernstodo b/bacula/kernstodo index 1502c9f495..0677e8287e 100644 --- a/bacula/kernstodo +++ b/bacula/kernstodo @@ -22,6 +22,7 @@ Documentation to do: (any release a little bit at a time) - Document run "yes". - Document that bscan does not work with multiple simultaneous jobs. - Update Automatic Volume Labeling in disk.wml +- Document portable=yes Testing to do: (painful) @@ -37,15 +38,7 @@ Testing to do: (painful) - Figure out how to use ssh or stunnel to protect Bacula communications. For 1.31 release: -- Listing of Win32 restored files has ??????? for user. - Do full check the command line args in update (e.g. VolStatus ...). -- In Win portable restore the directory is not create - 27-Jun-2003 16:52 tibs-fd: kernsrestore.2003-06-27_16.52.20 Error: - create_file.c:175 Could not create - /tmp/bacula-restores/cygwin/home/kern/bacula/k/src/dird/dird_conf.o: 0 - ERR=The system cannot find the path specified. -- Finish Windows implementation (add setting of correct type on restore, - add Portable Data Format flag). - Maybe remove multiple simultaneous devices code in SD. - Increment DB version prior to releasing. - Turn off FULL_DEBUG prior to releasing. @@ -63,6 +56,7 @@ For 1.31 release: For 1.32: +- Figure out how to handle DHCP IP addresses. - Allow multiple Storage specifications (or multiple names on a single Storage specification) in the Job record. Thus a job can be backed up to a number of storage devices. @@ -1020,3 +1014,12 @@ Done: (see kernsdone for more) because there were a whole pile of jobs hanging around in the SD waiting for a connection from the FD that was never coming. - Possibly update all client records at startup. +- Listing of Win32 restored files has ??????? for user. +- In Win portable restore the directory is not create + 27-Jun-2003 16:52 tibs-fd: kernsrestore.2003-06-27_16.52.20 Error: + create_file.c:175 Could not create + /tmp/bacula-restores/cygwin/home/kern/bacula/k/src/dird/dird_conf.o: 0 + ERR=The system cannot find the path specified. +- Finish Windows implementation (add setting of correct type on restore, + add Portable Data Format flag). + diff --git a/bacula/src/dird/ua_cmds.c b/bacula/src/dird/ua_cmds.c index 243dc10c7b..fd27b201e6 100644 --- a/bacula/src/dird/ua_cmds.c +++ b/bacula/src/dird/ua_cmds.c @@ -654,13 +654,35 @@ static int update_cmd(UAContext *ua, char *cmd) static void update_volstatus(UAContext *ua, char *val, MEDIA_DBR *mr) { POOLMEM *query = get_pool_memory(PM_MESSAGE); - bstrncpy(mr->VolStatus, val, sizeof(mr->VolStatus)); - Mmsg(&query, "UPDATE Media SET VolStatus='%s' WHERE MediaId=%u", - mr->VolStatus, mr->MediaId); - if (!db_sql_query(ua->db, query, NULL, NULL)) { - bsendmsg(ua, "%s", db_strerror(ua->db)); + char *kw[] = { + "Append", + "Archive", + "Disabled", + "Full", + "Used", + "Cleaning", + "Read-Only", + NULL}; + bool found = false; + int i; + + for (i=0; kw[i]; i++) { + if (strcasecmp(val, kw[i]) == 0) { + found = true; + break; + } + } + if (!found) { + bsendmsg(ua, _("Invalid VolStatus specified: %s\n"), val); } else { - bsendmsg(ua, _("New Volume status is: %s\n"), mr->VolStatus); + bstrncpy(mr->VolStatus, kw[i], sizeof(mr->VolStatus)); + Mmsg(&query, "UPDATE Media SET VolStatus='%s' WHERE MediaId=%u", + mr->VolStatus, mr->MediaId); + if (!db_sql_query(ua->db, query, NULL, NULL)) { + bsendmsg(ua, "%s", db_strerror(ua->db)); + } else { + bsendmsg(ua, _("New Volume status is: %s\n"), mr->VolStatus); + } } free_pool_memory(query); } -- 2.39.5