Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
V
vlc
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
Commits
dc60b611
Commit
dc60b611
authored
Nov 07, 2004
by
Rémi Denis-Courmont
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Bring socket in non-blocking mode before TLS handshake
parent
6186fac9
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
11 additions
and
9 deletions
+11
-9
src/misc/httpd.c
src/misc/httpd.c
+11
-9
No files found.
src/misc/httpd.c
View file @
dc60b611
...
@@ -1554,15 +1554,6 @@ static httpd_client_t *httpd_ClientNew( int fd, struct sockaddr_storage *sock,
...
@@ -1554,15 +1554,6 @@ static httpd_client_t *httpd_ClientNew( int fd, struct sockaddr_storage *sock,
tls_session_t
*
p_tls
)
tls_session_t
*
p_tls
)
{
{
httpd_client_t
*
cl
=
malloc
(
sizeof
(
httpd_client_t
)
);
httpd_client_t
*
cl
=
malloc
(
sizeof
(
httpd_client_t
)
);
/* set this new socket non-block */
#if defined( WIN32 ) || defined( UNDER_CE )
{
unsigned
long
i_dummy
=
1
;
ioctlsocket
(
fd
,
FIONBIO
,
&
i_dummy
);
}
#else
fcntl
(
fd
,
F_SETFL
,
O_NONBLOCK
);
#endif
cl
->
i_ref
=
0
;
cl
->
i_ref
=
0
;
cl
->
fd
=
fd
;
cl
->
fd
=
fd
;
memcpy
(
&
cl
->
sock
,
sock
,
sizeof
(
cl
->
sock
)
);
memcpy
(
&
cl
->
sock
,
sock
,
sizeof
(
cl
->
sock
)
);
...
@@ -2431,6 +2422,17 @@ static void httpd_HostThread( httpd_host_t *host )
...
@@ -2431,6 +2422,17 @@ static void httpd_HostThread( httpd_host_t *host )
fd
=
accept
(
host
->
fd
,
(
struct
sockaddr
*
)
&
sock
,
&
i_sock_size
);
fd
=
accept
(
host
->
fd
,
(
struct
sockaddr
*
)
&
sock
,
&
i_sock_size
);
if
(
fd
>=
0
)
if
(
fd
>=
0
)
{
{
/* set this new socket non-block */
#if defined( WIN32 ) || defined( UNDER_CE )
{
unsigned
long
i_dummy
=
1
;
ioctlsocket
(
fd
,
FIONBIO
,
&
i_dummy
);
}
#else
fcntl
(
fd
,
F_SETFL
,
O_NONBLOCK
);
#endif
/* FIXME: that MUST be non-blocking */
if
(
p_tls
!=
NULL
)
if
(
p_tls
!=
NULL
)
{
{
p_tls
=
tls_SessionHandshake
(
p_tls
,
fd
);
p_tls
=
tls_SessionHandshake
(
p_tls
,
fd
);
...
...
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