Author: sebawagner
Date: Thu Apr 19 19:04:27 2012
New Revision: 1328079
URL: http://svn.apache.org/viewvc?rev=1328079&view=rev
Log:
OPENMEETINGS-179 User Not Removed from chat participants window after logout..
Modified:
incubator/openmeetings/trunk/singlewebapp/src/org/openmeetings/app/data/user/Usermanagement.java
incubator/openmeetings/trunk/singlewebapp/src/org/openmeetings/app/remote/MainService.java
incubator/openmeetings/trunk/singlewebapp/src/org/openmeetings/app/remote/UserService.java
incubator/openmeetings/trunk/singlewebapp/src/org/openmeetings/app/remote/red5/ScopeApplicationAdapter.java
Modified:
incubator/openmeetings/trunk/singlewebapp/src/org/openmeetings/app/data/user/Usermanagement.java
URL:
http://svn.apache.org/viewvc/incubator/openmeetings/trunk/singlewebapp/src/org/openmeetings/app/data/user/Usermanagement.java?rev=1328079&r1=1328078&r2=1328079&view=diff
==============================================================================
---
incubator/openmeetings/trunk/singlewebapp/src/org/openmeetings/app/data/user/Usermanagement.java
(original)
+++
incubator/openmeetings/trunk/singlewebapp/src/org/openmeetings/app/data/user/Usermanagement.java
Thu Apr 19 19:04:27 2012
@@ -1651,7 +1651,7 @@ public class Usermanagement {
}
IScope currentScope =
scopeApplicationAdapter
.getRoomScope(scopeName);
-
scopeApplicationAdapter.roomLeaveByScope(rcl, currentScope);
+
scopeApplicationAdapter.roomLeaveByScope(rcl, currentScope, true);
HashMap<Integer, String> messageObj =
new HashMap<Integer, String>();
messageObj.put(0, "kick");
@@ -1696,7 +1696,7 @@ public class Usermanagement {
scopeApplicationAdapter.sendMessageById(messageObj,
rcl.getStreamid(),
currentScope);
- scopeApplicationAdapter.roomLeaveByScope(rcl,
currentScope);
+ scopeApplicationAdapter.roomLeaveByScope(rcl,
currentScope, true);
return true;
}
Modified:
incubator/openmeetings/trunk/singlewebapp/src/org/openmeetings/app/remote/MainService.java
URL:
http://svn.apache.org/viewvc/incubator/openmeetings/trunk/singlewebapp/src/org/openmeetings/app/remote/MainService.java?rev=1328079&r1=1328078&r2=1328079&view=diff
==============================================================================
---
incubator/openmeetings/trunk/singlewebapp/src/org/openmeetings/app/remote/MainService.java
(original)
+++
incubator/openmeetings/trunk/singlewebapp/src/org/openmeetings/app/remote/MainService.java
Thu Apr 19 19:04:27 2012
@@ -689,12 +689,21 @@ public class MainService implements IPen
* @return string value if completed
*/
public Long logoutUser(String SID) {
- Long users_id = sessionManagement.checkSession(SID);
- IConnection current = Red5.getConnectionLocal();
- RoomClient currentClient = this.clientListManager
-
.getClientByStreamId(current.getClient().getId());
- currentClient.setUserObject(null, null, null, null);
- return userManagement.logout(SID, users_id);
+ try {
+ Long users_id = sessionManagement.checkSession(SID);
+ IConnection current = Red5.getConnectionLocal();
+ RoomClient currentClient = this.clientListManager
+
.getClientByStreamId(current.getClient().getId());
+
+
scopeApplicationAdapter.roomLeaveByScope(currentClient,current.getScope(),
false);
+
+ currentClient.setUserObject(null, null, null, null);
+
+ return userManagement.logout(SID, users_id);
+ } catch (Exception err) {
+ log.error("[logoutUser]",err);
+ }
+ return -1L;
}
/**
Modified:
incubator/openmeetings/trunk/singlewebapp/src/org/openmeetings/app/remote/UserService.java
URL:
http://svn.apache.org/viewvc/incubator/openmeetings/trunk/singlewebapp/src/org/openmeetings/app/remote/UserService.java?rev=1328079&r1=1328078&r2=1328079&view=diff
==============================================================================
---
incubator/openmeetings/trunk/singlewebapp/src/org/openmeetings/app/remote/UserService.java
(original)
+++
incubator/openmeetings/trunk/singlewebapp/src/org/openmeetings/app/remote/UserService.java
Thu Apr 19 19:04:27 2012
@@ -533,7 +533,7 @@ public class UserService {
streamid, currentScope);
this.scopeApplicationAdapter
- .roomLeaveByScope(rcl,
currentScope);
+ .roomLeaveByScope(rcl,
currentScope, true);
return true;
}
@@ -1614,7 +1614,7 @@ public class UserService {
rcl.getStreamid(),
currentScope);
this.scopeApplicationAdapter
- .roomLeaveByScope(rcl,
currentScope);
+ .roomLeaveByScope(rcl,
currentScope, true);
return true;
}
Modified:
incubator/openmeetings/trunk/singlewebapp/src/org/openmeetings/app/remote/red5/ScopeApplicationAdapter.java
URL:
http://svn.apache.org/viewvc/incubator/openmeetings/trunk/singlewebapp/src/org/openmeetings/app/remote/red5/ScopeApplicationAdapter.java?rev=1328079&r1=1328078&r2=1328079&view=diff
==============================================================================
---
incubator/openmeetings/trunk/singlewebapp/src/org/openmeetings/app/remote/red5/ScopeApplicationAdapter.java
(original)
+++
incubator/openmeetings/trunk/singlewebapp/src/org/openmeetings/app/remote/red5/ScopeApplicationAdapter.java
Thu Apr 19 19:04:27 2012
@@ -530,7 +530,7 @@ public class ScopeApplicationAdapter ext
// logicalRoomLeave
if (currentClient != null) {
log.debug("currentClient IS NOT NULL");
- this.roomLeaveByScope(currentClient, room);
+ this.roomLeaveByScope(currentClient, room,
true);
}
} catch (Exception err) {
@@ -558,7 +558,7 @@ public class ScopeApplicationAdapter ext
RoomClient currentClient = this.clientListManager
.getClientByStreamId(streamid);
- this.roomLeaveByScope(currentClient,
current.getScope());
+ this.roomLeaveByScope(currentClient,
current.getScope(), true);
} catch (Exception err) {
log.error("[logicalRoomLeave]", err);
@@ -569,11 +569,14 @@ public class ScopeApplicationAdapter ext
* Removes the Client from the List, stops recording, adds the
Room-Leave
* event to running recordings, clear Polls and removes Client from any
list
*
+ * This function is kind of private/protected as the client won't be
able
+ * to call it with proper values.
+ *
* @param currentClient
* @param currentScope
*/
public synchronized void roomLeaveByScope(RoomClient currentClient,
- IScope currentScope) {
+ IScope currentScope, boolean removeUserFromSessionList)
{
try {
log.debug("currentClient " + currentClient);
@@ -692,7 +695,9 @@ public class ScopeApplicationAdapter ext
}
}
-
this.clientListManager.removeClient(currentClient.getStreamid());
+ if (removeUserFromSessionList) {
+
this.clientListManager.removeClient(currentClient.getStreamid());
+ }
} catch (Exception err) {
log.error("[roomLeaveByScope]", err);
}