Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
V
vlc-2-2
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-2-2
Commits
8e0bb47f
Commit
8e0bb47f
authored
Nov 18, 2003
by
Gildas Bazin
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
* modules/control/http.c: fixed the "keep" command.
parent
1754611a
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
14 additions
and
27 deletions
+14
-27
modules/control/http.c
modules/control/http.c
+14
-27
No files found.
modules/control/http.c
View file @
8e0bb47f
...
...
@@ -2,7 +2,7 @@
* http.c : http mini-server ;)
*****************************************************************************
* Copyright (C) 2001 VideoLAN
* $Id: http.c,v 1.3
5 2003/11/17 15:29:03 garf
Exp $
* $Id: http.c,v 1.3
6 2003/11/18 12:32:04 gbazin
Exp $
*
* Authors: Gildas Bazin <gbazin@netcourrier.com>
* Laurent Aimar <fenrir@via.ecp.fr>
...
...
@@ -1812,7 +1812,7 @@ static void MacroDo( httpd_file_callback_args_t *p_args,
{
int
i_item
,
*
p_items
=
NULL
,
i_nb_items
=
0
;
char
item
[
512
],
*
p_parser
=
p_request
;
int
i
,
j
,
temp
;
int
i
,
j
;
/* Get the list of items to keep */
while
(
(
p_parser
=
...
...
@@ -1821,40 +1821,27 @@ static void MacroDo( httpd_file_callback_args_t *p_args,
if
(
!*
item
)
continue
;
i_item
=
atoi
(
item
);
p_items
=
realloc
(
p_items
,
(
i_nb_items
+
3
)
*
p_items
=
realloc
(
p_items
,
(
i_nb_items
+
1
)
*
sizeof
(
int
)
);
p_items
[
i_nb_items
+
1
]
=
i_item
;
p_items
[
i_nb_items
]
=
i_item
;
i_nb_items
++
;
}
/*
sort item list
*/
for
(
i
=
1
;
i
<
(
i_nb_items
+
1
)
;
i
++
)
/*
The items need to be deleted from in reversed order
*/
for
(
i
=
p_sys
->
p_playlist
->
i_size
-
1
;
i
>=
0
;
i
--
)
{
for
(
j
=
(
i
+
1
)
;
j
<
(
i_nb_items
+
1
)
;
j
++
)
/* Check if the item is in the keep list */
for
(
j
=
0
;
j
<
i_nb_items
;
j
++
)
{
if
(
p_items
[
j
]
>
p_items
[
i
]
)
{
temp
=
p_items
[
j
];
p_items
[
j
]
=
p_items
[
i
];
p_items
[
i
]
=
temp
;
}
if
(
p_items
[
j
]
==
i
)
break
;
}
}
p_items
[
0
]
=
p_sys
->
p_playlist
->
i_size
;
p_items
[
i_nb_items
+
1
]
=
-
1
;
/* The items need to be deleted from in reversed order */
for
(
i
=
0
;
i
<=
i_nb_items
;
i
++
)
if
(
j
==
i_nb_items
)
{
for
(
j
=
(
p_items
[
i
]
-
1
)
;
j
>
p_items
[
i
+
1
]
;
j
--
)
{
playlist_Delete
(
p_sys
->
p_playlist
,
j
);
msg_Dbg
(
p_intf
,
"requested playlist delete: %d"
,
j
);
}
playlist_Delete
(
p_sys
->
p_playlist
,
i
);
msg_Dbg
(
p_intf
,
"requested playlist delete: %d"
,
i
);
}
}
if
(
p_items
)
free
(
p_items
);
break
;
...
...
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