Commit 9b91b013 authored by Rémi Denis-Courmont's avatar Rémi Denis-Courmont

Remove net_AddressIsMulticast:

it did not work properly (proper check is impossible without blocking)
parent 2dcc933b
......@@ -286,34 +286,6 @@ net_SockAddrIsMulticast (const struct sockaddr *addr, socklen_t len)
}
/**
* net_AddressIsMulticast
* @return VLC_FALSE iff the psz_addr does not specify a multicast address,
* or the address is not a valid address.
*/
static inline vlc_bool_t net_AddressIsMulticast( vlc_object_t *p_object, const char *psz_addr )
{
struct addrinfo hints, *res;
memset (&hints, 0, sizeof (hints));
hints.ai_socktype = SOCK_DGRAM; /* UDP */
hints.ai_flags = AI_NUMERICHOST;
int i = vlc_getaddrinfo (p_object, psz_addr, 0,
&hints, &res);
if (i)
{
msg_Err (p_object, "invalid address \"%s\" for net_AddressIsMulticast (%s)",
psz_addr, vlc_gai_strerror (i));
return VLC_FALSE;
}
vlc_bool_t b = net_SockAddrIsMulticast (res->ai_addr, res->ai_addrlen);
vlc_freeaddrinfo (res);
return b;
}
static inline int net_GetSockAddress( int fd, char *address, int *port )
{
struct sockaddr_storage addr;
......
......@@ -1079,16 +1079,7 @@ void wizStreamingMethodPage::OnWizardPageChanging(wxWizardEvent& event)
if( !event.GetDirection() ) return;
/* Check valid address */
if( i_method == 1
&& !net_AddressIsMulticast( (vlc_object_t *)p_intf,
address_txtctrl->GetValue().mb_str(wxConvUTF8)) )
{
wxMessageBox( wxU( INVALID_MCAST_ADDRESS ) , wxU( ERROR_MSG ),
wxICON_WARNING | wxOK, this->p_parent );
event.Veto();
}
else if( i_method == 0 && address_txtctrl->GetValue().IsEmpty() )
if( i_method == 0 && address_txtctrl->GetValue().IsEmpty() )
{
wxMessageBox( wxU( NO_ADDRESS_TEXT ) , wxU( ERROR_MSG ),
wxICON_WARNING | wxOK, this->p_parent );
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment