Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
V
vlc
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
Commits
6f8c9706
Commit
6f8c9706
authored
Sep 23, 2007
by
Rémi Denis-Courmont
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Do not leak the art handler from HTTP interface - fixes #1308
parent
e67567c4
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
13 additions
and
9 deletions
+13
-9
modules/control/http/http.c
modules/control/http/http.c
+12
-9
modules/control/http/http.h
modules/control/http/http.h
+1
-0
No files found.
modules/control/http/http.c
View file @
6f8c9706
...
...
@@ -159,6 +159,7 @@ static int Open( vlc_object_t *p_this )
p_sys
->
p_vlm
=
NULL
;
p_sys
->
psz_address
=
psz_address
;
p_sys
->
i_port
=
i_port
;
p_sys
->
p_art_handler
=
NULL
;
/* determine Content-Type value for HTML pages */
psz_src
=
config_GetPsz
(
p_intf
,
"http-charset"
);
...
...
@@ -344,6 +345,14 @@ static int Open( vlc_object_t *p_this )
}
E_
(
ParseDirectory
)(
p_intf
,
psz_src
,
psz_src
);
if
(
p_sys
->
i_files
<=
0
)
{
msg_Err
(
p_intf
,
"cannot find any file in directory %s"
,
psz_src
);
goto
failed
;
}
p_intf
->
pf_run
=
Run
;
free
(
psz_src
);
if
(
config_GetInt
(
p_intf
,
"http-album-art"
)
)
{
...
...
@@ -361,17 +370,9 @@ static int Open( vlc_object_t *p_this )
h
->
p_handler
=
httpd_HandlerNew
(
p_sys
->
p_httpd_host
,
"/art"
,
NULL
,
NULL
,
NULL
,
E_
(
ArtCallback
),
h
);
TAB_APPEND
(
p_sys
->
i_handlers
,
p_sys
->
pp_handlers
,
h
->
p_handler
)
;
p_sys
->
p_art_handler
=
h
->
p_handler
;
}
if
(
p_sys
->
i_files
<=
0
)
{
msg_Err
(
p_intf
,
"cannot find any file in directory %s"
,
psz_src
);
goto
failed
;
}
p_intf
->
pf_run
=
Run
;
free
(
psz_src
);
return
VLC_SUCCESS
;
failed:
...
...
@@ -434,6 +435,8 @@ static void Close ( vlc_object_t *p_this )
}
if
(
p_sys
->
i_handlers
)
free
(
p_sys
->
pp_handlers
);
if
(
p_sys
->
p_art_handler
)
httpd_HandlerDelete
(
p_sys
->
p_art_handler
);
httpd_HostDelete
(
p_sys
->
p_httpd_host
);
free
(
p_sys
->
psz_address
);
free
(
p_sys
->
psz_html_type
);
...
...
modules/control/http/http.h
View file @
6f8c9706
...
...
@@ -382,6 +382,7 @@ struct intf_sys_t
int
i_handlers
;
http_association_t
**
pp_handlers
;
httpd_handler_t
*
p_art_handler
;
playlist_t
*
p_playlist
;
input_thread_t
*
p_input
;
...
...
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