[xiph-commits] r14777 - in icecast/trunk/icecast: . conf src

karl at svn.xiph.org karl at svn.xiph.org
Fri Apr 18 19:04:17 PDT 2008


Author: karl
Date: 2008-04-18 19:04:17 -0700 (Fri, 18 Apr 2008)
New Revision: 14777

Modified:
   icecast/trunk/icecast/conf/icecast.xml.in
   icecast/trunk/icecast/configure.in
   icecast/trunk/icecast/src/cfgfile.c
   icecast/trunk/icecast/src/yp.c
Log:
Small cleanups.  Prevent possible segv in relay definition if missing server tag.
Don't add to stream directory until a minute has passed, it seems like a few sites
are triggering YP requests because they are connecting and then dropping (probably
due to timeout), so at least make sure the stream is running a little while.


Modified: icecast/trunk/icecast/conf/icecast.xml.in
===================================================================
--- icecast/trunk/icecast/conf/icecast.xml.in	2008-04-19 01:54:11 UTC (rev 14776)
+++ icecast/trunk/icecast/conf/icecast.xml.in	2008-04-19 02:04:17 UTC (rev 14777)
@@ -31,6 +31,12 @@
         <admin-password>hackme</admin-password>
     </authentication>
 
+    <!-- set the mountpoint for a shoutcast source to use, the default if not
+         specified is /stream but you can change it here if an alternative is
+         wanted or an extension is required
+    <shoutcast-mount>/live.nsv</shoutcast-mount>
+    -->
+
     <!-- Uncomment this if you want directory listings -->
     <!--
     <directory>
@@ -117,12 +123,6 @@
 
     <fileserve>1</fileserve>
 
-    <!-- set the mountpoint for a shoutcast source to use, the default if not
-         specified is /stream but you can change it here if an alternative is
-         wanted or an extension is required
-    <shoutcast-mount>/live.nsv</shoutcast-mount>
-    -->
-
     <paths>
 		<!-- basedir is only used if chroot is enabled -->
         <basedir>@pkgdatadir@</basedir>

Modified: icecast/trunk/icecast/configure.in
===================================================================
--- icecast/trunk/icecast/configure.in	2008-04-19 01:54:11 UTC (rev 14776)
+++ icecast/trunk/icecast/configure.in	2008-04-19 02:04:17 UTC (rev 14777)
@@ -31,12 +31,14 @@
 
 dnl Checks for header files.
 AC_HEADER_STDC
+AC_HEADER_TIME
 
 AC_CHECK_HEADERS([alloca.h])
 AC_CHECK_HEADERS(pwd.h, AC_DEFINE(CHUID, 1, [Define if you have pwd.h]),,)
 AC_CHECK_HEADERS(unistd.h, AC_DEFINE(CHROOT, 1, [Define if you have unistd.h]),,)
 
 dnl Checks for typedefs, structures, and compiler characteristics.
+XIPH_C__FUNC__
 
 dnl Check for types
 

Modified: icecast/trunk/icecast/src/cfgfile.c
===================================================================
--- icecast/trunk/icecast/src/cfgfile.c	2008-04-19 01:54:11 UTC (rev 14776)
+++ icecast/trunk/icecast/src/cfgfile.c	2008-04-19 02:04:17 UTC (rev 14777)
@@ -728,6 +728,7 @@
     relay->next = NULL;
     relay->mp3metadata = 1;
     relay->on_demand = configuration->on_demand;
+    relay->server = (char *)xmlCharStrdup ("127.0.0.1");
     relay->mount = (char *)xmlCharStrdup ("/");
 
     do {

Modified: icecast/trunk/icecast/src/yp.c
===================================================================
--- icecast/trunk/icecast/src/yp.c	2008-04-19 01:54:11 UTC (rev 14776)
+++ icecast/trunk/icecast/src/yp.c	2008-04-19 02:04:17 UTC (rev 14777)
@@ -406,7 +406,6 @@
         /* force first touch in 5 secs */
         yp->next_update = time(NULL) + 5;
     }
-
     return ret;
 }
 
@@ -480,7 +479,7 @@
 
 static int process_ypdata (struct yp_server *server, ypdata_t *yp)
 {
-    unsigned len = 512;
+    unsigned len = 1024;
     char *s = NULL, *tmp;
 
     if (now < yp->next_update)
@@ -501,7 +500,7 @@
         }
 
         ret = yp->process (yp, s, len);
-        if (ret == 0)
+        if (ret <= 0)
         {
            free (s);
            return ret;
@@ -882,7 +881,7 @@
                 yp->server = server;
                 yp->touch_interval = server->touch_interval;
                 yp->next = server->pending_mounts;
-                yp->next_update = time(NULL) + 5;
+                yp->next_update = time(NULL) + 60;
                 server->pending_mounts = yp;
                 yp_update = 1;
             }



More information about the commits mailing list