diff options
author | Xavier Roche <xroche@users.noreply.github.com> | 2012-03-19 13:04:51 +0000 |
---|---|---|
committer | Xavier Roche <xroche@users.noreply.github.com> | 2012-03-19 13:04:51 +0000 |
commit | 873739001a3502a095e314d23c01fff308c84a8c (patch) | |
tree | df5a4326e907a53c186596a633e8f7a8ac65bf1f /src/htsparse.c | |
parent | 388b7dee2a2d558c0ee576a9213b5ea422a56c77 (diff) |
httrack 3.45.2
Diffstat (limited to 'src/htsparse.c')
-rw-r--r-- | src/htsparse.c | 16 |
1 files changed, 14 insertions, 2 deletions
diff --git a/src/htsparse.c b/src/htsparse.c index 146f8e9..2ee266a 100644 --- a/src/htsparse.c +++ b/src/htsparse.c @@ -3473,12 +3473,24 @@ int hts_mirror_check_moved(htsmoduleStruct* str, htsmoduleStructExtended* stre) if (opt->log!=NULL) { HTS_LOG(opt,LOG_ERROR); fprintf(opt->log,"Can not remove old file %s"LF,urlfil); test_flush; + error = 1; } } } else { if (opt->log!=NULL) { - HTS_LOG(opt,LOG_WARNING); fprintf(opt->log,"Unexpected 412/416 error (%s) for %s%s"LF,r->msg,urladr,urlfil); + HTS_LOG(opt,LOG_WARNING); fprintf(opt->log,"Unexpected 412/416 error (%s) for %s%s, '%s' could not be found on disk"LF,r->msg,urladr,urlfil,liens[ptr]->sav != NULL ? liens[ptr]->sav : ""); test_flush; + error = 1; + } + } + + // Error ? + if (error) { + if (!opt->errpage) { + if (r->adr) { // désalloc + freet(r->adr); + r->adr=NULL; + } } } } else if (r->statuscode!=HTTP_OK) { @@ -3619,8 +3631,8 @@ int hts_mirror_check_moved(htsmoduleStruct* str, htsmoduleStructExtended* stre) freet(r->adr); r->adr=NULL; } - error=1; // erreur! } + error=1; // erreur! } // FIN rattrapage des 301,302,307.. // ------------------------------------------------------------ |