diff options
author | lbsa71 | 2007-09-24 01:16:21 +0000 |
---|---|---|
committer | lbsa71 | 2007-09-24 01:16:21 +0000 |
commit | 79045abe685efef2c497b6cae97601689186153f (patch) | |
tree | 9917bba55dcd738ee7dc7bce6dd07dfab577c43e | |
parent | * Purged 'Regions' code pending Agent layer grok. (diff) | |
download | opensim-SC-79045abe685efef2c497b6cae97601689186153f.zip opensim-SC-79045abe685efef2c497b6cae97601689186153f.tar.gz opensim-SC-79045abe685efef2c497b6cae97601689186153f.tar.bz2 opensim-SC-79045abe685efef2c497b6cae97601689186153f.tar.xz |
* Renamed stuff on UserManagerBase to get implicit implementation of IUserServices (instead of stubs)
Diffstat (limited to '')
-rw-r--r-- | OpenSim/Framework/UserManager/LoginService.cs | 2 | ||||
-rw-r--r-- | OpenSim/Framework/UserManager/UserManagerBase.cs | 8 | ||||
-rw-r--r-- | OpenSim/Grid/UserServer/UserManager.cs | 4 | ||||
-rw-r--r-- | OpenSim/Region/ClientStack/UDPServer.cs | 18 | ||||
-rw-r--r-- | OpenSim/Region/Communications/Local/CommunicationsLocal.cs | 2 | ||||
-rw-r--r-- | OpenSim/Region/Communications/Local/LocalLoginService.cs | 4 | ||||
-rw-r--r-- | OpenSim/Region/Communications/Local/LocalUserServices.cs | 28 |
7 files changed, 29 insertions, 37 deletions
diff --git a/OpenSim/Framework/UserManager/LoginService.cs b/OpenSim/Framework/UserManager/LoginService.cs index 32f5565..483665e 100644 --- a/OpenSim/Framework/UserManager/LoginService.cs +++ b/OpenSim/Framework/UserManager/LoginService.cs | |||
@@ -202,7 +202,7 @@ namespace OpenSim.Framework.UserManagement | |||
202 | /// <returns></returns> | 202 | /// <returns></returns> |
203 | public virtual UserProfileData GetTheUser(string firstname, string lastname) | 203 | public virtual UserProfileData GetTheUser(string firstname, string lastname) |
204 | { | 204 | { |
205 | return this.m_userManager.getUserProfile(firstname, lastname); | 205 | return this.m_userManager.GetUserProfile(firstname, lastname); |
206 | } | 206 | } |
207 | 207 | ||
208 | /// <summary> | 208 | /// <summary> |
diff --git a/OpenSim/Framework/UserManager/UserManagerBase.cs b/OpenSim/Framework/UserManager/UserManagerBase.cs index 649831d..82b3731 100644 --- a/OpenSim/Framework/UserManager/UserManagerBase.cs +++ b/OpenSim/Framework/UserManager/UserManagerBase.cs | |||
@@ -85,7 +85,7 @@ namespace OpenSim.Framework.UserManagement | |||
85 | /// </summary> | 85 | /// </summary> |
86 | /// <param name="uuid">The target UUID</param> | 86 | /// <param name="uuid">The target UUID</param> |
87 | /// <returns>A user profile</returns> | 87 | /// <returns>A user profile</returns> |
88 | public UserProfileData getUserProfile(LLUUID uuid) | 88 | public UserProfileData GetUserProfile(LLUUID uuid) |
89 | { | 89 | { |
90 | foreach (KeyValuePair<string, IUserData> plugin in _plugins) | 90 | foreach (KeyValuePair<string, IUserData> plugin in _plugins) |
91 | { | 91 | { |
@@ -110,7 +110,7 @@ namespace OpenSim.Framework.UserManagement | |||
110 | /// </summary> | 110 | /// </summary> |
111 | /// <param name="name">The target name</param> | 111 | /// <param name="name">The target name</param> |
112 | /// <returns>A user profile</returns> | 112 | /// <returns>A user profile</returns> |
113 | public UserProfileData getUserProfile(string name) | 113 | public UserProfileData GetUserProfile(string name) |
114 | { | 114 | { |
115 | foreach (KeyValuePair<string, IUserData> plugin in _plugins) | 115 | foreach (KeyValuePair<string, IUserData> plugin in _plugins) |
116 | { | 116 | { |
@@ -136,7 +136,7 @@ namespace OpenSim.Framework.UserManagement | |||
136 | /// <param name="fname">First name</param> | 136 | /// <param name="fname">First name</param> |
137 | /// <param name="lname">Last name</param> | 137 | /// <param name="lname">Last name</param> |
138 | /// <returns>A user profile</returns> | 138 | /// <returns>A user profile</returns> |
139 | public UserProfileData getUserProfile(string fname, string lname) | 139 | public UserProfileData GetUserProfile(string fname, string lname) |
140 | { | 140 | { |
141 | foreach (KeyValuePair<string, IUserData> plugin in _plugins) | 141 | foreach (KeyValuePair<string, IUserData> plugin in _plugins) |
142 | { | 142 | { |
@@ -228,7 +228,7 @@ namespace OpenSim.Framework.UserManagement | |||
228 | // TODO: document | 228 | // TODO: document |
229 | public void clearUserAgent(LLUUID agentID) | 229 | public void clearUserAgent(LLUUID agentID) |
230 | { | 230 | { |
231 | UserProfileData profile = getUserProfile(agentID); | 231 | UserProfileData profile = GetUserProfile(agentID); |
232 | profile.currentAgent = null; | 232 | profile.currentAgent = null; |
233 | setUserProfile(profile); | 233 | setUserProfile(profile); |
234 | } | 234 | } |
diff --git a/OpenSim/Grid/UserServer/UserManager.cs b/OpenSim/Grid/UserServer/UserManager.cs index 44f92b4..20f3b95 100644 --- a/OpenSim/Grid/UserServer/UserManager.cs +++ b/OpenSim/Grid/UserServer/UserManager.cs | |||
@@ -122,7 +122,7 @@ namespace OpenSim.Grid.UserServer | |||
122 | UserProfileData userProfile; | 122 | UserProfileData userProfile; |
123 | if (requestData.Contains("avatar_name")) | 123 | if (requestData.Contains("avatar_name")) |
124 | { | 124 | { |
125 | userProfile = getUserProfile((string)requestData["avatar_name"]); | 125 | userProfile = GetUserProfile((string)requestData["avatar_name"]); |
126 | if (userProfile == null) | 126 | if (userProfile == null) |
127 | { | 127 | { |
128 | return CreateUnknownUserErrorResponse(); | 128 | return CreateUnknownUserErrorResponse(); |
@@ -144,7 +144,7 @@ namespace OpenSim.Grid.UserServer | |||
144 | System.Console.WriteLine("METHOD BY UUID CALLED"); | 144 | System.Console.WriteLine("METHOD BY UUID CALLED"); |
145 | if (requestData.Contains("avatar_uuid")) | 145 | if (requestData.Contains("avatar_uuid")) |
146 | { | 146 | { |
147 | userProfile = getUserProfile((LLUUID)(string)requestData["avatar_uuid"]); | 147 | userProfile = GetUserProfile((LLUUID)(string)requestData["avatar_uuid"]); |
148 | if (userProfile == null) | 148 | if (userProfile == null) |
149 | { | 149 | { |
150 | return CreateUnknownUserErrorResponse(); | 150 | return CreateUnknownUserErrorResponse(); |
diff --git a/OpenSim/Region/ClientStack/UDPServer.cs b/OpenSim/Region/ClientStack/UDPServer.cs index 64ed4b4..9a3d01a 100644 --- a/OpenSim/Region/ClientStack/UDPServer.cs +++ b/OpenSim/Region/ClientStack/UDPServer.cs | |||
@@ -103,18 +103,24 @@ namespace OpenSim.Region.ClientStack | |||
103 | Packet packet = null; | 103 | Packet packet = null; |
104 | 104 | ||
105 | int numBytes; | 105 | int numBytes; |
106 | 106 | ||
107 | try | 107 | try |
108 | { | 108 | { |
109 | numBytes = Server.EndReceiveFrom(result, ref epSender); | 109 | numBytes = Server.EndReceiveFrom(result, ref epSender); |
110 | } | 110 | } |
111 | catch (System.Net.Sockets.SocketException e) | 111 | catch (System.Net.Sockets.SocketException e) |
112 | { | 112 | { |
113 | Console.WriteLine("Remote host Closed connection"); | 113 | // TODO : Actually only handle those states that we have control over, re-throw everything else, |
114 | 114 | // TODO: implement cases as we encounter them. | |
115 | CloseEndPoint(epSender); | 115 | switch (e.SocketErrorCode) |
116 | 116 | { | |
117 | //Server.BeginReceiveFrom(RecvBuffer, 0, RecvBuffer.Length, SocketFlags.None, ref epSender, ReceivedData, null); | 117 | case SocketError.AlreadyInProgress: |
118 | case SocketError.NetworkReset: | ||
119 | default: | ||
120 | Console.WriteLine("Remote host Closed connection"); | ||
121 | CloseEndPoint(epSender); | ||
122 | break; | ||
123 | } | ||
118 | 124 | ||
119 | return; | 125 | return; |
120 | } | 126 | } |
diff --git a/OpenSim/Region/Communications/Local/CommunicationsLocal.cs b/OpenSim/Region/Communications/Local/CommunicationsLocal.cs index e326a1e..0105b9d 100644 --- a/OpenSim/Region/Communications/Local/CommunicationsLocal.cs +++ b/OpenSim/Region/Communications/Local/CommunicationsLocal.cs | |||
@@ -45,7 +45,7 @@ namespace OpenSim.Region.Communications.Local | |||
45 | public LocalLoginService LoginServices; | 45 | public LocalLoginService LoginServices; |
46 | public LocalInventoryService InvenServices; | 46 | public LocalInventoryService InvenServices; |
47 | // public CAPSService CapsServices; | 47 | // public CAPSService CapsServices; |
48 | private LocalSettings m_settings; | 48 | private readonly LocalSettings m_settings; |
49 | 49 | ||
50 | public CommunicationsLocal(NetworkServersInfo serversInfo, BaseHttpServer httpServer, AssetCache assetCache, LocalSettings settings) | 50 | public CommunicationsLocal(NetworkServersInfo serversInfo, BaseHttpServer httpServer, AssetCache assetCache, LocalSettings settings) |
51 | : base(serversInfo, httpServer, assetCache) | 51 | : base(serversInfo, httpServer, assetCache) |
diff --git a/OpenSim/Region/Communications/Local/LocalLoginService.cs b/OpenSim/Region/Communications/Local/LocalLoginService.cs index 3c43d29..9c15742 100644 --- a/OpenSim/Region/Communications/Local/LocalLoginService.cs +++ b/OpenSim/Region/Communications/Local/LocalLoginService.cs | |||
@@ -33,7 +33,7 @@ namespace OpenSim.Region.Communications.Local | |||
33 | 33 | ||
34 | public override UserProfileData GetTheUser(string firstname, string lastname) | 34 | public override UserProfileData GetTheUser(string firstname, string lastname) |
35 | { | 35 | { |
36 | UserProfileData profile = this.m_userManager.getUserProfile(firstname, lastname); | 36 | UserProfileData profile = this.m_userManager.GetUserProfile(firstname, lastname); |
37 | if (profile != null) | 37 | if (profile != null) |
38 | { | 38 | { |
39 | 39 | ||
@@ -46,7 +46,7 @@ namespace OpenSim.Region.Communications.Local | |||
46 | Console.WriteLine("No User account found so creating a new one "); | 46 | Console.WriteLine("No User account found so creating a new one "); |
47 | this.m_userManager.AddUserProfile(firstname, lastname, "test", defaultHomeX, defaultHomeY); | 47 | this.m_userManager.AddUserProfile(firstname, lastname, "test", defaultHomeX, defaultHomeY); |
48 | 48 | ||
49 | profile = this.m_userManager.getUserProfile(firstname, lastname); | 49 | profile = this.m_userManager.GetUserProfile(firstname, lastname); |
50 | if (profile != null) | 50 | if (profile != null) |
51 | { | 51 | { |
52 | m_Parent.InvenServices.CreateNewUserInventory(profile.UUID); | 52 | m_Parent.InvenServices.CreateNewUserInventory(profile.UUID); |
diff --git a/OpenSim/Region/Communications/Local/LocalUserServices.cs b/OpenSim/Region/Communications/Local/LocalUserServices.cs index 1a409bf..02b6e60 100644 --- a/OpenSim/Region/Communications/Local/LocalUserServices.cs +++ b/OpenSim/Region/Communications/Local/LocalUserServices.cs | |||
@@ -10,36 +10,22 @@ namespace OpenSim.Region.Communications.Local | |||
10 | { | 10 | { |
11 | public class LocalUserServices : UserManagerBase, IUserServices | 11 | public class LocalUserServices : UserManagerBase, IUserServices |
12 | { | 12 | { |
13 | private CommunicationsLocal m_Parent; | 13 | private readonly CommunicationsLocal m_Parent; |
14 | 14 | ||
15 | private NetworkServersInfo serversInfo; | 15 | private readonly NetworkServersInfo serversInfo; |
16 | private uint defaultHomeX ; | 16 | private readonly uint defaultHomeX ; |
17 | private uint defaultHomeY; | 17 | private readonly uint defaultHomeY; |
18 | 18 | ||
19 | 19 | ||
20 | public LocalUserServices(CommunicationsLocal parent, NetworkServersInfo serversInfo) | 20 | public LocalUserServices(CommunicationsLocal parent, NetworkServersInfo serversInfo) |
21 | { | 21 | { |
22 | m_Parent = parent; | 22 | m_Parent = parent; |
23 | this.serversInfo = serversInfo; | 23 | this.serversInfo = serversInfo; |
24 | |||
24 | defaultHomeX = this.serversInfo.DefaultHomeLocX; | 25 | defaultHomeX = this.serversInfo.DefaultHomeLocX; |
25 | defaultHomeY = this.serversInfo.DefaultHomeLocY; | 26 | defaultHomeY = this.serversInfo.DefaultHomeLocY; |
26 | } | 27 | } |
27 | 28 | ||
28 | public UserProfileData GetUserProfile(string firstName, string lastName) | ||
29 | { | ||
30 | return GetUserProfile(firstName + " " + lastName); | ||
31 | } | ||
32 | |||
33 | public UserProfileData GetUserProfile(string name) | ||
34 | { | ||
35 | return this.getUserProfile(name); | ||
36 | } | ||
37 | |||
38 | public UserProfileData GetUserProfile(LLUUID avatarID) | ||
39 | { | ||
40 | return this.getUserProfile(avatarID); | ||
41 | } | ||
42 | |||
43 | public UserProfileData SetupMasterUser(string firstName, string lastName) | 29 | public UserProfileData SetupMasterUser(string firstName, string lastName) |
44 | { | 30 | { |
45 | return SetupMasterUser(firstName, lastName, ""); | 31 | return SetupMasterUser(firstName, lastName, ""); |
@@ -47,7 +33,7 @@ namespace OpenSim.Region.Communications.Local | |||
47 | 33 | ||
48 | public UserProfileData SetupMasterUser(string firstName, string lastName, string password) | 34 | public UserProfileData SetupMasterUser(string firstName, string lastName, string password) |
49 | { | 35 | { |
50 | UserProfileData profile = getUserProfile(firstName, lastName); | 36 | UserProfileData profile = base.GetUserProfile(firstName, lastName); |
51 | if (profile != null) | 37 | if (profile != null) |
52 | { | 38 | { |
53 | 39 | ||
@@ -57,7 +43,7 @@ namespace OpenSim.Region.Communications.Local | |||
57 | Console.WriteLine("Unknown Master User. Sandbox Mode: Creating Account"); | 43 | Console.WriteLine("Unknown Master User. Sandbox Mode: Creating Account"); |
58 | this.AddUserProfile(firstName, lastName, password, defaultHomeX, defaultHomeY); | 44 | this.AddUserProfile(firstName, lastName, password, defaultHomeX, defaultHomeY); |
59 | 45 | ||
60 | profile = getUserProfile(firstName, lastName); | 46 | profile = base.GetUserProfile(firstName, lastName); |
61 | 47 | ||
62 | if (profile == null) | 48 | if (profile == null) |
63 | { | 49 | { |