Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
What's new
10
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Open sidebar
Xiph.Org
Icecast-Server
Commits
61c9def2
Commit
61c9def2
authored
Oct 11, 2012
by
Philipp Schafft
🦁
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
cleanup of <source-password> parser code
svn path=/icecast/trunk/icecast/; revision=18649
parent
fdcef55c
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
5 additions
and
13 deletions
+5
-13
src/cfgfile.c
src/cfgfile.c
+5
-13
No files found.
src/cfgfile.c
View file @
61c9def2
...
...
@@ -411,15 +411,9 @@ static void _parse_root(xmlDocPtr doc, xmlNodePtr node,
_parse_authentication
(
doc
,
node
->
xmlChildrenNode
,
configuration
);
}
else
if
(
xmlStrcmp
(
node
->
name
,
XMLSTR
(
"source-password"
))
==
0
)
{
/* TODO: This is the backwards-compatibility location */
char
*
mount
,
*
pass
;
if
((
mount
=
(
char
*
)
xmlGetProp
(
node
,
XMLSTR
(
"mount"
)))
!=
NULL
)
{
pass
=
(
char
*
)
xmlNodeListGetString
(
doc
,
node
->
xmlChildrenNode
,
1
);
/* FIXME: This is a placeholder for per-mount passwords */
}
else
{
if
(
configuration
->
source_password
)
xmlFree
(
configuration
->
source_password
);
configuration
->
source_password
=
(
char
*
)
xmlNodeListGetString
(
doc
,
node
->
xmlChildrenNode
,
1
);
}
WARN0
(
"<source-password> defined outside <authentication>. This is deprecated."
);
if
(
configuration
->
source_password
)
xmlFree
(
configuration
->
source_password
);
configuration
->
source_password
=
(
char
*
)
xmlNodeListGetString
(
doc
,
node
->
xmlChildrenNode
,
1
);
}
else
if
(
xmlStrcmp
(
node
->
name
,
XMLSTR
(
"icelogin"
))
==
0
)
{
tmp
=
(
char
*
)
xmlNodeListGetString
(
doc
,
node
->
xmlChildrenNode
,
1
);
configuration
->
ice_login
=
atoi
(
tmp
);
...
...
@@ -864,10 +858,8 @@ static void _parse_authentication(xmlDocPtr doc, xmlNodePtr node,
if
(
xmlIsBlankNode
(
node
))
continue
;
if
(
xmlStrcmp
(
node
->
name
,
XMLSTR
(
"source-password"
))
==
0
)
{
char
*
mount
,
*
pass
;
if
((
mount
=
(
char
*
)
xmlGetProp
(
node
,
XMLSTR
(
"mount"
)))
!=
NULL
)
{
pass
=
(
char
*
)
xmlNodeListGetString
(
doc
,
node
->
xmlChildrenNode
,
1
);
/* FIXME: This is a placeholder for per-mount passwords */
if
(
xmlGetProp
(
node
,
XMLSTR
(
"mount"
)))
{
ERROR0
(
"Mount level source password defined within global <authentication> section."
);
}
else
{
if
(
configuration
->
source_password
)
...
...
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