Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Menu
Open sidebar
Steve Lhomme
VLC
Commits
22f8e743
Commit
22f8e743
authored
Aug 04, 2008
by
Rémi Denis-Courmont
Browse files
Fix wrapper: use SOCK_STREAM rather than SOCK_DGRAM for TCP
parent
ea351fa9
Changes
2
Hide whitespace changes
Inline
Side-by-side
src/network/io.c
View file @
22f8e743
...
...
@@ -216,7 +216,7 @@ int *net_Listen (vlc_object_t *p_this, const char *psz_host,
{
net_Close
(
fd
);
#if !defined(WIN32) && !defined(UNDER_CE)
fd
=
rootwrap_bind
(
ptr
->
ai_family
,
ptr
->
ai_
socktype
,
fd
=
rootwrap_bind
(
ptr
->
ai_family
,
socktype
,
protocol
?:
ptr
->
ai_protocol
,
ptr
->
ai_addr
,
ptr
->
ai_addrlen
);
if
(
fd
!=
-
1
)
...
...
src/network/rootbind.c
View file @
22f8e743
...
...
@@ -145,7 +145,7 @@ int rootwrap_bind (int family, int socktype, int protocol,
}
memset
(
&
ss
,
0
,
sizeof
(
ss
));
memcpy
(
&
ss
,
addr
,
alen
>
sizeof
(
ss
)
?
sizeof
(
ss
)
:
alen
);
memcpy
(
&
ss
,
addr
,
(
alen
>
sizeof
(
ss
)
)
?
sizeof
(
ss
)
:
alen
);
pthread_mutex_lock
(
&
mutex
);
if
(
send
(
sock
,
&
ss
,
sizeof
(
ss
),
0
)
!=
sizeof
(
ss
))
...
...
Write
Preview
Supports
Markdown
0%
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!
Cancel
Please
register
or
sign in
to comment