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

karl at motherfish-iii.xiph.org karl at motherfish-iii.xiph.org
Thu Nov 18 11:47:40 PST 2004


Author: karl
Date: 2004-11-18 11:47:39 -0800 (Thu, 18 Nov 2004)
New Revision: 8223

Modified:
   icecast/trunk/icecast/src/admin.c
Log:
missing test from a previous patch, the running check needs to apply as well


Modified: icecast/trunk/icecast/src/admin.c
===================================================================
--- icecast/trunk/icecast/src/admin.c	2004-11-18 19:45:51 UTC (rev 8222)
+++ icecast/trunk/icecast/src/admin.c	2004-11-18 19:47:39 UTC (rev 8223)
@@ -339,16 +339,23 @@
         }
         else
         {
-            if (!source->shoutcast_compat) {
-                if (source->running == 0)
-                {
-                    INFO2("Received admin command %s on unavailable mount \"%s\"",
-                            command_string, mount);
-                    avl_tree_unlock (global.source_tree);
-                    client_send_400 (client, "Source is not available");
-                    return;
-                }
+            if (source->running == 0)
+            {
+                avl_tree_unlock (global.source_tree);
+                INFO2("Received admin command %s on unavailable mount \"%s\"",
+                        command_string, mount);
+                client_send_400 (client, "Source is not available");
+                return;
             }
+            if (command == COMMAND_SHOUTCAST_METADATA_UPDATE &&
+                    source->shoutcast_compat == 0)
+            {
+                avl_tree_unlock (global.source_tree);
+                ERROR0 ("illegal change of metadata on non-shoutcast "
+                        "compatible stream");
+                client_send_400 (client, "illegal metadata call");
+                return;
+            }
             INFO2("Received admin command %s on mount \"%s\"", 
                     command_string, mount);
             admin_handle_mount_request(client, source, command);



More information about the commits mailing list