summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorXavier Roche <xroche@users.noreply.github.com>2012-03-19 15:37:02 +0000
committerXavier Roche <xroche@users.noreply.github.com>2012-03-19 15:37:02 +0000
commit1c8cc0dbc8068ba407e4c3cd2984a5b784aab464 (patch)
tree19384f3fc83fb966849f296373846ecc9dc18b85 /src
parent484cd31a7479495d33821ba1a5051745218f29b1 (diff)
Alain Desilets: --max-time should not break too violently the mirror
Diffstat (limited to 'src')
-rw-r--r--src/htsback.c15
1 files changed, 8 insertions, 7 deletions
diff --git a/src/htsback.c b/src/htsback.c
index b2f4705..1c77c29 100644
--- a/src/htsback.c
+++ b/src/htsback.c
@@ -79,7 +79,7 @@ Please visit our Website: http://www.httrack.com
static int slot_can_be_cached_on_disk(const lien_back* back);
static int slot_can_be_cleaned(const lien_back* back);
static int slot_can_be_finalized(httrackp* opt, const lien_back* back);
-
+
struct_back* back_new(int back_max) {
int i;
@@ -280,8 +280,8 @@ int back_cleanup_background(httrackp* opt,cache_back* cache,struct_back* sback)
back_delete(NULL, NULL, sback, checkIndex);
#ifdef _DEBUG
/* This should NOT happend! */
- { int duplicateEntryInBacklog = 1; assertf(!duplicateEntryInBacklog); }
-#endif
+ { int duplicateEntryInBacklog = 1; assertf(!duplicateEntryInBacklog); }
+#endif
}
#ifndef HTS_NO_BACK_ON_DISK
/* temporarily serialize the entry on disk */
@@ -2085,7 +2085,7 @@ void Hostlookup(void* pP) {
void back_solve(httrackp *opt, lien_back* back) {
if ((!strfield(back->url_adr,"file://"))
&& ! strfield(back->url_adr,"ftp://")
-#if HTS_USEMMS
+#if HTS_USEMMS
&& ! strfield(back->url_adr,"mms://")
#endif
) {
@@ -2134,9 +2134,9 @@ void back_solve(httrackp *opt, lien_back* back) {
int host_wait(httrackp *opt, lien_back* back) {
if ((!strfield(back->url_adr,"file://"))
&& (!strfield(back->url_adr,"ftp://"))
-#if HTS_USEMMS
+#if HTS_USEMMS
&& (!strfield(back->url_adr,"mms://"))
-#endif
+#endif
) {
//## if (back->url_adr[0]!=lOCAL_CHAR) {
if (!(back->r.req.proxy.active)) {
@@ -3826,7 +3826,8 @@ int back_checkmirror(httrackp* opt) {
fprintf(opt->log,"More than %d seconds passed.. giving up"LF,opt->maxtime);
test_flush;
}
- return 0; /* stop now */
+ /* cancel mirror smoothly */
+ hts_request_stop(opt, 0);
}
return 1; /* Ok, go on */
}