Author: seba.wagner
Date: Mon Jan 26 04:16:50 2009
New Revision: 1855

Modified:
    trunk/webapp/filetest.keystore
    trunk/webapp/src/app/org/openmeetings/app/remote/WhiteBoardService.java
    trunk/webapp/src/app/org/openmeetings/app/remote/red5/ApplicationRe.java
     
trunk/webapp/src/app/org/openmeetings/app/remote/red5/ScopeApplicationAdapter.java

Log:
Part of:
Issue 489 allow simultaneous drawing on the whiteboard for  
non-moderators/all users / rework Moderation Role
=> return self initially

Modified: trunk/webapp/filetest.keystore
==============================================================================
Binary files. No diff available.

Modified:  
trunk/webapp/src/app/org/openmeetings/app/remote/WhiteBoardService.java
==============================================================================
--- trunk/webapp/src/app/org/openmeetings/app/remote/WhiteBoardService.java     
 
(original)
+++ trunk/webapp/src/app/org/openmeetings/app/remote/WhiteBoardService.java     
 
Mon Jan 26 04:16:50 2009
@@ -441,7 +441,7 @@
                                
                                log.debug("scope "+scope);
                                
-                               if (numberOfInitial==0){
+                               if (numberOfInitial==0 && scope != null){
                                        Iterator<IConnection> it = 
scope.getConnections();
                                        while (it.hasNext()) {
                                                IConnection conn = it.next();
@@ -474,7 +474,7 @@
                                
                                int numberOfImageLoaders =  
this.whiteBoardObjectListManager.getWhiteBoardObjectSyncListByRoomid(room_id).size();
                                
-                               if (numberOfImageLoaders==0){
+                               if (numberOfImageLoaders==0 && scope != null){
                                        Iterator<IConnection> it = 
scope.getConnections();
                                        while (it.hasNext()) {
                                                IConnection conn = it.next();
@@ -533,5 +533,6 @@
                // TODO Auto-generated method stub
                log.debug("resultReceived: "+arg0);
        }
+

  }

Modified:  
trunk/webapp/src/app/org/openmeetings/app/remote/red5/ApplicationRe.java
==============================================================================
---  
trunk/webapp/src/app/org/openmeetings/app/remote/red5/ApplicationRe.java        
 
(original)
+++  
trunk/webapp/src/app/org/openmeetings/app/remote/red5/ApplicationRe.java        
 
Mon Jan 26 04:16:50 2009
@@ -345,9 +345,9 @@
                        
                        
                        //Remove User from Sync List's
-                       if (room_id != null) {
-                               
WhiteBoardService.getInstance().removeUserFromAllLists(currentScope,  
currentClient);
-                       }
+//                     if (room_id != null) {
+//                             
WhiteBoardService.getInstance().removeUserFromAllLists(currentScope,  
currentClient);
+//                     }

                        //String streamid = currentClient.getStreamid();
                        

Modified:  
trunk/webapp/src/app/org/openmeetings/app/remote/red5/ScopeApplicationAdapter.java
==============================================================================
---  
trunk/webapp/src/app/org/openmeetings/app/remote/red5/ScopeApplicationAdapter.java
       
(original)
+++  
trunk/webapp/src/app/org/openmeetings/app/remote/red5/ScopeApplicationAdapter.java
       
Mon Jan 26 04:16:50 2009
@@ -262,40 +262,33 @@
                        
                        log.debug("currentScope "+currentScope);
                        
-                       if (currentScope == null ) {
-                               return;
-                       }
-                       log.debug("currentScope 
"+currentScope.getConnections());
-                       if (currentScope.getConnections() == null ) {
-                               return;
-                       }
-                       
-                       //Notify Users of the current Scope
-                       Iterator<IConnection> it = 
currentScope.getConnections();
-                       while (it.hasNext()) {
-                               log.debug("hasNext == true");
-                               IConnection cons = it.next();
-                               log.debug("cons Host: "+cons);
-                               if (cons instanceof IServiceCapableConnection) {
-                                       
-                                       log.debug("sending roomDisconnect to " 
+ cons);
-                                       RoomClient rcl =  
this.clientListManager.getClientByStreamId(cons.getClient().getId());
-                                       
-                                       if 
(!currentClient.getStreamid().equals(rcl.getStreamid())){
-                                               //Send to all connected users   
-                                               ((IServiceCapableConnection) 
cons).invoke("roomDisconnect",new  
Object[] { currentClient }, this);
+                       if (currentScope != null && 
currentScope.getConnections() != null) {
+                               //Notify Users of the current Scope
+                               Iterator<IConnection> it = 
currentScope.getConnections();
+                               while (it.hasNext()) {
+                                       log.debug("hasNext == true");
+                                       IConnection cons = it.next();
+                                       log.debug("cons Host: "+cons);
+                                       if (cons instanceof 
IServiceCapableConnection) {
+                                               
                                                log.debug("sending 
roomDisconnect to " + cons);
-                                               //add Notification if another 
user is recording
-                                               
log.debug("###########[roomLeave]");
-                                               if (rcl.getIsRecording()){
-                                                       log.debug("*** 
roomLeave Any Client is Recording - stop that");
-                                                       
StreamService.addRoomClientEnterEventFunc(rcl,  
rcl.getRoomRecordingName(), rcl.getUserip(), false);
-                                                       
StreamService.stopRecordingShowForClient(cons, currentClient,  
rcl.getRoomRecordingName(), false);
+                                               RoomClient rcl =  
this.clientListManager.getClientByStreamId(cons.getClient().getId());
+                                               
+                                               if 
(!currentClient.getStreamid().equals(rcl.getStreamid())){
+                                                       //Send to all connected 
users   
+                                                       
((IServiceCapableConnection) cons).invoke("roomDisconnect",new  
Object[] { currentClient }, this);
+                                                       log.debug("sending 
roomDisconnect to " + cons);
+                                                       //add Notification if 
another user is recording
+                                                       
log.debug("###########[roomLeave]");
+                                                       if 
(rcl.getIsRecording()){
+                                                               log.debug("*** 
roomLeave Any Client is Recording - stop that");
+                                                               
StreamService.addRoomClientEnterEventFunc(rcl,  
rcl.getRoomRecordingName(), rcl.getUserip(), false);
+                                                               
StreamService.stopRecordingShowForClient(cons, currentClient,  
rcl.getRoomRecordingName(), false);
+                                                       }
                                                }
                                        }
-                               }
-                       }       
-                       
+                               }       
+                       }
                        
                        //Remove User AFTER cause otherwise the currentClient 
Object is NULL ?!
                        
this.clientListManager.removeClient(currentClient.getStreamid());
@@ -602,15 +595,15 @@
                                log.debug("#+#+#+#+##+## logicalRoomEnter 
ClientList  
key: "+rcl.getRoom_id()+" "+room_id);
                                //Check if the Client is in the same room and 
same domain
                                //and is not the same like we have just 
declared to be moderating this  
room
-                               if(!streamid.equals(rcl.getStreamid())){
+                               //if(!streamid.equals(rcl.getStreamid())){
                                        log.debug("set to ++ for client: 
"+rcl.getStreamid()+" "+roomcount);
                                        roomcount++;
                                        //Add user to List
                                        roomClientList.put(key, rcl);
-                               }                               
+                               //}                             
                        }
                        
-                       if (roomcount==0){
+                       if (roomcount==1){
                                log.debug("Room is empty so set this user to be 
moderation role");
                                currentClient.setIsMod(true);
                                
this.clientListManager.updateClientByStreamId(streamid, currentClient);

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"OpenMeetings developers" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to 
[email protected]
For more options, visit this group at 
http://groups.google.com/group/openmeetings-dev?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to