From: Kern Sibbald Date: Sun, 17 Aug 2003 09:19:38 +0000 (+0000) Subject: Apply Phil's code for the job name X-Git-Tag: Release-1.32~50 X-Git-Url: https://git.sur5r.net/?a=commitdiff_plain;h=94f640be5461854a08252feb3fb4499b42af6bb5;p=bacula%2Fbacula Apply Phil's code for the job name git-svn-id: https://bacula.svn.sourceforge.net/svnroot/bacula/trunk@669 91ce42f0-d328-0410-95d8-f526ca767f89 --- diff --git a/bacula/src/lib/util.c b/bacula/src/lib/util.c index ce7c074fb4..71518c3b81 100644 --- a/bacula/src/lib/util.c +++ b/bacula/src/lib/util.c @@ -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; iJob-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; diff --git a/bacula/src/version.h b/bacula/src/version.h index 0fef6fddc6..513349e060 100644 --- a/bacula/src/version.h +++ b/bacula/src/version.h @@ -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