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
f96204db
Commit
f96204db
authored
15 years ago
by
Yang Tse
Browse files
Options
Downloads
Patches
Plain Diff
Remove run-time requirement for advapi32.dll since
c-ares can work even with no advapi32.dll at all.
parent
0427b783
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
ares/ares.h
+1
-2
1 addition, 2 deletions
ares/ares.h
ares/ares_library_init.c
+9
-12
9 additions, 12 deletions
ares/ares_library_init.c
ares/ares_strerror.c
+0
-1
0 additions, 1 deletion
ares/ares_strerror.c
with
10 additions
and
15 deletions
ares/ares.h
+
1
−
2
View file @
f96204db
...
...
@@ -96,8 +96,7 @@ extern "C" {
/* ares_library_init error codes */
#define ARES_ELOADIPHLPAPI 21
#define ARES_ELOADADVAPI32 22
#define ARES_EADDRGetNetworkParams 23
#define ARES_EADDRGetNetworkParams 22
/* Flag values */
#define ARES_FLAG_USEVC (1 << 0)
...
...
This diff is collapsed.
Click to expand it.
ares/ares_library_init.c
+
9
−
12
View file @
f96204db
...
...
@@ -41,23 +41,20 @@ static int ares_win32_init(void)
return
ARES_EADDRGetNetworkParams
;
}
/*
* When advapi32.dll is unavailable or advapi32.dll has no SystemFunction036,
* also known as RtlGenRandom, which is the case for Windows versions prior
* to WinXP then c-ares uses portable rand() function. Then don't error here.
*/
hnd_advapi32
=
0
;
hnd_advapi32
=
LoadLibrary
(
"advapi32.dll"
);
if
(
!
hnd_advapi32
)
if
(
hnd_advapi32
)
{
FreeLibrary
(
hnd_iphlpapi
);
return
ARES_ELOADADVAPI32
;
fpSystemFunction036
=
(
fpSystemFunction036_t
)
GetProcAddress
(
hnd_advapi32
,
"SystemFunction036"
)
;
}
fpSystemFunction036
=
(
fpSystemFunction036_t
)
GetProcAddress
(
hnd_advapi32
,
"SystemFunction036"
);
/*
* Intentionally avoid checking if the address of SystemFunction036, a.k.a.
* RtlGenRandom, has been located or not. This function is only available on
* WinXP and later. When unavailable c-ares uses portable rand() function.
*/
#endif
return
ARES_SUCCESS
;
}
...
...
This diff is collapsed.
Click to expand it.
ares/ares_strerror.c
+
0
−
1
View file @
f96204db
...
...
@@ -45,7 +45,6 @@ const char *ares_strerror(int code)
"Given hostname is not numeric"
,
"Illegal hints flags specified"
,
"Error loading iphlpapi.dll"
,
"Error loading advapi32.dll"
,
"Could not find GetNetworkParams function"
};
...
...
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