[xiph-commits] r9174 - icecast/branches/kh/icecast/src

karl at motherfish-iii.xiph.org karl at motherfish-iii.xiph.org
Sat Apr 23 17:38:44 PDT 2005


Author: karl
Date: 2005-04-23 17:38:41 -0700 (Sat, 23 Apr 2005)
New Revision: 9174

Modified:
   icecast/branches/kh/icecast/src/source.c
Log:
add safety check for moving clients. make sure src and dest are not the same


Modified: icecast/branches/kh/icecast/src/source.c
===================================================================
--- icecast/branches/kh/icecast/src/source.c	2005-04-23 18:20:50 UTC (rev 9173)
+++ icecast/branches/kh/icecast/src/source.c	2005-04-24 00:38:41 UTC (rev 9174)
@@ -339,6 +339,11 @@
 void source_move_clients (source_t *source, source_t *dest)
 {
     unsigned int count = 0;
+    if (strcmp (source->mount, dest->mount) == 0)
+    {
+        WARN1 ("src and dst are the same \"%s\", skipping", source->mount);
+        return;
+    }
     /* we don't want the two write locks to deadlock in here */
     thread_mutex_lock (&move_clients_mutex);
     thread_mutex_lock (&dest->lock);



More information about the commits mailing list