From 0d69f0d9dc3d0e4d228ac2651a4e9091b3757b67 Mon Sep 17 00:00:00 2001 From: Kern Sibbald Date: Wed, 1 Dec 2004 09:19:11 +0000 Subject: [PATCH] - Fix non-python prototypes in dummy routines. - Add python 2.3 to config search list (user submitted patch) - Add JobStatus to Python variables. git-svn-id: https://bacula.svn.sourceforge.net/svnroot/bacula/trunk@1734 91ce42f0-d328-0410-95d8-f526ca767f89 --- bacula/src/dird/python.c | 6 ++++++ bacula/src/lib/util.c | 3 --- bacula/src/version.h | 4 ++-- 3 files changed, 8 insertions(+), 5 deletions(-) diff --git a/bacula/src/dird/python.c b/bacula/src/dird/python.c index bda706e664..d539bd4fa6 100644 --- a/bacula/src/dird/python.c +++ b/bacula/src/dird/python.c @@ -67,6 +67,7 @@ static struct s_vars vars[] = { { N_("Catalog"), "s"}, { N_("MediaType"), "s"}, { N_("JobName"), "s"}, + { N_("JobStatus"), "s"}, { NULL, NULL} }; @@ -79,6 +80,7 @@ PyObject *bacula_get(PyObject *self, PyObject *args) char *item; bool found = false; int i; + char buf[10]; if (!PyArg_ParseTuple(args, "Os:get", &CObject, &item)) { return NULL; @@ -118,6 +120,10 @@ PyObject *bacula_get(PyObject *self, PyObject *args) return Py_BuildValue(vars[i].fmt, jcr->store->media_type); case 11: /* JobName */ return Py_BuildValue(vars[i].fmt, jcr->Job); + case 12: /* JobStatus */ + buf[1] = 0; + buf[0] = jcr->JobStatus; + return Py_BuildValue(vars[i].fmt, buf); } return NULL; } diff --git a/bacula/src/lib/util.c b/bacula/src/lib/util.c index 32f9d0afab..b2c499aadb 100644 --- a/bacula/src/lib/util.c +++ b/bacula/src/lib/util.c @@ -547,9 +547,6 @@ POOLMEM *edit_job_codes(JCR *jcr, char *omsg, char *imsg, const char *to) } else { str = "*none*"; } - if (!str) { - str = ""; - } break; case 'd': str = my_name; /* Director's name */ diff --git a/bacula/src/version.h b/bacula/src/version.h index 6d5067be97..10d0c573da 100644 --- a/bacula/src/version.h +++ b/bacula/src/version.h @@ -1,8 +1,8 @@ /* */ #undef VERSION #define VERSION "1.37.1" -#define BDATE "29 November 2004" -#define LSMDATE "29Nov04" +#define BDATE "01 December 2004" +#define LSMDATE "01Dec04" /* Debug flags */ #undef DEBUG -- 2.39.5