From 1f865769b733a0f9887368873511897fbed60be9 Mon Sep 17 00:00:00 2001 From: Kern Sibbald Date: Mon, 24 Dec 2007 10:41:44 +0000 Subject: [PATCH] Partial back out (disabled) %f job code editing because it does not build on Win32. git-svn-id: https://bacula.svn.sourceforge.net/svnroot/bacula/branches/Branch-2.2@6130 91ce42f0-d328-0410-95d8-f526ca767f89 --- bacula/src/dird/dird_conf.c | 4 ++-- bacula/src/lib/protos.h | 3 ++- bacula/src/lib/runscript.c | 3 ++- bacula/src/lib/util.c | 9 +++++---- bacula/technotes-2.1 | 2 ++ 5 files changed, 13 insertions(+), 8 deletions(-) diff --git a/bacula/src/dird/dird_conf.c b/bacula/src/dird/dird_conf.c index aae20e5d91..03e129fbe3 100644 --- a/bacula/src/dird/dird_conf.c +++ b/bacula/src/dird/dird_conf.c @@ -1732,7 +1732,7 @@ static void store_short_runscript(LEX *lc, RES_ITEM *item, int index, int pass) if (pass == 2) { RUNSCRIPT *script = new_runscript(); - script->set_job_code_callback(job_code_callback_filesetname); +// script->set_job_code_callback(job_code_callback_filesetname); script->set_command(lc->str); @@ -1873,7 +1873,7 @@ static void store_runscript(LEX *lc, RES_ITEM *item, int index, int pass) RUNSCRIPT *script = new_runscript(); memcpy(script, &res_runscript, sizeof(RUNSCRIPT)); - script->set_job_code_callback(job_code_callback_filesetname); +// script->set_job_code_callback(job_code_callback_filesetname); if (*runscripts == NULL) { *runscripts = New(alist(10, not_owned_by_alist)); diff --git a/bacula/src/lib/protos.h b/bacula/src/lib/protos.h index fbc365629b..8aac41a3b1 100644 --- a/bacula/src/lib/protos.h +++ b/bacula/src/lib/protos.h @@ -320,7 +320,8 @@ const char * job_type_to_str (int type); const char * job_status_to_str (int stat); const char * job_level_to_str (int level); void make_session_key (char *key, char *seed, int mode); -POOLMEM * edit_job_codes (JCR *jcr, char *omsg, char *imsg, const char *to, job_code_callback_t job_code_callback = NULL); +//POOLMEM * edit_job_codes (JCR *jcr, char *omsg, char *imsg, const char *to, job_code_callback_t job_code_callback = NULL); +POOLMEM * edit_job_codes (JCR *jcr, char *omsg, char *imsg, const char *to); void set_working_directory (char *wd); const char * last_path_separator (const char *str); diff --git a/bacula/src/lib/runscript.c b/bacula/src/lib/runscript.c index 0b9db7848d..ea7e71bd9f 100644 --- a/bacula/src/lib/runscript.c +++ b/bacula/src/lib/runscript.c @@ -208,7 +208,8 @@ bool RUNSCRIPT::run(JCR *jcr, const char *name) BPIPE *bpipe; char line[MAXSTRING]; - ecmd = edit_job_codes(jcr, ecmd, this->command, "", this->job_code_callback); +// ecmd = edit_job_codes(jcr, ecmd, this->command, "", this->job_code_callback); + ecmd = edit_job_codes(jcr, ecmd, this->command, ""); Dmsg1(100, "runscript: running '%s'...\n", ecmd); Jmsg(jcr, M_INFO, 0, _("%s: run command \"%s\"\n"), name, ecmd); diff --git a/bacula/src/lib/util.c b/bacula/src/lib/util.c index 54f96f16fd..e05f55c86d 100644 --- a/bacula/src/lib/util.c +++ b/bacula/src/lib/util.c @@ -574,7 +574,8 @@ void make_session_key(char *key, char *seed, int mode) * to = recepients list * */ -POOLMEM *edit_job_codes(JCR *jcr, char *omsg, char *imsg, const char *to, job_code_callback_t callback) +//POOLMEM *edit_job_codes(JCR *jcr, char *omsg, char *imsg, const char *to, job_code_callback_t callback) +POOLMEM *edit_job_codes(JCR *jcr, char *omsg, char *imsg, const char *to) { char *p, *q; const char *str; @@ -673,9 +674,9 @@ POOLMEM *edit_job_codes(JCR *jcr, char *omsg, char *imsg, const char *to, job_co break; default: str = NULL; - if (callback != NULL) { - str = callback(jcr, p); - } +// if (callback != NULL) { +// str = callback(jcr, p); +// } if (!str) { add[0] = '%'; diff --git a/bacula/technotes-2.1 b/bacula/technotes-2.1 index 1e425949ff..5c270425b5 100644 --- a/bacula/technotes-2.1 +++ b/bacula/technotes-2.1 @@ -2,6 +2,8 @@ General: 24Dec07 +kes Partial back out (disabled) %f job code editing because it + does not build on Win32. kes Fix seg fault Frank Sweetser reports in regression testing on his systems. The problem was that the original author of bsnprintf.c did not take into account the side effects of -- 2.39.5