]> git.sur5r.net Git - bacula/bacula/commitdiff
Apply Phil's code for the job name
authorKern Sibbald <kern@sibbald.com>
Sun, 17 Aug 2003 09:19:38 +0000 (09:19 +0000)
committerKern Sibbald <kern@sibbald.com>
Sun, 17 Aug 2003 09:19:38 +0000 (09:19 +0000)
git-svn-id: https://bacula.svn.sourceforge.net/svnroot/bacula/trunk@669 91ce42f0-d328-0410-95d8-f526ca767f89

bacula/src/lib/util.c
bacula/src/version.h

index ce7c074fb47bc7d76b56428eb9a8247e2c7f8eec..71518c3b81a8353016f8edda03b50280c90eb7ca 100644 (file)
@@ -419,14 +419,15 @@ void make_session_key(char *key, char *seed, int mode)
 /*
  * Edit job codes into main command line
  *  %% = %
- *  %j = Job name
- *  %t = Job type (Backup, ...)
+ *  %c = Client's name
+ *  %d = Director's name
  *  %e = Job Exit code
  *  %i = JobId
+ *  %j = Unique Job name
  *  %l = job level
- *  %c = Client's name
+ *  %n = Unadorned Job name
+ *  %t = Job type (Backup, ...)
  *  %r = Recipients
- *  %d = Director's name
  *
  *  omsg = edited output message
  *  imsg = input string containing edit codes (%x)
@@ -470,10 +471,12 @@ POOLMEM *edit_job_codes(JCR *jcr, char *omsg, char *imsg, char *to)
            str = job_level_to_str(jcr->JobLevel);
            break;
          case 'n':
-             str = strchr(jcr->Job, '.');
-            for (int i=0; i<str-jcr->Job-1; i++) {
-               name[i] = jcr->Job[i];
-               name[i+1] = 0;
+            bstrncpy(name, jcr->Job, sizeof(name));
+            /* There are three periods after the Job name */
+            for (int i=0; i<3; i++) {
+                if ((str=strrchr(name, '.')) != NULL) {
+                   *str = 0;
+               }
             }
             str = name;
             break;
index 0fef6fddc6f5dd7b936a8993d186dc4632bb5c4c..513349e060660c0a34e97853c3c8aa2519868e39 100644 (file)
@@ -2,8 +2,8 @@
 #undef  VERSION
 #define VERSION "1.32"
 #define VSTRING "1"
-#define BDATE   "18 Aug 2003"
-#define LSMDATE "18Aug03"
+#define BDATE   "16 Aug 2003"
+#define LSMDATE "16Aug03"
 
 /* Debug flags */
 #undef  DEBUG