Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
T
TLMSP curl
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package registry
Container Registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
CYBER - Cyber Security
TS 103 523 MSP
TLMSP
TLMSP curl
Commits
89b431f6
Commit
89b431f6
authored
12 years ago
by
Tatsuhiro Tsujikawa
Committed by
Yang Tse
12 years ago
Browse files
Options
Downloads
Patches
Plain Diff
curl: Added runtime version check for libmetalink
parent
4e3320a6
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
src/tool_getparam.c
+15
-1
15 additions, 1 deletion
src/tool_getparam.c
src/tool_metalink.h
+11
-0
11 additions, 0 deletions
src/tool_metalink.h
with
26 additions
and
1 deletion
src/tool_getparam.c
+
15
−
1
View file @
89b431f6
...
...
@@ -824,7 +824,21 @@ ParameterError getparameter(char *flag, /* f or -long-flag */
case
'J'
:
/* --metalink */
{
#ifdef USE_METALINK
config
->
use_metalink
=
toggle
;
int
major
,
minor
,
patch
;
metalink_get_version
(
&
major
,
&
minor
,
&
patch
);
if
((
major
*
10000
)
+
(
minor
*
100
)
+
patch
<
CURL_REQ_LIBMETALINK_VERS
)
{
warnf
(
config
,
"--metalink option cannot be used because the version of "
"the linked libmetalink library is too old. "
"Required: %d.%d.%d, found %d.%d.%d
\n
"
,
CURL_REQ_LIBMETALINK_MAJOR
,
CURL_REQ_LIBMETALINK_MINOR
,
CURL_REQ_LIBMETALINK_PATCH
,
major
,
minor
,
patch
);
return
PARAM_BAD_USE
;
}
else
config
->
use_metalink
=
toggle
;
#else
warnf
(
config
,
"--metalink option is ignored because the binary is "
"built without the Metalink support.
\n
"
);
...
...
This diff is collapsed.
Click to expand it.
src/tool_metalink.h
+
11
−
0
View file @
89b431f6
...
...
@@ -78,6 +78,17 @@ typedef struct metalinkfile {
#ifdef USE_METALINK
/*
* curl requires libmetalink 0.1.0 or newer
*/
#define CURL_REQ_LIBMETALINK_MAJOR 0
#define CURL_REQ_LIBMETALINK_MINOR 1
#define CURL_REQ_LIBMETALINK_PATCH 0
#define CURL_REQ_LIBMETALINK_VERS ((CURL_REQ_LIBMETALINK_MAJOR * 10000) + \
(CURL_REQ_LIBMETALINK_MINOR * 100) + \
CURL_REQ_LIBMETALINK_PATCH)
extern
const
digest_params
MD5_DIGEST_PARAMS
[
1
];
extern
const
digest_params
SHA1_DIGEST_PARAMS
[
1
];
extern
const
digest_params
SHA256_DIGEST_PARAMS
[
1
];
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment