X-Git-Url: https://git.sesse.net/?a=blobdiff_plain;f=src%2Fnetwork%2Facl.c;h=c177781195ffdb7092d5afa2dbb6d3f2a47f8405;hb=747e569007af4f30ccf147873a01dd30ea16f7de;hp=47b331865df4d9830a6bd96642b7d7fa20326ce9;hpb=449fd28aaf007c6411251dae9d0dbfdc65b135d1;p=vlc diff --git a/src/network/acl.c b/src/network/acl.c index 47b331865d..c177781195 100644 --- a/src/network/acl.c +++ b/src/network/acl.c @@ -28,7 +28,7 @@ # include "config.h" #endif -#include +#include #include #include @@ -189,9 +189,6 @@ int ACL_AddNet( vlc_acl_t *p_acl, const char *psz_ip, int i_len, if( i_len > 128 ) i_len = 128; - else - if( i_len < 0 ) - i_len = 0; } else i_len = 128; /* ACL_AddHost */ @@ -221,7 +218,7 @@ vlc_acl_t *__ACL_Create( vlc_object_t *p_this, bool b_allow ) if( p_acl == NULL ) return NULL; - vlc_object_yield( p_this ); + vlc_object_hold( p_this ); p_acl->p_owner = p_this; p_acl->i_size = 0; p_acl->p_entries = NULL; @@ -267,7 +264,7 @@ vlc_acl_t *__ACL_Duplicate( vlc_object_t *p_this, const vlc_acl_t *p_acl ) else p_dupacl->p_entries = NULL; - vlc_object_yield( p_this ); + vlc_object_hold( p_this ); p_dupacl->p_owner = p_this; p_dupacl->i_size = p_acl->i_size; p_dupacl->b_allow_default = p_acl->b_allow_default; @@ -380,7 +377,7 @@ int ACL_LoadFile( vlc_acl_t *p_acl, const char *psz_path ) : ACL_AddHost( p_acl, psz_ip, true ) ) { msg_Err( p_acl->p_owner, "cannot add ACL from %s", psz_path ); - goto error; + continue; } }