--------------------- PatchSet 6284 Date: 2004/08/28 10:30:47 Author: serassio Branch: nt-2_5 Tag: (none) Log: Applied Bugzilla #1053 patch to Awin32 fs Members: src/fs/awin32/store_dir_aufs.c:1.1.62.15->1.1.62.16 Index: squid/src/fs/awin32/store_dir_aufs.c =================================================================== RCS file: /cvsroot/squid-sf//squid/src/fs/awin32/Attic/store_dir_aufs.c,v retrieving revision 1.1.62.15 retrieving revision 1.1.62.16 diff -u -r1.1.62.15 -r1.1.62.16 --- squid/src/fs/awin32/store_dir_aufs.c 7 Aug 2003 07:56:07 -0000 1.1.62.15 +++ squid/src/fs/awin32/store_dir_aufs.c 28 Aug 2004 10:30:47 -0000 1.1.62.16 @@ -1,6 +1,6 @@ /* - * $Id: store_dir_aufs.c,v 1.1.62.15 2003/08/07 07:56:07 serassio Exp $ + * $Id: store_dir_aufs.c,v 1.1.62.16 2004/08/28 10:30:47 serassio Exp $ * * DEBUG: section 47 Store Directory Routines * AUTHOR: Duane Wessels @@ -324,6 +324,10 @@ char *path; int fd; path = storeAufsDirSwapLogFile(sd, NULL); + if (aioinfo->swaplog_fd >= 0) { + debug(50, 1) ("storeAufsDirOpenSwapLog: %s already open\n", path); + return; + } fd = file_open(path, O_WRONLY | O_CREAT | O_BINARY); if (fd < 0) { debug(50, 1) ("%s: %s\n", path, xstrerror()); @@ -958,6 +962,10 @@ state->new = xstrdup(storeAufsDirSwapLogFile(sd, ".clean")); state->fd = file_open(state->new, O_WRONLY | O_CREAT | O_TRUNC | O_BINARY); if (state->fd < 0) { + debug(50, 0) ("storeDirWriteCleanStart: %s: open: %s\n", + state->new, xstrerror()); + debug(50, 0) ("storeDirWriteCleanStart: Current swap logfile " + "not replaced.\n"); xfree(state->new); xfree(state); return -1; @@ -968,7 +976,7 @@ state->outbuf_offset = 0; state->walker = sd->repl->WalkInit(sd->repl); unlink(state->cln); - debug(47, 3) ("storeDirWriteCleanLogs: opened %s, FD %d\n", + debug(50, 3) ("storeDirWriteCleanStart: opened %s, FD %d\n", state->new, state->fd); #if HAVE_FCHMOD if (stat(state->cur, &sb) == 0)