diff options
Diffstat (limited to '')
14 files changed, 234 insertions, 92 deletions
diff --git a/OpenSim/Data/SQLite/Resources/019_RegionStore.sql b/OpenSim/Data/SQLite/Resources/019_RegionStore.sql deleted file mode 100644 index d62f848..0000000 --- a/OpenSim/Data/SQLite/Resources/019_RegionStore.sql +++ /dev/null | |||
@@ -1,5 +0,0 @@ | |||
1 | BEGIN; | ||
2 | |||
3 | ALTER TABLE regionsettings ADD COLUMN map_tile_ID varchar(36) NOT NULL default '00000000-0000-0000-0000-000000000000'; | ||
4 | |||
5 | COMMIT; \ No newline at end of file | ||
diff --git a/OpenSim/Data/SQLite/Resources/020_RegionStore.sql b/OpenSim/Data/SQLite/Resources/020_RegionStore.sql deleted file mode 100644 index 39cb752..0000000 --- a/OpenSim/Data/SQLite/Resources/020_RegionStore.sql +++ /dev/null | |||
@@ -1,6 +0,0 @@ | |||
1 | BEGIN; | ||
2 | |||
3 | ALTER TABLE prims ADD COLUMN MediaURL varchar(255); | ||
4 | ALTER TABLE primshapes ADD COLUMN Media TEXT; | ||
5 | |||
6 | COMMIT; \ No newline at end of file | ||
diff --git a/OpenSim/Data/SQLite/Resources/RegionStore.migrations b/OpenSim/Data/SQLite/Resources/RegionStore.migrations index 0c421ec..5e2045b 100644 --- a/OpenSim/Data/SQLite/Resources/RegionStore.migrations +++ b/OpenSim/Data/SQLite/Resources/RegionStore.migrations | |||
@@ -448,11 +448,22 @@ update land | |||
448 | COMMIT; | 448 | COMMIT; |
449 | 449 | ||
450 | :VERSION 19 | 450 | :VERSION 19 |
451 | BEGIN ; | 451 | BEGIN; |
452 | ALTER TABLE `land` ADD COLUMN `MediaType` VARCHAR(32) NOT NULL DEFAULT 'none/none' ; | 452 | ALTER TABLE regionsettings ADD COLUMN map_tile_ID varchar(36) NOT NULL default '00000000-0000-0000-0000-000000000000'; |
453 | COMMIT; | ||
454 | |||
455 | :VERSION 20 | ||
456 | BEGIN; | ||
457 | ALTER TABLE prims ADD COLUMN MediaURL varchar(255); | ||
458 | ALTER TABLE primshapes ADD COLUMN Media TEXT; | ||
459 | COMMIT; | ||
460 | |||
461 | :VERSION 21 | ||
462 | BEGIN; | ||
463 | ALTER TABLE `land` ADD COLUMN `MediaType` VARCHAR(32) NOT NULL DEFAULT 'none/none'; | ||
453 | ALTER TABLE `land` ADD COLUMN `MediaDescription` VARCHAR(255) NOT NULL DEFAULT ''; | 464 | ALTER TABLE `land` ADD COLUMN `MediaDescription` VARCHAR(255) NOT NULL DEFAULT ''; |
454 | ALTER TABLE `land` ADD COLUMN `MediaSize` VARCHAR(16) NOT NULL DEFAULT '0,0'; | 465 | ALTER TABLE `land` ADD COLUMN `MediaSize` VARCHAR(16) NOT NULL DEFAULT '0,0'; |
455 | ALTER TABLE `land` ADD COLUMN `MediaLoop` BOOLEAN NOT NULL DEFAULT FALSE; | 466 | ALTER TABLE `land` ADD COLUMN `MediaLoop` BOOLEAN NOT NULL DEFAULT FALSE; |
456 | ALTER TABLE `land` ADD COLUMN `ObscureMusic` BOOLEAN NOT NULL DEFAULT FALSE; | 467 | ALTER TABLE `land` ADD COLUMN `ObscureMusic` BOOLEAN NOT NULL DEFAULT FALSE; |
457 | ALTER TABLE `land` ADD COLUMN `ObscureMedia` BOOLEAN NOT NULL DEFAULT FALSE; | 468 | ALTER TABLE `land` ADD COLUMN `ObscureMedia` BOOLEAN NOT NULL DEFAULT FALSE; |
458 | COMMIT ; \ No newline at end of file | 469 | COMMIT; \ No newline at end of file |
diff --git a/OpenSim/Framework/Servers/HttpServer/BaseHttpServer.cs b/OpenSim/Framework/Servers/HttpServer/BaseHttpServer.cs index 016ab73..95c3e6c 100644 --- a/OpenSim/Framework/Servers/HttpServer/BaseHttpServer.cs +++ b/OpenSim/Framework/Servers/HttpServer/BaseHttpServer.cs | |||
@@ -338,19 +338,25 @@ namespace OpenSim.Framework.Servers.HttpServer | |||
338 | // HandleRequest(request,resp); | 338 | // HandleRequest(request,resp); |
339 | // } | 339 | // } |
340 | 340 | ||
341 | /// <summary> | ||
342 | /// This methods is the start of incoming HTTP request handling. | ||
343 | /// </summary> | ||
344 | /// <param name="request"></param> | ||
345 | /// <param name="response"></param> | ||
341 | public virtual void HandleRequest(OSHttpRequest request, OSHttpResponse response) | 346 | public virtual void HandleRequest(OSHttpRequest request, OSHttpResponse response) |
342 | { | 347 | { |
343 | try | 348 | try |
344 | { | 349 | { |
350 | // m_log.Debug("[BASE HTTP SERVER]: Handling request to " + request.RawUrl); | ||
351 | |||
345 | Thread.CurrentThread.CurrentCulture = new CultureInfo("en-US", true); | 352 | Thread.CurrentThread.CurrentCulture = new CultureInfo("en-US", true); |
353 | |||
346 | // This is the REST agent interface. We require an agent to properly identify | 354 | // This is the REST agent interface. We require an agent to properly identify |
347 | // itself. If the REST handler recognizes the prefix it will attempt to | 355 | // itself. If the REST handler recognizes the prefix it will attempt to |
348 | // satisfy the request. If it is not recognizable, and no damage has occurred | 356 | // satisfy the request. If it is not recognizable, and no damage has occurred |
349 | // the request can be passed through to the other handlers. This is a low | 357 | // the request can be passed through to the other handlers. This is a low |
350 | // probability event; if a request is matched it is normally expected to be | 358 | // probability event; if a request is matched it is normally expected to be |
351 | // handled | 359 | // handled |
352 | // m_log.Debug("[BASE HTTP SERVER]: Handling request to " + request.RawUrl); | ||
353 | |||
354 | IHttpAgentHandler agentHandler; | 360 | IHttpAgentHandler agentHandler; |
355 | 361 | ||
356 | if (TryGetAgentHandler(request, response, out agentHandler)) | 362 | if (TryGetAgentHandler(request, response, out agentHandler)) |
diff --git a/OpenSim/Region/Application/OpenSim.cs b/OpenSim/Region/Application/OpenSim.cs index 072e4d3..945da7d 100644 --- a/OpenSim/Region/Application/OpenSim.cs +++ b/OpenSim/Region/Application/OpenSim.cs | |||
@@ -218,7 +218,13 @@ namespace OpenSim | |||
218 | 218 | ||
219 | m_console.Commands.AddCommand("region", false, "debug packet", | 219 | m_console.Commands.AddCommand("region", false, "debug packet", |
220 | "debug packet <level>", | 220 | "debug packet <level>", |
221 | "Turn on packet debugging", Debug); | 221 | "Turn on packet debugging", |
222 | "If level > 255 then all incoming and outgoing packets are logged.\n" | ||
223 | + "If level <= 255 then incoming AgentUpdate and outgoing SimStats and SimulatorViewerTimeMessage packets are not logged.\n" | ||
224 | + "If level <= 200 then incoming RequestImage and outgoing ImagePacket, ImageData, LayerData and CoarseLocationUpdate packets are not logged.\n" | ||
225 | + "If level <= 100 then incoming ViewerEffect and AgentAnimation and outgoing ViewerEffect and AvatarAnimation packets are not logged.\n" | ||
226 | + "If level <= 0 then no packets are logged.", | ||
227 | Debug); | ||
222 | 228 | ||
223 | m_console.Commands.AddCommand("region", false, "debug scene", | 229 | m_console.Commands.AddCommand("region", false, "debug scene", |
224 | "debug scene <cripting> <collisions> <physics>", | 230 | "debug scene <cripting> <collisions> <physics>", |
diff --git a/OpenSim/Region/Application/OpenSimBase.cs b/OpenSim/Region/Application/OpenSimBase.cs index 4ef0b1b..ec3193c 100644 --- a/OpenSim/Region/Application/OpenSimBase.cs +++ b/OpenSim/Region/Application/OpenSimBase.cs | |||
@@ -36,7 +36,6 @@ using Nini.Config; | |||
36 | using OpenMetaverse; | 36 | using OpenMetaverse; |
37 | using OpenSim.Framework; | 37 | using OpenSim.Framework; |
38 | using OpenSim.Framework.Communications; | 38 | using OpenSim.Framework.Communications; |
39 | |||
40 | using OpenSim.Framework.Console; | 39 | using OpenSim.Framework.Console; |
41 | using OpenSim.Framework.Servers; | 40 | using OpenSim.Framework.Servers; |
42 | using OpenSim.Framework.Servers.HttpServer; | 41 | using OpenSim.Framework.Servers.HttpServer; |
@@ -403,7 +402,9 @@ namespace OpenSim | |||
403 | } | 402 | } |
404 | catch (Exception e) | 403 | catch (Exception e) |
405 | { | 404 | { |
406 | m_log.ErrorFormat("[STARTUP]: Registration of region with grid failed, aborting startup - {0}", e.StackTrace); | 405 | m_log.ErrorFormat( |
406 | "[STARTUP]: Registration of region with grid failed, aborting startup due to {0} {1}", | ||
407 | e.Message, e.StackTrace); | ||
407 | 408 | ||
408 | if (scene.SnmpService != null) | 409 | if (scene.SnmpService != null) |
409 | { | 410 | { |
diff --git a/OpenSim/Region/ClientStack/LindenUDP/LLClientView.cs b/OpenSim/Region/ClientStack/LindenUDP/LLClientView.cs index aa7de05..a1cd30a 100644 --- a/OpenSim/Region/ClientStack/LindenUDP/LLClientView.cs +++ b/OpenSim/Region/ClientStack/LindenUDP/LLClientView.cs | |||
@@ -60,7 +60,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP | |||
60 | public class LLClientView : IClientAPI, IClientCore, IClientIM, IClientChat, IClientIPEndpoint, IStatsCollector | 60 | public class LLClientView : IClientAPI, IClientCore, IClientIM, IClientChat, IClientIPEndpoint, IStatsCollector |
61 | { | 61 | { |
62 | /// <value> | 62 | /// <value> |
63 | /// Debug packet level. At the moment, only 255 does anything (prints out all in and out packets). | 63 | /// Debug packet level. See OpenSim.RegisterConsoleCommands() for more details. |
64 | /// </value> | 64 | /// </value> |
65 | protected int m_debugPacketLevel = 0; | 65 | protected int m_debugPacketLevel = 0; |
66 | 66 | ||
@@ -11229,8 +11229,28 @@ namespace OpenSim.Region.ClientStack.LindenUDP | |||
11229 | /// handles splitting manually</param> | 11229 | /// handles splitting manually</param> |
11230 | protected void OutPacket(Packet packet, ThrottleOutPacketType throttlePacketType, bool doAutomaticSplitting) | 11230 | protected void OutPacket(Packet packet, ThrottleOutPacketType throttlePacketType, bool doAutomaticSplitting) |
11231 | { | 11231 | { |
11232 | if (m_debugPacketLevel >= 255) | 11232 | if (m_debugPacketLevel > 0) |
11233 | m_log.DebugFormat("[CLIENT]: Packet OUT {0}", packet.Type); | 11233 | { |
11234 | bool outputPacket = true; | ||
11235 | |||
11236 | if (m_debugPacketLevel <= 255 | ||
11237 | && (packet.Type == PacketType.SimStats || packet.Type == PacketType.SimulatorViewerTimeMessage)) | ||
11238 | outputPacket = false; | ||
11239 | |||
11240 | if (m_debugPacketLevel <= 200 | ||
11241 | && | ||
11242 | (packet.Type == PacketType.ImagePacket | ||
11243 | || packet.Type == PacketType.ImageData | ||
11244 | || packet.Type == PacketType.LayerData | ||
11245 | || packet.Type == PacketType.CoarseLocationUpdate)) | ||
11246 | outputPacket = false; | ||
11247 | |||
11248 | if (m_debugPacketLevel <= 100 && (packet.Type == PacketType.AvatarAnimation || packet.Type == PacketType.ViewerEffect)) | ||
11249 | outputPacket = false; | ||
11250 | |||
11251 | if (outputPacket) | ||
11252 | m_log.DebugFormat("[CLIENT]: Packet OUT {0}", packet.Type); | ||
11253 | } | ||
11234 | 11254 | ||
11235 | m_udpServer.SendPacket(m_udpClient, packet, throttlePacketType, doAutomaticSplitting); | 11255 | m_udpServer.SendPacket(m_udpClient, packet, throttlePacketType, doAutomaticSplitting); |
11236 | } | 11256 | } |
@@ -11316,26 +11336,29 @@ namespace OpenSim.Region.ClientStack.LindenUDP | |||
11316 | /// Entryway from the client to the simulator. All UDP packets from the client will end up here | 11336 | /// Entryway from the client to the simulator. All UDP packets from the client will end up here |
11317 | /// </summary> | 11337 | /// </summary> |
11318 | /// <param name="Pack">OpenMetaverse.packet</param> | 11338 | /// <param name="Pack">OpenMetaverse.packet</param> |
11319 | public void ProcessInPacket(Packet Pack) | 11339 | public void ProcessInPacket(Packet packet) |
11320 | { | 11340 | { |
11321 | if (!m_IsPresenceReady) | 11341 | if (m_debugPacketLevel > 0) |
11322 | { | 11342 | { |
11323 | if (m_pendingPackets == null) | 11343 | bool outputPacket = true; |
11324 | { | 11344 | |
11325 | m_pendingPackets = new List<Packet>(); | 11345 | if (m_debugPacketLevel <= 255 && packet.Type == PacketType.AgentUpdate) |
11326 | } | 11346 | outputPacket = false; |
11327 | m_pendingPackets.Add(Pack); | 11347 | |
11348 | if (m_debugPacketLevel <= 200 && packet.Type == PacketType.RequestImage) | ||
11349 | outputPacket = false; | ||
11350 | |||
11351 | if (m_debugPacketLevel <= 100 && (packet.Type == PacketType.ViewerEffect || packet.Type == PacketType.AgentAnimation)) | ||
11352 | outputPacket = false; | ||
11353 | |||
11354 | if (outputPacket) | ||
11355 | m_log.DebugFormat("[CLIENT]: Packet IN {0}", packet.Type); | ||
11328 | } | 11356 | } |
11329 | else | ||
11330 | { | ||
11331 | if (m_debugPacketLevel >= 255) | ||
11332 | m_log.DebugFormat("[CLIENT]: Packet IN {0}", Pack.Type); | ||
11333 | 11357 | ||
11334 | if (!ProcessPacketMethod(Pack)) | 11358 | if (!ProcessPacketMethod(packet)) |
11335 | m_log.Warn("[CLIENT]: unhandled packet " + Pack.Type); | 11359 | m_log.Warn("[CLIENT]: unhandled packet " + packet.Type); |
11336 | 11360 | ||
11337 | PacketPool.Instance.ReturnPacket(Pack); | 11361 | PacketPool.Instance.ReturnPacket(packet); |
11338 | } | ||
11339 | } | 11362 | } |
11340 | 11363 | ||
11341 | private static PrimitiveBaseShape GetShapeFromAddPacket(ObjectAddPacket addPacket) | 11364 | private static PrimitiveBaseShape GetShapeFromAddPacket(ObjectAddPacket addPacket) |
diff --git a/OpenSim/Region/CoreModules/Avatar/Attachments/AttachmentsModule.cs b/OpenSim/Region/CoreModules/Avatar/Attachments/AttachmentsModule.cs index 38152cc..bd9e621 100644 --- a/OpenSim/Region/CoreModules/Avatar/Attachments/AttachmentsModule.cs +++ b/OpenSim/Region/CoreModules/Avatar/Attachments/AttachmentsModule.cs | |||
@@ -174,16 +174,12 @@ namespace OpenSim.Region.CoreModules.Avatar.Attachments | |||
174 | UUID itemID = UUID.Zero; | 174 | UUID itemID = UUID.Zero; |
175 | if (sp != null) | 175 | if (sp != null) |
176 | { | 176 | { |
177 | foreach(SceneObjectGroup grp in sp.Attachments) | 177 | foreach(SceneObjectGroup grp in sp.GetAttachments(AttachmentPt)) |
178 | { | 178 | { |
179 | if (grp.GetAttachmentPoint() == (byte)AttachmentPt) | 179 | itemID = grp.GetFromItemID(); |
180 | { | 180 | if (itemID != UUID.Zero) |
181 | itemID = grp.GetFromItemID(); | 181 | DetachSingleAttachmentToInv(itemID, remoteClient); |
182 | break; | 182 | } |
183 | } | ||
184 | } | ||
185 | if (itemID != UUID.Zero) | ||
186 | DetachSingleAttachmentToInv(itemID, remoteClient); | ||
187 | } | 183 | } |
188 | 184 | ||
189 | if (group.GetFromItemID() == UUID.Zero) | 185 | if (group.GetFromItemID() == UUID.Zero) |
@@ -197,12 +193,7 @@ namespace OpenSim.Region.CoreModules.Avatar.Attachments | |||
197 | 193 | ||
198 | SetAttachmentInventoryStatus(remoteClient, AttachmentPt, itemID, group); | 194 | SetAttachmentInventoryStatus(remoteClient, AttachmentPt, itemID, group); |
199 | 195 | ||
200 | group.AttachToAgent(remoteClient.AgentId, AttachmentPt, attachPos, silent); | 196 | AttachToAgent(sp, group, AttachmentPt, attachPos, silent); |
201 | |||
202 | // In case it is later dropped again, don't let | ||
203 | // it get cleaned up | ||
204 | group.RootPart.RemFlag(PrimFlags.TemporaryOnRez); | ||
205 | group.HasGroupChanged = false; | ||
206 | } | 197 | } |
207 | else | 198 | else |
208 | { | 199 | { |
@@ -551,6 +542,78 @@ namespace OpenSim.Region.CoreModules.Avatar.Attachments | |||
551 | remoteClient.SendInventoryItemCreateUpdate(item, 0); | 542 | remoteClient.SendInventoryItemCreateUpdate(item, 0); |
552 | } | 543 | } |
553 | } | 544 | } |
554 | } | 545 | } |
546 | |||
547 | /// <summary> | ||
548 | /// Attach this scene object to the given avatar. | ||
549 | /// </summary> | ||
550 | /// | ||
551 | /// This isn't publicly available since attachments should always perform the corresponding inventory | ||
552 | /// operation (to show the attach in user inventory and update the asset with positional information). | ||
553 | /// | ||
554 | /// <param name="sp"></param> | ||
555 | /// <param name="so"></param> | ||
556 | /// <param name="attachmentpoint"></param> | ||
557 | /// <param name="AttachOffset"></param> | ||
558 | /// <param name="silent"></param> | ||
559 | protected void AttachToAgent(ScenePresence avatar, SceneObjectGroup so, uint attachmentpoint, Vector3 AttachOffset, bool silent) | ||
560 | { | ||
561 | // don't attach attachments to child agents | ||
562 | if (avatar.IsChildAgent) return; | ||
563 | |||
564 | // m_log.DebugFormat("[ATTACHMENTS MODULE]: Adding attachment {0} to avatar {1}", Name, avatar.Name); | ||
565 | |||
566 | so.DetachFromBackup(); | ||
567 | |||
568 | // Remove from database and parcel prim count | ||
569 | m_scene.DeleteFromStorage(so.UUID); | ||
570 | m_scene.EventManager.TriggerParcelPrimCountTainted(); | ||
571 | |||
572 | so.RootPart.AttachedAvatar = avatar.UUID; | ||
573 | |||
574 | //Anakin Lohner bug #3839 | ||
575 | lock (so.Children) | ||
576 | { | ||
577 | foreach (SceneObjectPart p in so.Children.Values) | ||
578 | { | ||
579 | p.AttachedAvatar = avatar.UUID; | ||
580 | } | ||
581 | } | ||
582 | |||
583 | if (so.RootPart.PhysActor != null) | ||
584 | { | ||
585 | m_scene.PhysicsScene.RemovePrim(so.RootPart.PhysActor); | ||
586 | so.RootPart.PhysActor = null; | ||
587 | } | ||
588 | |||
589 | so.AbsolutePosition = AttachOffset; | ||
590 | so.RootPart.AttachedPos = AttachOffset; | ||
591 | so.RootPart.IsAttachment = true; | ||
592 | |||
593 | so.RootPart.SetParentLocalId(avatar.LocalId); | ||
594 | so.SetAttachmentPoint(Convert.ToByte(attachmentpoint)); | ||
595 | |||
596 | avatar.AddAttachment(so); | ||
597 | |||
598 | if (!silent) | ||
599 | { | ||
600 | // Killing it here will cause the client to deselect it | ||
601 | // It then reappears on the avatar, deselected | ||
602 | // through the full update below | ||
603 | // | ||
604 | if (so.IsSelected) | ||
605 | { | ||
606 | m_scene.SendKillObject(so.RootPart.LocalId); | ||
607 | } | ||
608 | |||
609 | so.IsSelected = false; // fudge.... | ||
610 | so.ScheduleGroupForFullUpdate(); | ||
611 | } | ||
612 | |||
613 | // In case it is later dropped again, don't let | ||
614 | // it get cleaned up | ||
615 | so.RootPart.RemFlag(PrimFlags.TemporaryOnRez); | ||
616 | so.HasGroupChanged = false; | ||
617 | } | ||
555 | } | 618 | } |
556 | } \ No newline at end of file | 619 | } \ No newline at end of file |
diff --git a/OpenSim/Region/Framework/Scenes/ScenePresence.cs b/OpenSim/Region/Framework/Scenes/ScenePresence.cs index 2ed00a0..6e3afa9 100644 --- a/OpenSim/Region/Framework/Scenes/ScenePresence.cs +++ b/OpenSim/Region/Framework/Scenes/ScenePresence.cs | |||
@@ -3911,6 +3911,27 @@ if (m_animator.m_jumping) force.Z = m_animator.m_jumpVelocity; // add for ju | |||
3911 | m_attachments.Add(gobj); | 3911 | m_attachments.Add(gobj); |
3912 | } | 3912 | } |
3913 | } | 3913 | } |
3914 | |||
3915 | /// <summary> | ||
3916 | /// Get the scene object attached to the given point. | ||
3917 | /// </summary> | ||
3918 | /// <param name="attachmentPoint"></param> | ||
3919 | /// <returns>Returns an empty list if there were no attachments at the point.</returns> | ||
3920 | public List<SceneObjectGroup> GetAttachments(uint attachmentPoint) | ||
3921 | { | ||
3922 | List<SceneObjectGroup> attachments = new List<SceneObjectGroup>(); | ||
3923 | |||
3924 | lock (m_attachments) | ||
3925 | { | ||
3926 | foreach (SceneObjectGroup so in m_attachments) | ||
3927 | { | ||
3928 | if (attachmentPoint == so.RootPart.AttachmentPoint) | ||
3929 | attachments.Add(so); | ||
3930 | } | ||
3931 | } | ||
3932 | |||
3933 | return attachments; | ||
3934 | } | ||
3914 | 3935 | ||
3915 | public bool HasAttachments() | 3936 | public bool HasAttachments() |
3916 | { | 3937 | { |
diff --git a/OpenSim/Services/Connectors/Hypergrid/GatekeeperServiceConnector.cs b/OpenSim/Services/Connectors/Hypergrid/GatekeeperServiceConnector.cs index 8d0f7be..77e3b20 100644 --- a/OpenSim/Services/Connectors/Hypergrid/GatekeeperServiceConnector.cs +++ b/OpenSim/Services/Connectors/Hypergrid/GatekeeperServiceConnector.cs | |||
@@ -86,13 +86,8 @@ namespace OpenSim.Services.Connectors.Hypergrid | |||
86 | paramList.Add(hash); | 86 | paramList.Add(hash); |
87 | 87 | ||
88 | XmlRpcRequest request = new XmlRpcRequest("link_region", paramList); | 88 | XmlRpcRequest request = new XmlRpcRequest("link_region", paramList); |
89 | IPEndPoint ext = info.ExternalEndPoint; | 89 | string uri = "http://" + ((info.ServerURI == string.Empty) ? info.ExternalEndPoint.Address + ":" + info.HttpPort + "/" : info.ServerURI); |
90 | string uri = ""; | 90 | m_log.Debug("[GATEKEEPER SERVICE CONNECTOR]: Linking to " + uri); |
91 | if (ext != null) | ||
92 | { | ||
93 | uri = "http://" + ext.Address + ":" + info.HttpPort + "/"; | ||
94 | } | ||
95 | //m_log.Debug("[GATEKEEPER SERVICE CONNECTOR]: Linking to " + uri); | ||
96 | XmlRpcResponse response = null; | 91 | XmlRpcResponse response = null; |
97 | try | 92 | try |
98 | { | 93 | { |
@@ -193,12 +188,7 @@ namespace OpenSim.Services.Connectors.Hypergrid | |||
193 | paramList.Add(hash); | 188 | paramList.Add(hash); |
194 | 189 | ||
195 | XmlRpcRequest request = new XmlRpcRequest("get_region", paramList); | 190 | XmlRpcRequest request = new XmlRpcRequest("get_region", paramList); |
196 | IPEndPoint ext = gatekeeper.ExternalEndPoint; | 191 | string uri = "http://" + ((gatekeeper.ServerURI == string.Empty) ? gatekeeper.ExternalEndPoint.Address + ":" + gatekeeper.HttpPort + "/" : gatekeeper.ServerURI); |
197 | string uri = ""; | ||
198 | if (ext != null) | ||
199 | { | ||
200 | uri = "http://" + ext.Address + ":" + gatekeeper.HttpPort + "/"; | ||
201 | } | ||
202 | m_log.Debug("[GATEKEEPER SERVICE CONNECTOR]: contacting " + uri); | 192 | m_log.Debug("[GATEKEEPER SERVICE CONNECTOR]: contacting " + uri); |
203 | XmlRpcResponse response = null; | 193 | XmlRpcResponse response = null; |
204 | try | 194 | try |
diff --git a/OpenSim/Services/Connectors/Hypergrid/UserAgentServiceConnector.cs b/OpenSim/Services/Connectors/Hypergrid/UserAgentServiceConnector.cs index 4501937..7fa086a 100644 --- a/OpenSim/Services/Connectors/Hypergrid/UserAgentServiceConnector.cs +++ b/OpenSim/Services/Connectors/Hypergrid/UserAgentServiceConnector.cs | |||
@@ -51,15 +51,16 @@ namespace OpenSim.Services.Connectors.Hypergrid | |||
51 | MethodBase.GetCurrentMethod().DeclaringType); | 51 | MethodBase.GetCurrentMethod().DeclaringType); |
52 | 52 | ||
53 | string m_ServerURL; | 53 | string m_ServerURL; |
54 | Uri m_Uri; | ||
55 | public UserAgentServiceConnector(string url) | 54 | public UserAgentServiceConnector(string url) |
56 | { | 55 | { |
57 | m_ServerURL = url; | 56 | m_ServerURL = url; |
57 | // Doing this here, because XML-RPC or mono have some strong ideas about | ||
58 | // caching DNS translations. | ||
58 | try | 59 | try |
59 | { | 60 | { |
60 | m_Uri = new Uri(m_ServerURL); | 61 | Uri m_Uri = new Uri(m_ServerURL); |
61 | IPAddress ip = Util.GetHostFromDNS(m_Uri.Host); | 62 | IPAddress ip = Util.GetHostFromDNS(m_Uri.Host); |
62 | m_ServerURL = "http://" + ip.ToString() + ":" + m_Uri.Port; | 63 | m_ServerURL = m_ServerURL.Replace(m_Uri.Host, ip.ToString()); ; |
63 | } | 64 | } |
64 | catch (Exception e) | 65 | catch (Exception e) |
65 | { | 66 | { |
diff --git a/OpenSim/Services/Connectors/Simulation/SimulationServiceConnector.cs b/OpenSim/Services/Connectors/Simulation/SimulationServiceConnector.cs index 9e30044..6d852f1 100644 --- a/OpenSim/Services/Connectors/Simulation/SimulationServiceConnector.cs +++ b/OpenSim/Services/Connectors/Simulation/SimulationServiceConnector.cs | |||
@@ -104,17 +104,23 @@ namespace OpenSim.Services.Connectors.Simulation | |||
104 | return false; | 104 | return false; |
105 | } | 105 | } |
106 | 106 | ||
107 | // Eventually, we want to use a caps url instead of the agentID | ||
108 | string uri = string.Empty; | 107 | string uri = string.Empty; |
109 | try | 108 | |
110 | { | 109 | // HACK -- Simian grid make it work!!! |
111 | uri = "http://" + destination.ExternalEndPoint.Address + ":" + destination.HttpPort + AgentPath() + aCircuit.AgentID + "/"; | 110 | if (destination.ServerURI != string.Empty) |
112 | } | 111 | uri = "http://" + destination.ServerURI + AgentPath() + aCircuit.AgentID + "/"; |
113 | catch (Exception e) | 112 | else |
114 | { | 113 | { |
115 | m_log.Debug("[REMOTE SIMULATION CONNECTOR]: Unable to resolve external endpoint on agent create. Reason: " + e.Message); | 114 | try |
116 | reason = e.Message; | 115 | { |
117 | return false; | 116 | uri = "http://" + destination.ExternalEndPoint.Address + ":" + destination.HttpPort + AgentPath() + aCircuit.AgentID + "/"; |
117 | } | ||
118 | catch (Exception e) | ||
119 | { | ||
120 | m_log.Debug("[REMOTE SIMULATION CONNECTOR]: Unable to resolve external endpoint on agent create. Reason: " + e.Message); | ||
121 | reason = e.Message; | ||
122 | return false; | ||
123 | } | ||
118 | } | 124 | } |
119 | 125 | ||
120 | //Console.WriteLine(" >>> DoCreateChildAgentCall <<< " + uri); | 126 | //Console.WriteLine(" >>> DoCreateChildAgentCall <<< " + uri); |
diff --git a/OpenSim/Services/GridService/HypergridLinker.cs b/OpenSim/Services/GridService/HypergridLinker.cs index 3d722ec..b86fb6f 100644 --- a/OpenSim/Services/GridService/HypergridLinker.cs +++ b/OpenSim/Services/GridService/HypergridLinker.cs | |||
@@ -158,7 +158,7 @@ namespace OpenSim.Services.GridService | |||
158 | string host = "127.0.0.1"; | 158 | string host = "127.0.0.1"; |
159 | string portstr; | 159 | string portstr; |
160 | string regionName = ""; | 160 | string regionName = ""; |
161 | uint port = 9000; | 161 | uint port = 0; |
162 | string[] parts = mapName.Split(new char[] { ':' }); | 162 | string[] parts = mapName.Split(new char[] { ':' }); |
163 | if (parts.Length >= 1) | 163 | if (parts.Length >= 1) |
164 | { | 164 | { |
@@ -177,18 +177,16 @@ namespace OpenSim.Services.GridService | |||
177 | regionName = parts[2]; | 177 | regionName = parts[2]; |
178 | } | 178 | } |
179 | 179 | ||
180 | // Sanity check. | 180 | //// Sanity check. |
181 | //IPAddress ipaddr = null; | 181 | //try |
182 | try | 182 | //{ |
183 | { | 183 | // Util.GetHostFromDNS(host); |
184 | //ipaddr = Util.GetHostFromDNS(host); | 184 | //} |
185 | Util.GetHostFromDNS(host); | 185 | //catch |
186 | } | 186 | //{ |
187 | catch | 187 | // reason = "Malformed hostname"; |
188 | { | 188 | // return null; |
189 | reason = "Malformed hostname"; | 189 | //} |
190 | return null; | ||
191 | } | ||
192 | 190 | ||
193 | GridRegion regInfo; | 191 | GridRegion regInfo; |
194 | bool success = TryCreateLink(scopeID, xloc, yloc, regionName, port, host, out regInfo, out reason); | 192 | bool success = TryCreateLink(scopeID, xloc, yloc, regionName, port, host, out regInfo, out reason); |
@@ -217,6 +215,11 @@ namespace OpenSim.Services.GridService | |||
217 | regInfo.RegionLocY = yloc; | 215 | regInfo.RegionLocY = yloc; |
218 | regInfo.ScopeID = scopeID; | 216 | regInfo.ScopeID = scopeID; |
219 | 217 | ||
218 | // Big HACK for Simian Grid !!! | ||
219 | // We need to clean up all URLs used in OpenSim !!! | ||
220 | if (externalHostName.Contains("/")) | ||
221 | regInfo.ServerURI = externalHostName; | ||
222 | |||
220 | try | 223 | try |
221 | { | 224 | { |
222 | regInfo.InternalEndPoint = new IPEndPoint(IPAddress.Parse("0.0.0.0"), (int)0); | 225 | regInfo.InternalEndPoint = new IPEndPoint(IPAddress.Parse("0.0.0.0"), (int)0); |
diff --git a/OpenSim/Services/InventoryService/XInventoryService.cs b/OpenSim/Services/InventoryService/XInventoryService.cs index 84306e7..fb395ec 100644 --- a/OpenSim/Services/InventoryService/XInventoryService.cs +++ b/OpenSim/Services/InventoryService/XInventoryService.cs | |||
@@ -293,13 +293,35 @@ namespace OpenSim.Services.InventoryService | |||
293 | 293 | ||
294 | public virtual bool AddFolder(InventoryFolderBase folder) | 294 | public virtual bool AddFolder(InventoryFolderBase folder) |
295 | { | 295 | { |
296 | InventoryFolderBase check = GetFolder(folder); | ||
297 | if (check != null) | ||
298 | return false; | ||
299 | |||
296 | XInventoryFolder xFolder = ConvertFromOpenSim(folder); | 300 | XInventoryFolder xFolder = ConvertFromOpenSim(folder); |
297 | return m_Database.StoreFolder(xFolder); | 301 | return m_Database.StoreFolder(xFolder); |
298 | } | 302 | } |
299 | 303 | ||
300 | public virtual bool UpdateFolder(InventoryFolderBase folder) | 304 | public virtual bool UpdateFolder(InventoryFolderBase folder) |
301 | { | 305 | { |
302 | return AddFolder(folder); | 306 | XInventoryFolder xFolder = ConvertFromOpenSim(folder); |
307 | InventoryFolderBase check = GetFolder(folder); | ||
308 | if (check == null) | ||
309 | return AddFolder(folder); | ||
310 | |||
311 | if (check.Type != -1 || xFolder.type != -1) | ||
312 | { | ||
313 | if (xFolder.version > check.Version) | ||
314 | return false; | ||
315 | check.Version = (ushort)xFolder.version; | ||
316 | xFolder = ConvertFromOpenSim(check); | ||
317 | return m_Database.StoreFolder(xFolder); | ||
318 | } | ||
319 | |||
320 | if (xFolder.version < check.Version) | ||
321 | xFolder.version = check.Version; | ||
322 | xFolder.folderID = check.ID; | ||
323 | |||
324 | return m_Database.StoreFolder(xFolder); | ||
303 | } | 325 | } |
304 | 326 | ||
305 | public virtual bool MoveFolder(InventoryFolderBase folder) | 327 | public virtual bool MoveFolder(InventoryFolderBase folder) |