Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse code

Metalink: message updates

Print "parsing (...) OK" only when no warnings are generated.  If
no file is found in Metalink, treat it FAILED.

If no digest is provided, print WARNING in parse_metalink().
Also print validating FAILED after download.

These changes make tests 2012 to 2016 pass.
  • Loading branch information...
commit bf4580d5fdd1ae5b76acd0957afddbf62918dfee 1 parent 5439849
Tatsuhiro Tsujikawa authored June 28, 2012 yangtse committed June 28, 2012
21  src/tool_metalink.c
@@ -330,7 +330,6 @@ static int check_hash(const char *filename,
@@ -374,7 +373,11 @@ int metalink_check_hash(struct Configurable *config,
@@ -474,6 +477,7 @@ int parse_metalink(struct Configurable *config, struct OutStruct *outs,
@@ -482,17 +486,17 @@ int parse_metalink(struct Configurable *config, struct OutStruct *outs,
@@ -517,7 +521,12 @@ int parse_metalink(struct Configurable *config, struct OutStruct *outs,
@@ -534,7 +543,7 @@ int parse_metalink(struct Configurable *config, struct OutStruct *outs,
10  src/tool_metalink.h
@@ -90,6 +90,16 @@ extern const digest_params SHA256_DIGEST_PARAMS[1];
8  src/tool_operate.c
@@ -1621,10 +1621,10 @@ int operate(struct Configurable *config, int argc, argv_item_t argv[])
1621 1621
 
1622 1622
 #ifdef USE_METALINK
1623 1623
         if(!metalink && config->use_metalink && res == CURLE_OK) {
1624  
-          if(parse_metalink(config, &outs, this_url) == 0)
1625  
-            fprintf(config->errors, "Metalink: parsing (%s) OK\n",
1626  
-                    this_url);
1627  
-          else
  1624
+          int rv = parse_metalink(config, &outs, this_url);
  1625
+          if(rv == 0)
  1626
+            fprintf(config->errors, "Metalink: parsing (%s) OK\n", this_url);
  1627
+          else if(rv == -1)
1628 1628
             fprintf(config->errors, "Metalink: parsing (%s) FAILED\n",
1629 1629
                     this_url);
1630 1630
         }
5  tests/data/DISABLED
@@ -5,9 +5,4 @@
5 5
 594
6 6
 1209
7 7
 1211
8  
-2012
9  
-2013
10  
-2014
11  
-2015
12  
-2016
13 8
 2017

0 notes on commit bf4580d

Please sign in to comment.
Something went wrong with that request. Please try again.