openmeetings-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From solo...@apache.org
Subject svn commit: r1442844 - /openmeetings/trunk/singlewebapp/src/org/apache/openmeetings/remote/red5/ScopeApplicationAdapter.java
Date Wed, 06 Feb 2013 05:27:50 GMT
Author: solomax
Date: Wed Feb  6 05:27:49 2013
New Revision: 1442844

URL: http://svn.apache.org/viewvc?rev=1442844&view=rev
Log:
ScopeApplicationAdapter.listRoomBroadcast method return all ids doubled, fixed.

Modified:
    openmeetings/trunk/singlewebapp/src/org/apache/openmeetings/remote/red5/ScopeApplicationAdapter.java

Modified: openmeetings/trunk/singlewebapp/src/org/apache/openmeetings/remote/red5/ScopeApplicationAdapter.java
URL: http://svn.apache.org/viewvc/openmeetings/trunk/singlewebapp/src/org/apache/openmeetings/remote/red5/ScopeApplicationAdapter.java?rev=1442844&r1=1442843&r2=1442844&view=diff
==============================================================================
--- openmeetings/trunk/singlewebapp/src/org/apache/openmeetings/remote/red5/ScopeApplicationAdapter.java
(original)
+++ openmeetings/trunk/singlewebapp/src/org/apache/openmeetings/remote/red5/ScopeApplicationAdapter.java
Wed Feb  6 05:27:49 2013
@@ -23,6 +23,7 @@ import java.util.ArrayList;
 import java.util.Collection;
 import java.util.Date;
 import java.util.HashMap;
+import java.util.HashSet;
 import java.util.Iterator;
 import java.util.LinkedList;
 import java.util.List;
@@ -419,7 +420,7 @@ public class ScopeApplicationAdapter ext
 	}
 
     public synchronized List<Integer> listRoomBroadcast() {
-        List<Integer> broadcastList = new ArrayList<Integer>();
+    	HashSet<Integer> broadcastList = new HashSet<Integer>();
         IConnection current = Red5.getConnectionLocal();
         String streamid = current.getClient().getId();
         Collection<Set<IConnection>> conCollection = current.getScope().getConnections();
@@ -442,13 +443,16 @@ public class ScopeApplicationAdapter ext
                             // as it will be already triggered
                             // in the result of this Function
                             // in the Client
-                            broadcastList.add(Long.valueOf(rcl.getBroadCastID()).intValue());
+                        	Long id = Long.valueOf(rcl.getBroadCastID());
+                        	if (id != null && !broadcastList.contains(id)) {
+                        		broadcastList.add(id.intValue());
+                        	}
                         }
                     }
                 }
             }
         }
-        return broadcastList;
+        return new ArrayList<Integer>(broadcastList);
     }
 
 



Mime
View raw message