aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Region/Communications
diff options
context:
space:
mode:
authorHomer Horwitz2008-09-24 21:12:21 +0000
committerHomer Horwitz2008-09-24 21:12:21 +0000
commitfe9aea258ff4142e718b4916ccefeeedef229768 (patch)
treef60c40697833392b35788fbc5cd97a5014bb29b7 /OpenSim/Region/Communications
parentlight the mysql region tests (diff)
downloadopensim-SC-fe9aea258ff4142e718b4916ccefeeedef229768.zip
opensim-SC-fe9aea258ff4142e718b4916ccefeeedef229768.tar.gz
opensim-SC-fe9aea258ff4142e718b4916ccefeeedef229768.tar.bz2
opensim-SC-fe9aea258ff4142e718b4916ccefeeedef229768.tar.xz
Add persistence of active gestures. This needs an UGAIM update to work.
Active gestures are sent as part of the login-response. Added fetchActiveGestures to SQLite and MySQL; added an empty one for MSSQL and NHibernate. Using the empty ones won't cause errors, but doesn't provide persistence either, of course.
Diffstat (limited to 'OpenSim/Region/Communications')
-rw-r--r--OpenSim/Region/Communications/Local/LocalLoginService.cs30
1 files changed, 30 insertions, 0 deletions
diff --git a/OpenSim/Region/Communications/Local/LocalLoginService.cs b/OpenSim/Region/Communications/Local/LocalLoginService.cs
index ded2d56..3d09729 100644
--- a/OpenSim/Region/Communications/Local/LocalLoginService.cs
+++ b/OpenSim/Region/Communications/Local/LocalLoginService.cs
@@ -142,6 +142,9 @@ namespace OpenSim.Region.Communications.Local
142 /// <param name="startLocationRequest">The requested start location</param> 142 /// <param name="startLocationRequest">The requested start location</param>
143 public override bool CustomiseResponse(LoginResponse response, UserProfileData theUser, string startLocationRequest) 143 public override bool CustomiseResponse(LoginResponse response, UserProfileData theUser, string startLocationRequest)
144 { 144 {
145 // add active gestures to login-response
146 AddActiveGestures(response, theUser);
147
145 // HomeLocation 148 // HomeLocation
146 RegionInfo homeInfo = null; 149 RegionInfo homeInfo = null;
147 150
@@ -255,6 +258,33 @@ namespace OpenSim.Region.Communications.Local
255 } 258 }
256 259
257 /// <summary> 260 /// <summary>
261 /// Add active gestures of the user to the login response.
262 /// </summary>
263 /// <param name="response">
264 /// A <see cref="LoginResponse"/>
265 /// </param>
266 /// <param name="theUser">
267 /// A <see cref="UserProfileData"/>
268 /// </param>
269 private void AddActiveGestures(LoginResponse response, UserProfileData theUser)
270 {
271 List<InventoryItemBase> gestures = m_interServiceInventoryService.GetActiveGestures(theUser.ID);
272 m_log.DebugFormat("[LOGIN]: AddActiveGestures, found {0}", gestures == null ? 0 : gestures.Count);
273 ArrayList list = new ArrayList();
274 if (gestures != null)
275 {
276 foreach (InventoryItemBase gesture in gestures)
277 {
278 Hashtable item = new Hashtable();
279 item["item_id"] = gesture.ID.ToString();
280 item["asset_id"] = gesture.AssetID.ToString();
281 list.Add(item);
282 }
283 }
284 response.ActiveGestures = list;
285 }
286
287 /// <summary>
258 /// Prepare a login to the given region. This involves both telling the region to expect a connection 288 /// Prepare a login to the given region. This involves both telling the region to expect a connection
259 /// and appropriately customising the response to the user. 289 /// and appropriately customising the response to the user.
260 /// </summary> 290 /// </summary>