aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Region
diff options
context:
space:
mode:
authorlbsa712007-09-24 01:16:21 +0000
committerlbsa712007-09-24 01:16:21 +0000
commit79045abe685efef2c497b6cae97601689186153f (patch)
tree9917bba55dcd738ee7dc7bce6dd07dfab577c43e /OpenSim/Region
parent* Purged 'Regions' code pending Agent layer grok. (diff)
downloadopensim-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/Region/ClientStack/UDPServer.cs18
-rw-r--r--OpenSim/Region/Communications/Local/CommunicationsLocal.cs2
-rw-r--r--OpenSim/Region/Communications/Local/LocalLoginService.cs4
-rw-r--r--OpenSim/Region/Communications/Local/LocalUserServices.cs28
4 files changed, 22 insertions, 30 deletions
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 {