]> git.sur5r.net Git - bacula/bacula/blobdiff - bacula/src/lib/util.c
Attempt to fix bat seg faults
[bacula/bacula] / bacula / src / lib / util.c
index 16683c50e7ce32a0639bc6524f1837c9a58724a4..5d3bffa30afa8ee894efd1cbf7e0ee21ba7caeb8 100644 (file)
@@ -1,7 +1,7 @@
 /*
    Bacula® - The Network Backup Solution
 
-   Copyright (C) 2000-2008 Free Software Foundation Europe e.V.
+   Copyright (C) 2000-2009 Free Software Foundation Europe e.V.
 
    The main author of Bacula is Kern Sibbald, with contributions from
    many others, a complete list can be found in the file AUTHORS.
@@ -134,10 +134,11 @@ unbash_spaces(POOL_MEM &pm)
    }
 }
 
-char *encode_time(time_t time, char *buf)
+char *encode_time(utime_t utime, char *buf)
 {
    struct tm tm;
    int n = 0;
+   time_t time = utime;
 
 #if defined(HAVE_WIN32)
    /*
@@ -194,6 +195,9 @@ void jobstatus_to_ascii(int JobStatus, char *msg, int maxlen)
    case JS_Error:
       jobstat = _("Non-fatal error");
       break;
+   case JS_Warnings:
+      jobstat = _("OK -- with warnings");
+      break;
    case JS_Canceled:
       jobstat = _("Canceled");
       break;
@@ -265,6 +269,9 @@ void jobstatus_to_ascii_gui(int JobStatus, char *msg, int maxlen)
    case JS_Terminated:
       cnv = _("Completed successfully");
       break;
+   case JS_Warnings:
+      cnv = _("Completed with warnings");
+      break;
    case JS_ErrorTerminated:
       cnv = _("Terminated with errors");
       break;
@@ -297,7 +304,7 @@ void jobstatus_to_ascii_gui(int JobStatus, char *msg, int maxlen)
    if (cnv) {
       bstrncpy(msg, cnv, maxlen);
    } else {
-     jobstatus_to_ascii( JobStatus, msg, maxlen);
+     jobstatus_to_ascii(JobStatus, msg, maxlen);
    }
 }
 
@@ -313,6 +320,9 @@ const char *job_status_to_str(int stat)
    case JS_Terminated:
       str = _("OK");
       break;
+   case JS_Warnings:
+      str = _("OK -- with warnings");
+      break;
    case JS_ErrorTerminated:
    case JS_Error:
       str = _("Error");
@@ -360,6 +370,9 @@ const char *job_type_to_str(int type)
    case JT_COPY:
       str = _("Copy");
       break;
+   case JT_JOB_COPY:
+      str = _("Job Copy");
+      break;
    case JT_CONSOLE:
       str = _("Console");
       break;