diff options
author | Jeff Ames | 2008-05-16 01:22:11 +0000 |
---|---|---|
committer | Jeff Ames | 2008-05-16 01:22:11 +0000 |
commit | 65c5efe43b68700bad94076d4cd421160203c5de (patch) | |
tree | 589b56649ed02f4942671fd6e51c6dc43f682e0d /OpenSim/Grid/UserServer/UserLoginService.cs | |
parent | Thank you very much, mjm for : (diff) | |
download | opensim-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 '')
-rw-r--r-- | OpenSim/Grid/UserServer/UserLoginService.cs | 52 |
1 files changed, 26 insertions, 26 deletions
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 | } |