diff options
author | Brian McBee | 2007-08-08 07:00:56 +0000 |
---|---|---|
committer | Brian McBee | 2007-08-08 07:00:56 +0000 |
commit | 5061a703eafedaaec01b756ac0fd3ac5ea51d3c5 (patch) | |
tree | 8354544ede19f75229469855a5ded4e9c662a215 | |
parent | Whoops! left this out. second part of r1541 (diff) | |
download | opensim-SC-5061a703eafedaaec01b756ac0fd3ac5ea51d3c5.zip opensim-SC-5061a703eafedaaec01b756ac0fd3ac5ea51d3c5.tar.gz opensim-SC-5061a703eafedaaec01b756ac0fd3ac5ea51d3c5.tar.bz2 opensim-SC-5061a703eafedaaec01b756ac0fd3ac5ea51d3c5.tar.xz |
CAPS should now be working in standalone mode. Texture uploads will work even after you cross a region boundary.
-rw-r--r-- | OpenSim/Framework/Communications/Capabilities/Caps.cs | 18 | ||||
-rw-r--r-- | OpenSim/Region/ClientStack/ClientView.API.cs | 18 |
2 files changed, 26 insertions, 10 deletions
diff --git a/OpenSim/Framework/Communications/Capabilities/Caps.cs b/OpenSim/Framework/Communications/Capabilities/Caps.cs index d133617..82ef08d 100644 --- a/OpenSim/Framework/Communications/Capabilities/Caps.cs +++ b/OpenSim/Framework/Communications/Capabilities/Caps.cs | |||
@@ -74,13 +74,18 @@ namespace OpenSim.Region.Capabilities | |||
74 | { | 74 | { |
75 | Console.WriteLine("registering CAPS handlers"); | 75 | Console.WriteLine("registering CAPS handlers"); |
76 | string capsBase = "/CAPS/" + m_capsObjectPath; | 76 | string capsBase = "/CAPS/" + m_capsObjectPath; |
77 | try | ||
78 | { | ||
79 | httpListener.AddStreamHandler(new LLSDStreamhandler<LLSDMapRequest, LLSDMapLayerResponse>("POST", capsBase + m_mapLayerPath, this.GetMapLayer)); | ||
80 | httpListener.AddStreamHandler(new LLSDStreamhandler<LLSDAssetUploadRequest, LLSDAssetUploadResponse>("POST", capsBase + m_newInventory, this.NewAgentInventoryRequest)); | ||
77 | 81 | ||
78 | httpListener.AddStreamHandler(new LLSDStreamhandler<LLSDMapRequest, LLSDMapLayerResponse>("POST", capsBase + m_mapLayerPath, this.GetMapLayer )); | 82 | AddLegacyCapsHandler(httpListener, m_requestPath, CapsRequest); |
79 | httpListener.AddStreamHandler( new LLSDStreamhandler<LLSDAssetUploadRequest, LLSDAssetUploadResponse>("POST", capsBase + m_newInventory, this.NewAgentInventoryRequest)); | 83 | //AddLegacyCapsHandler(httpListener, m_requestTexture , RequestTexture); |
80 | 84 | AddLegacyCapsHandler(httpListener, m_notecardUpdatePath, NoteCardAgentInventory); | |
81 | AddLegacyCapsHandler(httpListener, m_requestPath, CapsRequest); | 85 | } |
82 | //AddLegacyCapsHandler(httpListener, m_requestTexture , RequestTexture); | 86 | catch |
83 | AddLegacyCapsHandler(httpListener, m_notecardUpdatePath, NoteCardAgentInventory); | 87 | { |
88 | } | ||
84 | } | 89 | } |
85 | 90 | ||
86 | 91 | ||
@@ -361,3 +366,4 @@ namespace OpenSim.Region.Capabilities | |||
361 | } | 366 | } |
362 | } | 367 | } |
363 | 368 | ||
369 | |||
diff --git a/OpenSim/Region/ClientStack/ClientView.API.cs b/OpenSim/Region/ClientStack/ClientView.API.cs index fb0ec29..a4b0af1 100644 --- a/OpenSim/Region/ClientStack/ClientView.API.cs +++ b/OpenSim/Region/ClientStack/ClientView.API.cs | |||
@@ -383,7 +383,7 @@ namespace OpenSim.Region.ClientStack | |||
383 | agentData.child = false; | 383 | agentData.child = false; |
384 | agentData.firstname = this.firstName; | 384 | agentData.firstname = this.firstName; |
385 | agentData.lastname = this.lastName; | 385 | agentData.lastname = this.lastName; |
386 | 386 | agentData.CapsPath=m_authenticateSessionsHandler.AgentCircuits[this.CircuitCode].CapsPath; | |
387 | return agentData; | 387 | return agentData; |
388 | } | 388 | } |
389 | 389 | ||
@@ -406,8 +406,13 @@ namespace OpenSim.Region.ClientStack | |||
406 | newSimPack.RegionData.SimIP += (uint)byteIP[1] << 8; | 406 | newSimPack.RegionData.SimIP += (uint)byteIP[1] << 8; |
407 | newSimPack.RegionData.SimIP += (uint)byteIP[0]; | 407 | newSimPack.RegionData.SimIP += (uint)byteIP[0]; |
408 | newSimPack.RegionData.SimPort = (ushort)externalIPEndPoint.Port; | 408 | newSimPack.RegionData.SimPort = (ushort)externalIPEndPoint.Port; |
409 | newSimPack.RegionData.SeedCapability = new byte[0]; | 409 | //newSimPack.RegionData.SeedCapability = new byte[0]; |
410 | |||
411 | string capsPath = "http://" + externalIPEndPoint.Address.ToString() + ":9000/CAPS/" + m_authenticateSessionsHandler.AgentCircuits[this.CircuitCode].CapsPath +"0000/"; | ||
412 | System.Text.ASCIIEncoding enc=new System.Text.ASCIIEncoding(); | ||
413 | newSimPack.RegionData.SeedCapability = enc.GetBytes(capsPath); | ||
410 | 414 | ||
415 | |||
411 | this.OutPacket(newSimPack); | 416 | this.OutPacket(newSimPack); |
412 | //this.DowngradeClient(); | 417 | //this.DowngradeClient(); |
413 | } | 418 | } |
@@ -451,7 +456,12 @@ namespace OpenSim.Region.ClientStack | |||
451 | teleport.Info.AgentID = this.AgentID; | 456 | teleport.Info.AgentID = this.AgentID; |
452 | teleport.Info.RegionHandle = regionHandle; | 457 | teleport.Info.RegionHandle = regionHandle; |
453 | teleport.Info.SimAccess = simAccess; | 458 | teleport.Info.SimAccess = simAccess; |
454 | teleport.Info.SeedCapability = new byte[0]; | 459 | |
460 | string capsPath = "http://" + newRegionEndPoint.Address.ToString() + ":9000/CAPS/" + m_authenticateSessionsHandler.AgentCircuits[this.CircuitCode].CapsPath + "0000/"; | ||
461 | System.Text.ASCIIEncoding enc = new System.Text.ASCIIEncoding(); | ||
462 | teleport.Info.SeedCapability = enc.GetBytes(capsPath); | ||
463 | |||
464 | //teleport.Info.SeedCapability = new byte[0]; | ||
455 | 465 | ||
456 | IPAddress oIP = newRegionEndPoint.Address; | 466 | IPAddress oIP = newRegionEndPoint.Address; |
457 | byte[] byteIP = oIP.GetAddressBytes(); | 467 | byte[] byteIP = oIP.GetAddressBytes(); |
@@ -459,7 +469,7 @@ namespace OpenSim.Region.ClientStack | |||
459 | ip += (uint)byteIP[2] << 16; | 469 | ip += (uint)byteIP[2] << 16; |
460 | ip += (uint)byteIP[1] << 8; | 470 | ip += (uint)byteIP[1] << 8; |
461 | ip += (uint)byteIP[0]; | 471 | ip += (uint)byteIP[0]; |
462 | 472 | ||
463 | teleport.Info.SimIP = ip; | 473 | teleport.Info.SimIP = ip; |
464 | teleport.Info.SimPort = (ushort)newRegionEndPoint.Port; | 474 | teleport.Info.SimPort = (ushort)newRegionEndPoint.Port; |
465 | teleport.Info.LocationID = 4; | 475 | teleport.Info.LocationID = 4; |