Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
V
vlc-2-2
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Redmine
Redmine
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Operations
Operations
Metrics
Environments
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
videolan
vlc-2-2
Commits
f2371212
Commit
f2371212
authored
Nov 01, 2006
by
Rémi Denis-Courmont
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Attempt to work-around the Winsock bug-of-the-day
parent
bcf43dd0
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
32 additions
and
21 deletions
+32
-21
src/network/getaddrinfo.c
src/network/getaddrinfo.c
+32
-21
No files found.
src/network/getaddrinfo.c
View file @
f2371212
...
...
@@ -649,29 +649,40 @@ int vlc_getaddrinfo( vlc_object_t *p_this, const char *node,
}
#if defined( WIN32 ) && !defined( UNDER_CE )
{
typedef
int
(
CALLBACK
*
GETADDRINFO
)
(
const
char
*
,
const
char
*
,
typedef
int
(
CALLBACK
*
GETADDRINFO
)
(
const
char
*
,
const
char
*
,
const
struct
addrinfo
*
,
struct
addrinfo
**
);
HINSTANCE
module
;
GETADDRINFO
ws2_getaddrinfo
;
struct
addrinfo
**
);
static
GETADDRINFO
ws2_getaddrinfo
=
NULL
;
module
=
LoadLibrary
(
"ws2_32.dll"
);
if
(
module
!=
NULL
)
if
(
ws2_getaddrinfo
==
NULL
)
{
ws2_getaddrinfo
=
(
GETADDRINFO
)
GetProcAddress
(
module
,
"getaddrinfo"
)
;
static
HINSTANCE
module
=
NULL
;
if
(
ws2_getaddrinfo
!=
NULL
)
{
int
i_ret
;
if
(
module
==
NULL
)
module
=
LoadLibrary
(
"ws2_32.dll"
);
i_ret
=
ws2_getaddrinfo
(
psz_node
,
psz_service
,
&
hints
,
res
);
FreeLibrary
(
module
);
/* is this wise ? */
return
i_ret
;
if
(
module
!=
NULL
)
ws2_getaddrinfo
=
(
GETADDRINFO
)
GetProcAddress
(
module
,
"getaddrinfo"
)
;
}
FreeLibrary
(
module
);
if
(
ws2_getaddrinfo
!=
NULL
)
{
/*
* Winsock tries to resolve numerical IPv4 addresses as AAAA
* and IPv6 addresses as A... There comes the work around.
*/
if
((
hints
.
ai_flags
&
AI_NUMERICHOST
)
==
0
)
{
hints
.
ai_flags
|=
AI_NUMERICHOST
;
if
(
ws2_getaddrinfo
(
psz_node
,
psz_service
,
&
hints
,
res
)
==
0
)
return
0
;
hints
.
ai_flags
&=
~
AI_NUMERICHOST
;
}
return
ws2_getaddrinfo
(
psz_node
,
psz_service
,
&
hints
,
res
);
}
#endif
#if defined( HAVE_GETADDRINFO ) || defined( UNDER_CE )
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment