summaryrefslogtreecommitdiff
path: root/src/tool_metalink.h
diff options
context:
space:
mode:
authorTatsuhiro Tsujikawa <tatsuhiro.t@gmail.com>2012-06-28 00:20:20 +0900
committerYang Tse <yangsita@gmail.com>2012-06-28 00:26:16 +0200
commitbf4580d5fdd1ae5b76acd0957afddbf62918dfee (patch)
tree2ee40ffcad3d375ab6c5730800fdb0ddf77c8795 /src/tool_metalink.h
parent54398492462850583274bc51a5c2d1f18e9cc7d0 (diff)
downloadcurl-bf4580d5fdd1ae5b76acd0957afddbf62918dfee.tar.gz
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.
Diffstat (limited to 'src/tool_metalink.h')
-rw-r--r--src/tool_metalink.h10
1 files changed, 10 insertions, 0 deletions
diff --git a/src/tool_metalink.h b/src/tool_metalink.h
index a3d10a22c..52a430ece 100644
--- a/src/tool_metalink.h
+++ b/src/tool_metalink.h
@@ -90,6 +90,16 @@ extern const digest_params SHA256_DIGEST_PARAMS[1];
int count_next_metalink_resource(metalinkfile *mlfile);
void clean_metalink(struct Configurable *config);
+/*
+ * Performs final parse operation and extracts information from
+ * Metalink and creates metalinkfile structs.
+ *
+ * This function returns 0 if it succeeds without warnings, or one of
+ * the following negative error codes:
+ *
+ * -1: Parsing failed; or no file is found
+ * -2: Parsing succeeded with some warnings.
+ */
int parse_metalink(struct Configurable *config, struct OutStruct *outs,
const char *metalink_url);