From 22c0e49580a1c825a5c67afaa6344bea5e92cc8a Mon Sep 17 00:00:00 2001 From: Kern Sibbald Date: Fri, 9 Jul 2004 18:39:40 +0000 Subject: [PATCH] Fix st_ctime on Win32 + fix status dir scheduled jobs + cleanup configure git-svn-id: https://bacula.svn.sourceforge.net/svnroot/bacula/trunk@1465 91ce42f0-d328-0410-95d8-f526ca767f89 --- bacula/autoconf/aclocal.m4 | 21 ++++++--------------- bacula/configure | 18 +++--------------- bacula/src/dird/ua_status.c | 8 ++++++-- bacula/src/lib/dlist.c | 4 ++-- bacula/src/version.h | 6 +++--- bacula/src/win32/compat/compat.cpp | 6 +++--- 6 files changed, 23 insertions(+), 40 deletions(-) diff --git a/bacula/autoconf/aclocal.m4 b/bacula/autoconf/aclocal.m4 index b183570d6f..725e7773ab 100644 --- a/bacula/autoconf/aclocal.m4 +++ b/bacula/autoconf/aclocal.m4 @@ -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, [ diff --git a/bacula/configure b/bacula/configure index 3236987c35..4bf687d9db 100755 --- a/bacula/configure +++ b/bacula/configure @@ -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; diff --git a/bacula/src/dird/ua_status.c b/bacula/src/dird/ua_status.c index 29eb20f6c8..71546d31c7 100644 --- a/bacula/src/dird/ua_status.c +++ b/bacula/src/dird/ua_status.c @@ -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 */ diff --git a/bacula/src/lib/dlist.c b/bacula/src/lib/dlist.c index 15e2f6f3c5..5fe1b4e529 100644 --- a/bacula/src/lib/dlist.c +++ b/bacula/src/lib/dlist.c @@ -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) { diff --git a/bacula/src/version.h b/bacula/src/version.h index aeddec6808..08e8412a87 100644 --- a/bacula/src/version.h +++ b/bacula/src/version.h @@ -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 diff --git a/bacula/src/win32/compat/compat.cpp b/bacula/src/win32/compat/compat.cpp index cf4ef4ab64..7e0fd1e39a 100644 --- a/bacula/src/win32/compat/compat.cpp +++ b/bacula/src/win32/compat/compat.cpp @@ -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; } -- 2.39.5