]> git.sur5r.net Git - bacula/bacula/commitdiff
Fix bug #491
authorKern Sibbald <kern@sibbald.com>
Mon, 21 Nov 2005 14:12:43 +0000 (14:12 +0000)
committerKern Sibbald <kern@sibbald.com>
Mon, 21 Nov 2005 14:12:43 +0000 (14:12 +0000)
git-svn-id: https://bacula.svn.sourceforge.net/svnroot/bacula/trunk@2613 91ce42f0-d328-0410-95d8-f526ca767f89

bacula/kes-1.39
bacula/src/findlib/bfile.c

index 35a3086a9879fbd4e7cbc57c93082f2587d7e3ab..e04221ec3a08f4352a171536ac6c7f71c64a8981 100644 (file)
@@ -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.
index 691dd314e86e1de1e63ec118965c28a0c3960158..61cd8dc79792920d6e174bd5933a5f239d8faf19 100644 (file)
@@ -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;