Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
V
vlc-gpu
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-gpu
Commits
bdbb3412
Commit
bdbb3412
authored
Jul 29, 2005
by
Rémi Denis-Courmont
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Don't add brackets around IPv6 addresses, this is annoying
parent
10f6eaea
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
7 additions
and
16 deletions
+7
-16
src/misc/httpd.c
src/misc/httpd.c
+7
-16
No files found.
src/misc/httpd.c
View file @
bdbb3412
...
@@ -1329,26 +1329,17 @@ void httpd_ClientModeBidir( httpd_client_t *cl )
...
@@ -1329,26 +1329,17 @@ void httpd_ClientModeBidir( httpd_client_t *cl )
char
*
httpd_ClientIP
(
httpd_client_t
*
cl
)
char
*
httpd_ClientIP
(
httpd_client_t
*
cl
)
{
{
int
i
;
int
i
;
char
sz_ip
[
NI_MAXNUMERICHOST
+
2
]
;
char
*
psz_ip
=
malloc
(
NI_MAXNUMERICHOST
)
;
i
=
vlc_getnameinfo
(
(
const
struct
sockaddr
*
)
&
cl
->
sock
,
cl
->
i_sock_size
,
if
(
psz_ip
==
NULL
)
sz_ip
+
1
,
NI_MAXNUMERICHOST
,
NULL
,
NI_NUMERICHOST
);
if
(
i
!=
0
)
return
NULL
;
return
NULL
;
/* semi-colon in address => must add bracket for HTTP */
i
=
vlc_getnameinfo
(
(
const
struct
sockaddr
*
)
&
cl
->
sock
,
cl
->
i_sock_size
,
if
(
strchr
(
sz_ip
+
1
,
':'
)
!=
NULL
)
psz_ip
,
NI_MAXNUMERICHOST
,
NULL
,
NI_NUMERICHOST
);
{
if
(
i
)
sz_ip
[
0
]
=
'['
;
return
NULL
;
i
=
strlen
(
sz_ip
);
sz_ip
[
i
++
]
=
']'
;
sz_ip
[
i
]
=
'\0'
;
return
strdup
(
sz_ip
);
}
return
strdup
(
sz_ip
+
1
)
;
return
psz_ip
;
}
}
static
void
httpd_ClientClean
(
httpd_client_t
*
cl
)
static
void
httpd_ClientClean
(
httpd_client_t
*
cl
)
...
...
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