mirror of
https://gitlab.xiph.org/xiph/icecast-server.git
synced 2025-01-03 14:56:34 -05:00
Decrement client connections on source termination to avoid eventual "server
is full" messages. svn path=/trunk/icecast/; revision=3801
This commit is contained in:
parent
c1bb9afaa9
commit
bf782f0248
31
configure.in
31
configure.in
@ -84,6 +84,35 @@ dnl Checks for library functions.
|
|||||||
|
|
||||||
dnl -- configure options --
|
dnl -- configure options --
|
||||||
|
|
||||||
|
AC_ARG_WITH(xslt-config,
|
||||||
|
[ --with-xslt-config=PATH use xslt-config in PATH to find libxslt ],
|
||||||
|
[if ! test -x "$with_xslt_config"
|
||||||
|
then
|
||||||
|
AC_MSG_ERROR([$with_xslt_config cannot be executed])
|
||||||
|
fi
|
||||||
|
XSLTCONFIG="$with_xslt_config"]
|
||||||
|
)
|
||||||
|
if test -z "$XSLTCONFIG"
|
||||||
|
then
|
||||||
|
AC_CHECK_PROGS(XSLTCONFIG, [xslt-config])
|
||||||
|
fi
|
||||||
|
if test -n "$XSLTCONFIG"
|
||||||
|
then
|
||||||
|
XSLT_LIBS="`$XSLTCONFIG --libs`"
|
||||||
|
XSLT_CFLAGS="`$XSLTCONFIG --cflags`"
|
||||||
|
save_LIBS="$LIBS"
|
||||||
|
save_CFLAGS="$CFLAGS"
|
||||||
|
LIBS="$LIBS $XSLT_LIBS"
|
||||||
|
CFLAGS="$CFLAGS $XSLT_CFLAGS"
|
||||||
|
AC_CHECK_FUNC(xsltParseStylesheetFile,, [AC_MSG_ERROR([There was a problem linking with libxslt])])
|
||||||
|
LIBS="$save_LIBS"
|
||||||
|
CFLAGS="$save_CFLAGS"
|
||||||
|
save_LIBS=
|
||||||
|
save_CFLAGS=
|
||||||
|
else
|
||||||
|
AC_MSG_ERROR([xslt-config could not be found])
|
||||||
|
fi
|
||||||
|
|
||||||
AC_ARG_WITH(xml-config,
|
AC_ARG_WITH(xml-config,
|
||||||
[ --with-xml-config=PATH use xml-config in PATH to find libxml ],
|
[ --with-xml-config=PATH use xml-config in PATH to find libxml ],
|
||||||
[if ! test -x "$with_xml_config"
|
[if ! test -x "$with_xml_config"
|
||||||
@ -118,9 +147,11 @@ AM_PATH_VORBIS(, AC_MSG_ERROR(must have Vorbis installed!))
|
|||||||
|
|
||||||
dnl Make substitutions
|
dnl Make substitutions
|
||||||
|
|
||||||
|
AC_SUBST(XSLT_CFLAGS)
|
||||||
AC_SUBST(XML_CFLAGS)
|
AC_SUBST(XML_CFLAGS)
|
||||||
AC_SUBST(OGG_CFLAGS)
|
AC_SUBST(OGG_CFLAGS)
|
||||||
AC_SUBST(VORBIS_CFLAGS)
|
AC_SUBST(VORBIS_CFLAGS)
|
||||||
|
AC_SUBST(XSLT_LIBS)
|
||||||
AC_SUBST(XML_LIBS)
|
AC_SUBST(XML_LIBS)
|
||||||
AC_SUBST(OGG_LIBS)
|
AC_SUBST(OGG_LIBS)
|
||||||
AC_SUBST(VORBIS_LIBS)
|
AC_SUBST(VORBIS_LIBS)
|
||||||
|
@ -308,10 +308,6 @@ void *source_main(void *arg)
|
|||||||
client_node = avl_get_next(client_node);
|
client_node = avl_get_next(client_node);
|
||||||
avl_delete(source->client_tree, (void *)client, _free_client);
|
avl_delete(source->client_tree, (void *)client, _free_client);
|
||||||
listeners--;
|
listeners--;
|
||||||
global_lock();
|
|
||||||
global.clients--;
|
|
||||||
global_unlock();
|
|
||||||
stats_event_dec(NULL, "clients");
|
|
||||||
stats_event_args(source->mount, "listeners", "%d", listeners);
|
stats_event_args(source->mount, "listeners", "%d", listeners);
|
||||||
DEBUG0("Client removed");
|
DEBUG0("Client removed");
|
||||||
continue;
|
continue;
|
||||||
@ -410,6 +406,11 @@ static int _remove_client(void *key)
|
|||||||
static int _free_client(void *key)
|
static int _free_client(void *key)
|
||||||
{
|
{
|
||||||
client_t *client = (client_t *)key;
|
client_t *client = (client_t *)key;
|
||||||
|
|
||||||
|
global_lock();
|
||||||
|
global.clients--;
|
||||||
|
global_unlock();
|
||||||
|
stats_event_dec(NULL, "clients");
|
||||||
|
|
||||||
client_destroy(client);
|
client_destroy(client);
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user