From bf4580d5fdd1ae5b76acd0957afddbf62918dfee Mon Sep 17 00:00:00 2001 From: Tatsuhiro Tsujikawa Date: Thu, 28 Jun 2012 00:20:20 +0900 Subject: 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. --- src/tool_operate.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'src/tool_operate.c') diff --git a/src/tool_operate.c b/src/tool_operate.c index 0b828de4b..7c0b8b5fe 100644 --- a/src/tool_operate.c +++ b/src/tool_operate.c @@ -1621,10 +1621,10 @@ int operate(struct Configurable *config, int argc, argv_item_t argv[]) #ifdef USE_METALINK if(!metalink && config->use_metalink && res == CURLE_OK) { - if(parse_metalink(config, &outs, this_url) == 0) - fprintf(config->errors, "Metalink: parsing (%s) OK\n", - this_url); - else + int rv = parse_metalink(config, &outs, this_url); + if(rv == 0) + fprintf(config->errors, "Metalink: parsing (%s) OK\n", this_url); + else if(rv == -1) fprintf(config->errors, "Metalink: parsing (%s) FAILED\n", this_url); } -- cgit v1.2.3