Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
V
vlc-gpu
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Redmine
Redmine
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Operations
Operations
Metrics
Environments
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
videolan
vlc-gpu
Commits
90d3d349
Commit
90d3d349
authored
Jul 16, 2005
by
Rémi Denis-Courmont
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Review and fix ACL duplication - really closes #262
parent
e9205d39
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
18 additions
and
13 deletions
+18
-13
src/stream_output/acl.c
src/stream_output/acl.c
+18
-13
No files found.
src/stream_output/acl.c
View file @
90d3d349
...
@@ -47,7 +47,6 @@
...
@@ -47,7 +47,6 @@
#include "network.h"
#include "network.h"
/* FIXME: rwlock on acl, but libvlc doesn't implement rwlock */
/* FIXME: rwlock on acl, but libvlc doesn't implement rwlock */
/* FIXME: move to src/stream_output/whatever */
typedef
struct
vlc_acl_entry_t
typedef
struct
vlc_acl_entry_t
{
{
uint8_t
host
[
17
];
uint8_t
host
[
17
];
...
@@ -165,6 +164,9 @@ int ACL_AddNet( vlc_acl_t *p_acl, const char *psz_ip, int i_len,
...
@@ -165,6 +164,9 @@ int ACL_AddNet( vlc_acl_t *p_acl, const char *psz_ip, int i_len,
if
(
p_ent
==
NULL
)
if
(
p_ent
==
NULL
)
return
-
1
;
return
-
1
;
p_acl
->
p_entries
=
p_ent
;
p_ent
+=
i_size
;
i_family
=
ACL_Resolve
(
p_acl
->
p_owner
,
p_ent
->
host
,
psz_ip
);
i_family
=
ACL_Resolve
(
p_acl
->
p_owner
,
p_ent
->
host
,
psz_ip
);
if
(
i_family
<
0
)
if
(
i_family
<
0
)
{
{
...
@@ -181,9 +183,6 @@ int ACL_AddNet( vlc_acl_t *p_acl, const char *psz_ip, int i_len,
...
@@ -181,9 +183,6 @@ int ACL_AddNet( vlc_acl_t *p_acl, const char *psz_ip, int i_len,
if
(
i_family
==
AF_INET
)
if
(
i_family
==
AF_INET
)
i_len
+=
96
;
i_len
+=
96
;
p_acl
->
p_entries
=
p_ent
;
p_ent
+=
i_size
;
if
(
i_len
>
128
)
if
(
i_len
>
128
)
i_len
=
128
;
i_len
=
128
;
else
else
...
@@ -231,22 +230,28 @@ vlc_acl_t *__ACL_Duplicate( vlc_object_t *p_this, const vlc_acl_t *p_acl )
...
@@ -231,22 +230,28 @@ vlc_acl_t *__ACL_Duplicate( vlc_object_t *p_this, const vlc_acl_t *p_acl )
if
(
p_dupacl
==
NULL
)
if
(
p_dupacl
==
NULL
)
return
NULL
;
return
NULL
;
p_dupacl
->
p_entries
=
(
vlc_acl_entry_t
*
)
if
(
p_acl
->
i_size
)
malloc
(
p_acl
->
i_size
*
sizeof
(
vlc_acl_entry_t
)
);
if
(
p_dupacl
->
p_entries
==
NULL
)
{
{
free
(
p_dupacl
);
p_dupacl
->
p_entries
=
(
vlc_acl_entry_t
*
)
return
NULL
;
malloc
(
p_acl
->
i_size
*
sizeof
(
vlc_acl_entry_t
)
);
}
if
(
p_dupacl
->
p_entries
==
NULL
)
{
free
(
p_dupacl
);
return
NULL
;
}
memcpy
(
p_dupacl
->
p_entries
,
p_acl
->
p_entries
,
p_acl
->
i_size
*
sizeof
(
vlc_acl_entry_t
)
);
}
else
p_dupacl
->
p_entries
=
NULL
;
vlc_object_yield
(
p_this
);
vlc_object_yield
(
p_this
);
p_dupacl
->
p_owner
=
p_this
;
p_dupacl
->
p_owner
=
p_this
;
p_dupacl
->
i_size
=
p_acl
->
i_size
;
p_dupacl
->
i_size
=
p_acl
->
i_size
;
p_dupacl
->
b_allow_default
=
p_acl
->
b_allow_default
;
p_dupacl
->
b_allow_default
=
p_acl
->
b_allow_default
;
memcpy
(
p_dupacl
->
p_entries
,
p_acl
->
p_entries
,
p_dupacl
->
i_size
*
sizeof
(
vlc_acl_entry_t
)
);
return
p_dupacl
;
return
p_dupacl
;
}
}
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment