From: Kern Sibbald Date: Wed, 1 Dec 2004 09:19:11 +0000 (+0000) Subject: - Fix non-python prototypes in dummy routines. X-Git-Tag: Release-7.0.0~9057 X-Git-Url: https://git.sur5r.net/?a=commitdiff_plain;h=07dba9aff6851746ba8a233152a74fce28d6a272;p=bacula%2Fbacula - 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 --- 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