Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
V
vlc-1.1
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-1.1
Commits
6d46c2a1
Commit
6d46c2a1
authored
Nov 23, 2003
by
Gildas Bazin
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
* modules/control/http.c: fixed segfault when deleting items and prevent adding empty items.
parent
fd6e137a
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
4 additions
and
15 deletions
+4
-15
modules/control/http.c
modules/control/http.c
+4
-15
No files found.
modules/control/http.c
View file @
6d46c2a1
...
@@ -2,7 +2,7 @@
...
@@ -2,7 +2,7 @@
* http.c : http mini-server ;)
* http.c : http mini-server ;)
*****************************************************************************
*****************************************************************************
* Copyright (C) 2001 VideoLAN
* Copyright (C) 2001 VideoLAN
* $Id: http.c,v 1.3
8 2003/11/23 16:24:20 garf
Exp $
* $Id: http.c,v 1.3
9 2003/11/23 17:46:06 gbazin
Exp $
*
*
* Authors: Gildas Bazin <gbazin@netcourrier.com>
* Authors: Gildas Bazin <gbazin@netcourrier.com>
* Laurent Aimar <fenrir@via.ecp.fr>
* Laurent Aimar <fenrir@via.ecp.fr>
...
@@ -1754,7 +1754,7 @@ static void MacroDo( httpd_file_callback_args_t *p_args,
...
@@ -1754,7 +1754,7 @@ static void MacroDo( httpd_file_callback_args_t *p_args,
uri_decode_url_encoded
(
mrl
);
uri_decode_url_encoded
(
mrl
);
p_item
=
parse_MRL
(
mrl
);
p_item
=
parse_MRL
(
mrl
);
if
(
p_item
==
NULL
)
if
(
!
p_item
||
!*
p_item
)
{
{
msg_Dbg
(
p_intf
,
"invalid requested mrl: %s"
,
mrl
);
msg_Dbg
(
p_intf
,
"invalid requested mrl: %s"
,
mrl
);
}
else
}
else
...
@@ -1810,10 +1810,9 @@ static void MacroDo( httpd_file_callback_args_t *p_args,
...
@@ -1810,10 +1810,9 @@ static void MacroDo( httpd_file_callback_args_t *p_args,
}
}
case
MVLC_KEEP
:
case
MVLC_KEEP
:
{
{
int
i_item
,
*
p_items
=
NULL
,
i_nb_items
=
0
,
i_current
=
-
1
;
int
i_item
,
*
p_items
=
NULL
,
i_nb_items
=
0
;
char
item
[
512
],
*
p_parser
=
p_request
;
char
item
[
512
],
*
p_parser
=
p_request
;
int
i
,
j
;
int
i
,
j
;
vlc_value_t
val
;
/* Get the list of items to keep */
/* Get the list of items to keep */
while
(
(
p_parser
=
while
(
(
p_parser
=
...
@@ -1828,16 +1827,6 @@ static void MacroDo( httpd_file_callback_args_t *p_args,
...
@@ -1828,16 +1827,6 @@ static void MacroDo( httpd_file_callback_args_t *p_args,
i_nb_items
++
;
i_nb_items
++
;
}
}
/* we should not remove an item while it is played by VLC */
var_Get
(
p_sys
->
p_input
,
"state"
,
&
val
);
if
(
val
.
i_int
==
PLAYING_S
)
{
i_current
=
p_sys
->
p_playlist
->
i_index
;
}
else
{
i_current
=
-
1
;
}
/* The items need to be deleted from in reversed order */
/* The items need to be deleted from in reversed order */
for
(
i
=
p_sys
->
p_playlist
->
i_size
-
1
;
i
>=
0
;
i
--
)
for
(
i
=
p_sys
->
p_playlist
->
i_size
-
1
;
i
>=
0
;
i
--
)
{
{
...
@@ -1846,7 +1835,7 @@ static void MacroDo( httpd_file_callback_args_t *p_args,
...
@@ -1846,7 +1835,7 @@ static void MacroDo( httpd_file_callback_args_t *p_args,
{
{
if
(
p_items
[
j
]
==
i
)
break
;
if
(
p_items
[
j
]
==
i
)
break
;
}
}
if
(
(
j
==
i_nb_items
)
&&
(
i
!=
i_current
)
)
if
(
j
==
i_nb_items
)
{
{
playlist_Delete
(
p_sys
->
p_playlist
,
i
);
playlist_Delete
(
p_sys
->
p_playlist
,
i
);
msg_Dbg
(
p_intf
,
"requested playlist delete: %d"
,
msg_Dbg
(
p_intf
,
"requested playlist delete: %d"
,
...
...
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