Kern's ToDo List
- 25 January 2003
+ 05 February 2003
Documentation to do: (a little bit at a time)
- Document running a test version.
- Need a verbose mode in restore, perhaps to bsr.
- bscan without -v is too quiet -- perhaps show jobs.
- Add code to reject whole blocks if not wanted on restore.
-- Implement multiple simultaneous file Volumes on a single device.
- Start working on Base jobs.
- Make sure the MaxVolFiles is fully implemented in SD
-- Flush all the daemon messages at the end of every job.
- Check if both CatalogFiles and UseCatalog are set to SD.
- Check if we can increase Bacula FD priorty in Win2000
- Need return status on read_cb() from read_records(). Need multiple
- Umasked 022 daemons
- Fix restore of hard linked file.
- Figure out how to allow multiple simultaneous file Volumes on a single device.
+- Implement multiple simultaneous file Volumes on a single device.
- Cleanup db_update_media and db_update_pool
+- Flush all the daemon messages at the end of every job.
+
char *exepath = (char *)NULL;
char *exename = (char *)NULL;
int console_msg_pending = 0;
-char con_fname[1000];
-FILE *con_fd = NULL;
-brwlock_t con_lock;
+char con_fname[500]; /* Console filename */
+FILE *con_fd = NULL; /* Console file descriptor */
+brwlock_t con_lock; /* Console lock structure */
#ifdef TRACE_FILE
FILE *trace_fd = NULL;
/*
* Walk down the message resource chain duplicating it
- * for the current Job. ****FIXME***** segfault on memcpy
+ * for the current Job.
*/
for (d=msg->dest_chain; d; d=d->next) {
dnew = (DEST *)malloc(sizeof(DEST));
jcr->jcr_msgs->dest_chain = temp_chain;
memcpy(jcr->jcr_msgs->send_msg, msg->send_msg, sizeof(msg->send_msg));
} else {
+ /* If we have default values, release them now */
+ if (daemon_msgs) {
+ free_msgs_res(daemon_msgs);
+ }
daemon_msgs = (MSGS *)malloc(sizeof(MSGS));
memset(daemon_msgs, 0, sizeof(MSGS));
daemon_msgs->dest_chain = temp_chain;
{
int fd;
- sprintf(con_fname, "%s/%s.conmsg", wd, my_name);
+ bsnprintf(con_fname, sizeof(con_fname), "%s/%s.conmsg", wd, my_name);
fd = open(con_fname, O_CREAT|O_RDWR|O_BINARY, 0600);
if (fd == -1) {
Emsg2(M_ERROR_TERM, 0, _("Could not open console message file %s: ERR=%s\n"),
if (jcr == NULL) { /* NULL -> global chain */
msgs = daemon_msgs;
- daemon_msgs = NULL;
} else {
msgs = jcr->jcr_msgs;
jcr->jcr_msgs = NULL;
}
free_pool_memory(cmd);
Dmsg0(150, "Done walking message chain.\n");
- free_msgs_res(msgs);
- msgs = NULL;
+ if (jcr) {
+ free_msgs_res(msgs);
+ msgs = NULL;
+ }
Dmsg0(150, "===End close msg resource\n");
}
{
DEST *d, *old;
+ /* Walk down the message chain releasing allocated buffers */
for (d=msgs->dest_chain; d; ) {
if (d->where) {
free(d->where);
free(old); /* free the destination item */
}
msgs->dest_chain = NULL;
- free(msgs);
+ free(msgs); /* free the head */
}
{
Dmsg0(100, "Enter term_msg\n");
close_msg(NULL); /* close global chain */
+ free_msgs_res(daemon_msgs); /* free the resources */
daemon_msgs = NULL;
if (con_fd) {
fflush(con_fd);