summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/htsparse.c14
1 files changed, 14 insertions, 0 deletions
diff --git a/src/htsparse.c b/src/htsparse.c
index b718655..41d1797 100644
--- a/src/htsparse.c
+++ b/src/htsparse.c
@@ -3988,6 +3988,11 @@ int hts_mirror_wait_for_next_file(htsmoduleStruct* str, htsmoduleStructExtended*
int b;
int n;
+ /* This is not supposed to hapen. */
+ if (liens[ptr]->pass2 == -1) {
+ HTS_LOG(opt, LOG_WARNING); fprintf(opt->log, "Link is already ready %s%s"LF, urladr, urlfil);
+ }
+
/* User interaction */
ENGINE_SAVE_CONTEXT();
{
@@ -3995,6 +4000,15 @@ int hts_mirror_wait_for_next_file(htsmoduleStruct* str, htsmoduleStructExtended*
}
ENGINE_SET_CONTEXT();
+ /* Done while processing user interactions ? */
+ if (liens[ptr]->pass2 == -1) {
+ if ( (opt->debug>0) && (opt->log!=NULL) ) {
+ HTS_LOG(opt,LOG_DEBUG); fprintf(opt->log, "Link is now ready %s%s"LF, urladr, urlfil);
+ }
+ // We are ready
+ return 2; // goto jump_if_done;
+ }
+
// si le fichier n'est pas en backing, le mettre..
if (!back_exist(str->sback,str->opt,urladr,urlfil,savename)) {
#if BDEBUG==1