diff -N -c -r -X exclude_files squid-1.0.beta8/src/store.c squid-1.0.beta8.henrik/src/store.c *** squid-1.0.beta8/src/store.c Wed May 22 00:26:17 1996 --- squid-1.0.beta8.henrik/src/store.c Wed May 22 01:26:53 1996 *************** *** 1272,1278 **** /* load a numboer of object per invocation */ for (count = 0; count < data->speed; count++) { if (!fgets(data->line_in, 4095, data->log)) ! return 0; if ((++data->linecount & 0xFFF) == 0) debug(20, 1, " %7d Lines read so far.\n", data->linecount); --- 1272,1278 ---- /* load a numboer of object per invocation */ for (count = 0; count < data->speed; count++) { if (!fgets(data->line_in, 4095, data->log)) ! return 0; /* We are done */ if ((++data->linecount & 0xFFF) == 0) debug(20, 1, " %7d Lines read so far.\n", data->linecount); *************** *** 1280,1286 **** debug(20, 10, "line_in: %s", data->line_in); if ((data->line_in[0] == '\0') || (data->line_in[0] == '\n') || (data->line_in[0] == '#')) ! return 1; /* skip bad lines */ url[0] = log_swapfile[0] = '\0'; expires = squid_curtime; --- 1280,1286 ---- debug(20, 10, "line_in: %s", data->line_in); if ((data->line_in[0] == '\0') || (data->line_in[0] == '\n') || (data->line_in[0] == '#')) ! continue; /* skip bad lines */ url[0] = log_swapfile[0] = '\0'; expires = squid_curtime; *************** *** 1291,1297 **** log_swapfile, url, &scan1, &scan2, &scan3) != 5) { if (opt_unlink_on_reload && log_swapfile[0]) safeunlink(log_swapfile, 0); ! return 1; } expires = (time_t) scan1; timestamp = (time_t) scan2; --- 1291,1297 ---- log_swapfile, url, &scan1, &scan2, &scan3) != 5) { if (opt_unlink_on_reload && log_swapfile[0]) safeunlink(log_swapfile, 0); ! continue; } expires = (time_t) scan1; timestamp = (time_t) scan2; *************** *** 1319,1344 **** if (opt_unlink_on_reload) safeunlink(log_swapfile, 1); } ! return 1; } /* Empty swap file? */ if (sb.st_size == 0) { if (opt_unlink_on_reload) safeunlink(log_swapfile, 1); ! return 1; } /* timestamp might be a little bigger than sb.st_mtime */ delta = (int) (timestamp - sb.st_mtime); if (delta > REBUILD_TIMESTAMP_DELTA_MAX || delta < 0) { /* this log entry doesn't correspond to this file */ data->clashcount++; ! return 1; } /* Wrong size? */ if (sb.st_size != size) { /* this log entry doesn't correspond to this file */ data->clashcount++; ! return 1; } timestamp = sb.st_mtime; debug(20, 10, "storeRebuildFromDisk: swap file exists: : %s\n", --- 1319,1344 ---- if (opt_unlink_on_reload) safeunlink(log_swapfile, 1); } ! continue; } /* Empty swap file? */ if (sb.st_size == 0) { if (opt_unlink_on_reload) safeunlink(log_swapfile, 1); ! continue; } /* timestamp might be a little bigger than sb.st_mtime */ delta = (int) (timestamp - sb.st_mtime); if (delta > REBUILD_TIMESTAMP_DELTA_MAX || delta < 0) { /* this log entry doesn't correspond to this file */ data->clashcount++; ! continue; } /* Wrong size? */ if (sb.st_size != size) { /* this log entry doesn't correspond to this file */ data->clashcount++; ! continue; } timestamp = sb.st_mtime; debug(20, 10, "storeRebuildFromDisk: swap file exists: : %s\n", *************** *** 1351,1357 **** if (opt_unlink_on_reload) safeunlink(swapfile, 1); data->dupcount++; ! return 1; } debug(20, 6, "storeRebuildFromDisk: Duplicate: \n", url); storeRelease(e); --- 1351,1357 ---- if (opt_unlink_on_reload) safeunlink(swapfile, 1); data->dupcount++; ! continue; } debug(20, 6, "storeRebuildFromDisk: Duplicate: \n", url); storeRelease(e); *************** *** 1363,1380 **** if (opt_unlink_on_reload) safeunlink(swapfile, 1); data->expcount++; ! return 1; } /* Is the swap file number already taken? */ if (file_map_bit_test(sfileno)) { ! /* Yes is is, we can't use this swapfile */ ! debug(20, 1, "storeRebuildFromDisk: Line %d Active clash: file #%d\n", data->linecount, sfileno); debug(20, 3, "storeRebuildFromDisk: --> \n", url); /* don't unlink the file! just skip this log entry */ data->clashcount++; ! return 1; } /* update store_swap_size */ store_swap_size += (int) ((size + 1023) >> 10); --- 1363,1380 ---- if (opt_unlink_on_reload) safeunlink(swapfile, 1); data->expcount++; ! continue; } /* Is the swap file number already taken? */ if (file_map_bit_test(sfileno)) { ! /* Yes it is. We can't use this log entry */ ! debug(20, 2, "storeRebuildFromDisk: Line %d Active clash: file #%d\n", data->linecount, sfileno); debug(20, 3, "storeRebuildFromDisk: --> \n", url); /* don't unlink the file! just skip this log entry */ data->clashcount++; ! continue; } /* update store_swap_size */ store_swap_size += (int) ((size + 1023) >> 10);