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
a06f46ed
Commit
a06f46ed
authored
Jul 11, 2013
by
Felix Paul Kühne
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
podcasts SD: fix variable handling and minor cleanup (close #8947)
parent
e69b8587
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
17 additions
and
13 deletions
+17
-13
modules/services_discovery/podcast.c
modules/services_discovery/podcast.c
+17
-13
No files found.
modules/services_discovery/podcast.c
View file @
a06f46ed
...
@@ -222,14 +222,13 @@ static void *Run( void *data )
...
@@ -222,14 +222,13 @@ static void *Run( void *data )
if
(
p_sys
->
update_type
==
UPDATE_URLS
)
if
(
p_sys
->
update_type
==
UPDATE_URLS
)
{
{
char
*
psz_urls
=
var_GetNonEmptyString
(
p_sd
,
"podcast-urls"
);
playlist_t
*
pl
=
pl_Get
(
p_sd
);
char
*
psz_urls
=
var_GetNonEmptyString
(
pl
,
"podcast-urls"
);
ParseUrls
(
p_sd
,
psz_urls
);
ParseUrls
(
p_sd
,
psz_urls
);
free
(
psz_urls
);
free
(
psz_urls
);
}
}
else
if
(
p_sys
->
update_type
==
UPDATE_REQUEST
)
else
if
(
p_sys
->
update_type
==
UPDATE_REQUEST
)
{
ParseRequest
(
p_sd
);
ParseRequest
(
p_sd
);
}
p_sys
->
b_update
=
false
;
p_sys
->
b_update
=
false
;
...
@@ -303,7 +302,8 @@ static void ParseUrls( services_discovery_t *p_sd, char *psz_urls )
...
@@ -303,7 +302,8 @@ static void ParseUrls( services_discovery_t *p_sd, char *psz_urls )
for
(
;;
)
for
(
;;
)
{
{
if
(
!
psz_urls
)
break
;
if
(
!
psz_urls
)
break
;
char
*
psz_tok
=
strchr
(
psz_urls
,
'|'
);
char
*
psz_tok
=
strchr
(
psz_urls
,
'|'
);
if
(
psz_tok
)
*
psz_tok
=
'\0'
;
if
(
psz_tok
)
*
psz_tok
=
'\0'
;
...
@@ -332,8 +332,10 @@ static void ParseUrls( services_discovery_t *p_sd, char *psz_urls )
...
@@ -332,8 +332,10 @@ static void ParseUrls( services_discovery_t *p_sd, char *psz_urls )
strdup
(
p_sys
->
ppsz_urls
[
i
])
);
strdup
(
p_sys
->
ppsz_urls
[
i
])
);
INSERT_ELEM
(
pp_new_items
,
i_new_items
,
i_new_items
,
p_sys
->
pp_items
[
i
]
);
INSERT_ELEM
(
pp_new_items
,
i_new_items
,
i_new_items
,
p_sys
->
pp_items
[
i
]
);
}
}
if
(
psz_tok
)
psz_urls
=
psz_tok
+
1
;
if
(
psz_tok
)
else
break
;
psz_urls
=
psz_tok
+
1
;
else
break
;
}
}
/* delete removed items and signal the removal */
/* delete removed items and signal the removal */
...
@@ -348,7 +350,8 @@ static void ParseUrls( services_discovery_t *p_sd, char *psz_urls )
...
@@ -348,7 +350,8 @@ static void ParseUrls( services_discovery_t *p_sd, char *psz_urls )
}
}
}
}
free
(
p_sys
->
pp_items
);
free
(
p_sys
->
pp_items
);
for
(
int
i
=
0
;
i
<
p_sys
->
i_urls
;
i
++
)
free
(
p_sys
->
ppsz_urls
[
i
]
);
for
(
int
i
=
0
;
i
<
p_sys
->
i_urls
;
i
++
)
free
(
p_sys
->
ppsz_urls
[
i
]
);
free
(
p_sys
->
ppsz_urls
);
free
(
p_sys
->
ppsz_urls
);
p_sys
->
ppsz_urls
=
ppsz_new_urls
;
p_sys
->
ppsz_urls
=
ppsz_new_urls
;
...
@@ -371,7 +374,8 @@ static void ParseRequest( services_discovery_t *p_sd )
...
@@ -371,7 +374,8 @@ static void ParseRequest( services_discovery_t *p_sd )
if
(
!
p_sys
->
b_savedurls_loaded
)
if
(
!
p_sys
->
b_savedurls_loaded
)
{
{
char
*
psz_urls
=
var_GetNonEmptyString
(
p_sd
,
"podcast-urls"
);
playlist_t
*
pl
=
pl_Get
(
p_sd
);
char
*
psz_urls
=
var_GetNonEmptyString
(
pl
,
"podcast-urls"
);
ParseUrls
(
p_sd
,
psz_urls
);
ParseUrls
(
p_sd
,
psz_urls
);
free
(
psz_urls
);
free
(
psz_urls
);
}
}
...
...
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