1 Index: patches/testing/breg.c
2 ===================================================================
3 --- patches/testing/breg.c (révision 4529)
4 +++ patches/testing/breg.c (copie de travail)
9 - Bacula® - The Network Backup Solution
10 + Bacula
\81Â
\81® - The Network Backup Solution
12 Copyright (C) 2006-2006 Free Software Foundation Europe e.V.
15 Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
18 - Bacula® is a registered trademark of John Walker.
19 + Bacula
\81Â
\81® is a registered trademark of John Walker.
20 The licensor of Bacula is the Free Software Foundation Europe
21 - (FSFE), Fiduciary Program, Sumatrastrasse 25, 8006 Zürich,
22 + (FSFE), Fiduciary Program, Sumatrastrasse 25, 8006 Z
\81Ã
\81¼rich,
23 Switzerland, email:ftf@fsfeurope.org.
27 * add_prefix = !^!add_prefix! 5 bytes
28 * add_suffix = !([^/])$!$1add_suffix! 13 bytes
30 - int str_size = (strip_prefix?strlen(strip_prefix)+4:0 +
31 - add_prefix?strlen(add_prefix)+5:0 + /* escape + 3*, + \0 */
32 - add_suffix?strlen(add_suffix)+14:0 ) * 2 + 3 + 1;
33 + int str_size = ((strip_prefix?strlen(strip_prefix)+4:0) +
34 + (add_prefix?strlen(add_prefix)+5 :0) + /* escape + 3*, + \0 */
35 + (add_suffix?strlen(add_suffix)+14 :0) ) * 2 + 3 + 1;
37 + Dmsg1(1, "bregexp_get_build_where_size = %i\n", str_size);
43 free_pool_memory(str_tmp);
50 Index: patches/testing/bregtest.c
51 ===================================================================
52 --- patches/testing/bregtest.c (révision 4529)
53 +++ patches/testing/bregtest.c (copie de travail)
58 - Bacula® - The Network Backup Solution
59 + Bacula
\81Â
\81® - The Network Backup Solution
61 Copyright (C) 2006-2006 Free Software Foundation Europe e.V.
64 Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
67 - Bacula® is a registered trademark of John Walker.
68 + Bacula
\81Â
\81® is a registered trademark of John Walker.
69 The licensor of Bacula is the Free Software Foundation Europe
70 - (FSFE), Fiduciary Program, Sumatrastrasse 25, 8006 Zürich,
71 + (FSFE), Fiduciary Program, Sumatrastrasse 25, 8006 Z
\81Ã
\81¼rich,
72 Switzerland, email:ftf@fsfeurope.org.
77 int main(int argc, char *const *argv)
79 - printf("%s\n", bregexp_build_where("/tmp", NULL, ".old"));
82 + int len = bregexp_get_build_where_size("/tmp", "/tmp/toto", ".old");
84 + printf("%s\n", bregexp_build_where(tab, len, "/tmp", "/tmp/toto!", ".old"));
89 Index: patches/testing/breg.h
90 ===================================================================
91 --- patches/testing/breg.h (révision 4529)
92 +++ patches/testing/breg.h (copie de travail)
97 - Bacula® - The Network Backup Solution
98 + Bacula
\81Â
\81® - The Network Backup Solution
100 Copyright (C) 2006-2006 Free Software Foundation Europe e.V.
103 Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
106 - Bacula® is a registered trademark of John Walker.
107 + Bacula
\81Â
\81® is a registered trademark of John Walker.
108 The licensor of Bacula is the Free Software Foundation Europe
109 - (FSFE), Fiduciary Program, Sumatrastrasse 25, 8006 Zürich,
110 + (FSFE), Fiduciary Program, Sumatrastrasse 25, 8006 Z
\81Ã
\81¼rich,
111 Switzerland, email:ftf@fsfeurope.org.
115 /* foreach_alist free RUNSCRIPT */
116 void free_bregexps(alist *bregexps); /* you have to free alist */
118 -/* get a bregexp string from user arguments */
119 -char *bregexp_build_where(char *strip_prefix,
120 +/* get regexp size */
121 +int bregexp_get_build_where_size(char *strip_prefix,
125 +/* get a bregexp string from user arguments
126 + * you must allocate it with bregexp_get_build_where_size();
128 +char *bregexp_build_where(char *dest, int str_size,
129 + char *strip_prefix,
133 Index: src/dird/ua_restore.c
134 ===================================================================
135 --- src/dird/ua_restore.c (révision 4529)
136 +++ src/dird/ua_restore.c (copie de travail)
141 +#include "lib/breg.h"
144 /* Imported functions */
145 extern void print_bsr(UAContext *ua, RBSR *bsr);
149 char *escaped_bsr_name = NULL;
150 char *escaped_where_name = NULL;
151 + bool where_use_regexp = false;
152 + char *strip_prefix, *add_prefix, *add_suffix, *regexp;
153 + strip_prefix = add_prefix = add_suffix = regexp = NULL;
155 memset(&rx, 0, sizeof(rx));
156 rx.path = get_pool_memory(PM_FNAME);
158 i = find_arg_with_value(ua, "where");
160 rx.where = ua->argv[i];
163 + i = find_arg_with_value(ua, "strip_prefix");
165 + strip_prefix = ua->argv[i];
168 + i = find_arg_with_value(ua, "add_prefix");
170 + add_prefix = ua->argv[i];
173 + i = find_arg_with_value(ua, "add_suffix");
175 + add_suffix = ua->argv[i];
178 + i = find_arg(ua, "where_use_regexp");
180 + where_use_regexp = true;
183 + i = find_arg_with_value(ua, "rwhere");
185 + where_use_regexp = true;
186 + rx.where = ua->argv[i];
189 + if (strip_prefix || add_suffix || add_prefix) {
190 + int len = bregexp_get_build_where_size(strip_prefix, add_prefix, add_suffix);
191 + regexp = (char *) bmalloc (len * sizeof(char));
193 + bregexp_build_where(regexp, len, strip_prefix, add_prefix, add_suffix);
194 + where_use_regexp = true;
200 if (!acl_access_ok(ua, Where_ACL, rx.where)) {
201 ua->error_msg(_("\"where\" specification not authorized.\n"));
206 "run job=\"%s\" client=\"%s\" storage=\"%s\" bootstrap=\"%s\""
207 - " where=\"%s\" files=%d catalog=\"%s\"",
208 + " %swhere=\"%s\" files=%d catalog=\"%s\"",
209 job->name(), rx.ClientName, rx.store?rx.store->name():"",
210 escaped_bsr_name ? escaped_bsr_name : jcr->RestoreBootstrap,
211 + where_use_regexp ? "r" : "",
212 escaped_where_name ? escaped_where_name : rx.where,
213 rx.selected_files, ua->catalog->name());
216 if (escaped_where_name != NULL) {
217 bfree(escaped_where_name);
224 if (find_arg(ua, NT_("yes")) > 0) {
225 pm_strcat(ua->cmd, " yes"); /* pass it on to the run command */
227 bfree(escaped_where_name);
237 @@ -333,23 +384,28 @@
240 /* These keywords are handled in a for loop */
245 - "directory", /* 4 */
253 + "directory", /* 4 */
258 /* The keyword below are handled by individual arg lookups */
261 - "fileset", /* 10 */
264 - "bootstrap", /* 13 */
268 + "fileset", /* 10 */
271 + "bootstrap", /* 13 */
273 + "strip_prefix", /* 15 */
274 + "add_prefix", /* 16 */
275 + "add_suffix", /* 17 */
276 + "where_use_regexp",/* 18 */
277 + "rwhere", /* 19 like where + where_use_regexp */
281 Index: src/dird/restore.c
282 ===================================================================
283 --- src/dird/restore.c (révision 4529)
284 +++ src/dird/restore.c (copie de travail)
288 /* Commands sent to File daemon */
289 -static char restorecmd[] = "restore replace=%c prelinks=%d where=%s\n";
290 -static char storaddr[] = "storage address=%s port=%d ssl=0\n";
291 +static char restorecmd[] = "restore replace=%c prelinks=%d where=%s\n";
292 +static char restorecmdR[] = "restore replace=%c prelinks=%d rwhere=%s\n";
293 +static char storaddr[] = "storage address=%s port=%d ssl=0\n";
295 /* Responses received from File daemon */
296 static char OKrestore[] = "2000 OK restore\n";
300 /* Send restore command */
301 - char replace, *where;
302 + char replace, *where, *cmd;
305 if (jcr->replace != 0) {
308 where = ∅ /* None */
311 jcr->prefix_links = jcr->job->PrefixLinks;
313 + if (jcr->where_use_regexp) {
320 - bnet_fsend(fd, restorecmd, replace, jcr->prefix_links, where);
321 + bnet_fsend(fd, cmd, replace, jcr->prefix_links, where);
322 unbash_spaces(where);
324 if (!response(jcr, fd, OKrestore, "Restore", DISPLAY_ERROR)) {
325 Index: src/dird/dird_conf.c
326 ===================================================================
327 --- src/dird/dird_conf.c (révision 4529)
328 +++ src/dird/dird_conf.c (copie de travail)
333 +#include "lib/breg.h"
335 /* Define the first and last resource ID record
336 * types. Note, these should be unique for each
338 {"run", store_alist_str, ITEM(res_job.run_cmds), 0, 0, 0},
339 /* Root of where to restore files */
340 {"where", store_dir, ITEM(res_job.RestoreWhere), 0, 0, 0},
341 + {"whereuseregexp", store_bool, ITEM(res_job.where_use_regexp), 0, 0, 0},
342 + {"stripprefix", store_str, ITEM(res_job.strip_prefix), 0, 0, 0},
343 + {"addprefix", store_str, ITEM(res_job.add_prefix), 0, 0, 0},
344 + {"addsuffix", store_str, ITEM(res_job.add_suffix), 0, 0, 0},
345 /* Where to find bootstrap during restore */
346 {"bootstrap",store_dir, ITEM(res_job.RestoreBootstrap), 0, 0, 0},
347 /* Where to write bootstrap file during backup */
349 if (res->res_job.RestoreWhere) {
350 sendit(sock, _(" --> Where=%s\n"), NPRT(res->res_job.RestoreWhere));
352 + if (res->res_job.where_use_regexp) {
353 + sendit(sock, _(" --> RWhere=%u\n"), res->res_job.where_use_regexp);
355 if (res->res_job.RestoreBootstrap) {
356 sendit(sock, _(" --> Bootstrap=%s\n"), NPRT(res->res_job.RestoreBootstrap));
358 @@ -1143,6 +1151,15 @@
359 if (res->res_job.RestoreWhere) {
360 free(res->res_job.RestoreWhere);
362 + if (res->res_job.strip_prefix) {
363 + free(res->res_job.strip_prefix);
365 + if (res->res_job.add_prefix) {
366 + free(res->res_job.add_prefix);
368 + if (res->res_job.add_suffix) {
369 + free(res->res_job.add_suffix);
371 if (res->res_job.RestoreBootstrap) {
372 free(res->res_job.RestoreBootstrap);
374 @@ -1299,6 +1316,25 @@
375 res->res_job.jobdefs = res_all.res_job.jobdefs;
376 res->res_job.run_cmds = res_all.res_job.run_cmds;
377 res->res_job.RunScripts = res_all.res_job.RunScripts;
378 + if (res->res_job.strip_prefix ||
379 + res->res_job.add_suffix ||
380 + res->res_job.add_prefix)
382 + if (res->res_job.RestoreWhere) {
383 + free(res->res_job.RestoreWhere);
385 + int len = bregexp_get_build_where_size(res->res_job.strip_prefix,
386 + res->res_job.add_prefix,
387 + res->res_job.add_suffix);
388 + res->res_job.RestoreWhere = (char *) bmalloc (len * sizeof(char));
389 + bregexp_build_where(res->res_job.RestoreWhere, len,
390 + res->res_job.strip_prefix,
391 + res->res_job.add_prefix,
392 + res->res_job.add_suffix);
393 + res->res_job.where_use_regexp = true;
395 + /* TODO: test bregexp */
399 if ((res = (URES *)GetResWithName(R_COUNTER, res_all.res_counter.hdr.name)) == NULL) {
400 Index: src/dird/ua_run.c
401 ===================================================================
402 --- src/dird/ua_run.c (révision 4529)
403 +++ src/dird/ua_run.c (copie de travail)
408 +#include "lib/breg.h"
410 /* Forward referenced subroutines */
411 static void select_job_level(UAContext *ua, JCR *jcr);
412 static bool display_job_parameters(UAContext *ua, JCR *jcr, JOB *job, char *verify_list,
413 char *jid, const char *replace);
414 +static void select_where_regexp(UAContext *ua, JCR *jcr);
417 /* Imported variables */
420 int i, j, opt, files = 0;
422 + bool where_use_regexp = false;
424 JOB *verify_job = NULL;
425 JOB *previous_job = NULL;
431 + "rwhere", /* 8 where string as a bregexp */
433 "bootstrap", /* 10 */
436 "cloned", /* 19 cloned */
437 "verifylist", /* 20 verify output list */
438 "migrationjob", /* 21 migration job name */
443 @@ -188,15 +192,10 @@
444 store_name = ua->argv[i];
449 - ua->send_msg(_("Pool specified twice.\n"));
452 - pool_name = ua->argv[i];
455 + case 8: /* rwhere */
457 + where_use_regexp = (j == 9)?false:true; /* rwhere or where ? */
460 ua->send_msg(_("Where specified twice.\n"));
463 previous_job_name = ua->argv[i];
466 + case 22: /* pool */
468 + ua->send_msg(_("Pool specified twice.\n"));
471 + pool_name = ua->argv[i];
482 jcr->where = bstrdup(where);
483 + jcr->where_use_regexp = where_use_regexp;
488 } else if (jcr->JobType == JT_RESTORE) {
489 add_prompt(ua, _("Bootstrap")); /* 7 */
490 add_prompt(ua, _("Where")); /* 8 */
491 - add_prompt(ua, _("Replace")); /* 9 */
492 - add_prompt(ua, _("JobId")); /* 10 */
493 + add_prompt(ua, _("File Relocation"));/* 9 */
494 + add_prompt(ua, _("Replace")); /* 10 */
495 + add_prompt(ua, _("JobId")); /* 11 */
497 switch (do_prompt(ua, "", _("Select parameter to modify"), NULL, 0)) {
502 jcr->where = bstrdup(ua->cmd);
503 + jcr->where_use_regexp = false;
507 + /* File relocation */
508 + select_where_regexp(ua, jcr);
512 start_prompt(ua, _("Replace:\n"));
513 for (i=0; ReplaceOptions[i].name; i++) {
515 jcr->replace = ReplaceOptions[opt].token;
521 jid = NULL; /* force reprompt */
522 jcr->RestoreJobId = 0;
523 @@ -775,6 +788,131 @@
524 return 0; /* do not run */
527 +static void select_where_regexp(UAContext *ua, JCR *jcr)
530 + char *strip_prefix, *add_prefix, *add_suffix, *rwhere;
531 + strip_prefix = add_suffix = rwhere = add_prefix = NULL;
534 + start_prompt(ua, _("This will replace your current Where value\n"));
535 + add_prompt(ua, _("Strip prefix")); /* 0 */
536 + add_prompt(ua, _("Add prefix")); /* 1 */
537 + add_prompt(ua, _("Add file suffix")); /* 2 */
538 + add_prompt(ua, _("Enter a regexp")); /* 3 */
539 + add_prompt(ua, _("Test filename manipulation")); /* 4 */
540 + add_prompt(ua, _("Use this ?")); /* 5 */
542 + switch (do_prompt(ua, "", _("Select parameter to modify"), NULL, 0)) {
545 + if (get_cmd(ua, _("Please enter path prefix to strip: "))) {
546 + if (strip_prefix) bfree(strip_prefix);
547 + strip_prefix = bstrdup(ua->cmd);
550 + goto try_again_reg;
553 + if (get_cmd(ua, _("Please enter path prefix to add (/ for none): "))) {
554 + if (IsPathSeparator(ua->cmd[0]) && ua->cmd[1] == '\0') {
558 + if (add_prefix) bfree(add_prefix);
559 + add_prefix = bstrdup(ua->cmd);
561 + goto try_again_reg;
564 + if (get_cmd(ua, _("Please enter file suffix to add: "))) {
565 + if (add_suffix) bfree(add_suffix);
566 + add_suffix = bstrdup(ua->cmd);
568 + goto try_again_reg;
571 + if (get_cmd(ua, _("Please enter a valid regexp (!from!to!): "))) {
572 + if (rwhere) bfree(rwhere);
573 + rwhere = bstrdup(ua->cmd);
576 + goto try_again_reg;
582 + if (rwhere && rwhere[0] != '\0') {
583 + regs = get_bregexps(rwhere);
584 + ua->send_msg(_("rwhere=%s\n"), NPRT(rwhere));
586 + int len = bregexp_get_build_where_size(strip_prefix, add_prefix, add_suffix);
587 + regexp = (char *) bmalloc (len * sizeof(char));
588 + bregexp_build_where(regexp, len, strip_prefix, add_prefix, add_suffix);
589 + regs = get_bregexps(regexp);
590 + ua->send_msg(_("strip_prefix=%s add_prefix=%s add_suffix=%s result=%s\n"),
591 + NPRT(strip_prefix), NPRT(add_prefix), NPRT(add_suffix), NPRT(regexp));
597 + ua->send_msg(_("Cannot use your regexp\n"));
598 + goto try_again_reg;
601 + while (get_cmd(ua, _("Please enter filename to test: "))) {
602 + apply_bregexps(ua->cmd, regs, &result);
603 + ua->send_msg(_("%s -> %s\n"), ua->cmd, result);
605 + free_bregexps(regs);
607 + goto try_again_reg;
612 + case -1: /* error or cancel */
615 + goto try_again_reg;
618 + /* replace the existing where */
625 + jcr->where = bstrdup(rwhere);
626 + } else if (strip_prefix || add_prefix || add_suffix) {
627 + int len = bregexp_get_build_where_size(strip_prefix, add_prefix, add_suffix);
628 + jcr->where = (char *) bmalloc(len*sizeof(char));
629 + bregexp_build_where(jcr->where, len, strip_prefix, add_prefix, add_suffix);
632 + regs = get_bregexps(jcr->where);
634 + free_bregexps(regs);
636 + jcr->where_use_regexp = true;
642 + ua->send_msg(_("Cannot use your regexp.\n"));
646 + if (strip_prefix) bfree(strip_prefix);
647 + if (add_prefix) bfree(add_prefix);
648 + if (add_suffix) bfree(add_suffix);
649 + if (rwhere) bfree(rwhere);
652 static void select_job_level(UAContext *ua, JCR *jcr)
654 if (jcr->JobType == JT_BACKUP) {
655 Index: src/dird/dird_conf.h
656 ===================================================================
657 --- src/dird/dird_conf.h (révision 4529)
658 +++ src/dird/dird_conf.h (copie de travail)
660 int Priority; /* Job priority */
661 int RestoreJobId; /* What -- JobId to restore */
662 char *RestoreWhere; /* Where on disk to restore -- directory */
663 + char *strip_prefix; /* remove prefix from filename */
664 + char *add_prefix; /* add prefix to filename */
665 + char *add_suffix; /* add suffix to filename -- .old */
666 + bool where_use_regexp; /* true if RestoreWhere is a BREGEXP */
667 char *RestoreBootstrap; /* Bootstrap file */
668 alist *RunScripts; /* Run {client} program {after|before} Job */
670 Index: src/filed/job.c
671 ===================================================================
672 --- src/filed/job.c (révision 4529)
673 +++ src/filed/job.c (copie de travail)
678 +#include "lib/breg.h"
680 #if defined(WIN32_VSS)
683 static char sessioncmd[] = "session %127s %ld %ld %ld %ld %ld %ld\n";
684 static char restorecmd[] = "restore replace=%c prelinks=%d where=%s\n";
685 static char restorecmd1[] = "restore replace=%c prelinks=%d where=\n";
686 +static char restorecmdR[] = "restore replace=%c prelinks=%d rwhere=%s\n";
687 static char verifycmd[] = "verify level=%30s";
688 static char estimatecmd[] = "estimate listing=%d";
689 static char runbefore[] = "RunBeforeJob %s";
690 @@ -1586,12 +1588,15 @@
693 if (sscanf(dir->msg, restorecmd, &replace, &prefix_links, where) != 3) {
694 - if (sscanf(dir->msg, restorecmd1, &replace, &prefix_links) != 2) {
695 - pm_strcpy(jcr->errmsg, dir->msg);
696 - Jmsg(jcr, M_FATAL, 0, _("Bad replace command. CMD=%s\n"), jcr->errmsg);
698 + if (sscanf(dir->msg, restorecmdR, &replace, &prefix_links, where) != 3){
699 + if (sscanf(dir->msg, restorecmd1, &replace, &prefix_links) != 2) {
700 + pm_strcpy(jcr->errmsg, dir->msg);
701 + Jmsg(jcr, M_FATAL, 0, _("Bad replace command. CMD=%s\n"), jcr->errmsg);
707 + jcr->where_use_regexp = true;
709 /* Turn / into nothing */
710 if (IsPathSeparator(where[0]) && where[1] == '\0') {
711 @@ -1601,6 +1606,15 @@
712 Dmsg2(150, "Got replace %c, where=%s\n", replace, where);
713 unbash_spaces(where);
714 jcr->where = bstrdup(where);
716 + if (jcr->where_use_regexp) {
717 + jcr->where_bregexp = get_bregexps(jcr->where);
718 + if (!jcr->where_bregexp) {
719 + Jmsg(jcr, M_FATAL, 0, _("Bad where regexp. where=%s\n"), jcr->where);
720 + free_pool_memory(where);
724 free_pool_memory(where);
725 jcr->replace = replace;
726 jcr->prefix_links = prefix_links;
728 ===================================================================
729 --- src/jcr.h (révision 4529)
730 +++ src/jcr.h (copie de travail)
732 MSGS *jcr_msgs; /* Copy of message resource -- actually used */
733 uint32_t ClientId; /* Client associated with Job */
734 char *where; /* prefix to restore files to */
735 + bool where_use_regexp; /* True if where is a bregexp */
736 + alist *where_bregexp; /* BREGEXP alist for path manipulation */
737 int cached_pnl; /* cached path length */
738 POOLMEM *cached_path; /* cached path */
739 bool prefix_links; /* Prefix links with Where path */
740 Index: src/lib/Makefile.in
741 ===================================================================
742 --- src/lib/Makefile.in (révision 4529)
743 +++ src/lib/Makefile.in (copie de travail)
745 res.c rwlock.c scan.c serial.c sha1.c \
746 signal.c smartall.c rblist.c tls.c tree.c \
747 util.c var.c watchdog.c workq.c btimers.c \
748 - address_conf.c pythonlib.c
749 + address_conf.c pythonlib.c breg.c
752 LIBOBJS = attr.o base64.o berrno.o bsys.o bget_msg.o \
754 res.o rwlock.o scan.o serial.o sha1.o \
755 signal.o smartall.o rblist.o tls.o tree.o \
756 util.o var.o watchdog.o workq.o btimers.o \
757 - address_conf.o pythonlib.o
758 + address_conf.o pythonlib.o breg.o
761 EXTRAOBJS = @OBJLIST@
762 Index: src/lib/attr.c
763 ===================================================================
764 --- src/lib/attr.c (révision 4529)
765 +++ src/lib/attr.c (copie de travail)
770 +#include "lib/breg.h"
775 ATTR *attr = (ATTR *)malloc(sizeof(ATTR));
777 * every filename if a prefix is supplied.
781 if (jcr->where[0] == 0) {
782 pm_strcpy(attr->ofname, attr->fname);
783 pm_strcpy(attr->olname, attr->lname);
785 + } else if (jcr->where_bregexp) {
787 + apply_bregexps(attr->fname, jcr->where_bregexp, &ret);
788 + pm_strcpy(attr->ofname, ret);
790 + if (attr->type == FT_LNKSAVED || attr->type == FT_LNK) {
791 + /* Always add prefix to hard links (FT_LNKSAVED) and
792 + * on user request to soft links
795 + if ((attr->type == FT_LNKSAVED || jcr->prefix_links)) {
796 + apply_bregexps(attr->lname, jcr->where_bregexp, &ret);
797 + pm_strcpy(attr->olname, ret);
800 + pm_strcpy(attr->olname, attr->lname);
806 int wherelen = strlen(jcr->where);
808 ===================================================================
809 --- src/lib/jcr.c (révision 4529)
810 +++ src/lib/jcr.c (copie de travail)
812 /* External variables we reference */
813 extern time_t watchdog_time;
815 +/* External referenced functions */
816 +void free_bregexps(alist *bregexps);
818 /* Forward referenced functions */
819 extern "C" void timeout_handler(int sig);
820 static void jcr_timeout_check(watchdog_t *self);
825 + if (jcr->where_bregexp) {
826 + free_bregexps(jcr->where_bregexp);
827 + delete jcr->where_bregexp;
828 + jcr->where_bregexp = NULL;
830 if (jcr->cached_path) {
831 free_pool_memory(jcr->cached_path);
832 jcr->cached_path = NULL;