Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
Xiph.Org
Icecast-Server
Commits
c519afa8
Commit
c519afa8
authored
Aug 23, 2005
by
Karl Heyes
Browse files
add per-mount listener time limit setting
svn path=/icecast/trunk/icecast/; revision=9834
parent
82e12b4d
Changes
4
Hide whitespace changes
Inline
Side-by-side
doc/icecast2_config_file.html
View file @
c519afa8
...
...
@@ -365,6 +365,7 @@ If you are relaying a Shoutcast stream, you need to specify this indicator to al
<
username
>
othersource
<
/username
>
<
password
>
hackmemore
<
/password
>
<
max-listeners
>
1
<
/max-listeners
>
<
max-listener-duration
>
3600
<
/max-listener-duration
>
<
dump-file
>
/tmp/dump-example1.ogg
<
/dump-file
>
<
intro
>
/intro.ogg
<
/intro
>
<
fallback-mount
>
/example2.ogg
<
/fallback-mount
>
...
...
@@ -416,6 +417,11 @@ An optional value which will set the password that a source must use to connect
<div
class=
"indentedbox"
>
An optional value which will set the maximum number of listeners that can be attached to this mountpoint.
</div>
<h4>
max-listener-duration
</h4>
<div
class=
"indentedbox"
>
An optional value which will set the length of time a listener will stay connected to the
stream. An auth component may override this.
</div>
<h4>
dump-file
</h4>
<div
class=
"indentedbox"
>
An optional value which will set the filename which will be a dump of the stream coming through on this mountpoint.
...
...
src/auth.c
View file @
c519afa8
...
...
@@ -322,6 +322,10 @@ static int add_authenticated_client (const char *mount, mount_proxy *mountinfo,
avl_tree_unlock
(
global
.
source_tree
);
return
-
1
;
}
/* set a per-mount disconnect time if auth hasn't set one already */
if
(
mountinfo
->
max_listener_duration
&&
client
->
con
->
discon_time
==
0
)
client
->
con
->
discon_time
=
time
(
NULL
)
+
mountinfo
->
max_listener_duration
;
ret
=
add_client_to_source
(
source
,
client
);
avl_tree_unlock
(
global
.
source_tree
);
if
(
ret
==
0
)
...
...
src/cfgfile.c
View file @
c519afa8
...
...
@@ -615,6 +615,11 @@ static void _parse_mount(xmlDocPtr doc, xmlNodePtr node,
mount
->
on_disconnect
=
(
char
*
)
xmlNodeListGetString
(
doc
,
node
->
xmlChildrenNode
,
1
);
}
else
if
(
strcmp
(
node
->
name
,
"max-listener-duration"
)
==
0
)
{
tmp
=
(
char
*
)
xmlNodeListGetString
(
doc
,
node
->
xmlChildrenNode
,
1
);
mount
->
max_listener_duration
=
atoi
(
tmp
);
if
(
tmp
)
xmlFree
(
tmp
);
}
else
if
(
strcmp
(
node
->
name
,
"queue-size"
)
==
0
)
{
tmp
=
(
char
*
)
xmlNodeListGetString
(
doc
,
node
->
xmlChildrenNode
,
1
);
mount
->
queue_size_limit
=
atoi
(
tmp
);
...
...
src/cfgfile.h
View file @
c519afa8
...
...
@@ -72,6 +72,7 @@ typedef struct _mount_proxy {
config_options_t
*
auth_options
;
/* Options for this type */
char
*
on_connect
;
char
*
on_disconnect
;
unsigned
int
max_listener_duration
;
char
*
stream_name
;
char
*
stream_description
;
...
...
Write
Preview
Supports
Markdown
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