memset (&hints, 0, sizeof( hints ));
hints.ai_family = family;
hints.ai_socktype = SOCK_DGRAM;
+ hints.ai_protocol = protocol;
hints.ai_flags = AI_PASSIVE;
if (host && !*host)
for (const struct addrinfo *ptr = res; ptr != NULL; ptr = ptr->ai_next)
{
int fd = net_Socket (obj, ptr->ai_family, ptr->ai_socktype,
- protocol ? protocol : ptr->ai_protocol);
+ ptr->ai_protocol);
if (fd == -1)
{
msg_Dbg (obj, "socket error: %m");
memset( &hints, 0, sizeof( hints ) );
hints.ai_socktype = SOCK_DGRAM;
+ hints.ai_protocol = proto;
msg_Dbg( p_this, "net: connecting to [%s]:%d", psz_host, i_port );
{
char *str;
int fd = net_Socket (p_this, ptr->ai_family, ptr->ai_socktype,
- proto ? proto : ptr->ai_protocol);
+ ptr->ai_protocol);
if (fd == -1)
continue;
memset (&hints, 0, sizeof (hints));
hints.ai_family = family;
hints.ai_socktype = SOCK_DGRAM;
+ hints.ai_protocol = protocol;
val = vlc_getaddrinfo (obj, psz_server, i_server, &hints, &rem);
if (val)
for (struct addrinfo *ptr = loc; ptr != NULL; ptr = ptr->ai_next)
{
int fd = net_Socket (obj, ptr->ai_family, ptr->ai_socktype,
- protocol ? protocol : ptr->ai_protocol);
+ ptr->ai_protocol);
if (fd == -1)
continue; // usually, address family not supported