]> git.sesse.net Git - vlc/commitdiff
Fix listening to UDP port (though this is fairly insecure) - closes #919
authorRémi Denis-Courmont <rem@videolan.org>
Fri, 5 Jan 2007 11:21:12 +0000 (11:21 +0000)
committerRémi Denis-Courmont <rem@videolan.org>
Fri, 5 Jan 2007 11:21:12 +0000 (11:21 +0000)
src/network/udp.c

index 7896a3264cf4797e47fbebd211719d1ab0a70510..b86948b16fb75d28e2e3dd859acf66c30f83b4e7 100644 (file)
@@ -628,7 +628,10 @@ int __net_OpenUDP( vlc_object_t *obj, const char *psz_bind, int i_bind,
     struct addrinfo hints, *loc, *rem;
     int val;
 
-    msg_Dbg( obj, "net: connecting to '[%s]:%d@[%s]:%d'",
+    if( !*psz_server )
+        return net_ListenUDP1 (obj, psz_bind, i_bind);
+
+    msg_Dbg( obj, "net: connecting to [%s]:%d from [%s]:%d",
              psz_server, i_server, psz_bind, i_bind );
 
     memset (&hints, 0, sizeof (hints));