From 4005bd44df3d4c76630d99c0b1740ca7b233ef9f Mon Sep 17 00:00:00 2001 From: Kern Sibbald Date: Mon, 21 Nov 2005 14:12:43 +0000 Subject: [PATCH] Fix bug #491 git-svn-id: https://bacula.svn.sourceforge.net/svnroot/bacula/trunk@2613 91ce42f0-d328-0410-95d8-f526ca767f89 --- bacula/kes-1.39 | 11 +++++++---- bacula/src/findlib/bfile.c | 14 +++++--------- 2 files changed, 12 insertions(+), 13 deletions(-) diff --git a/bacula/kes-1.39 b/bacula/kes-1.39 index 35a3086a98..e04221ec3a 100644 --- a/bacula/kes-1.39 +++ b/bacula/kes-1.39 @@ -4,7 +4,10 @@ General: Changes to 1.39.0: -20Oct05 +21Nov05 +- Remove abs() in bfile.c so that it compiles on Solaris. + Bug #491. +20Nov05 - Fix crash in tray-monitor when daemon disconnects. Bug #479. - Fix bnet-server bug found on OpenBSD. Bug #486 - Fix cancel failure bug. Bug #481 @@ -14,7 +17,7 @@ Changes to 1.39.0: - Fix memory overrun in bfile.c in building OS X resource fork filename. Bug #489 - Add Pool name to SD status output. -14Oct05 +14Nov05 - Apply SunOS patch for ACLs submitted by David Duchscher. - Make sure to set storage before trying to set drive. - Add bacula_mail_summary.sh to examples directory. It makes @@ -22,10 +25,10 @@ Changes to 1.39.0: by Adrew J. Millar. - Make sure when we do a mount to unblock the device even if the drive could not be opened. -13Oct05 +13Nov05 - Remove the USE_WIN32STREAMEXTRACTION #defines (always on) and correct a few minor problems to make it build on Linux. -10Oct05 +10Nov05 - Remove delete of CVS from all Makefiles - Fix seg fault when clicking on Add button in wx-console restore panel. Bug #470. diff --git a/bacula/src/findlib/bfile.c b/bacula/src/findlib/bfile.c index 691dd314e8..61cd8dc797 100644 --- a/bacula/src/findlib/bfile.c +++ b/bacula/src/findlib/bfile.c @@ -154,7 +154,7 @@ bool processWin32BackupAPIBlock (BFILE *bfd, void *pBuffer, ssize_t dwSize) } else { dwDataLen = pContext->liNextHeader-dwDataOffset; - bContinue = TRUE; /* multiple iterations may be necessary */ + bContinue = true; /* multiple iterations may be necessary */ } /* flush */ @@ -172,10 +172,9 @@ bool processWin32BackupAPIBlock (BFILE *bfd, void *pBuffer, ssize_t dwSize) /* start of header was before this block, so we * continue with the part in the current block */ - dwOffsetTarget = abs (pContext->liNextHeader); + dwOffsetTarget = -pContext->liNextHeader; dwOffsetSource = 0; - } - else { + } else { /* start of header is inside of this block */ dwOffsetTarget = 0; dwOffsetSource = pContext->liNextHeader; @@ -734,13 +733,10 @@ int bopen(BFILE *bfd, const char *fname, int flags, mode_t mode) int bopen_rsrc(BFILE *bfd, const char *fname, int flags, mode_t mode) { POOLMEM *rsrc_fname; - size_t fname_len; - fname_len = strlen(fname); rsrc_fname = get_pool_memory(PM_FNAME); - bstrncpy(rsrc_fname, fname, fname_len + 1); - bstrncpy(rsrc_fname + fname_len, _PATH_RSRCFORKSPEC, - strlen(_PATH_RSRCFORKSPEC) + 1); + pm_strcpy(rsrc_fname, fname); + pm_strcat(rsrc_fname, _PATH_RSRCFORKSPEC); bopen(bfd, rsrc_fname, flags, mode); free_pool_memory(rsrc_fname); return bfd->fid; -- 2.39.5