diff -N -c -r -X exclude_files squid-1.0.beta2/src/neighbors.c squid-1.0.beta2.henrik/src/neighbors.c *** squid-1.0.beta2/src/neighbors.c Tue Apr 16 20:29:40 1996 --- squid-1.0.beta2.henrik/src/neighbors.c Tue Apr 23 20:07:50 1996 *************** *** 241,253 **** file_close(fileno(cache_hierarchy_log)); fclose(cache_hierarchy_log); } ! log_fd = file_open(fname, NULL, O_WRONLY | O_CREAT | O_APPEND); ! if (log_fd < 0) { ! debug(15, 0, "rotate_logs: %s: %s\n", fname, xstrerror()); ! debug(15, 1, "Hierachical logging is disabled.\n"); ! } else if ((cache_hierarchy_log = fdopen(log_fd, "a")) == NULL) { ! debug(15, 0, "rotate_logs: %s: %s\n", fname, xstrerror()); debug(15, 1, "Hierachical logging is disabled.\n"); } } --- 241,259 ---- file_close(fileno(cache_hierarchy_log)); fclose(cache_hierarchy_log); } ! if (strcmp(fname,"none")==0) { ! log_fd=-1; ! cache_hierarchy_log=NULL; debug(15, 1, "Hierachical logging is disabled.\n"); + } else { + log_fd = file_open(fname, NULL, O_WRONLY | O_CREAT | O_APPEND); + if (log_fd < 0) { + debug(15, 0, "rotate_logs: %s: %s\n", fname, xstrerror()); + debug(15, 1, "Hierachical logging is disabled.\n"); + } else if ((cache_hierarchy_log = fdopen(log_fd, "a")) == NULL) { + debug(15, 0, "rotate_logs: %s: %s\n", fname, xstrerror()); + debug(15, 1, "Hierachical logging is disabled.\n"); + } } } diff -N -c -r -X exclude_files squid-1.0.beta2/src/store.c squid-1.0.beta2.henrik/src/store.c *** squid-1.0.beta2/src/store.c Mon Apr 22 03:48:36 1996 --- squid-1.0.beta2.henrik/src/store.c Tue Apr 23 20:07:51 1996 *************** *** 2440,2446 **** int dir_created; wordlist *w = NULL; ! storelog_fd = file_open(getStoreLogFile(), NULL, O_WRONLY | O_APPEND | O_CREAT); for (w = getCacheDirs(); w; w = w->next) storeAddSwapDisk(w->key); --- 2440,2451 ---- int dir_created; wordlist *w = NULL; ! if (strcmp(getStoreLogFile(),"none")==0) ! storelog_fd = -1; ! else ! storelog_fd = file_open(getStoreLogFile(), NULL, O_WRONLY | O_APPEND | O_CREAT); ! if (storelog_fd == -1) ! debug(20, 1, "Store logging disabled\n"); for (w = getCacheDirs(); w; w = w->next) storeAddSwapDisk(w->key); *************** *** 2714,2718 **** } if (storelog_fd > -1) file_close(storelog_fd); ! storelog_fd = file_open(getStoreLogFile(), NULL, O_WRONLY | O_APPEND | O_CREAT); } --- 2719,2726 ---- } if (storelog_fd > -1) file_close(storelog_fd); ! if (strcmp(getStoreLogFile(),"none")==0) ! storelog_fd = -1; ! else ! storelog_fd = file_open(getStoreLogFile(), NULL, O_WRONLY | O_APPEND | O_CREAT); }