int errstat;
jcr->lock();
- sm_check(__FILE__, __LINE__, true);
+ Dsm_check(100);
init_msg(jcr, jcr->messages);
/* Initialize termination condition variable */
generate_job_event(jcr, "JobInit");
generate_plugin_event(jcr, bEventJobInit);
- Dsm_check(1);
+ Dsm_check(100);
return true;
bail_out:
JCR *jcr = (JCR *)arg;
pthread_detach(pthread_self());
- Dsm_check(1);
+ Dsm_check(100);
Dmsg0(200, "=====Start Job=========\n");
jcr->setJobStatus(JS_Running); /* this will be set only if no error */
generate_daemon_event(jcr, "JobEnd");
generate_plugin_event(jcr, bEventJobEnd);
Dmsg1(50, "======== End Job stat=%c ==========\n", jcr->JobStatus);
- sm_check(__FILE__, __LINE__, true);
+ Dsm_check(100);
return NULL;
}
control_jcr = (JCR *)self->data;
- Dsm_check(1);
+ Dsm_check(100);
Dmsg1(800, "job_monitor_watchdog %p called\n", self);
foreach_jcr(jcr) {
pm_strcpy(ff_pkt->link_save, ff_pkt->link);
Dmsg2(500, "strcpy link_save=%d link=%d\n", strlen(ff_pkt->link_save),
strlen(ff_pkt->link));
- sm_check(__FILE__, __LINE__, true);
+ Dsm_check(200);
}
/**
strcpy(ff_pkt->link, ff_pkt->link_save);
Dmsg2(500, "strcpy link=%d link_save=%d\n", strlen(ff_pkt->link),
strlen(ff_pkt->link_save));
- sm_check(__FILE__, __LINE__, true);
+ Dsm_check(200);
}
}
Dmsg0(100, "Done with term_find_files\n");
free_jcr(jcr); /* destroy JCR record */
Dmsg0(100, "Done with free_jcr\n");
- Dsm_check(1);
+ Dsm_check(100);
garbage_collect_memory_pool();
return NULL;
}
/*
Bacula® - The Network Backup Solution
- Copyright (C) 2002-2010 Free Software Foundation Europe e.V.
+ Copyright (C) 2002-2011 Free Software Foundation Europe e.V.
The main author of Bacula is Kern Sibbald, with contributions from
many others, a complete list can be found in the file AUTHORS.
const int bufsize = 32000;
- sm_check(__FILE__, __LINE__, false);
+ Dsm_check(200);
tmp = get_pool_memory(PM_MESSAGE);
buf = (char *)malloc(bufsize+1);
goto bail_out;
}
- sm_check(__FILE__, __LINE__, false);
+ Dsm_check(200);
tmp[0] = 0;
while (1) {
buf[0] = 0;
/*
Bacula® - The Network Backup Solution
- Copyright (C) 2007-2010 Free Software Foundation Europe e.V.
+ Copyright (C) 2007-2011 Free Software Foundation Europe e.V.
The main author of Bacula is Kern Sibbald, with contributions from
many others, a complete list can be found in the file AUTHORS.
* buffer is at least one byte longer than the message length.
*/
msg[nbytes] = 0; /* terminate in case it is a string */
- sm_check(__FILE__, __LINE__, false);
+ /*
+ * The following uses *lots* of resources so turn it on only for
+ * serious debugging.
+ */
+ Dsm_check(300);
get_out:
if (m_use_locking) V(m_mutex);
static void terminate_btape(int stat)
{
- sm_check(__FILE__, __LINE__, false);
+ Dsm_check(200);
if (configfile) {
free(configfile);
}
return;
}
- sm_check(__FILE__, __LINE__, false);
+ Dsm_check(200);
block = new_block(dev);
rec = new_record();
rec->data = check_pool_memory_size(rec->data, i);
memset(rec->data, i & 0xFF, i);
rec->data_len = i;
- sm_check(__FILE__, __LINE__, false);
+ Dsm_check(200);
if (write_record_to_block(block, rec)) {
empty_block(block);
blkno++;
} else {
break;
}
- sm_check(__FILE__, __LINE__, false);
+ Dsm_check(200);
}
free_record(rec);
free_block(block);
- sm_check(__FILE__, __LINE__, false);
+ Dsm_check(200);
}
/*
if (!dev->is_open()) {
open_the_device();
}
- sm_check(__FILE__, __LINE__, false);
+ Dsm_check(200);
empty_block(block);
if (verbose > 1) {
dump_block(block, "test");
rec->data = check_pool_memory_size(rec->data, i);
memset(rec->data, i & 0xFF, i);
rec->data_len = i;
- sm_check(__FILE__, __LINE__, false);
+ Dsm_check(200);
if (!write_record_to_block(block, rec)) {
Pmsg0(0, _("Error writing record to block.\n"));
goto bail_out;
Pmsg0(0, _("Wrote block to device.\n"));
bail_out:
- sm_check(__FILE__, __LINE__, false);
- sm_check(__FILE__, __LINE__, false);
+ Dsm_check(200);
}
/*
count = 1000;
}
- sm_check(__FILE__, __LINE__, false);
+ Dsm_check(200);
i = block->buf_len - 100;
ASSERT (i > 0);
scan_blocks();
bail_out:
- sm_check(__FILE__, __LINE__, false);
+ Dsm_check(200);
}
/*
bool found;
while (!quit && get_cmd("*")) {
- sm_check(__FILE__, __LINE__, false);
+ Dsm_check(200);
found = false;
parse_args(cmd, &args, &argc, argk, argv, MAX_CMD_ARGS);
for (i=0; i<comsize; i++) /* search for command */
int status, tries;
berrno be;
- Dsm_check(1);
+ Dsm_check(200);
if (mount) {
icmd = device->mount_command;
} else {
set_mounted(false);
free_pool_memory(results);
Dmsg0(200, "============ mount=0\n");
- Dsm_check(1);
+ Dsm_check(200);
return false;
}
int status, tries, name_max, count;
berrno be;
- Dsm_check(1);
+ Dsm_check(200);
if (mount) {
icmd = device->mount_command;
} else {
set_mounted(false);
free_pool_memory(results);
Dmsg0(200, "============ mount=0\n");
- Dsm_check(1);
+ Dsm_check(200);
return false;
}
/*
Bacula® - The Network Backup Solution
- Copyright (C) 2005-2010 Free Software Foundation Europe e.V.
+ Copyright (C) 2005-2011 Free Software Foundation Europe e.V.
The main author of Bacula is Kern Sibbald, with contributions from
many others, a complete list can be found in the file AUTHORS.
/* The device must be mounted in order to dvd-freespace to work */
mount(1);
- sm_check(__FILE__, __LINE__, false);
+ Dsm_check(400);
icmd = device->free_space_command;
if (!icmd) {
free_pool_memory(results);
Dmsg4(29, "leave update_freespace: free_space=%s freespace_ok=%d free_space_errno=%d have_media=%d\n",
edit_uint64(free_space, ed1), !!is_freespace_ok(), free_space_errno, !!have_media());
- sm_check(__FILE__, __LINE__, false);
+ Dsm_check(400);
return ok;
}
unlink(archive_name.c_str());
dev->set_part_spooled(false);
Dmsg1(29, "========= unlink(%s)\n", archive_name.c_str());
- sm_check(__FILE__, __LINE__, false);
+ Dsm_check(400);
return true;
}
dev->clear_freespace_ok(); /* need to update freespace */
- sm_check(__FILE__, __LINE__, false);
+ Dsm_check(400);
Dmsg3(29, "dvd_write_part: device is %s, part is %d, is_mounted=%d\n", dev->print_name(), dev->part, dev->is_mounted());
icmd = dev->device->write_part_command;
if (!dev->truncating) {
dcr->mark_volume_in_error();
}
- sm_check(__FILE__, __LINE__, false);
+ Dsm_check(400);
return false;
}
Jmsg(dcr->jcr, M_INFO, 0, _("Part %d (%lld bytes) written to DVD.\n"), dev->part, dev->part_size);
unlink(archive_name.c_str());
dev->set_part_spooled(false);
Dmsg1(29, "========= unlink(%s)\n", archive_name.c_str());
- sm_check(__FILE__, __LINE__, false);
+ Dsm_check(400);
/* growisofs umounted the device, so remount it (it will update the free space) */
dev->clear_mounted();
dev->mount(1);
Jmsg(dcr->jcr, M_INFO, 0, _("Remaining free space %s on %s\n"),
edit_uint64_with_commas(dev->free_space, ed1), dev->print_name());
- sm_check(__FILE__, __LINE__, false);
+ Dsm_check(400);
return true;
}
struct timespec timeout;
int errstat = 0;
- Dsm_check(1);
+ Dsm_check(200);
Dmsg1(200, "Run_cmd: %s\n", jcr->dir_bsock->msg);
/* If we do not need the FD, we are doing a migrate, copy, or virtual
delete jcr->write_store;
jcr->write_store = NULL;
}
- Dsm_check(1);
+ Dsm_check(200);
if (jcr->JobId != 0)
write_state_file(me->working_directory, "bacula-sd", get_first_port_host_order(me->sdaddrs));
/*
Bacula® - The Network Backup Solution
- Copyright (C) 2006-2007 Free Software Foundation Europe e.V.
+ Copyright (C) 2006-2011 Free Software Foundation Europe e.V.
The main author of Bacula is Kern Sibbald, with contributions from
many others, a complete list can be found in the file AUTHORS.
*
* Kern Sibbald, MMVI
*
- * Version $Id$
*/
#include "bacula.h"
dcr->VolCatInfo = dcrVolCatInfo; /* structure assignment */
VolCatInfo = devVolCatInfo; /* structure assignment */
}
- sm_check(__FILE__, __LINE__, false);
+ Dsm_check(100);
return found;
}