]> git.sur5r.net Git - bacula/bacula/commitdiff
Re-enable the new job code editing (%f).
authorKern Sibbald <kern@sibbald.com>
Wed, 9 Jan 2008 10:58:13 +0000 (10:58 +0000)
committerKern Sibbald <kern@sibbald.com>
Wed, 9 Jan 2008 10:58:13 +0000 (10:58 +0000)
git-svn-id: https://bacula.svn.sourceforge.net/svnroot/bacula/branches/Branch-2.2@6262 91ce42f0-d328-0410-95d8-f526ca767f89

bacula/ChangeLog
bacula/ReleaseNotes
bacula/src/dird/dird_conf.c
bacula/src/dird/protos.h
bacula/src/lib/protos.h
bacula/src/lib/runscript.c
bacula/src/lib/util.c
bacula/src/version.h
bacula/technotes-2.1

index 3fdad8db5ffe37ac41a102aa0d06a8466fe6661a..db1a0d212a23bc022914280e301a4b2a1420fe90 100644 (file)
@@ -1,6 +1,11 @@
               Technical notes on version 2.2.x
 
 General:
+09Jan08
+kes  Re-enable the new job code editing (%f).
+08Jan08
+kes  Fix bsnprintf for float point numbers. I broke recently when
+     parameterizing some variables.
 03Jan08
 kes  Move Heartbeat documentation from Job to Director resource.
      This fixes bug #1033.
index 908c6f5bfc8bf50e230f6748f97587bdbc270b78..ce74af6a01414e29ce526d90dd5185bd8d5ec9e2 100644 (file)
@@ -1,5 +1,5 @@
 
-          Release Notes for Bacula 2.2.7 
+          Release Notes for Bacula 2.2.8 
 
   Bacula code: Total files = 520 Total lines = 195,550 (*.h *.c *.in)
   82 new files, 41,221 new lines of code, 208,380 lines of change from 2.0.3
@@ -10,6 +10,9 @@ use some of the new features that affect the FD.  In other words, you should
 not have to upgrade all your File daemons when you upgrade. There is
 no database upgrade needed from version 2.0.x to 2.2.0.
 
+Version 2.2.8 is a bug fix to version 2.2.7:
+- It fixes bugs: 1036, 1033(doc), 1018, and 1028.
+
 Version 2.2.7 has several new features and several important bug fixes
   since version 2.2.6:
 - It fixes bugs: 1009, 1022, 1024, 1019, 1012, 1021, 1020
index 107ed51b820cf255c5d939dcf05f4bb4a34c6bd1..77c74c73c06256328a76bf42737bc1424f3e1974 100644 (file)
@@ -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));
@@ -1888,7 +1888,7 @@ static void store_runscript(LEX *lc, RES_ITEM *item, int index, int pass)
 }
 
 /* callback function for edit_job_codes */
-char *job_code_callback_filesetname(JCR *jcr, const char* param)
+extern "C" char *job_code_callback_filesetname(JCR *jcr, const char* param)
 {
    if (param[0] == 'f') {
       return jcr->fileset->name();
index 482ee7f870a5b0d8ffd83da3ed91015cf58cdccd..5eeed6e93b25e057cc569389ada89b2ab67c9f81 100644 (file)
@@ -75,7 +75,7 @@ extern void catalog_update(JCR *jcr, BSOCK *bs);
 
 /* dird_conf.c */
 extern const char *level_to_str(int level);
-extern char *job_code_callback_filesetname(JCR *jcr, const char*);
+extern "C" char *job_code_callback_filesetname(JCR *jcr, const char*);
 
 /* expand.c */
 int variable_expansion(JCR *jcr, char *inp, POOLMEM **exp);
index 8aac41a3b16ed8f74bc38c00d4a9d8ca881225ba..ff511f541d6ea0bf95f38f2d3eb5fc116a144f3c 100644 (file)
@@ -302,7 +302,9 @@ bool             get_tls_enable          (TLS_CONTEXT *ctx);
 
 /* util.c */
 
+extern "C"{
 typedef char *(*job_code_callback_t)(JCR *, const char *);
+}
 
 bool             is_buf_zero             (char *buf, int len);
 void             lcase                   (char *str);
@@ -320,8 +322,7 @@ 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);
+POOLMEM *        edit_job_codes          (JCR *jcr, char *omsg, char *imsg, const char *to, job_code_callback_t job_code_callback = NULL);
 void             set_working_directory   (char *wd);
 const char *     last_path_separator     (const char *str);
 
index ea7e71bd9fb5a582634cd23ae09da2df1ed0115c..774753ffc6f2b28dbc82d4e93487f3532f6e2112 100644 (file)
@@ -208,7 +208,7 @@ 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);
index e05f55c86d0bc825382c11e1d956e0d055bdd429..54f96f16fd0e635b6fdc35a1f02b1d25569bc302 100644 (file)
@@ -574,8 +574,7 @@ 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)
+POOLMEM *edit_job_codes(JCR *jcr, char *omsg, char *imsg, const char *to, job_code_callback_t callback)
 {
    char *p, *q;
    const char *str;
@@ -674,9 +673,9 @@ POOLMEM *edit_job_codes(JCR *jcr, char *omsg, char *imsg, const char *to)
             break;
          default:
             str = NULL;
-//          if (callback != NULL) {
-//              str = callback(jcr, p);
-//          }
+            if (callback != NULL) {
+                str = callback(jcr, p);
+            }
 
             if (!str) {
                 add[0] = '%';
index 5c0bb5b2407244f17a2933764eae8337e17033cf..41350b2b69f8e94871bb6358a2989d2b2869c65c 100644 (file)
@@ -4,8 +4,8 @@
 
 #undef  VERSION
 #define VERSION "2.2.8"
-#define BDATE   "04 January 2008"
-#define LSMDATE "04Jan08"
+#define BDATE   "08 January 2008"
+#define LSMDATE "08Jan08"
 
 #define PROG_COPYRIGHT "Copyright (C) %d-2008 Free Software Foundation Europe e.V.\n"
 #define BYEAR "2008"       /* year for copyright messages in progs */
index d18efb836ef95d5a773f5a17a7f4f9971e05e178..07e05d918a4af4046850df3ea06cae0ec4249c28 100644 (file)
@@ -1,9 +1,11 @@
               Technical notes on version 2.2
 
 General:
+09Jan08
+kes  Re-enable the new job code editing (%f).
 08Jan08
 kes  Fix bsnprintf for float point numbers. I broke recently when
-     parameterizing some variables.
+     parameterizing some variables. This fixes bug #1036.
 03Jan08
 kes  Move Heartbeat documentation from Job to Director resource.
      This fixes bug #1033.