[xiph-commits] r9488 - icecast/trunk/icecast/src

karl at motherfish-iii.xiph.org karl at motherfish-iii.xiph.org
Sun Jun 19 06:50:41 PDT 2005


Author: karl
Date: 2005-06-19 06:50:39 -0700 (Sun, 19 Jun 2005)
New Revision: 9488

Modified:
   icecast/trunk/icecast/src/yp.c
Log:
allow touch frequency setting to be changed on any YP response. Also pass
user agent to YP server


Modified: icecast/trunk/icecast/src/yp.c
===================================================================
--- icecast/trunk/icecast/src/yp.c	2005-06-18 17:38:11 UTC (rev 9487)
+++ icecast/trunk/icecast/src/yp.c	2005-06-19 13:50:39 UTC (rev 9488)
@@ -128,16 +128,16 @@
             if (yp->sid)
                 sscanf (ptr, "SID: %[^\r\n]", yp->sid);
         }
-        if (strncmp (ptr, "TouchFreq: ", 11) == 0)
-        {
-            unsigned secs;
-            sscanf (ptr, "TouchFreq: %u", &secs);
-            if (secs < 30)
-                secs = 30;
-            DEBUG1 ("server touch interval is %u", secs);
-            yp->touch_interval = secs;
-        }
     }
+    if (strncmp (ptr, "TouchFreq: ", 11) == 0)
+    {
+        unsigned secs;
+        sscanf (ptr, "TouchFreq: %u", &secs);
+        if (secs < 30)
+            secs = 30;
+        DEBUG1 ("server touch interval is %u", secs);
+        yp->touch_interval = secs;
+    }
     return (int)bytes;
 }
 
@@ -240,6 +240,7 @@
             }
             if (server->touch_interval < 30)
                 server->touch_interval = 30;
+            curl_easy_setopt (server->curl, CURLOPT_USERAGENT, ICECAST_VERSION_STRING);
             curl_easy_setopt (server->curl, CURLOPT_URL, server->url);
             curl_easy_setopt (server->curl, CURLOPT_HEADERFUNCTION, handle_returned_header);
             curl_easy_setopt (server->curl, CURLOPT_WRITEFUNCTION, handle_returned_data);



More information about the commits mailing list