You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@openmeetings.apache.org by so...@apache.org on 2014/01/04 09:10:08 UTC

svn commit: r1555332 - in /openmeetings/trunk/singlewebapp: WebContent/swf10/video/baseVideoObject.lzx src/main/java/org/apache/openmeetings/remote/MainService.java

Author: solomax
Date: Sat Jan  4 08:10:08 2014
New Revision: 1555332

URL: http://svn.apache.org/r1555332
Log:
[OPENMEETINGS-337] Client object was not saved after loginWicket call

Modified:
    openmeetings/trunk/singlewebapp/WebContent/swf10/video/baseVideoObject.lzx
    openmeetings/trunk/singlewebapp/src/main/java/org/apache/openmeetings/remote/MainService.java

Modified: openmeetings/trunk/singlewebapp/WebContent/swf10/video/baseVideoObject.lzx
URL: http://svn.apache.org/viewvc/openmeetings/trunk/singlewebapp/WebContent/swf10/video/baseVideoObject.lzx?rev=1555332&r1=1555331&r2=1555332&view=diff
==============================================================================
--- openmeetings/trunk/singlewebapp/WebContent/swf10/video/baseVideoObject.lzx (original)
+++ openmeetings/trunk/singlewebapp/WebContent/swf10/video/baseVideoObject.lzx Sat Jan  4 08:10:08 2014
@@ -230,12 +230,14 @@
 	    	}
 		]]>
 		</method>
+		
 		<method name="setVideouserProfilePic" args="value">
 			if ($debug) Debug.write("### setVideouserProfilePic ",value);
 			this.deleteVideoConfProfilePic();
 			new lz.videoUserProfilePicSWF10(this._chatvideoinner,{name:'userProfilePic',value:value});
 			this.showUserProfilePic = true;
 		</method>
+		
 		<method name="deleteVideoConfProfilePic">
 			if ($debug) Debug.write("### deleteVideoConfProfilePic ###");
 			if ($debug) Debug.write("delete ",this.showUserProfilePic);

Modified: openmeetings/trunk/singlewebapp/src/main/java/org/apache/openmeetings/remote/MainService.java
URL: http://svn.apache.org/viewvc/openmeetings/trunk/singlewebapp/src/main/java/org/apache/openmeetings/remote/MainService.java?rev=1555332&r1=1555331&r2=1555332&view=diff
==============================================================================
--- openmeetings/trunk/singlewebapp/src/main/java/org/apache/openmeetings/remote/MainService.java (original)
+++ openmeetings/trunk/singlewebapp/src/main/java/org/apache/openmeetings/remote/MainService.java Sat Jan  4 08:10:08 2014
@@ -169,7 +169,8 @@ public class MainService implements IPen
 		User u = userId == null ? null : usersDao.get(userId);
 		if (u != null) {
 			IConnection current = Red5.getConnectionLocal();
-			Client currentClient = sessionManager.getClientByStreamId(current.getClient().getId(), null);
+			String streamId = current.getClient().getId();
+			Client currentClient = sessionManager.getClientByStreamId(streamId, null);
 			
 			if (!u.getOrganisation_users().isEmpty()) {
 				u.setSessionData(sessiondataDao.getSessionByHash(wicketSID));
@@ -179,6 +180,7 @@ public class MainService implements IPen
 			
 				currentClient.setFirstname(u.getFirstname());
 				currentClient.setLastname(u.getLastname());
+				sessionManager.updateClientByStreamId(streamId, currentClient, false, null);
 				
 				scopeApplicationAdapter.syncMessageToCurrentScope("roomConnect", currentClient, false);
 				
@@ -192,8 +194,7 @@ public class MainService implements IPen
 		try {
 
 			log.debug("############### secureLoginByRemote " + secureHash);
-			System.out.println("############### secureLoginByRemote "
-					+ secureHash);
+			System.out.println("############### secureLoginByRemote " + secureHash);
 
 			String clientURL = Red5.getConnectionLocal().getRemoteAddress();
 
@@ -221,27 +222,21 @@ public class MainService implements IPen
 
 			IConnection current = Red5.getConnectionLocal();
 			String streamId = current.getClient().getId();
-			Client currentClient = this.sessionManager
-					.getClientByStreamId(streamId, null);
+			Client currentClient = sessionManager.getClientByStreamId(streamId, null);
 
 			if (currentClient.getUser_id() != null) {
 				sessiondataDao.updateUser(SID, currentClient.getUser_id());
 			}
 
 			currentClient.setAllowRecording(soapLogin.getAllowRecording());
-			this.sessionManager.updateClientByStreamId(streamId,
-					currentClient, false, null);
+			sessionManager.updateClientByStreamId(streamId, currentClient, false, null);
 
 			if (loginReturn == null) {
-
-				log.debug("loginReturn IS NULL for SID: "
-						+ soapLogin.getSessionHash());
+				log.debug("loginReturn IS NULL for SID: " + soapLogin.getSessionHash());
 
 				return -1L;
 			} else if (loginReturn < 0) {
-
-				log.debug("loginReturn IS < 0 for SID: "
-						+ soapLogin.getSessionHash());
+				log.debug("loginReturn IS < 0 for SID: " + soapLogin.getSessionHash());
 
 				return loginReturn;
 			} else {
@@ -260,18 +255,13 @@ public class MainService implements IPen
 				SOAPLogin returnSoapLogin = new SOAPLogin();
 
 				returnSoapLogin.setRoom_id(soapLogin.getRoom_id());
-				returnSoapLogin.setBecomemoderator(soapLogin
-						.getBecomemoderator());
-				returnSoapLogin.setShowAudioVideoTest(soapLogin
-						.getShowAudioVideoTest());
-				returnSoapLogin.setRoomRecordingId(soapLogin
-						.getRoomRecordingId());
-				returnSoapLogin.setShowNickNameDialog(soapLogin
-						.getShowNickNameDialog());
+				returnSoapLogin.setBecomemoderator(soapLogin.getBecomemoderator());
+				returnSoapLogin.setShowAudioVideoTest(soapLogin.getShowAudioVideoTest());
+				returnSoapLogin.setRoomRecordingId(soapLogin.getRoomRecordingId());
+				returnSoapLogin.setShowNickNameDialog(soapLogin.getShowNickNameDialog());
 				returnSoapLogin.setLandingZone(soapLogin.getLandingZone());
 
 				return returnSoapLogin;
-
 			}
 
 		} catch (Exception err) {