[xiph-cvs] cvs commit: icecast/src source.c

Michael Smith msmith at xiph.org
Sun Aug 11 05:15:40 PDT 2002



msmith      02/08/11 08:15:40

  Modified:    .        configure.in
               src      source.c
  Log:
  Decrement client connections on source termination to avoid eventual "server
  is full" messages.

Revision  Changes    Path
1.14      +31 -0     icecast/configure.in

Index: configure.in
===================================================================
RCS file: /usr/local/cvsroot/icecast/configure.in,v
retrieving revision 1.13
retrieving revision 1.14
diff -u -r1.13 -r1.14
--- configure.in	14 May 2002 11:06:53 -0000	1.13
+++ configure.in	11 Aug 2002 12:15:40 -0000	1.14
@@ -84,6 +84,35 @@
 
 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,
   [  --with-xml-config=PATH  use xml-config in PATH to find libxml ],
   [if ! test -x "$with_xml_config"
@@ -118,9 +147,11 @@
 
 dnl Make substitutions
 
+AC_SUBST(XSLT_CFLAGS)
 AC_SUBST(XML_CFLAGS)
 AC_SUBST(OGG_CFLAGS)
 AC_SUBST(VORBIS_CFLAGS)
+AC_SUBST(XSLT_LIBS)
 AC_SUBST(XML_LIBS)
 AC_SUBST(OGG_LIBS)
 AC_SUBST(VORBIS_LIBS)

<p><p>1.19      +5 -4      icecast/src/source.c

Index: source.c
===================================================================
RCS file: /usr/local/cvsroot/icecast/src/source.c,v
retrieving revision 1.18
retrieving revision 1.19
diff -u -r1.18 -r1.19
--- source.c	10 Aug 2002 08:01:56 -0000	1.18
+++ source.c	11 Aug 2002 12:15:40 -0000	1.19
@@ -308,10 +308,6 @@
                                 client_node = avl_get_next(client_node);
                                 avl_delete(source->client_tree, (void *)client, _free_client);
                                 listeners--;
-				global_lock();
-				global.clients--;
-				global_unlock();
-				stats_event_dec(NULL, "clients");
                                 stats_event_args(source->mount, "listeners", "%d", listeners);
                 DEBUG0("Client removed");
                                 continue;
@@ -410,6 +406,11 @@
 static int _free_client(void *key)
 {
         client_t *client = (client_t *)key;
+
+	global_lock();
+	global.clients--;
+	global_unlock();
+	stats_event_dec(NULL, "clients");
         
         client_destroy(client);
         

<p><p>--- >8 ----
List archives:  http://www.xiph.org/archives/
Ogg project homepage: http://www.xiph.org/ogg/
To unsubscribe from this list, send a message to 'cvs-request at xiph.org'
containing only the word 'unsubscribe' in the body.  No subject is needed.
Unsubscribe messages sent to the list will be ignored/filtered.



More information about the commits mailing list