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 Thu May 23 19:06:28 1996 --- squid-1.0.beta8.henrik/src/store.c Thu May 23 19:10:19 1996 *************** *** 1269,1275 **** /* load a number of objects 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); --- 1269,1275 ---- /* load a number of objects 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); *************** *** 1277,1283 **** 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; --- 1277,1283 ---- 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; *************** *** 1288,1294 **** 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; --- 1288,1294 ---- 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; *************** *** 1316,1341 **** 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", --- 1316,1341 ---- 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", *************** *** 1348,1354 **** if (opt_unlink_on_reload) safeunlink(swapfile, 1); data->dupcount++; ! return 1; } debug(20, 6, "storeRebuildFromDisk: Duplicate: \n", url); storeRelease(e); --- 1348,1354 ---- if (opt_unlink_on_reload) safeunlink(swapfile, 1); data->dupcount++; ! continue; } debug(20, 6, "storeRebuildFromDisk: Duplicate: \n", url); storeRelease(e); *************** *** 1360,1366 **** 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)) { --- 1360,1366 ---- if (opt_unlink_on_reload) safeunlink(swapfile, 1); data->expcount++; ! continue; } /* Is the swap file number already taken? */ if (file_map_bit_test(sfileno)) { *************** *** 1371,1377 **** 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); --- 1371,1377 ---- 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);