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
1e230972
Commit
1e230972
authored
Jul 26, 2018
by
Philipp Schafft
🦁
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Feature: Allow <upstream> within <relay> to have a type="" that can be "normal" and "default"
parent
2c8d4531
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
17 additions
and
6 deletions
+17
-6
src/cfgfile.c
src/cfgfile.c
+17
-6
No files found.
src/cfgfile.c
View file @
1e230972
...
...
@@ -1773,13 +1773,24 @@ static void _parse_relay(xmlDocPtr doc,
if
(
tmp
)
xmlFree
(
tmp
);
}
else
if
(
xmlStrcmp
(
node
->
name
,
XMLSTR
(
"upstream"
))
==
0
)
{
relay_config_upstream_t
*
n
=
realloc
(
relay
->
upstream
,
sizeof
(
*
n
)
*
(
relay
->
upstreams
+
1
));
if
(
n
)
{
relay
->
upstream
=
n
;
memset
(
&
(
n
[
relay
->
upstreams
]),
0
,
sizeof
(
relay_config_upstream_t
));
_parse_relay_upstream
(
doc
,
node
->
xmlChildrenNode
,
&
(
n
[
relay
->
upstreams
]));
relay
->
upstreams
++
;
tmp
=
(
char
*
)
xmlGetProp
(
node
,
XMLSTR
(
"type"
));
if
(
tmp
==
NULL
||
strcmp
(
tmp
,
"normal"
)
==
0
)
{
relay_config_upstream_t
*
n
=
realloc
(
relay
->
upstream
,
sizeof
(
*
n
)
*
(
relay
->
upstreams
+
1
));
if
(
n
)
{
relay
->
upstream
=
n
;
memset
(
&
(
n
[
relay
->
upstreams
]),
0
,
sizeof
(
relay_config_upstream_t
));
_parse_relay_upstream
(
doc
,
node
->
xmlChildrenNode
,
&
(
n
[
relay
->
upstreams
]));
relay
->
upstreams
++
;
}
}
else
if
(
strcmp
(
tmp
,
"default"
)
==
0
)
{
_parse_relay_upstream
(
doc
,
node
->
xmlChildrenNode
,
&
(
relay
->
upstream_default
));
}
else
{
ICECAST_LOG_WARN
(
"<upstream> of unknown type is ignored."
);
}
if
(
tmp
)
xmlFree
(
tmp
);
}
}
while
((
node
=
node
->
next
));
...
...
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