Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
V
vlc-1.1
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-1.1
Commits
24a100c0
Commit
24a100c0
authored
Jul 19, 2004
by
Gildas Bazin
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
* src/misc/httpd.c: ipv6 win32 fix.
parent
cc0c26f4
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
27 additions
and
24 deletions
+27
-24
src/misc/httpd.c
src/misc/httpd.c
+27
-24
No files found.
src/misc/httpd.c
View file @
24a100c0
...
@@ -49,6 +49,10 @@
...
@@ -49,6 +49,10 @@
# endif
# endif
#endif
#endif
#if defined(WIN32)
static
const
struct
in6_addr
in6addr_any
=
{{
IN6ADDR_ANY_INIT
}};
#endif
#if 0
#if 0
typedef struct httpd_t httpd_t;
typedef struct httpd_t httpd_t;
...
@@ -999,37 +1003,35 @@ httpd_host_t *httpd_HostNew( vlc_object_t *p_this, char *psz_host, int i_port )
...
@@ -999,37 +1003,35 @@ httpd_host_t *httpd_HostNew( vlc_object_t *p_this, char *psz_host, int i_port )
#ifdef AF_INET6
#ifdef AF_INET6
if
(
httpd
->
host
[
i
]
->
sock
.
ss_family
==
AF_INET6
)
if
(
httpd
->
host
[
i
]
->
sock
.
ss_family
==
AF_INET6
)
{
{
const
struct
sockaddr_in6
*
p_hsock
,
*
p_sock
;
const
struct
sockaddr_in6
*
p_hsock
,
*
p_sock
;
p_hsock
=
(
const
struct
sockaddr_in6
*
)
&
httpd
->
host
[
i
]
->
sock
;
p_hsock
=
(
const
struct
sockaddr_in6
*
)
&
httpd
->
host
[
i
]
->
sock
;
p_sock
=
(
const
struct
sockaddr_in6
*
)
res
->
ai_addr
;
p_sock
=
(
const
struct
sockaddr_in6
*
)
res
->
ai_addr
;
if
(
memcmp
(
&
p_hsock
->
sin6_addr
,
&
in6addr_any
,
if
(
memcmp
(
&
p_hsock
->
sin6_addr
,
&
in6addr_any
,
sizeof
(
struct
in6_addr
)
)
&&
sizeof
(
struct
in6_addr
)
)
&&
(
p_sock
->
sin6_family
!=
AF_INET6
||
(
p_sock
->
sin6_family
!=
AF_INET6
||
memcmp
(
&
p_hsock
->
sin6_addr
,
&
p_sock
->
sin6_addr
,
memcmp
(
&
p_hsock
->
sin6_addr
,
&
p_sock
->
sin6_addr
,
sizeof
(
struct
in6_addr
)
)
)
)
sizeof
(
struct
in6_addr
)
)
)
)
continue
;
/* does not match */
continue
;
/* does not match */
}
}
else
else
if
(
res
->
ai_family
==
PF_INET6
)
if
(
res
->
ai_family
==
PF_INET6
)
continue
;
continue
;
else
else
#endif
#endif
if
(
httpd
->
host
[
i
]
->
sock
.
ss_family
==
AF_INET
)
if
(
httpd
->
host
[
i
]
->
sock
.
ss_family
==
AF_INET
)
{
{
const
struct
sockaddr_in
*
p_hsock
,
*
p_sock
;
const
struct
sockaddr_in
*
p_hsock
,
*
p_sock
;
p_hsock
=
(
const
struct
sockaddr_in
*
)
&
httpd
->
host
[
i
]
->
sock
;
p_hsock
=
(
const
struct
sockaddr_in
*
)
&
httpd
->
host
[
i
]
->
sock
;
p_sock
=
(
const
struct
sockaddr_in
*
)
res
->
ai_addr
;
p_sock
=
(
const
struct
sockaddr_in
*
)
res
->
ai_addr
;
if
(
p_hsock
->
sin_addr
.
s_addr
!=
INADDR_ANY
&&
if
(
p_hsock
->
sin_addr
.
s_addr
!=
INADDR_ANY
&&
(
p_sock
->
sin_family
!=
AF_INET
||
(
p_sock
->
sin_family
!=
AF_INET
||
p_hsock
->
sin_addr
.
s_addr
!=
p_sock
->
sin_addr
.
s_addr
)
)
p_hsock
->
sin_addr
.
s_addr
!=
p_sock
->
sin_addr
.
s_addr
)
)
continue
;
/* does not match */
continue
;
/* does not match */
}
}
else
else
if
(
res
->
ai_family
==
PF_INET
)
if
(
res
->
ai_family
==
PF_INET
)
continue
;
continue
;
else
else
{
{
...
@@ -1487,7 +1489,8 @@ char* httpd_ClientIP( httpd_client_t *cl )
...
@@ -1487,7 +1489,8 @@ char* httpd_ClientIP( httpd_client_t *cl )
}
}
return
strdup
(
&
sz_ip
[
1
]
);
return
strdup
(
&
sz_ip
[
1
]
);
#else
#else
/* FIXME not thread safe */
/* FIXME not thread safe */
return
strdup
(
inet_ntoa
(
((
const
struct
sockaddr_in
*
)
&
cl
->
sock
)
->
sin_addr
)
);
return
strdup
(
inet_ntoa
(
((
const
struct
sockaddr_in
*
)
&
cl
->
sock
)
->
sin_addr
)
);
#endif
#endif
...
...
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