[vlc-devel] commit: Fix wrapper: use SOCK_STREAM rather than SOCK_DGRAM for TCP ( Rémi Denis-Courmont )
git version control
git at videolan.org
Mon Aug 4 17:22:41 CEST 2008
vlc | branch: master | Rémi Denis-Courmont <rdenis at simphalempin.com> | Mon Aug 4 18:24:21 2008 +0300| [22f8e7435cab1dbaef1530d5f4db5dd4142b14c4] | committer: Rémi Denis-Courmont
Fix wrapper: use SOCK_STREAM rather than SOCK_DGRAM for TCP
> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=22f8e7435cab1dbaef1530d5f4db5dd4142b14c4
---
src/network/io.c | 2 +-
src/network/rootbind.c | 2 +-
2 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/network/io.c b/src/network/io.c
index 0491c39..0f52527 100644
--- a/src/network/io.c
+++ b/src/network/io.c
@@ -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)
diff --git a/src/network/rootbind.c b/src/network/rootbind.c
index 983c657..dfdf624 100644
--- a/src/network/rootbind.c
+++ b/src/network/rootbind.c
@@ -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))
More information about the vlc-devel
mailing list