aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Framework/Communications
diff options
context:
space:
mode:
authorTeravus Ovares2008-08-25 07:35:17 +0000
committerTeravus Ovares2008-08-25 07:35:17 +0000
commit2912aafe259727351eb9405532e45aa3501b7e9a (patch)
tree34774a49306ae19a6682580d41927fcfb222ea6e /OpenSim/Framework/Communications
parentMantis#2043. Thank you kindly, Ralphos for a patch that addresses: (diff)
downloadopensim-SC_OLD-2912aafe259727351eb9405532e45aa3501b7e9a.zip
opensim-SC_OLD-2912aafe259727351eb9405532e45aa3501b7e9a.tar.gz
opensim-SC_OLD-2912aafe259727351eb9405532e45aa3501b7e9a.tar.bz2
opensim-SC_OLD-2912aafe259727351eb9405532e45aa3501b7e9a.tar.xz
* This commit incorporates the heart of the OpenGridProtocol patch that is currently on Forge in a nice, friendly modular format.
* There are a lot of changes and this is quite experimental. It's off by default, but you can turn it on by examining the bottom of the opensim.ini.example for the proper OpenSim.ini settings. Remember, you still need an agent domain.. * Furthermore, it isn't quite right when it comes to teleporting to remote regions (place_avatar)
Diffstat (limited to 'OpenSim/Framework/Communications')
-rw-r--r--OpenSim/Framework/Communications/Cache/UserProfileCacheService.cs25
-rw-r--r--OpenSim/Framework/Communications/Capabilities/LLSDMethodString.cs31
-rw-r--r--OpenSim/Framework/Communications/UserManagerBase.cs5
3 files changed, 61 insertions, 0 deletions
diff --git a/OpenSim/Framework/Communications/Cache/UserProfileCacheService.cs b/OpenSim/Framework/Communications/Cache/UserProfileCacheService.cs
index 4e3840b..3b02c88 100644
--- a/OpenSim/Framework/Communications/Cache/UserProfileCacheService.cs
+++ b/OpenSim/Framework/Communications/Cache/UserProfileCacheService.cs
@@ -160,6 +160,31 @@ namespace OpenSim.Framework.Communications.Cache
160 } 160 }
161 161
162 /// <summary> 162 /// <summary>
163 /// Preloads User data into the region cache. Modules may use this service to add non-standard clients
164 /// </summary>
165 /// <param name="userID"></param>
166 /// <param name="userData"></param>
167 public void PreloadUserCache(LLUUID userID, UserProfileData userData)
168 {
169 if (userID == LLUUID.Zero)
170 return;
171
172 lock (m_userProfiles)
173 {
174 if (m_userProfiles.ContainsKey(userID))
175 {
176 return;
177 }
178 else
179 {
180
181 CachedUserInfo userInfo = new CachedUserInfo(m_commsManager, userData);
182 m_userProfiles.Add(userID, userInfo);
183 }
184 }
185 }
186
187 /// <summary>
163 /// Handle an inventory folder creation request from the client. 188 /// Handle an inventory folder creation request from the client.
164 /// </summary> 189 /// </summary>
165 /// <param name="remoteClient"></param> 190 /// <param name="remoteClient"></param>
diff --git a/OpenSim/Framework/Communications/Capabilities/LLSDMethodString.cs b/OpenSim/Framework/Communications/Capabilities/LLSDMethodString.cs
new file mode 100644
index 0000000..31325d8
--- /dev/null
+++ b/OpenSim/Framework/Communications/Capabilities/LLSDMethodString.cs
@@ -0,0 +1,31 @@
1/*
2 * Copyright (c) Contributors, http://opensimulator.org/
3 * See CONTRIBUTORS.TXT for a full list of copyright holders.
4 *
5 * Redistribution and use in source and binary forms, with or without
6 * modification, are permitted provided that the following conditions are met:
7 * * Redistributions of source code must retain the above copyright
8 * notice, this list of conditions and the following disclaimer.
9 * * Redistributions in binary form must reproduce the above copyright
10 * notice, this list of conditions and the following disclaimer in the
11 * documentation and/or other materials provided with the distribution.
12 * * Neither the name of the OpenSim Project nor the
13 * names of its contributors may be used to endorse or promote products
14 * derived from this software without specific prior written permission.
15 *
16 * THIS SOFTWARE IS PROVIDED BY THE DEVELOPERS ``AS IS'' AND ANY
17 * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
18 * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
19 * DISCLAIMED. IN NO EVENT SHALL THE CONTRIBUTORS BE LIABLE FOR ANY
20 * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
21 * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
22 * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
23 * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
24 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
25 * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
26 */
27
28namespace OpenSim.Framework.Communications.Capabilities
29{
30 public delegate TResponse LLSDMethodString<TRequest, TResponse>(TRequest request, string path);
31}
diff --git a/OpenSim/Framework/Communications/UserManagerBase.cs b/OpenSim/Framework/Communications/UserManagerBase.cs
index fd02382..a35ed72 100644
--- a/OpenSim/Framework/Communications/UserManagerBase.cs
+++ b/OpenSim/Framework/Communications/UserManagerBase.cs
@@ -339,6 +339,11 @@ namespace OpenSim.Framework.Communications
339 public void ClearUserAgent(LLUUID agentID) 339 public void ClearUserAgent(LLUUID agentID)
340 { 340 {
341 UserProfileData profile = GetUserProfile(agentID); 341 UserProfileData profile = GetUserProfile(agentID);
342
343 if (profile == null)
344 {
345 return;
346 }
342 profile.CurrentAgent = null; 347 profile.CurrentAgent = null;
343 348
344 UpdateUserProfile(profile); 349 UpdateUserProfile(profile);