aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Grid/UserServer
diff options
context:
space:
mode:
authorJeff Ames2008-05-16 01:22:11 +0000
committerJeff Ames2008-05-16 01:22:11 +0000
commit65c5efe43b68700bad94076d4cd421160203c5de (patch)
tree589b56649ed02f4942671fd6e51c6dc43f682e0d /OpenSim/Grid/UserServer
parentThank you very much, mjm for : (diff)
downloadopensim-SC_OLD-65c5efe43b68700bad94076d4cd421160203c5de.zip
opensim-SC_OLD-65c5efe43b68700bad94076d4cd421160203c5de.tar.gz
opensim-SC_OLD-65c5efe43b68700bad94076d4cd421160203c5de.tar.bz2
opensim-SC_OLD-65c5efe43b68700bad94076d4cd421160203c5de.tar.xz
Formatting cleanup.
Diffstat (limited to 'OpenSim/Grid/UserServer')
-rw-r--r--OpenSim/Grid/UserServer/Main.cs46
-rw-r--r--OpenSim/Grid/UserServer/MessageServersConnector.cs22
-rw-r--r--OpenSim/Grid/UserServer/Properties/AssemblyInfo.cs8
-rw-r--r--OpenSim/Grid/UserServer/UserLoginService.cs52
-rw-r--r--OpenSim/Grid/UserServer/UserManager.cs20
5 files changed, 74 insertions, 74 deletions
diff --git a/OpenSim/Grid/UserServer/Main.cs b/OpenSim/Grid/UserServer/Main.cs
index 00b7f76..79524b4 100644
--- a/OpenSim/Grid/UserServer/Main.cs
+++ b/OpenSim/Grid/UserServer/Main.cs
@@ -48,10 +48,10 @@ namespace OpenSim.Grid.UserServer
48 private static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType); 48 private static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType);
49 49
50 private UserConfig Cfg; 50 private UserConfig Cfg;
51 51
52 public UserManager m_userManager; 52 public UserManager m_userManager;
53 public UserLoginService m_loginService; 53 public UserLoginService m_loginService;
54 public MessageServersConnector m_messagesService; 54 public MessageServersConnector m_messagesService;
55 55
56 private LLUUID m_lastCreatedUser = LLUUID.Random(); 56 private LLUUID m_lastCreatedUser = LLUUID.Random();
57 57
@@ -87,13 +87,13 @@ namespace OpenSim.Grid.UserServer
87 public void Startup() 87 public void Startup()
88 { 88 {
89 Cfg = new UserConfig("USER SERVER", (Path.Combine(Util.configDir(), "UserServer_Config.xml"))); 89 Cfg = new UserConfig("USER SERVER", (Path.Combine(Util.configDir(), "UserServer_Config.xml")));
90 90
91 m_stats = StatsManager.StartCollectingUserStats(); 91 m_stats = StatsManager.StartCollectingUserStats();
92 92
93 m_log.Info("[REGION]: Establishing data connection"); 93 m_log.Info("[REGION]: Establishing data connection");
94 m_userManager = new UserManager(); 94 m_userManager = new UserManager();
95 m_userManager._config = Cfg; 95 m_userManager._config = Cfg;
96 m_userManager.AddPlugin(Cfg.DatabaseProvider, Cfg.DatabaseConnect); 96 m_userManager.AddPlugin(Cfg.DatabaseProvider, Cfg.DatabaseConnect);
97 97
98 m_loginService = new UserLoginService( 98 m_loginService = new UserLoginService(
99 m_userManager, new LibraryRootFolder(), Cfg, Cfg.DefaultStartupMsg); 99 m_userManager, new LibraryRootFolder(), Cfg, Cfg.DefaultStartupMsg);
@@ -104,7 +104,7 @@ namespace OpenSim.Grid.UserServer
104 m_userManager.OnLogOffUser += NotifyMessageServersUserLoggOff; 104 m_userManager.OnLogOffUser += NotifyMessageServersUserLoggOff;
105 105
106 m_log.Info("[REGION]: Starting HTTP process"); 106 m_log.Info("[REGION]: Starting HTTP process");
107 107
108 m_httpServer = new BaseHttpServer(Cfg.HttpPort); 108 m_httpServer = new BaseHttpServer(Cfg.HttpPort);
109 AddHttpHandlers(); 109 AddHttpHandlers();
110 m_httpServer.Start(); 110 m_httpServer.Start();
@@ -117,7 +117,7 @@ namespace OpenSim.Grid.UserServer
117 m_httpServer.AddXmlRPCHandler("login_to_simulator", m_loginService.XmlRpcLoginMethod); 117 m_httpServer.AddXmlRPCHandler("login_to_simulator", m_loginService.XmlRpcLoginMethod);
118 118
119 m_httpServer.AddHTTPHandler("login", m_loginService.ProcessHTMLLogin); 119 m_httpServer.AddHTTPHandler("login", m_loginService.ProcessHTMLLogin);
120 120
121 m_httpServer.SetLLSDHandler(m_loginService.LLSDLoginMethod); 121 m_httpServer.SetLLSDHandler(m_loginService.LLSDLoginMethod);
122 122
123 m_httpServer.AddXmlRPCHandler("get_user_by_name", m_userManager.XmlRPCGetUserMethodName); 123 m_httpServer.AddXmlRPCHandler("get_user_by_name", m_userManager.XmlRPCGetUserMethodName);
@@ -128,7 +128,7 @@ namespace OpenSim.Grid.UserServer
128 m_httpServer.AddXmlRPCHandler("update_user_friend_perms", m_userManager.XmlRpcResponseXmlRPCUpdateUserFriendPerms); 128 m_httpServer.AddXmlRPCHandler("update_user_friend_perms", m_userManager.XmlRpcResponseXmlRPCUpdateUserFriendPerms);
129 m_httpServer.AddXmlRPCHandler("get_user_friend_list", m_userManager.XmlRpcResponseXmlRPCGetUserFriendList); 129 m_httpServer.AddXmlRPCHandler("get_user_friend_list", m_userManager.XmlRpcResponseXmlRPCGetUserFriendList);
130 m_httpServer.AddXmlRPCHandler("logout_of_simulator", m_userManager.XmlRPCLogOffUserMethodUUID); 130 m_httpServer.AddXmlRPCHandler("logout_of_simulator", m_userManager.XmlRPCLogOffUserMethodUUID);
131 131
132 // Message Server ---> User Server 132 // Message Server ---> User Server
133 m_httpServer.AddXmlRPCHandler("register_messageserver", m_messagesService.XmlRPCRegisterMessageServer); 133 m_httpServer.AddXmlRPCHandler("register_messageserver", m_messagesService.XmlRPCRegisterMessageServer);
134 m_httpServer.AddXmlRPCHandler("agent_change_region", m_messagesService.XmlRPCUserMovedtoRegion); 134 m_httpServer.AddXmlRPCHandler("agent_change_region", m_messagesService.XmlRPCUserMovedtoRegion);
@@ -163,17 +163,17 @@ namespace OpenSim.Grid.UserServer
163 { 163 {
164 m_log.ErrorFormat( 164 m_log.ErrorFormat(
165 "[USERS]: A user with the name {0} {1} already exists!", tempfirstname, templastname); 165 "[USERS]: A user with the name {0} {1} already exists!", tempfirstname, templastname);
166 166
167 break; 167 break;
168 } 168 }
169 169
170 tempMD5Passwd = Util.Md5Hash(Util.Md5Hash(tempMD5Passwd) + ":" + String.Empty); 170 tempMD5Passwd = Util.Md5Hash(Util.Md5Hash(tempMD5Passwd) + ":" + String.Empty);
171 171
172 LLUUID userID = new LLUUID(); 172 LLUUID userID = new LLUUID();
173 try 173 try
174 { 174 {
175 userID = m_userManager.AddUserProfile(tempfirstname, templastname, tempMD5Passwd, regX, regY); 175 userID = m_userManager.AddUserProfile(tempfirstname, templastname, tempMD5Passwd, regX, regY);
176 } 176 }
177 catch (Exception ex) 177 catch (Exception ex)
178 { 178 {
179 m_log.ErrorFormat("[USERS]: Error creating user: {0}", ex.ToString()); 179 m_log.ErrorFormat("[USERS]: Error creating user: {0}", ex.ToString());
@@ -181,31 +181,31 @@ namespace OpenSim.Grid.UserServer
181 181
182 try 182 try
183 { 183 {
184 bool created 184 bool created
185 = SynchronousRestObjectPoster.BeginPostObject<Guid, bool>( 185 = SynchronousRestObjectPoster.BeginPostObject<Guid, bool>(
186 "POST", m_userManager._config.InventoryUrl + "CreateInventory/", userID.UUID); 186 "POST", m_userManager._config.InventoryUrl + "CreateInventory/", userID.UUID);
187 187
188 if (!created) 188 if (!created)
189 { 189 {
190 throw new Exception( 190 throw new Exception(
191 String.Format( 191 String.Format(
192 "The inventory creation request for user {0} did not succeed." 192 "The inventory creation request for user {0} did not succeed."
193 + " Please contact your inventory service provider for more information.", 193 + " Please contact your inventory service provider for more information.",
194 userID)); 194 userID));
195 } 195 }
196 196
197 } 197 }
198 catch (WebException) 198 catch (WebException)
199 { 199 {
200 m_log.ErrorFormat( 200 m_log.ErrorFormat(
201 "[USERS]: Could not contact the inventory service at {0} to create an inventory for {1}", 201 "[USERS]: Could not contact the inventory service at {0} to create an inventory for {1}",
202 m_userManager._config.InventoryUrl + "CreateInventory/", userID.UUID); 202 m_userManager._config.InventoryUrl + "CreateInventory/", userID.UUID);
203 } 203 }
204 catch (Exception e) 204 catch (Exception e)
205 { 205 {
206 m_log.ErrorFormat("[USERS]: Error creating inventory for user: {0}", e); 206 m_log.ErrorFormat("[USERS]: Error creating inventory for user: {0}", e);
207 } 207 }
208 208
209 m_lastCreatedUser = userID; 209 m_lastCreatedUser = userID;
210 break; 210 break;
211 } 211 }
@@ -214,7 +214,7 @@ namespace OpenSim.Grid.UserServer
214 public override void RunCmd(string cmd, string[] cmdparams) 214 public override void RunCmd(string cmd, string[] cmdparams)
215 { 215 {
216 base.RunCmd(cmd, cmdparams); 216 base.RunCmd(cmd, cmdparams);
217 217
218 switch (cmd) 218 switch (cmd)
219 { 219 {
220 case "help": 220 case "help":
@@ -223,7 +223,7 @@ namespace OpenSim.Grid.UserServer
223 223
224 case "create": 224 case "create":
225 do_create(cmdparams[0]); 225 do_create(cmdparams[0]);
226 break; 226 break;
227 227
228 case "test-inventory": 228 case "test-inventory":
229 // RestObjectPosterResponse<List<InventoryFolderBase>> requester = new RestObjectPosterResponse<List<InventoryFolderBase>>(); 229 // RestObjectPosterResponse<List<InventoryFolderBase>> requester = new RestObjectPosterResponse<List<InventoryFolderBase>>();
@@ -242,10 +242,10 @@ namespace OpenSim.Grid.UserServer
242 public override void Shutdown() 242 public override void Shutdown()
243 { 243 {
244 m_loginService.OnUserLoggedInAtLocation -= NotifyMessageServersUserLoggedInToLocation; 244 m_loginService.OnUserLoggedInAtLocation -= NotifyMessageServersUserLoggedInToLocation;
245 245
246 base.Shutdown(); 246 base.Shutdown();
247 } 247 }
248 248
249 public void TestResponse(List<InventoryFolderBase> resp) 249 public void TestResponse(List<InventoryFolderBase> resp)
250 { 250 {
251 m_console.Notice("response got"); 251 m_console.Notice("response got");
@@ -257,10 +257,10 @@ namespace OpenSim.Grid.UserServer
257 } 257 }
258 258
259 public void NotifyMessageServersUserLoggedInToLocation(LLUUID agentID, LLUUID sessionID, LLUUID RegionID, 259 public void NotifyMessageServersUserLoggedInToLocation(LLUUID agentID, LLUUID sessionID, LLUUID RegionID,
260 ulong regionhandle, float positionX, float positionY, 260 ulong regionhandle, float positionX, float positionY,
261 float positionZ, string firstname, string lastname) 261 float positionZ, string firstname, string lastname)
262 { 262 {
263 263
264 m_messagesService.TellMessageServersAboutUser(agentID, sessionID, RegionID, regionhandle, positionX, 264 m_messagesService.TellMessageServersAboutUser(agentID, sessionID, RegionID, regionhandle, positionX,
265 positionY, positionZ, firstname, lastname); 265 positionY, positionZ, firstname, lastname);
266 } 266 }
diff --git a/OpenSim/Grid/UserServer/MessageServersConnector.cs b/OpenSim/Grid/UserServer/MessageServersConnector.cs
index 4e9728e..529c089 100644
--- a/OpenSim/Grid/UserServer/MessageServersConnector.cs
+++ b/OpenSim/Grid/UserServer/MessageServersConnector.cs
@@ -41,12 +41,12 @@ namespace OpenSim.Grid.UserServer
41 private static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType); 41 private static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType);
42 42
43 public Dictionary<string, MessageServerInfo> MessageServers; 43 public Dictionary<string, MessageServerInfo> MessageServers;
44 44
45 public MessageServersConnector() 45 public MessageServersConnector()
46 { 46 {
47 MessageServers = new Dictionary<string, MessageServerInfo>(); 47 MessageServers = new Dictionary<string, MessageServerInfo>();
48 } 48 }
49 49
50 public void RegisterMessageServer(string URI, MessageServerInfo serverData) 50 public void RegisterMessageServer(string URI, MessageServerInfo serverData)
51 { 51 {
52 lock (MessageServers) 52 lock (MessageServers)
@@ -55,7 +55,7 @@ namespace OpenSim.Grid.UserServer
55 MessageServers.Add(URI, serverData); 55 MessageServers.Add(URI, serverData);
56 } 56 }
57 } 57 }
58 58
59 public void DeRegisterMessageServer(string URI) 59 public void DeRegisterMessageServer(string URI)
60 { 60 {
61 lock (MessageServers) 61 lock (MessageServers)
@@ -64,7 +64,7 @@ namespace OpenSim.Grid.UserServer
64 MessageServers.Remove(URI); 64 MessageServers.Remove(URI);
65 } 65 }
66 } 66 }
67 67
68 public void AddResponsibleRegion(string URI, ulong regionhandle) 68 public void AddResponsibleRegion(string URI, ulong regionhandle)
69 { 69 {
70 if (!MessageServers.ContainsKey(URI)) 70 if (!MessageServers.ContainsKey(URI))
@@ -76,7 +76,7 @@ namespace OpenSim.Grid.UserServer
76 MessageServerInfo msginfo = MessageServers["URI"]; 76 MessageServerInfo msginfo = MessageServers["URI"];
77 msginfo.responsibleForRegions.Add(regionhandle); 77 msginfo.responsibleForRegions.Add(regionhandle);
78 MessageServers["URI"] = msginfo; 78 MessageServers["URI"] = msginfo;
79 } 79 }
80 } 80 }
81 public void RemoveResponsibleRegion(string URI, ulong regionhandle) 81 public void RemoveResponsibleRegion(string URI, ulong regionhandle)
82 { 82 {
@@ -92,7 +92,7 @@ namespace OpenSim.Grid.UserServer
92 msginfo.responsibleForRegions.Remove(regionhandle); 92 msginfo.responsibleForRegions.Remove(regionhandle);
93 MessageServers["URI"] = msginfo; 93 MessageServers["URI"] = msginfo;
94 } 94 }
95 } 95 }
96 96
97 } 97 }
98 public XmlRpcResponse XmlRPCRegisterMessageServer(XmlRpcRequest request) 98 public XmlRpcResponse XmlRPCRegisterMessageServer(XmlRpcRequest request)
@@ -148,7 +148,7 @@ namespace OpenSim.Grid.UserServer
148 string scurrentpos = (string)requestData["currentpos"]; 148 string scurrentpos = (string)requestData["currentpos"];
149 //LLVector3.TryParse((string)reader["currentPos"], out retval.currentPos); 149 //LLVector3.TryParse((string)reader["currentPos"], out retval.currentPos);
150 // TODO: Okay now raise event so the user server can pass this data to the Usermanager 150 // TODO: Okay now raise event so the user server can pass this data to the Usermanager
151 151
152 responseData["responsestring"] = "TRUE"; 152 responseData["responsestring"] = "TRUE";
153 response.Value = responseData; 153 response.Value = responseData;
154 } 154 }
@@ -156,7 +156,7 @@ namespace OpenSim.Grid.UserServer
156 } 156 }
157 157
158 public void TellMessageServersAboutUser(LLUUID agentID, LLUUID sessionID, LLUUID RegionID, 158 public void TellMessageServersAboutUser(LLUUID agentID, LLUUID sessionID, LLUUID RegionID,
159 ulong regionhandle, float positionX, float positionY, 159 ulong regionhandle, float positionX, float positionY,
160 float positionZ, string firstname, string lastname) 160 float positionZ, string firstname, string lastname)
161 { 161 {
162 // Loop over registered Message Servers (AND THERE WILL BE MORE THEN ONE :D) 162 // Loop over registered Message Servers (AND THERE WILL BE MORE THEN ONE :D)
@@ -218,9 +218,9 @@ namespace OpenSim.Grid.UserServer
218 m_log.Info("[LOGOUT]: Notified : " + serv.URI + " about user logout"); 218 m_log.Info("[LOGOUT]: Notified : " + serv.URI + " about user logout");
219 } 219 }
220 220
221 private void NotifyMessageServerAboutUser(MessageServerInfo serv, 221 private void NotifyMessageServerAboutUser(MessageServerInfo serv,
222 LLUUID agentID, LLUUID sessionID, LLUUID RegionID, 222 LLUUID agentID, LLUUID sessionID, LLUUID RegionID,
223 ulong regionhandle, float positionX, float positionY, float positionZ, 223 ulong regionhandle, float positionX, float positionY, float positionZ,
224 string firstname, string lastname) 224 string firstname, string lastname)
225 { 225 {
226 Hashtable reqparams = new Hashtable(); 226 Hashtable reqparams = new Hashtable();
@@ -250,7 +250,7 @@ namespace OpenSim.Grid.UserServer
250 { 250 {
251 m_log.Warn("[MSGCONNECTOR]: Unable to notify Message Server about login. Presence might be borked for this user"); 251 m_log.Warn("[MSGCONNECTOR]: Unable to notify Message Server about login. Presence might be borked for this user");
252 } 252 }
253 253
254 } 254 }
255 } 255 }
256} 256}
diff --git a/OpenSim/Grid/UserServer/Properties/AssemblyInfo.cs b/OpenSim/Grid/UserServer/Properties/AssemblyInfo.cs
index 680b357..926f680 100644
--- a/OpenSim/Grid/UserServer/Properties/AssemblyInfo.cs
+++ b/OpenSim/Grid/UserServer/Properties/AssemblyInfo.cs
@@ -28,7 +28,7 @@
28using System.Reflection; 28using System.Reflection;
29using System.Runtime.InteropServices; 29using System.Runtime.InteropServices;
30 30
31// General Information about an assembly is controlled through the following 31// General information about an assembly is controlled through the following
32// set of attributes. Change these attribute values to modify the information 32// set of attributes. Change these attribute values to modify the information
33// associated with an assembly. 33// associated with an assembly.
34 34
@@ -41,8 +41,8 @@ using System.Runtime.InteropServices;
41[assembly : AssemblyTrademark("")] 41[assembly : AssemblyTrademark("")]
42[assembly : AssemblyCulture("")] 42[assembly : AssemblyCulture("")]
43 43
44// Setting ComVisible to false makes the types in this assembly not visible 44// Setting ComVisible to false makes the types in this assembly not visible
45// to COM components. If you need to access a type in this assembly from 45// to COM components. If you need to access a type in this assembly from
46// COM, set the ComVisible attribute to true on that type. 46// COM, set the ComVisible attribute to true on that type.
47 47
48[assembly : ComVisible(false)] 48[assembly : ComVisible(false)]
@@ -54,7 +54,7 @@ using System.Runtime.InteropServices;
54// Version information for an assembly consists of the following four values: 54// Version information for an assembly consists of the following four values:
55// 55//
56// Major Version 56// Major Version
57// Minor Version 57// Minor Version
58// Build Number 58// Build Number
59// Revision 59// Revision
60// 60//
diff --git a/OpenSim/Grid/UserServer/UserLoginService.cs b/OpenSim/Grid/UserServer/UserLoginService.cs
index 32b1ada..3c9d650 100644
--- a/OpenSim/Grid/UserServer/UserLoginService.cs
+++ b/OpenSim/Grid/UserServer/UserLoginService.cs
@@ -50,11 +50,11 @@ namespace OpenSim.Grid.UserServer
50 public event UserLoggedInAtLocation OnUserLoggedInAtLocation; 50 public event UserLoggedInAtLocation OnUserLoggedInAtLocation;
51 51
52 private UserLoggedInAtLocation handlerUserLoggedInAtLocation = null; 52 private UserLoggedInAtLocation handlerUserLoggedInAtLocation = null;
53 53
54 public UserConfig m_config; 54 public UserConfig m_config;
55 55
56 public UserLoginService( 56 public UserLoginService(
57 UserManagerBase userManager, LibraryRootFolder libraryRootFolder, 57 UserManagerBase userManager, LibraryRootFolder libraryRootFolder,
58 UserConfig config, string welcomeMess) 58 UserConfig config, string welcomeMess)
59 : base(userManager, libraryRootFolder, welcomeMess) 59 : base(userManager, libraryRootFolder, welcomeMess)
60 { 60 {
@@ -138,9 +138,9 @@ namespace OpenSim.Grid.UserServer
138 theUser.HomeLocation.Y.ToString() + ",r" + theUser.HomeLocation.Z.ToString() + "]}"; 138 theUser.HomeLocation.Y.ToString() + ",r" + theUser.HomeLocation.Z.ToString() + "]}";
139 139
140 // Destination 140 // Destination
141 //CFK: The "Notifying" message always seems to appear, so subsume the data from this message into 141 //CFK: The "Notifying" message always seems to appear, so subsume the data from this message into
142 //CFK: the next one for X & Y and comment this one. 142 //CFK: the next one for X & Y and comment this one.
143 //CFK: m_log.Info("[LOGIN]: CUSTOMISERESPONSE: Region X: " + SimInfo.regionLocX + 143 //CFK: m_log.Info("[LOGIN]: CUSTOMISERESPONSE: Region X: " + SimInfo.regionLocX +
144 //CFK: "; Region Y: " + SimInfo.regionLocY); 144 //CFK: "; Region Y: " + SimInfo.regionLocY);
145 response.SimAddress = Util.GetHostFromDNS(SimInfo.serverURI.Split(new char[] { '/', ':' })[3]).ToString(); 145 response.SimAddress = Util.GetHostFromDNS(SimInfo.serverURI.Split(new char[] { '/', ':' })[3]).ToString();
146 response.SimPort = uint.Parse(SimInfo.serverURI.Split(new char[] { '/', ':' })[4]); 146 response.SimPort = uint.Parse(SimInfo.serverURI.Split(new char[] { '/', ':' })[4]);
@@ -150,15 +150,15 @@ namespace OpenSim.Grid.UserServer
150 //Not sure if the + "/CAPS/" should in fact be +"CAPS/" depending if there is already a / as part of httpServerURI 150 //Not sure if the + "/CAPS/" should in fact be +"CAPS/" depending if there is already a / as part of httpServerURI
151 string capsPath = Util.GetRandomCapsPath(); 151 string capsPath = Util.GetRandomCapsPath();
152 response.SeedCapability = SimInfo.httpServerURI + "CAPS/" + capsPath + "0000/"; 152 response.SeedCapability = SimInfo.httpServerURI + "CAPS/" + capsPath + "0000/";
153 153
154 m_log.DebugFormat( 154 m_log.DebugFormat(
155 "[LOGIN]: Sending new CAPS seed url {0} to client {1}", 155 "[LOGIN]: Sending new CAPS seed url {0} to client {1}",
156 response.SeedCapability, response.AgentID); 156 response.SeedCapability, response.AgentID);
157 157
158 // Notify the target of an incoming user 158 // Notify the target of an incoming user
159 //CFK: The "Notifying" message always seems to appear, so subsume the data from this message into 159 //CFK: The "Notifying" message always seems to appear, so subsume the data from this message into
160 //CFK: the next one for X & Y and comment this one. 160 //CFK: the next one for X & Y and comment this one.
161 //CFK: m_log.Info("[LOGIN]: " + SimInfo.regionName + " (" + SimInfo.serverURI + ") " + 161 //CFK: m_log.Info("[LOGIN]: " + SimInfo.regionName + " (" + SimInfo.serverURI + ") " +
162 //CFK: SimInfo.regionLocX + "," + SimInfo.regionLocY); 162 //CFK: SimInfo.regionLocX + "," + SimInfo.regionLocY);
163 163
164 theUser.CurrentAgent.Region = SimInfo.UUID; 164 theUser.CurrentAgent.Region = SimInfo.UUID;
@@ -187,23 +187,23 @@ namespace OpenSim.Grid.UserServer
187 // Update agent with target sim 187 // Update agent with target sim
188 188
189 m_log.InfoFormat( 189 m_log.InfoFormat(
190 "[LOGIN]: Telling region {0} @ {1},{2} ({3}) to expect user connection", 190 "[LOGIN]: Telling region {0} @ {1},{2} ({3}) to expect user connection",
191 SimInfo.regionName, response.RegionX, response.RegionY, SimInfo.httpServerURI); 191 SimInfo.regionName, response.RegionX, response.RegionY, SimInfo.httpServerURI);
192 192
193 XmlRpcRequest GridReq = new XmlRpcRequest("expect_user", SendParams); 193 XmlRpcRequest GridReq = new XmlRpcRequest("expect_user", SendParams);
194 XmlRpcResponse GridResp = GridReq.Send(SimInfo.httpServerURI, 6000); 194 XmlRpcResponse GridResp = GridReq.Send(SimInfo.httpServerURI, 6000);
195 195
196 if (GridResp.IsFault) 196 if (GridResp.IsFault)
197 { 197 {
198 m_log.ErrorFormat( 198 m_log.ErrorFormat(
199 "[LOGIN]: XMLRPC request for {0} failed, fault code: {1}, reason: {2}", 199 "[LOGIN]: XMLRPC request for {0} failed, fault code: {1}, reason: {2}",
200 SimInfo.httpServerURI, GridResp.FaultCode, GridResp.FaultString); 200 SimInfo.httpServerURI, GridResp.FaultCode, GridResp.FaultString);
201 } 201 }
202 handlerUserLoggedInAtLocation = OnUserLoggedInAtLocation; 202 handlerUserLoggedInAtLocation = OnUserLoggedInAtLocation;
203 if (handlerUserLoggedInAtLocation != null) 203 if (handlerUserLoggedInAtLocation != null)
204 { 204 {
205 //m_log.Info("[LOGIN]: Letting other objects know about login"); 205 //m_log.Info("[LOGIN]: Letting other objects know about login");
206 handlerUserLoggedInAtLocation(theUser.ID, theUser.CurrentAgent.SessionID, theUser.CurrentAgent.Region, 206 handlerUserLoggedInAtLocation(theUser.ID, theUser.CurrentAgent.SessionID, theUser.CurrentAgent.Region,
207 theUser.CurrentAgent.Handle, theUser.CurrentAgent.Position.X,theUser.CurrentAgent.Position.Y,theUser.CurrentAgent.Position.Z, 207 theUser.CurrentAgent.Handle, theUser.CurrentAgent.Position.X,theUser.CurrentAgent.Position.Y,theUser.CurrentAgent.Position.Z,
208 theUser.FirstName,theUser.SurName); 208 theUser.FirstName,theUser.SurName);
209 } 209 }
@@ -213,7 +213,7 @@ namespace OpenSim.Grid.UserServer
213 { 213 {
214 tryDefault = true; 214 tryDefault = true;
215 } 215 }
216 216
217 if (tryDefault) 217 if (tryDefault)
218 { 218 {
219 // Send him to default region instead 219 // Send him to default region instead
@@ -301,8 +301,8 @@ namespace OpenSim.Grid.UserServer
301 protected override InventoryData GetInventorySkeleton(LLUUID userID) 301 protected override InventoryData GetInventorySkeleton(LLUUID userID)
302 { 302 {
303 m_log.DebugFormat( 303 m_log.DebugFormat(
304 "[LOGIN]: Contacting inventory service at {0} for inventory skeleton of user {1}", 304 "[LOGIN]: Contacting inventory service at {0} for inventory skeleton of user {1}",
305 m_config.InventoryUrl, userID); 305 m_config.InventoryUrl, userID);
306 306
307 List<InventoryFolderBase> folders 307 List<InventoryFolderBase> folders
308 = SynchronousRestObjectPoster.BeginPostObject<Guid, List<InventoryFolderBase>>( 308 = SynchronousRestObjectPoster.BeginPostObject<Guid, List<InventoryFolderBase>>(
@@ -317,23 +317,23 @@ namespace OpenSim.Grid.UserServer
317 // tools are creating the user profile directly in the database without creating the inventory. At 317 // tools are creating the user profile directly in the database without creating the inventory. At
318 // this time we'll accomodate them by lazily creating the user inventory now if it doesn't already 318 // this time we'll accomodate them by lazily creating the user inventory now if it doesn't already
319 // exist. 319 // exist.
320 bool created = 320 bool created =
321 SynchronousRestObjectPoster.BeginPostObject<Guid, bool>( 321 SynchronousRestObjectPoster.BeginPostObject<Guid, bool>(
322 "POST", m_config.InventoryUrl + "CreateInventory/", userID.UUID); 322 "POST", m_config.InventoryUrl + "CreateInventory/", userID.UUID);
323 323
324 if (!created) 324 if (!created)
325 { 325 {
326 throw new Exception( 326 throw new Exception(
327 String.Format( 327 String.Format(
328 "The inventory creation request for user {0} did not succeed." 328 "The inventory creation request for user {0} did not succeed."
329 + " Please contact your inventory service provider for more information.", 329 + " Please contact your inventory service provider for more information.",
330 userID)); 330 userID));
331 } 331 }
332 else 332 else
333 { 333 {
334 m_log.InfoFormat("[LOGIN]: A new inventory skeleton was successfully created for user {0}", userID); 334 m_log.InfoFormat("[LOGIN]: A new inventory skeleton was successfully created for user {0}", userID);
335 } 335 }
336 336
337 folders = SynchronousRestObjectPoster.BeginPostObject<Guid, List<InventoryFolderBase>>( 337 folders = SynchronousRestObjectPoster.BeginPostObject<Guid, List<InventoryFolderBase>>(
338 "POST", m_config.InventoryUrl + "RootFolders/", userID.UUID); 338 "POST", m_config.InventoryUrl + "RootFolders/", userID.UUID);
339 } 339 }
@@ -343,11 +343,11 @@ namespace OpenSim.Grid.UserServer
343 LLUUID rootID = LLUUID.Zero; 343 LLUUID rootID = LLUUID.Zero;
344 ArrayList AgentInventoryArray = new ArrayList(); 344 ArrayList AgentInventoryArray = new ArrayList();
345 Hashtable TempHash; 345 Hashtable TempHash;
346 346
347 foreach (InventoryFolderBase InvFolder in folders) 347 foreach (InventoryFolderBase InvFolder in folders)
348 { 348 {
349// m_log.DebugFormat("[LOGIN]: Received agent inventory folder {0}", InvFolder.name); 349// m_log.DebugFormat("[LOGIN]: Received agent inventory folder {0}", InvFolder.name);
350 350
351 if (InvFolder.ParentID == LLUUID.Zero) 351 if (InvFolder.ParentID == LLUUID.Zero)
352 { 352 {
353 rootID = InvFolder.ID; 353 rootID = InvFolder.ID;
@@ -360,14 +360,14 @@ namespace OpenSim.Grid.UserServer
360 TempHash["folder_id"] = InvFolder.ID.ToString(); 360 TempHash["folder_id"] = InvFolder.ID.ToString();
361 AgentInventoryArray.Add(TempHash); 361 AgentInventoryArray.Add(TempHash);
362 } 362 }
363 363
364 return new InventoryData(AgentInventoryArray, rootID); 364 return new InventoryData(AgentInventoryArray, rootID);
365 } 365 }
366 else 366 else
367 { 367 {
368 throw new Exception( 368 throw new Exception(
369 String.Format( 369 String.Format(
370 "A root inventory folder for user {0} could not be retrieved from the inventory service", 370 "A root inventory folder for user {0} could not be retrieved from the inventory service",
371 userID)); 371 userID));
372 } 372 }
373 } 373 }
diff --git a/OpenSim/Grid/UserServer/UserManager.cs b/OpenSim/Grid/UserServer/UserManager.cs
index 5d0e1d6..8372d6a 100644
--- a/OpenSim/Grid/UserServer/UserManager.cs
+++ b/OpenSim/Grid/UserServer/UserManager.cs
@@ -41,7 +41,7 @@ namespace OpenSim.Grid.UserServer
41 public delegate void logOffUser(LLUUID AgentID); 41 public delegate void logOffUser(LLUUID AgentID);
42 42
43 public class UserManager : UserManagerBase 43 public class UserManager : UserManagerBase
44 { 44 {
45 private static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType); 45 private static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType);
46 46
47 public event logOffUser OnLogOffUser; 47 public event logOffUser OnLogOffUser;
@@ -91,7 +91,7 @@ namespace OpenSim.Grid.UserServer
91 responseData["lastname" + i.ToString()] = returnUsers[i].lastName; 91 responseData["lastname" + i.ToString()] = returnUsers[i].lastName;
92 } 92 }
93 response.Value = responseData; 93 response.Value = responseData;
94 94
95 return response; 95 return response;
96 } 96 }
97 97
@@ -182,7 +182,7 @@ namespace OpenSim.Grid.UserServer
182 Hashtable responseData = new Hashtable(); 182 Hashtable responseData = new Hashtable();
183 string returnString = "FALSE"; 183 string returnString = "FALSE";
184 // Query Result Information 184 // Query Result Information
185 185
186 if (requestData.Contains("ownerID") && requestData.Contains("friendID") && requestData.Contains("friendPerms")) 186 if (requestData.Contains("ownerID") && requestData.Contains("friendID") && requestData.Contains("friendPerms"))
187 { 187 {
188 // UserManagerBase.AddNewuserFriend 188 // UserManagerBase.AddNewuserFriend
@@ -201,7 +201,7 @@ namespace OpenSim.Grid.UserServer
201 Hashtable responseData = new Hashtable(); 201 Hashtable responseData = new Hashtable();
202 string returnString = "FALSE"; 202 string returnString = "FALSE";
203 // Query Result Information 203 // Query Result Information
204 204
205 if (requestData.Contains("ownerID") && requestData.Contains("friendID")) 205 if (requestData.Contains("ownerID") && requestData.Contains("friendID"))
206 { 206 {
207 // UserManagerBase.AddNewuserFriend 207 // UserManagerBase.AddNewuserFriend
@@ -219,7 +219,7 @@ namespace OpenSim.Grid.UserServer
219 Hashtable requestData = (Hashtable)request.Params[0]; 219 Hashtable requestData = (Hashtable)request.Params[0];
220 Hashtable responseData = new Hashtable(); 220 Hashtable responseData = new Hashtable();
221 string returnString = "FALSE"; 221 string returnString = "FALSE";
222 222
223 if (requestData.Contains("ownerID") && requestData.Contains("friendID") && requestData.Contains("friendPerms")) 223 if (requestData.Contains("ownerID") && requestData.Contains("friendID") && requestData.Contains("friendPerms"))
224 { 224 {
225 UpdateUserFriendPerms(new LLUUID((string)requestData["ownerID"]), new LLUUID((string)requestData["friendID"]), (uint)Convert.ToInt32((string)requestData["friendPerms"])); 225 UpdateUserFriendPerms(new LLUUID((string)requestData["ownerID"]), new LLUUID((string)requestData["friendID"]), (uint)Convert.ToInt32((string)requestData["friendPerms"]));
@@ -243,7 +243,7 @@ namespace OpenSim.Grid.UserServer
243 { 243 {
244 returndata = this.GetUserFriendList(new LLUUID((string)requestData["ownerID"])); 244 returndata = this.GetUserFriendList(new LLUUID((string)requestData["ownerID"]));
245 } 245 }
246 246
247 return FriendListItemListtoXmlRPCResponse(returndata); 247 return FriendListItemListtoXmlRPCResponse(returndata);
248 } 248 }
249 249
@@ -350,7 +350,7 @@ namespace OpenSim.Grid.UserServer
350 } 350 }
351 // dont' know how yet 351 // dont' know how yet
352 if (requestData.Contains("MaturePublish")) 352 if (requestData.Contains("MaturePublish"))
353 { 353 {
354 } 354 }
355 if (requestData.Contains("AboutText")) 355 if (requestData.Contains("AboutText"))
356 { 356 {
@@ -362,7 +362,7 @@ namespace OpenSim.Grid.UserServer
362 } 362 }
363 // not in DB yet. 363 // not in DB yet.
364 if (requestData.Contains("ProfileURL")) 364 if (requestData.Contains("ProfileURL"))
365 { 365 {
366 } 366 }
367 if (requestData.Contains("home_region")) 367 if (requestData.Contains("home_region"))
368 { 368 {
@@ -382,7 +382,7 @@ namespace OpenSim.Grid.UserServer
382 { 382 {
383 m_log.Error("[PROFILE]:Failed to set home region, Value was too large"); 383 m_log.Error("[PROFILE]:Failed to set home region, Value was too large");
384 } 384 }
385 385
386 } 386 }
387 if (requestData.Contains("home_pos_x")) 387 if (requestData.Contains("home_pos_x"))
388 { 388 {
@@ -442,7 +442,7 @@ namespace OpenSim.Grid.UserServer
442 } 442 }
443 if (requestData.Contains("home_look_z")) 443 if (requestData.Contains("home_look_z"))
444 { 444 {
445 try 445 try
446 { 446 {
447 userProfile.HomeLookAtZ = (float)Convert.ToDecimal((string)requestData["home_look_z"]); 447 userProfile.HomeLookAtZ = (float)Convert.ToDecimal((string)requestData["home_look_z"]);
448 } 448 }