Browse Source

network: net_Listen() doesn't accept a negative port

pull/73/head
Steve Lhomme 8 years ago
parent
commit
bb1c8e8e41
  1. 2
      include/vlc_network.h
  2. 2
      src/network/io.c

2
include/vlc_network.h

@ -124,7 +124,7 @@ int net_Socket (vlc_object_t *obj, int family, int socktype, int proto);
VLC_API int net_Connect(vlc_object_t *p_this, const char *psz_host, int i_port, int socktype, int protocol);
#define net_Connect(a, b, c, d, e) net_Connect(VLC_OBJECT(a), b, c, d, e)
VLC_API int * net_Listen(vlc_object_t *p_this, const char *psz_host, int i_port, int socktype, int protocol);
VLC_API int * net_Listen(vlc_object_t *p_this, const char *psz_host, unsigned i_port, int socktype, int protocol);
#define net_ListenTCP(a, b, c) net_Listen(VLC_OBJECT(a), b, c, \
SOCK_STREAM, IPPROTO_TCP)

2
src/network/io.c

@ -104,7 +104,7 @@ int net_Socket (vlc_object_t *p_this, int family, int socktype,
int *net_Listen (vlc_object_t *p_this, const char *psz_host,
int i_port, int type, int protocol)
unsigned i_port, int type, int protocol)
{
struct addrinfo hints = {
.ai_socktype = type,

Loading…
Cancel
Save