aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim
diff options
context:
space:
mode:
authorAdam Frisby2008-09-14 04:13:15 +0000
committerAdam Frisby2008-09-14 04:13:15 +0000
commit3476dd56ea9a6b2e597d2a4e8abf679ac0778681 (patch)
tree11ba00686669e656eca605e42e7e4dca70b8eb04 /OpenSim
parentThank you kindly, CMickeyb for a patch that: (diff)
downloadopensim-SC-3476dd56ea9a6b2e597d2a4e8abf679ac0778681.zip
opensim-SC-3476dd56ea9a6b2e597d2a4e8abf679ac0778681.tar.gz
opensim-SC-3476dd56ea9a6b2e597d2a4e8abf679ac0778681.tar.bz2
opensim-SC-3476dd56ea9a6b2e597d2a4e8abf679ac0778681.tar.xz
* Converted a number of methods within the login processes from private to protected.
* Made several methods virtual to allow derivative overrides. * Minor cleanups.
Diffstat (limited to '')
-rw-r--r--OpenSim/Framework/Communications/LoginResponse.cs2
-rw-r--r--OpenSim/Framework/Communications/LoginService.cs12
-rw-r--r--OpenSim/Framework/Servers/BaseHttpServer.cs10
-rw-r--r--OpenSim/Region/ClientStack/LindenUDP/LLPacketServer.cs5
-rw-r--r--OpenSim/Region/Communications/Local/LocalLoginService.cs16
5 files changed, 19 insertions, 26 deletions
diff --git a/OpenSim/Framework/Communications/LoginResponse.cs b/OpenSim/Framework/Communications/LoginResponse.cs
index f92d66f..435852d4 100644
--- a/OpenSim/Framework/Communications/LoginResponse.cs
+++ b/OpenSim/Framework/Communications/LoginResponse.cs
@@ -307,7 +307,7 @@ namespace OpenSim.Framework.Communications
307 307
308 #endregion 308 #endregion
309 309
310 public XmlRpcResponse ToXmlRpcResponse() 310 public virtual XmlRpcResponse ToXmlRpcResponse()
311 { 311 {
312 try 312 try
313 { 313 {
diff --git a/OpenSim/Framework/Communications/LoginService.cs b/OpenSim/Framework/Communications/LoginService.cs
index 26ae3c6..f4c43ef 100644
--- a/OpenSim/Framework/Communications/LoginService.cs
+++ b/OpenSim/Framework/Communications/LoginService.cs
@@ -103,7 +103,7 @@ namespace OpenSim.Framework.Communications
103 /// </summary> 103 /// </summary>
104 /// <param name="request">The XMLRPC request</param> 104 /// <param name="request">The XMLRPC request</param>
105 /// <returns>The response to send</returns> 105 /// <returns>The response to send</returns>
106 public XmlRpcResponse XmlRpcLoginMethod(XmlRpcRequest request) 106 public virtual XmlRpcResponse XmlRpcLoginMethod(XmlRpcRequest request)
107 { 107 {
108 // Temporary fix 108 // Temporary fix
109 m_loginMutex.WaitOne(); 109 m_loginMutex.WaitOne();
@@ -123,8 +123,8 @@ namespace OpenSim.Framework.Communications
123 UserProfileData userProfile; 123 UserProfileData userProfile;
124 LoginResponse logResponse = new LoginResponse(); 124 LoginResponse logResponse = new LoginResponse();
125 125
126 string firstname = String.Empty; 126 string firstname;
127 string lastname = String.Empty; 127 string lastname;
128 128
129 if (GoodXML) 129 if (GoodXML)
130 { 130 {
@@ -230,7 +230,7 @@ namespace OpenSim.Framework.Communications
230 try 230 try
231 { 231 {
232 UUID agentID = userProfile.ID; 232 UUID agentID = userProfile.ID;
233 InventoryData inventData = null; 233 InventoryData inventData;
234 234
235 try 235 try
236 { 236 {
@@ -265,7 +265,7 @@ namespace OpenSim.Framework.Communications
265 logResponse.InventorySkeleton = AgentInventoryArray; 265 logResponse.InventorySkeleton = AgentInventoryArray;
266 logResponse.InventoryLibrary = GetInventoryLibrary(); 266 logResponse.InventoryLibrary = GetInventoryLibrary();
267 267
268 logResponse.CircuitCode = (Int32)Util.RandomClass.Next(); 268 logResponse.CircuitCode = Util.RandomClass.Next();
269 logResponse.Lastname = userProfile.SurName; 269 logResponse.Lastname = userProfile.SurName;
270 logResponse.Firstname = userProfile.FirstName; 270 logResponse.Firstname = userProfile.FirstName;
271 logResponse.AgentID = agentID.ToString(); 271 logResponse.AgentID = agentID.ToString();
@@ -298,7 +298,7 @@ namespace OpenSim.Framework.Communications
298 } 298 }
299 catch (Exception e) 299 catch (Exception e)
300 { 300 {
301 m_log.Info("[LOGIN END]: XMLRPC Login failed, " + e.ToString()); 301 m_log.Info("[LOGIN END]: XMLRPC Login failed, " + e);
302 } 302 }
303 } 303 }
304 304
diff --git a/OpenSim/Framework/Servers/BaseHttpServer.cs b/OpenSim/Framework/Servers/BaseHttpServer.cs
index 72c9ca1..181eb92 100644
--- a/OpenSim/Framework/Servers/BaseHttpServer.cs
+++ b/OpenSim/Framework/Servers/BaseHttpServer.cs
@@ -104,15 +104,9 @@ namespace OpenSim.Framework.Servers
104 { 104 {
105 lock (m_rpcHandlers) 105 lock (m_rpcHandlers)
106 { 106 {
107 if (!m_rpcHandlers.ContainsKey(method)) 107 m_rpcHandlers[method] = handler;
108 { 108 return true;
109 m_rpcHandlers.Add(method, handler);
110 return true;
111 }
112 } 109 }
113
114 //must already have a handler for that path so return false
115 return false;
116 } 110 }
117 111
118 public bool AddHTTPHandler(string method, GenericHTTPMethod handler) 112 public bool AddHTTPHandler(string method, GenericHTTPMethod handler)
diff --git a/OpenSim/Region/ClientStack/LindenUDP/LLPacketServer.cs b/OpenSim/Region/ClientStack/LindenUDP/LLPacketServer.cs
index c36a238..5020558 100644
--- a/OpenSim/Region/ClientStack/LindenUDP/LLPacketServer.cs
+++ b/OpenSim/Region/ClientStack/LindenUDP/LLPacketServer.cs
@@ -31,7 +31,6 @@ using OpenMetaverse;
31using OpenMetaverse.Packets; 31using OpenMetaverse.Packets;
32using OpenSim.Framework; 32using OpenSim.Framework;
33using OpenSim.Framework.Communications.Cache; 33using OpenSim.Framework.Communications.Cache;
34using OpenSim.Region.ClientStack.LindenUDP;
35 34
36namespace OpenSim.Region.ClientStack.LindenUDP 35namespace OpenSim.Region.ClientStack.LindenUDP
37{ 36{
@@ -40,8 +39,8 @@ namespace OpenSim.Region.ClientStack.LindenUDP
40 //private static readonly log4net.ILog m_log 39 //private static readonly log4net.ILog m_log
41 // = log4net.LogManager.GetLogger(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType); 40 // = log4net.LogManager.GetLogger(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType);
42 41
43 private readonly LLClientStackNetworkHandler m_networkHandler; 42 protected readonly LLClientStackNetworkHandler m_networkHandler;
44 private IScene m_scene; 43 protected IScene m_scene;
45 44
46 //private readonly ClientManager m_clientManager = new ClientManager(); 45 //private readonly ClientManager m_clientManager = new ClientManager();
47 //public ClientManager ClientManager 46 //public ClientManager ClientManager
diff --git a/OpenSim/Region/Communications/Local/LocalLoginService.cs b/OpenSim/Region/Communications/Local/LocalLoginService.cs
index 2f7fdb7..41093c1 100644
--- a/OpenSim/Region/Communications/Local/LocalLoginService.cs
+++ b/OpenSim/Region/Communications/Local/LocalLoginService.cs
@@ -41,18 +41,18 @@ namespace OpenSim.Region.Communications.Local
41 41
42 public class LocalLoginService : LoginService 42 public class LocalLoginService : LoginService
43 { 43 {
44 private static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType); 44 protected static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType);
45 45
46 private CommunicationsLocal m_Parent; 46 protected CommunicationsLocal m_Parent;
47 47
48 private NetworkServersInfo serversInfo; 48 protected NetworkServersInfo serversInfo;
49 private uint defaultHomeX; 49 protected uint defaultHomeX;
50 private uint defaultHomeY; 50 protected uint defaultHomeY;
51 private bool authUsers = false; 51 protected bool authUsers = false;
52 52
53 public event LoginToRegionEvent OnLoginToRegion; 53 public event LoginToRegionEvent OnLoginToRegion;
54 54
55 private LoginToRegionEvent handlerLoginToRegion = null; // OnLoginToRegion; 55 protected LoginToRegionEvent handlerLoginToRegion = null; // OnLoginToRegion;
56 56
57 public LocalLoginService(UserManagerBase userManager, string welcomeMess, 57 public LocalLoginService(UserManagerBase userManager, string welcomeMess,
58 CommunicationsLocal parent, NetworkServersInfo serversInfo, 58 CommunicationsLocal parent, NetworkServersInfo serversInfo,
@@ -246,7 +246,7 @@ namespace OpenSim.Region.Communications.Local
246 /// <param name="user"></param> 246 /// <param name="user"></param>
247 /// <param name="response"></param> 247 /// <param name="response"></param>
248 /// <returns>true if the region was successfully contacted, false otherwise</returns> 248 /// <returns>true if the region was successfully contacted, false otherwise</returns>
249 private bool PrepareLoginToRegion(RegionInfo regionInfo, UserProfileData user, LoginResponse response) 249 protected bool PrepareLoginToRegion(RegionInfo regionInfo, UserProfileData user, LoginResponse response)
250 { 250 {
251 response.SimAddress = regionInfo.ExternalEndPoint.Address.ToString(); 251 response.SimAddress = regionInfo.ExternalEndPoint.Address.ToString();
252 response.SimPort = (uint)regionInfo.ExternalEndPoint.Port; 252 response.SimPort = (uint)regionInfo.ExternalEndPoint.Port;