prefix = @prefix@
exec_prefix = @exec_prefix@
datadir = @datadir@
+datarootdir = @datarootdir@
localedir = $(datadir)/locale
gettextsrcdir = $(datadir)/gettext/po
for lc in '' $(EXTRA_LOCALE_CATEGORIES); do \
if test -n "$$lc"; then \
if (cd $(DESTDIR)$(localedir)/$$lang && LC_ALL=C ls -l -d $$lc 2>/dev/null) | grep ' -> ' >/dev/null; then \
- link=`cd $(DESTDIR)$(localedir)/$$lang && LC_ALL=C ls -l -d $$lc | sed -e 's/^.* -> //'`; \
- mv $(DESTDIR)$(localedir)/$$lang/$$lc $(DESTDIR)$(localedir)/$$lang/$$lc.old; \
- mkdir $(DESTDIR)$(localedir)/$$lang/$$lc; \
- (cd $(DESTDIR)$(localedir)/$$lang/$$lc.old && \
- for file in *; do \
- if test -f $$file; then \
- ln -s ../$$link/$$file $(DESTDIR)$(localedir)/$$lang/$$lc/$$file; \
- fi; \
- done); \
- rm -f $(DESTDIR)$(localedir)/$$lang/$$lc.old; \
+ link=`cd $(DESTDIR)$(localedir)/$$lang && LC_ALL=C ls -l -d $$lc | sed -e 's/^.* -> //'`; \
+ mv $(DESTDIR)$(localedir)/$$lang/$$lc $(DESTDIR)$(localedir)/$$lang/$$lc.old; \
+ mkdir $(DESTDIR)$(localedir)/$$lang/$$lc; \
+ (cd $(DESTDIR)$(localedir)/$$lang/$$lc.old && \
+ for file in *; do \
+ if test -f $$file; then \
+ ln -s ../$$link/$$file $(DESTDIR)$(localedir)/$$lang/$$lc/$$file; \
+ fi; \
+ done); \
+ rm -f $(DESTDIR)$(localedir)/$$lang/$$lc.old; \
else \
- if test -d $(DESTDIR)$(localedir)/$$lang/$$lc; then \
- :; \
- else \
- rm -f $(DESTDIR)$(localedir)/$$lang/$$lc; \
- mkdir $(DESTDIR)$(localedir)/$$lang/$$lc; \
- fi; \
+ if test -d $(DESTDIR)$(localedir)/$$lang/$$lc; then \
+ :; \
+ else \
+ rm -f $(DESTDIR)$(localedir)/$$lang/$$lc; \
+ mkdir $(DESTDIR)$(localedir)/$$lang/$$lc; \
+ fi; \
fi; \
rm -f $(DESTDIR)$(localedir)/$$lang/$$lc/$(DOMAIN).mo; \
ln -s ../LC_MESSAGES/$(DOMAIN).mo $(DESTDIR)$(localedir)/$$lang/$$lc/$(DOMAIN).mo 2>/dev/null || \
for lc in '' $(EXTRA_LOCALE_CATEGORIES); do \
if test -n "$$lc"; then \
if (cd $(DESTDIR)$(localedir)/$$lang && LC_ALL=C ls -l -d $$lc 2>/dev/null) | grep ' -> ' >/dev/null; then \
- link=`cd $(DESTDIR)$(localedir)/$$lang && LC_ALL=C ls -l -d $$lc | sed -e 's/^.* -> //'`; \
- mv $(DESTDIR)$(localedir)/$$lang/$$lc $(DESTDIR)$(localedir)/$$lang/$$lc.old; \
- mkdir $(DESTDIR)$(localedir)/$$lang/$$lc; \
- (cd $(DESTDIR)$(localedir)/$$lang/$$lc.old && \
- for file in *; do \
- if test -f $$file; then \
- ln -s ../$$link/$$file $(DESTDIR)$(localedir)/$$lang/$$lc/$$file; \
- fi; \
- done); \
- rm -f $(DESTDIR)$(localedir)/$$lang/$$lc.old; \
+ link=`cd $(DESTDIR)$(localedir)/$$lang && LC_ALL=C ls -l -d $$lc | sed -e 's/^.* -> //'`; \
+ mv $(DESTDIR)$(localedir)/$$lang/$$lc $(DESTDIR)$(localedir)/$$lang/$$lc.old; \
+ mkdir $(DESTDIR)$(localedir)/$$lang/$$lc; \
+ (cd $(DESTDIR)$(localedir)/$$lang/$$lc.old && \
+ for file in *; do \
+ if test -f $$file; then \
+ ln -s ../$$link/$$file $(DESTDIR)$(localedir)/$$lang/$$lc/$$file; \
+ fi; \
+ done); \
+ rm -f $(DESTDIR)$(localedir)/$$lang/$$lc.old; \
else \
- if test -d $(DESTDIR)$(localedir)/$$lang/$$lc; then \
- :; \
- else \
- rm -f $(DESTDIR)$(localedir)/$$lang/$$lc; \
- mkdir $(DESTDIR)$(localedir)/$$lang/$$lc; \
- fi; \
+ if test -d $(DESTDIR)$(localedir)/$$lang/$$lc; then \
+ :; \
+ else \
+ rm -f $(DESTDIR)$(localedir)/$$lang/$$lc; \
+ mkdir $(DESTDIR)$(localedir)/$$lang/$$lc; \
+ fi; \
fi; \
fi; \
done; \
static int db_create_file_record(JCR *jcr, B_DB *mdb, ATTR_DBR *ar)
{
int stat;
- static char *no_digest = "0";
+ static const char *no_digest = "0";
char *digest;
ASSERT(ar->JobId);
/*
Bacula® - The Network Backup Solution
- Copyright (C) 2000-2007 Free Software Foundation Europe e.V.
+ Copyright (C) 2000-2008 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.
exit(1);
}
already_here = true;
+ debug_level = 0; /* turn off debug */
stop_watchdog();
generate_daemon_event(NULL, "Exit");
write_state_file(director->working_directory, "bacula-dir", get_first_port_host_order(director->DIRaddrs));
/*
Bacula® - The Network Backup Solution
- Copyright (C) 2000-2007 Free Software Foundation Europe e.V.
+ Copyright (C) 2000-2008 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.
static bool list_nextvol(UAContext *ua, int ndays)
{
JOB *job;
- JCR *jcr = ua->jcr;
+ JCR *jcr;
USTORE store;
RUN *run;
time_t runtime;
} else {
job = (JOB *)GetResWithName(R_JOB, ua->argv[i]);
if (!job) {
- Jmsg(jcr, M_ERROR, 0, _("%s is not a job name.\n"), ua->argv[i]);
+ Jmsg(ua->jcr, M_ERROR, 0, _("%s is not a job name.\n"), ua->argv[i]);
if ((job = select_job_resource(ua)) == NULL) {
return false;
}
}
}
+
+ jcr = new_jcr(sizeof(JCR), dird_free_jcr);
for (run=NULL; (run = find_next_run(run, job, runtime, ndays)); ) {
if (!complete_jcr_for_job(jcr, job, run->pool)) {
- return false;
+ found = false;
+ goto get_out;
}
if (!jcr->jr.PoolId) {
- ua->error_msg(_("Could not Pool Job %s\n"), job->name());
+ ua->error_msg(_("Could not find Pool for Job %s\n"), job->name());
continue;
}
memset(&pr, 0, sizeof(pr));
pr.PoolId = jcr->jr.PoolId;
- if (!db_get_pool_record(ua->jcr, ua->db, &pr)) {
+ if (!db_get_pool_record(jcr, jcr->db, &pr)) {
bstrncpy(pr.Name, "*UnknownPool*", sizeof(pr.Name));
}
mr.PoolId = jcr->jr.PoolId;
job->name(), pr.Name, level_to_str(run->level), mr.VolumeName);
found = true;
}
- if (jcr->db && jcr->db != ua->db) {
- db_close_database(jcr, jcr->db);
- jcr->db = NULL;
- }
}
+
+get_out:
+ db_close_database(jcr, jcr->db);
+ jcr->db = NULL;
+ free_jcr(jcr);
if (!found) {
ua->error_msg(_("Could not find next Volume for Job %s.\n"),
job->hdr.name);
/*
Bacula® - The Network Backup Solution
- Copyright (C) 2000-2007 Free Software Foundation Europe e.V.
+ Copyright (C) 2000-2008 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.
exit(1); /* prevent loops */
}
already_here = true;
+ debug_level = 0; /* turn off debug */
stop_watchdog();
bnet_stop_thread_server(server_tid);
for (k=0; k<fo->regex.size(); k++) {
regfree((regex_t *)fo->regex.get(k));
}
+ for (k=0; k<fo->regexdir.size(); k++) {
+ regfree((regex_t *)fo->regexdir.get(k));
+ }
+ for (k=0; k<fo->regexfile.size(); k++) {
+ regfree((regex_t *)fo->regexfile.get(k));
+ }
fo->regex.destroy();
fo->regexdir.destroy();
fo->regexfile.destroy();
/*
Bacula® - The Network Backup Solution
- Copyright (C) 2006-2006 Free Software Foundation Europe e.V.
+ Copyright (C) 2006-2008 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.
if (bufp->cflags & REG_ICASE) {
char *p, *lcase = bstrdup(regex);
for( p = lcase; *p ; p++) {
- *p = tolower(*p);
+ *p = tolower(*p);
}
re_compile_pattern(bufp, (unsigned char *)lcase);
bfree(lcase);
}
void re_registers_to_regmatch(regexp_registers_t old_regs,
- regmatch_t pmatch[],
- size_t nmatch)
+ regmatch_t pmatch[],
+ size_t nmatch)
{
size_t i=0;
int len = strlen(string);
struct re_registers regs;
stat = re_search(preg, (unsigned char *)string, len, 0, len, ®s);
- re_registers_to_regmatch(®s, pmatch, nmatch);
+ if (stat >= 0) {
+ re_registers_to_regmatch(®s, pmatch, nmatch);
+ }
/* stat is the start position in the string base 0 where
* the pattern was found or negative if not found.
*/
if (bufp->cflags & REG_ICASE) { /* we must use string in lowercase */
int len = strlen((const char *)str);
if (!bufp->lcase) {
- bufp->lcase = get_pool_memory(PM_FNAME);
+ bufp->lcase = get_pool_memory(PM_FNAME);
}
check_pool_memory_size(bufp->lcase, len+1);
unsigned char *dst = (unsigned char *)bufp->lcase;
while (*string) {
- *dst++ = tolower(*string++);
+ *dst++ = tolower(*string++);
}
*dst = '\0';
string = (unsigned char *)bufp->lcase;
exit(1);
}
in_here = true;
+ debug_level = 0; /* turn off any debug */
stop_watchdog();
if (sig == SIGTERM) { /* normal shutdown request? */
Dmsg1(200, "In terminate_stored() sig=%d\n", sig);
+ free_volume_list();
+
foreach_res(device, R_DEVICE) {
Dmsg1(10, "Term device %s\n", device->device_name);
if (device->dev) {
}
term_msg();
cleanup_crypto();
- free_volume_list();
term_reservations_lock();
close_memory_pool();
*/
#undef VERSION
-#define VERSION "2.2.9-b5"
-#define BDATE "04 April 2008"
-#define LSMDATE "04Apr08"
+#define VERSION "2.2.9-b6"
+#define BDATE "06 April 2008"
+#define LSMDATE "06Apr08"
#define PROG_COPYRIGHT "Copyright (C) %d-2008 Free Software Foundation Europe e.V.\n"
#define BYEAR "2008" /* year for copyright messages in progs */
Technical notes on version 2.2
General:
+06Apr08
+kes Eliminate ./configure warning on po directory
+kes Fix bug #1063, reuse of freed ptr in list nextvol.
+kes Release regex compile buffer in filed/job.c
+kes Add proper type of const char in sql_create.c
+kes Turn off debug in daemon termination routines
+kes Move free_volume_list() before devices are freed in stored.c
+kes Fix reference to uninitalized stack variables in bregex.c.
+ This should correct bug #1067.
+04Apr08
+kes Fix possible seg fault in SD when freeing a volume entry.
02Apr08
kes Apply patch from bug #1069 that corrects spurious error messages
when ACLs enabled on SGI but no ACL exists.