From: Kern Sibbald Date: Thu, 3 Aug 2006 19:44:23 +0000 (+0000) Subject: kes Remove previous changes to compat.cpp as they create problems. X-Git-Tag: Release-2.0.0~673 X-Git-Url: https://git.sur5r.net/?a=commitdiff_plain;h=6c210279bc094ec7bfedf140e515ed98eb2734a3;p=bacula%2Fbacula kes Remove previous changes to compat.cpp as they create problems. kes Use old style MD5 for FileSets to avoid Full saves on every Job. git-svn-id: https://bacula.svn.sourceforge.net/svnroot/bacula/trunk@3232 91ce42f0-d328-0410-95d8-f526ca767f89 --- diff --git a/bacula/kernstodo b/bacula/kernstodo index 93688cd81f..b2b20ac95a 100644 --- a/bacula/kernstodo +++ b/bacula/kernstodo @@ -29,6 +29,8 @@ Document: Priority: For 1.39: +- If a job terminates, the DIR connection can close before the + Volume info is updated, leaving the File count wrong. - Look at why SIGPIPE during connection can cause seg fault in writing the daemon message, when Dir dropped to bacula:bacula - Look at zlib 32 => 64 problems. diff --git a/bacula/src/dird/job.c b/bacula/src/dird/job.c index 1da8057ab4..d71fb8fb23 100644 --- a/bacula/src/dird/job.c +++ b/bacula/src/dird/job.c @@ -688,7 +688,11 @@ bool get_or_create_fileset_record(JCR *jcr) unsigned char digest[MD5HashSize]; memcpy(&md5c, &jcr->fileset->md5c, sizeof(md5c)); MD5Final(digest, &md5c); - bin_to_base64(fsr.MD5, sizeof(fsr.MD5), (char *)digest, MD5HashSize, true); + /* + * Keep the flag (last arg) set to false otherwise old FileSets will + * get new MD5 sums and the user will get Full backups on everything + */ + bin_to_base64(fsr.MD5, sizeof(fsr.MD5), (char *)digest, MD5HashSize, false); bstrncpy(jcr->fileset->MD5, fsr.MD5, sizeof(jcr->fileset->MD5)); } else { Jmsg(jcr, M_WARNING, 0, _("FileSet MD5 digest not found.\n")); diff --git a/bacula/src/stored/askdir.c b/bacula/src/stored/askdir.c index 8b7f8a5301..be5411e3cf 100644 --- a/bacula/src/stored/askdir.c +++ b/bacula/src/stored/askdir.c @@ -322,7 +322,7 @@ bool dir_update_volume_info(DCR *dcr, bool label) /* Do not lock device here because it may be locked from label */ if (!do_get_volume_info(dcr)) { Jmsg(jcr, M_FATAL, 0, "%s", jcr->errmsg); - Pmsg2(000, _("Didn't get vol info vol=%s: ERR=%s"), + Dmsg2(100, _("Didn't get vol info vol=%s: ERR=%s"), vol->VolCatName, jcr->errmsg); return false; } diff --git a/bacula/src/version.h b/bacula/src/version.h index eceb1f0a1f..f636ca7472 100644 --- a/bacula/src/version.h +++ b/bacula/src/version.h @@ -4,8 +4,8 @@ #undef VERSION #define VERSION "1.39.18" -#define BDATE "03 August 2006" -#define LSMDATE "03Aug06" +#define BDATE "04 August 2006" +#define LSMDATE "04Aug06" #define BYEAR "2006" /* year for copyright messages in progs */ /* Debug flags */ diff --git a/bacula/src/win32/compat/compat.cpp b/bacula/src/win32/compat/compat.cpp index b9067875f6..d5931f4392 100644 --- a/bacula/src/win32/compat/compat.cpp +++ b/bacula/src/win32/compat/compat.cpp @@ -253,7 +253,7 @@ make_wchar_win32_path(POOLMEM *pszUCSPath, BOOL *pBIsRawPath /*= NULL*/) if (bAddDrive && !bAddCurrentPath) { wchar_t szDrive[3]; - if (!bAddPrefix && dwCurDirPathSize > 3 && wcsncmp((LPCWSTR)pwszCurDirBuf, L"\\\\?\\", 4) == 0) { + if (dwCurDirPathSize > 3 && wcsncmp((LPCWSTR)pwszCurDirBuf, L"\\\\?\\", 4) == 0) { /* copy drive character */ wcsncpy((wchar_t *)szDrive, (LPCWSTR)pwszCurDirBuf+4, 2); } else { @@ -328,9 +328,9 @@ make_wchar_win32_path(POOLMEM *pszUCSPath, BOOL *pBIsRawPath /*= NULL*/) /* create temp. buffer */ POOLMEM* pszBuf = get_pool_memory(PM_FNAME); pszBuf = check_pool_memory_size(pszBuf, (dwBufCharsNeeded+MAX_PATH)*sizeof(wchar_t)); -// if (bAddPrefix) -// nParseOffset = 4; -// else + if (bAddPrefix) + nParseOffset = 4; + else nParseOffset = 0; wcsncpy((wchar_t *)pszBuf, (wchar_t *)pwszBuf+nParseOffset, wcslen((wchar_t *)pwszBuf)+1-nParseOffset); g_pVSSPathConvertW((wchar_t *)pszBuf, (wchar_t *)pwszBuf, dwBufCharsNeeded+MAX_PATH); diff --git a/bacula/technotes-1.39 b/bacula/technotes-1.39 index 085afd2344..69103148e5 100644 --- a/bacula/technotes-1.39 +++ b/bacula/technotes-1.39 @@ -2,13 +2,13 @@ General: 03Aug06 +kes Remove previous changes to compat.cpp as they create problems. +kes Use old style MD5 for FileSets to avoid Full saves on every Job. kes Attempt to fix problems with the msg_queue crashing on Solaris when Bacula is terminating, but problems remain. kes Add WIN32_VSS to HAVES in src/Makefile.inc.in to correct VSS name editing problems with too many \\?\es. -kes Add an extra test for !bAddPrefix at line 256 compat.cpp kes Fix some Bacula source code stlye problems in compat.cpp. -kes Turn off 3 lines of code at line 331 of compat.cpp kes Add debug code to compat.cpp and convert non-Bacula debug code to Bacula style. 02Aug06