]> git.sur5r.net Git - bacula/bacula/commitdiff
Fix st_ctime on Win32 + fix status dir scheduled jobs + cleanup configure
authorKern Sibbald <kern@sibbald.com>
Fri, 9 Jul 2004 18:39:40 +0000 (18:39 +0000)
committerKern Sibbald <kern@sibbald.com>
Fri, 9 Jul 2004 18:39:40 +0000 (18:39 +0000)
git-svn-id: https://bacula.svn.sourceforge.net/svnroot/bacula/trunk@1465 91ce42f0-d328-0410-95d8-f526ca767f89

bacula/autoconf/aclocal.m4
bacula/configure
bacula/src/dird/ua_status.c
bacula/src/lib/dlist.c
bacula/src/version.h
bacula/src/win32/compat/compat.cpp

index b183570d6f306a5260ed06d67a489e0f4ba810d3..725e7773abc12114aa17eb30b2b13830ebc9557e 100644 (file)
@@ -168,7 +168,7 @@ fi])
 
 
 AC_DEFUN(BA_CHECK_OPSYS,
-[AC_MSG_CHECKING(for Operating System)
+[
 AC_CYGWIN
 if test $HAVE_UNAME=yes -a x`uname -s` = xSunOS
 then
@@ -265,8 +265,6 @@ then
 else
     AM_CONDITIONAL(HAVE_DARWIN_OS, $FALSEPRG)
 fi
-
-AC_MSG_RESULT(" ")
 ])
 
 AC_DEFUN(BA_CHECK_OPSYS_DISTNAME,
@@ -338,7 +336,7 @@ then
 else
         DISTNAME=unknown
 fi
-AC_MSG_RESULT(" ")
+AC_MSG_RESULT(done)
 ])
 
 AC_DEFUN(BA_CHECK_MYSQL_DB,
@@ -410,9 +408,8 @@ AC_ARG_WITH(mysql,
   else
         AC_MSG_RESULT(no)
   fi
-],[
-    AC_MSG_RESULT(no)
-])
+]
+)
 
 AC_ARG_WITH(embedded-mysql,
 [
@@ -475,9 +472,8 @@ AC_ARG_WITH(embedded-mysql,
   else
         AC_MSG_RESULT(no)
   fi
-],[
-  AC_MSG_RESULT(no)
-])
+]
+)
 
 
 AC_SUBST(SQL_LFLAGS)
@@ -619,18 +615,13 @@ dnl# CHECKING FOR VARIOUS DATABASES (thanks to UdmSearch team)
 dnl# --------------------------------------------------------------------------
 dnl Check for some DBMS backend
 dnl NOTE: we can use only one backend at a time
-AC_MSG_RESULT(" ")
-
 db_found=no
 db_name=none
 
-
-
 if test x$support_mysql = xyes; then
    cats=cats
 fi
 
-
 AC_MSG_CHECKING(for Berkeley DB support)
 AC_ARG_WITH(berkeleydb,
 [
index 3236987c35f6d0ad724479f7f332dcb0c91d528d..4bf687d9dba62d628905e665854056af0261e80d 100755 (executable)
@@ -3777,8 +3777,7 @@ build_vendor=`echo $ac_cv_build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
 build_os=`echo $ac_cv_build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
 
 
-echo "$as_me:$LINENO: checking for Operating System" >&5
-echo $ECHO_N "checking for Operating System... $ECHO_C" >&6
+
 echo "$as_me:$LINENO: checking host system type" >&5
 echo $ECHO_N "checking host system type... $ECHO_C" >&6
 if test "${ac_cv_host+set}" = set; then
@@ -4130,9 +4129,6 @@ else
 fi
 fi
 
-echo "$as_me:$LINENO: result: \" \"" >&5
-echo "${ECHO_T}\" \"" >&6
-
 
 # -----------------------------------------------------------
 # ----------------------------------------------------------
@@ -4208,8 +4204,8 @@ _ACEOF
 else
         DISTNAME=unknown
 fi
-echo "$as_me:$LINENO: result: \" \"" >&5
-echo "${ECHO_T}\" \"" >&6
+echo "$as_me:$LINENO: result: done" >&5
+echo "${ECHO_T}done" >&6
 
 
 # -----------------------------------------------------------
@@ -7440,10 +7436,6 @@ echo "${ECHO_T}yes" >&6
 echo "${ECHO_T}no" >&6
   fi
 
-else
-
-    echo "$as_me:$LINENO: result: no" >&5
-echo "${ECHO_T}no" >&6
 
 fi;
 
@@ -7522,10 +7514,6 @@ echo "${ECHO_T}yes" >&6
 echo "${ECHO_T}no" >&6
   fi
 
-else
-
-  echo "$as_me:$LINENO: result: no" >&5
-echo "${ECHO_T}no" >&6
 
 fi;
 
index 29eb20f6c8df42fa68ca53804008e3fb1beaa2fa..71546d31c71150049eb572cf74b18127a5a6ea61 100644 (file)
@@ -391,7 +391,7 @@ static void list_scheduled_jobs(UAContext *ua)
    int priority;
    bool hdr_printed = false;
    dlist sched;
-   sched_pkt *sp;
+   sched_pkt *sp, *ip;
 
    Dmsg0(200, "enter list_sched_jobs()\n");
 
@@ -420,7 +420,11 @@ static void list_scheduled_jobs(UAContext *ua)
         sp->priority = priority;
         sp->runtime = runtime;
         sp->pool = run->pool;
-        sched.binary_insert(sp, my_compare);
+        ip = (sched_pkt *)sched.binary_insert(sp, my_compare);
+        if (ip != sp) {
+           /* Identical entry already, we must explictly insert it */
+           sched.insert_after(sp, ip);
+        }
         num_jobs++;
       }
    } /* end for loop over resources */
index 15e2f6f3c59135cb1f1de2e4df40f503636d4efc..5fe1b4e529d75abd85ecacd4a329320a9c686272 100644 (file)
@@ -120,7 +120,7 @@ void *dlist::binary_insert(void *item, int compare(void *item1, void *item2))
    if (num_items == 1) {
       comp = compare(item, first());     
       if (comp < 0) {
-        insert_before(item, first());
+        prepend(item);
        //Dmsg0(000, "Insert before first.\n");
         return item;
       } else if (comp > 0) {
@@ -145,7 +145,7 @@ void *dlist::binary_insert(void *item, int compare(void *item1, void *item2))
    /* Check against first item */
    comp = compare(item, first());
    if (comp < 0) {
-      insert_before(item, first());
+      prepend(item);
     //Dmsg0(000, "Inserted item before.\n");
       return item;
    } else if (comp == 0) {
index aeddec6808c7b27531f5ddda87b3ef671ca16678..08e8412a87a75fed48c34d526c2ae358a2b45fa2 100644 (file)
@@ -1,9 +1,9 @@
 /* */
 #undef  VERSION
-#define VERSION "1.35.0"
+#define VERSION "1.35.1"
 #define VSTRING "1"
-#define BDATE   "08 July 2004"
-#define LSMDATE "08Jul04"
+#define BDATE   "09 July 2004"
+#define LSMDATE "09Jul04"
 
 /* Debug flags */
 #undef  DEBUG
index cf4ef4ab64b68428feaf0a871db79e3e8ee937bc..7e0fd1e39a309b145778ac274466ae19a060a028 100644 (file)
@@ -225,7 +225,7 @@ statDir(const char *file, struct stat *sb)
 
     sb->st_atime = cvt_ftime_to_utime(info.ftLastAccessTime);
     sb->st_mtime = cvt_ftime_to_utime(info.ftLastWriteTime);
-    sb->st_ctime = cvt_ftime_to_utime(info.ftLastWriteTime);
+    sb->st_ctime = cvt_ftime_to_utime(info.ftCreationTime);
     FindClose(h);
 
     return 0;
@@ -299,7 +299,7 @@ stat2(const char *file, struct stat *sb)
     sb->st_blocks = (uint32_t)(sb->st_size + 4095)/4096;
     sb->st_atime = cvt_ftime_to_utime(info.ftLastAccessTime);
     sb->st_mtime = cvt_ftime_to_utime(info.ftLastWriteTime);
-    sb->st_ctime = cvt_ftime_to_utime(info.ftLastWriteTime);
+    sb->st_ctime = cvt_ftime_to_utime(info.ftCreationTime);
 
 error:
     CloseHandle(h);
@@ -356,7 +356,7 @@ stat(const char *file, struct stat *sb)
     sb->st_blocks = (uint32_t)(sb->st_size + 4095)/4096;
     sb->st_atime = cvt_ftime_to_utime(data.ftLastAccessTime);
     sb->st_mtime = cvt_ftime_to_utime(data.ftLastWriteTime);
-    sb->st_ctime = cvt_ftime_to_utime(data.ftLastWriteTime);
+    sb->st_ctime = cvt_ftime_to_utime(data.ftCreationTime);
     return 0;
 }