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

Fix error passing from IPv4 plugin

in case of resolution failure.
This should fix the "lame stack" + "Non-socket handle" bug.
parent 465627ab
...@@ -169,15 +169,15 @@ static int OpenUDP( vlc_object_t * p_this ) ...@@ -169,15 +169,15 @@ static int OpenUDP( vlc_object_t * p_this )
# define strerror( x ) winsock_strerror( strerror_buf ) # define strerror( x ) winsock_strerror( strerror_buf )
#endif #endif
p_socket->i_handle = -1;
/* Build the local socket */ /* Build the local socket */
if( BuildAddr( p_this, &sock, psz_bind_addr, i_bind_port ) == -1 ) if( BuildAddr( p_this, &sock, psz_bind_addr, i_bind_port ) == -1 )
{ {
msg_Dbg( p_this, "could not build local address" ); msg_Dbg( p_this, "cannot build local address" );
return 0; return 0;
} }
p_socket->i_handle = -1;
/* Open a SOCK_DGRAM (UDP) socket, in the AF_INET domain, automatic (0) /* Open a SOCK_DGRAM (UDP) socket, in the AF_INET domain, automatic (0)
* protocol */ * protocol */
if( (i_handle = socket( AF_INET, SOCK_DGRAM, 0 )) == -1 ) if( (i_handle = socket( AF_INET, SOCK_DGRAM, 0 )) == -1 )
......
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