Commit Graph

874 Commits (e09c8681ad5f6a645ef433e86166795a5c7dd762)

Author SHA1 Message Date
Diva Canto 7e01213bf2 Go easy on enforcing session ids in position updates 2013-08-09 08:31:15 -07:00
Justin Clark-Casey (justincc) 99bce9d877 Fix an issue with an A->C->B->A teleport where these regions are in a row (A,B,C) where the A root agent is still closed, terminating the connection.
This was occuring because teleport to B did not set DoNotCloseAfterTeleport on A as it was a neighbour (where it isn't set to avoid the issue where the source region doesn't send Close() to regions that are still neighbours (hence not resetting DoNotCloseAfterTeleport).
Fix here is to still set DoNotCloseAfterTeleport if scene presence is still registered as in transit from A
2013-08-09 00:24:22 +01:00
Justin Clark-Casey (justincc) b1c26a56b3 Fix an issue where under teleport v2 protocol, teleporting from regions in an line from A->B->C would not close region A when reaching C
The root cause was that v2 was only closing neighbour agents if the root connection also needed a close.
However, fixing this requires the neighbour regions also detect when they should not close due to re-teleports re-establishing the child connection.
This involves restructuring the code to introduce a scene presence state machine that can serialize the different add and remove client calls that are now possible with the late close of the
This commit appears to fix these issues and improve teleport, but still has holes on at least quick reteleporting (and possibly occasionally on ordinary teleports).
Also, has not been completely tested yet in scenarios where regions are running on different simulators
2013-08-08 23:29:30 +01:00
Justin Clark-Casey (justincc) b10710d4a5 minor: add some method doc to ScenePresence fields used for entity transfer, add minor details to some log messages, rename a misleading local variable name.
No functional changes.
2013-08-07 23:17:31 +01:00
Diva Canto 3194ffdab8 Fixed incomplete commit r/23317 -- see_into_region. Put the guard around estate bans also, and delete the obsolete config var. 2013-08-07 08:01:59 -07:00
Diva Canto dd2c211e62 Comment debug message 2013-07-26 07:40:55 -07:00
Diva Canto 878ce1e6b2 This should fix all issues with teleports. One should be able to TP as fast as needed. (Although sometimes Justin's state machine kicks in and doesn't let you) The EventQueues are a hairy mess, and it's very easy to mess things up. But it looks like this commit makes them work right. Here's what's going on:
- Child and root agents are only closed after 15 sec, maybe
- If the user comes back, they aren't closed, and everything is reused
- On the receiving side, clients and scene presences are reused if they already exist
- Caps are always recreated (this is where I spent most of my time!). It turns out that, because the agents carry the seeds around, the seed gets the same URL, except for the root agent coming back to a far away region, which gets a new seed (because we don't know what was its seed in the departing region, and we can't send it back to the client when the agent returns there).
2013-07-25 23:44:58 -07:00
Justin Clark-Casey (justincc) 72ed49af5f Reset DoNotClose scene presence teleport flag before pausing. Rename DoNotClose to DoNotCloseAfterTeleport 2013-07-26 01:38:04 +01:00
Justin Clark-Casey (justincc) 1fabdcc43c If a returning teleport starts to reuse a downgraded child connection that was a previous root agent, do not close that child agent at the end of the 15 sec teleport timer.
This prevents an issue if the user teleports back to the neighbour simulator of a source before 15 seconds have elapsed.
This more closely emulates observed linden behaviour, though the timeout there is 50 secs and applies to all the pre-teleport agents.
Currently sticks a DoNotClose flag on ScenePresence though this may be temporary as possibly it could be incorporated into the ETM state machine
2013-07-26 01:04:16 +01:00
Diva Canto 14530b2607 Minor adjustment on timings of waits. 2013-07-24 14:29:37 -07:00
Diva Canto 3891a8946b New Teleport protocol (V2), still compatible with V1 and older. (version of the destination is being checked)
In this new protocol, and as committed before, the viewer is not sent EnableSimulator/EstablishChildCommunication for the destination. Instead, it is sent TeleportFinish directly. TeleportFinish, in turn, makes the viewer send a UserCircuitCode packet followed by CompleteMovementIntoRegion packet. These 2 packets tend to occur one after the other almost immediately to the point that when CMIR arrives the client is not even connected yet and that packet is ignored (there might have been some race conditions here before); then the viewer sends CMIR again within 5-8 secs. But the delay between them may be higher in busier regions, which may lead to race conditions.
This commit improves the process so there are are no race conditions at the destination. CompleteMovement (triggered by the viewer) waits until Update has been sent from the origin. Update, in turn, waits until there is a *root* scene presence -- so making sure CompleteMovement has run MakeRoot. In other words, there are two threadlets at the destination, one from the viewer and one from the origin region, waiting for each other to do the right thing. That makes it safe to close the agent at the origin upon return of the Update call without having to wait for callback, because we are absolutely sure that the viewer knows it is in th new region.
Note also that in the V1 protocol, the destination was getting UseCircuitCode from the viewer twice -- once on EstablishAgentCommunication and then again on TeleportFinish. The second UCC was being ignored, but it shows how we were not following the expected steps...
2013-07-24 14:27:58 -07:00
Diva Canto aae29c0ee2 Further tweaks on TPs: not sending the callback URL and instead waiting 15sec before closing the agent. This seems to be working fairly well. The viewer seems to have an 8 sec delay between UseCircuitCode and CompleteMovement.
Also added back the position on UpdateAgent, because it's needed for TPing between neighboring regions.
2013-07-24 14:27:37 -07:00
Diva Canto 00d4a26eef Amend previous commit. 2013-07-24 12:49:30 -07:00
Diva Canto e103e34f1d Added config var that we all thought was already there: see_into_region. (Note: different from the defunct see_into_neighboring_sim, which used to control the process from the other end). This enables child agents in neighbors for which the root agent doesn't have permission to be in. 2013-07-24 11:25:41 -07:00
Diva Canto c8dcb8474d Let's go easy on authenticating ChildAgentUpdates, otherwise this will be chaotic while ppl are using different versions of opensim. Warning only, but no enforcement. 2013-07-14 10:26:05 -07:00
Diva Canto c61ff917ef Authenticate ChildAgentUpdate too. 2013-07-14 09:21:28 -07:00
Diva Canto f3b3e21dea Change the auth token to be the user's sessionid. 2013-07-14 07:28:40 -07:00
Diva Canto e4f741f006 This should fix the failing test. 2013-07-13 22:52:51 -07:00
Diva Canto a2ee887c6d Deleted a line too many 2013-07-13 22:32:52 -07:00
Diva Canto b4f1b9acf6 Guard against unauthorized agent deletes. 2013-07-13 21:28:46 -07:00
Diva Canto 67e500383e Put guards on a bunch of exception-inducing code, as seen in logs from load test. 2013-07-09 14:12:52 -07:00
Diva Canto 8265a88c4a Throttle the viewer's requests for region handles. Apparently Kokua is requesting this for all landmarks in inventory. Not sure why. But this seems to be the root cause of the login freeze mentioned before. This commit adds a blocking queue / process thread pattern. 2013-07-04 14:51:18 -07:00
Diva Canto da3aa44138 Debug the RegionHandle handler (same issue) 2013-07-04 13:27:53 -07:00
Melanie 81ad9255b5 Hook up Keyframe motion to almost everything. Failing to cross a sim border
may yield unexpected results in some cases. No database persistence yet,
2013-06-06 03:03:05 +01:00
Robert Adams 439f11cc3c Add region heartbeat start event to complement heartbeat end event.
This allows object modification before the usual heartbeat operation.
2013-05-30 19:16:31 -07:00
Justin Clark-Casey (justincc) cc7aa88b26 Try caching the user name for a new agent earlier on in the process of establishing a connection, to see if this helps with "Unknown UserUMMTGUN" issues.
The UMMTGUN form of Unknown User seems to appear because a viewer sometimes sends a UUIDNameRequest UDP request that fails to find a binding.
However, in theory the incoming agent should have made that binding before any such request is triggered.
So moving this binding to an earlier point in the process to see if this makes a difference.
Unknown user name is also updated to UserUMMTGUN2 - if you see the old name then you need to clear your viewer cache.
This relates to http://opensimulator.org/mantis/view.php?id=6625
2013-05-29 23:08:54 +01:00
Justin Clark-Casey (justincc) d214e2d0c4 On closing child agents, send separate asynchronous requests to each neighbour rather than sending all closes concurrently on a separate thread.
This is to reduce race conditions where neighbours may be responding erratically, thus mixing up create and close agent requests in time.
This mirrors OpenSimulator behaviour on enabling child agents where each region is contacted separately.
2013-05-16 17:12:02 +01:00
Justin Clark-Casey (justincc) bd31821792 On logout, send close child agent requests to neighbours asynchronously, so user is not prevented from relogging if many neighbours are present but not responsive.
The symptom here is that previous user connections are still present but are labelled active == false
2013-05-16 16:37:21 +01:00
Diva Canto a4431381fa Finalize the logic for SetHome. See comments in Land/LandManagementModule.cs about who has permission to set home where. 2013-05-11 07:58:14 -07:00
Melanie 55c9bc15e5 Merge branch 'master' of melanie@opensimulator.org:/var/git/opensim 2013-05-11 01:29:30 +01:00
Melanie 81d8deb1a8 Send up the part missing from the Avination Estate commit.
Warning - contains a small migration.
2013-05-11 01:27:37 +01:00
Justin Clark-Casey (justincc) 3290cd09d3 remove pointless region handle paramter from IClientAPI.SendKillObject() 2013-05-09 18:12:17 +01:00
Melanie 4c83b5e719 Step one of estate settings sharing - port the Avination Estate module (complete module) as changes are too extensive to apply manually 2013-05-07 00:31:11 +01:00
Diva Canto a81ddf3d70 Merge branch 'master' of ssh://opensimulator.org/var/git/opensim 2013-05-06 09:18:17 -07:00
Diva Canto ad00466483 Minor reordering of operations on NewUserConnection. The agent circuit needs to be added earlier for some of the checks to work correctly. 2013-05-06 09:17:54 -07:00
Justin Clark-Casey (justincc) 304c5d4a8b On startup, start scenes after we're set up all local scenes, rather than starting scenes before others have been created.
This aims to avoid a race condition where scenes could look to inform neighbours that they were up before those neighbours had been created.
http://opensimulator.org/mantis/view.php?id=6618
2013-05-03 18:48:50 +01:00
Melanie 3ff7391495 Some more pieces of Avination's ban system - if an avatar isn't allowed on any
parcel in the sim, keep them out entirely.
2013-04-29 00:55:34 +01:00
Melanie 6f3c905744 Add Avination's support for parcel eject and freeze 2013-04-25 00:24:48 +01:00
Justin Clark-Casey (justincc) 7f070236f7 Fix taking (and rezzing) of coalesced objects in the non-root subregions of megaregions.
This fixes the combined bounding box location for regions bigger than 256x256.
It also fixes the position on taking coalesced objects in the non-root regions, where position checks are properly done on rez instead.
It also fixes the megaregion land channel to return null if the land does not exist, which should probably also be done for the ordinary land channels rather than returning a dummy region.
Inspiration from Garmin's commit in http://opensimulator.org/mantis/view.php?id=6595.  Thanks!
2013-04-06 02:34:51 +01:00
Justin Clark-Casey (justincc) 23ae4c0a4d Fix bug where CHANGED_REGION and/or CHANGED_TELEPORT weren't firing for scripts in attachments.
This was because the script resumption in AttachmentsModule was firing the attach event instead.
Had to reinstate the code in 285bd3a do we can resume the scripts there instead, though the bug existed before its removal.
This is to resolve http://opensimulator.org/mantis/view.php?id=6578
2013-03-29 02:21:38 +00:00
Justin Clark-Casey (justincc) 03e421bf3d minor: comment out unused Scene.AgentCrossing() to reduce code complexity 2013-03-28 22:55:13 +00:00
Justin Clark-Casey (justincc) c2093ccce1 Move the simulator-side RezAttachments call on login to SP.MakeRootAgent with the other attachments code, using TeleportFlags.ViaLogin check to fire if necessary.
This is to simplify the code (no tricky 'wasChild' signalling required)
and to reduce the risk of a thread clash between simulator-side attaching (necessary for v1 viewers)
and the viewer-side attaching the v3 viewers perform.
2013-03-28 22:07:58 +00:00
Melanie 5f4c4df227 Phase 1 of implementing a transfer permission. Overwrite libOMV's PermissionMask
with our own and add export permissions as well as a new definition for "All" as meaning "all conventional permissions" rather than "all possible permissions"
2013-03-26 03:40:06 +00:00
Justin Clark-Casey (justincc) 93206ef0fa Add "show borders" command to show the borders of a region.
This is relevant to mega-regions where the borders are very different to a regular region.
Also adds some method doc and other code comments.
2013-03-23 00:45:21 +00:00
Justin Clark-Casey (justincc) b1cd1d917e minor: don't bother with the pause before rezzing attachments if we are running regression tests (fire and forget calls launched on the same thread).
Also adds code comments as to why this pause exists.
2013-03-20 23:12:13 +00:00
Justin Clark-Casey (justincc) 8de933ab07 Insert a short delay on the simulator side rezzing of attachments in order to fix viewer 3 issues if its own rezzing actions on login collide with the simulator side actions.
This resolves issues (at least in my tests with LL 3.3.4) where this can make attachments invisible until one zooms in on the avatar.
This doesn't affect version 1 viewers since this delay is shorter than the login delay.
This doesn't increase the login time since this part of the process was already being performed asynchronously.
This may be a temporary solution.
2013-03-20 02:09:25 +00:00
Melanie fcecfc81bb Multiattach, part 1
Conflicts:

	OpenSim/Framework/AvatarAppearance.cs
	OpenSim/Region/CoreModules/Avatar/Attachments/AttachmentsModule.cs
	OpenSim/Region/CoreModules/Avatar/Attachments/Tests/AttachmentsModuleTests.cs
	OpenSim/Region/Framework/Interfaces/IAttachmentsModule.cs
	OpenSim/Region/Framework/Scenes/Scene.cs
	OpenSim/Region/OptionalModules/Avatar/Attachments/TempAttachmentsModule.cs
	OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs
2013-03-18 22:56:03 +00:00
Justin Clark-Casey (justincc) 1bc8692a99 Move AllowedClients and BannedClients section to new [AccessControl] section in OpenSim.ini from [Startup]
This change also corrects the setting names - they were actually wrong (though the text in {} was correct).
If there are settings in [Startup] they will continue to be used and anything there will override settings in [AccessControl]
2013-03-02 01:43:54 +00:00
Justin Clark-Casey (justincc) d0cb4fc326 Move map related settings from [Startup] to a new [Map] section in OpenSim.ini
Existing map settings in [Startup] will continue to work, and if present will override anything in [Map]
However, the proper place for such settings would now be [Map]
This is to reduce the use of [Startup] as a bag for non-generic settings which should really go in sections, in common with other settings.
This commit also extends Diva's previous work to allow a default setting to be given when looking at multiple sections for settings.
2013-02-25 23:04:38 +00:00
BlueWall adedd70c35 Fix teleport/telehub issue:
Fix bug that allowed only login access to regions with mis-configured telehubs. Administrators now have teleport access when there exists a mis-configured telehub in the region. Estate owners are now placed at region center in the absence of spawnpoints instead of being denied access. Grid Gods are unrestricted. All others are denied access to the region until spawnpoints are assigned to the telehub object.
2013-02-10 13:01:33 -05:00
Justin Clark-Casey (justincc) 145e38e5e9 Remove long unused Scene.DumpAssetsToFile boolean. 2013-02-06 02:21:17 +00:00
Justin Clark-Casey (justincc) 9ebad38c34 Remove unused ScriptEngineLoader and ScriptEngineInterface in OpenSim.Region.Framework.dll
I believe this predates the generic system of registering interfaces and is very long unused.
2013-02-06 02:08:44 +00:00
Melanie 6a4c8824ea Whitespace fix and removing unneccessary parentheses 2013-01-31 20:46:41 +00:00
Jak Daniels fac72d540b Allow use of MaptileStaticUUID in Regions.ini to override the global setting in OpenSim.ini for each region.
Signed-off-by: BlueWall <jamesh@bluewallgroup.com>
2013-01-30 23:37:02 -05:00
Melanie c1795ed399 Add the Avination physics raycast glue so Core Physics can implement raycast 2013-01-23 21:03:24 +00:00
Justin Clark-Casey (justincc) 115e1c2abb Add "debug set set animations true|false" region console command.
Setting this logs extra information about animation add/remove, such as uuid and animation name
Unfortunately cannot be done per client yet
2013-01-18 23:22:02 +00:00
Justin Clark-Casey (justincc) a16ae5d7e3 Move scene debug commands into separate module. Command changes from "debug scene <key> <value>" to "debug scene set <key> <value>" to accomodate future settings 2013-01-10 23:49:48 +00:00
Justin Clark-Casey (justincc) 983e458bb6 refactor: route the final scene backup through the same code that handles periodic backup
This is rather than making unnecessary duplicate checks that the SOG later performs again.
2013-01-10 22:59:40 +00:00
Justin Clark-Casey (justincc) 701ca1e4b8 Add "debug scene pbackup true|false" console command. This enables or disable periodic scene backup. For debug purposes.
If false, scene is still saved on shutdown.
2013-01-10 22:38:48 +00:00
Oren Hurvitz 1a6694b264 Fixed several problems with the Sun: some settings didn't work, or were inconsistently used. - The sun position is always calculated by combining the sun settings in the Region and Estate. This fixes the problem that 'UseEstateSun' didn't work. - To remove ambiguity, the EstateToolsSunUpdate event no longer accepts the sun's position as parameters. That's because the position is always calculated from the Region and Estate settings. - Use only the 'FixedSun' flag to determine whether the sun is fixed; not the 'UseGlobalTime' flag. - Don't change the region's 'SunPosition' field according to the sun's position: this field is used only to set the position when using a FixedSun. (The 'SunVector' field does get updated according to the sun's position in the sky) 2013-01-02 23:16:24 +00:00
Justin Clark-Casey (justincc) fb26d32a5c minor: Put Scene.PhysicsRequestAsset() into standard C# xml format. 2012-12-04 22:33:25 +00:00
Justin Clark-Casey (justincc) 1f336579c8 minor: Make note in log if scene was restarted due to an unrecoverable physics error 2012-11-23 04:06:48 +00:00
Justin Clark-Casey (justincc) 8c8c8a00a4 Fix problem where restarting the currently selected region would stop various console commands (e.g. "show users") from working.
This was because the "currently selected" scene reference was being left as the dead scene instead of the restarted Scene object.
2012-11-23 02:22:30 +00:00
Melanie 8c130bcaf5 Remove the old style module loader and all references to it 2012-11-12 22:50:28 +00:00
Justin Clark-Casey (justincc) 984faf24df Only create a new list to check if objects have reached targets if there actually are any targets. 2012-10-30 01:48:05 +00:00
Justin Clark-Casey (justincc) 09f4e72d6a Fix memory leak where removing an NPC did not remove its circuits.
This was because we were removing by circuitcode where NPCs have no code.
Now removing by agent ID instead.
This commit also fixes the "show circuits" console command to work properly where the circuit has no associated IP address.
2012-10-29 23:22:40 +00:00
Melanie 5a96ef52cb Deep copy the collection of at_target objects so it can't be modified while
it's being iterated
2012-10-28 18:41:47 +00:00
Justin Clark-Casey (justincc) 2fb89b5aac Comment out InventoryTransferModule.NeedSceneCacheClear() and invocations since the call itself does nothing and the return value is ignored by all callers.
This is a very old method (+4 years) so is probably confusing code cruft.
2012-10-26 01:15:16 +01:00
Justin Clark-Casey (justincc) dc17cee044 minor: if a scene is already shutting down on Scene.Close(), warn and exit instead of attempting to run another shutdown concurrently.
Thanks to Oren Hurvitz for this change.
2012-10-25 23:47:55 +01:00
Justin Clark-Casey (justincc) 22e216fd12 In Scene.Close(), dispose of the physics scene after base.Close() since script events can still access Physics scene until the script engine shuts down (triggered off base.Close())
XEngine listeners to EventManager.OnShutdown which is triggered from base.Close().
Possibly it could listen for the earlier OnSceneShuttingDown instead, but the easier solution right now is to relocate disposal of the physics scene.
This bug has existed since c150320 (Thu Jul 26 15:27:18 2012) and was in 0.7.4
2012-10-25 22:55:29 +01:00
Justin Clark-Casey (justincc) 81aeecc907 Allow "show object", "show part", "dump object" and "delete object" to accept a local ID as well as a UUID.
This means that the sub-commands are now id rather than uuid, e.g. show object id
2012-10-24 04:10:22 +01:00
Justin Clark-Casey (justincc) d469bde849 minor: Add/correct some doc messages associated with entity teleport.
I believe UseCircuitCode is sent on EnableSimulator EQ message, rather than EstablishAgentCommunication
At least with LL 3.3.4, EstablishAgentCommunication appears unnecessary in the teleport context -
viewer still requests it though possibly only after TeleportFinish().  However, we will continue to send it.
2012-10-16 01:20:41 +01:00
Justin Clark-Casey (justincc) b9c2a1508e Fix problems with regression tests by allowing invoke of Update() with a finite number of frames even if the scene isn't active. 2012-10-12 03:19:12 +01:00
Justin Clark-Casey (justincc) b5a3c74a5c Add "active true|false" to "debug scene" console command.
This allows the scene update and maintenance loops to be started and stopped for debug purposes.
2012-10-12 02:52:08 +01:00
Justin Clark-Casey (justincc) e76b01a201 Lock on AgentCircuitData during Scene.AddClient() and RemoveClient() to prevent an inactive connection being left behind if the user closes the viewer whilst the connection is being established.
This should remove the need to run the console command "kick user --force" when these connections are left around.
2012-10-10 00:26:43 +01:00
Justin Clark-Casey (justincc) a3c0e3ed26 minor: elaborate method doc on Scene.NewUserConnection() 2012-10-09 22:19:47 +01:00
Dan Lake 6f220a8679 Trigger ObjectAddedToScene when loading objects from oarfile. Already triggers when creating, duplicating or loading from database, incoming attachments, etc 2012-10-05 17:30:27 -07:00
Justin Clark-Casey (justincc) 03136df1a7 Forgot to actually remove the packetpool set code from scene. 2012-10-05 01:45:49 +01:00
Melanie 402128bb53 Prevent the ExtraSettings code from crashing SQLite driven sims. 2012-10-02 00:51:38 +01:00
Justin Clark-Casey (justincc) 2bf42f30af Add MaxPrimsUndo config setting to [Startup] section of OpenSim.ini.
This controls how many undo steps the simulator will store for each prim.
Default is now 20 rather than 5 as it briefly was.
The default number could be increased through this is a memory tradeoff which will scale with the number of prims in the sim and level of activity.
2012-09-27 00:12:34 +01:00
Justin Clark-Casey (justincc) 327320d1a7 Enforce existing 5 action hardcoded undo limit.
This was present in the code but not enforced, which led to a memory leak over time as part properties were changed, whether by viewer, script or another source.
This commit enforces that limit, which will soon become configurable.
Regression test for undo limit added
Should help with http://opensimulator.org/mantis/view.php?id=6279
2012-09-26 22:49:44 +01:00
Justin Clark-Casey (justincc) f2a9d26118 Make ResendAppearanceUpdates = true by default in [Appearance] in OpenSimDefaults.ini.
This resends appearance uuids to avatars in the scene once a minute.
I have seen this help in the past resolve grey appearance problems where viewers have for unknown reasons sometimes ignored the packet.
The overhead is very small since only the UUIDs are sent - the viewer then requests the texture only if it does not have it cached.
This setting will not help with cloudy avatars which are usually due to the viewer not uploading baked texture data or uploading something that isn't valid JPEG2000
2012-09-20 01:40:05 +01:00
BlueWall 9d973ec3b3 Cleanup from prev. commit
Make correct defaults to Phys/nonPhys prims to fix errors in prev. commit
2012-09-18 10:12:32 -04:00
BlueWall d29fc53052 Fix some inconsistencies in configurartion: NonPhys prims
Fix inconsistencies between configuration parameter names and their description names. Changing the configuration parameters for non physical prim size min-max from Nonphys* to NonPhys*.

  Please update your OpenSim.ini and Regions.ini to reflect these changes.
2012-09-18 09:53:45 -04:00
SignpostMarv c7948a669a preventing a null reference exception from being thrown
Signed-off-by: Melanie <melanie@t-data.com>
2012-09-17 13:29:15 +01:00
SignpostMarv 783ee949ea implementing per-region configuration of limits on the number of prims one can have in a linkset
Applied with changes - patch was based on a repo different from core

Signed-off-by: Melanie <melanie@t-data.com>
2012-09-09 12:59:25 +01:00
SignpostMarv e041f09750 refactoring to allow Scene.GetLandData to accept Vector3 as an argument. Note that the prior work on LSL_Vector implicit operators means one does not need to explicitly cast a LSL_Vector to Vector3 2012-09-08 00:44:27 +01:00
SignpostMarv 4215877b48 adding utility method for getting SceneObjectGroup from scene
Signed-off-by: BlueWall <jamesh@bluewallgroup.com>
2012-09-06 06:32:56 -04:00
SignpostMarv d2e79e26d7 adding utility method for getting SceneObjectPart from scene
Signed-off-by: BlueWall <jamesh@bluewallgroup.com>
2012-09-06 06:32:46 -04:00
Justin Clark-Casey (justincc) 476996bee8 If a connecting scene presence is replacing an existing scene presence then bypass close checks. 2012-08-24 22:38:07 +01:00
Justin Clark-Casey (justincc) bcbd450fe4 Add --force flag to "kick user" console command to allow bypassing of recent race condition checks.
This is to allow a second attempt to remove an avatar even if "show connections" shows them as already inactive (i.e. close has already been attempted once).
You should only attempt --force if a normal kick fails.
This is partly for diagnostics as we have seen some connections occasionally remain on lbsa plaza even if they are registered as inactive.
This is not a permanent solution and may not work anyway - the ultimate solution is to stop this problem from happening in the first place.
2012-08-20 20:24:54 +01:00
SignpostMarv ef4122213c enables configurable minimum sizes for physical & non-physical prims 2012-08-15 23:35:23 +01:00
Melanie c27ff70d5c Add support for the extra params to scene and the event manager 2012-08-15 18:58:39 +01:00
Melanie dc82ad0f7a Add a skeleton for a name value storage associated with regions 2012-08-15 02:06:22 +01:00
Melanie fe4c3a37c0 Lay some groundwork for temp attachments. Decouple attachments from inventory. 2012-08-14 00:12:15 +01:00
Justin Clark-Casey (justincc) 789e88d8bd Move previously unadvertised SendPeriodicAppearanceUpdates setting from [Startup] to [Appearance] config section.
Add description and default of false (as before) to OpenSimDefaults.ini
If set to true, this config switch will resend avatar appearance information (a small amount of UUID data, not the baked textures themselves) to other avatars in the sim every 60 seconds.
For me, this has helped with situations where avatars appear persistently grey - the LL viewer sometimes did not appear to request assets the first time the appearance data was sent.
However, this switch will not help with other appearance failure situations (e.g. failure to bake assets).
This setting is experimental but will not have any significant impact on the simulator if turned to true.
2012-08-03 21:36:00 +01:00
Melanie cf16ca9bda Create the ability for physics modules to request assets on demand by
themselves. For that, the physics module simply calls RequestAssetMethod, which
in turn points to Scene.PhysicsRequestAsset. This gives physics access to
the asset system without introducing unwanted knowledge of the scene class.
2012-08-01 22:37:38 +01:00
Justin Clark-Casey (justincc) 7e89b99e6a Avoid a race condition between the scene shutdown thread and the update thread since commit c150320 (Thu Jul 26 15:27:18 2012)
c150320 started explicitly disposing of the physics scene and nulling it out on region shutdown.
However, the update loop may not have yet checked Scene.ShuttingDown, particularly if avatars were not in the scene, causing failure when it tried to lookup time dilation.
This commit moves the setting of m_shuttingDown above the existing 500ms pause to notify avatars that they are being kicked.
This should not affect the few other places that use this flag.
2012-07-27 23:58:53 +01:00
Robert Adams c1503205c0 Add a Dispose() of the physics engine when a scene is being shutdown. 2012-07-26 15:27:18 -07:00
Justin Clark-Casey (justincc) 5aec0ff207 Move Watchdog and MemoryWatchdog classes into OpenSim.Framework.Monitoring with other monitoring code from OpenSim.Framework 2012-07-25 23:27:00 +01:00
Justin Clark-Casey (justincc) 31304c222d Make SceneManager.OnRegionsReadyStatusChange event available.
This is fired when all regions are ready or when at least one region becomes not ready.
Recently added EventManager.OnRegionReady becomes OnRegionReadyStatusChange to match OnLoginsEnabledStatusChange
2012-07-25 21:00:59 +01:00
Melanie e126915bc1 Change attachment handling to remove object from the scene first as per
justincc's original work. Sample scripts before doing so. Also refactor some
crucial common code and eliminate parameters that were only ever used with
the same constant value.
2012-07-23 21:39:26 +01:00
Justin Clark-Casey (justincc) ba80f137b5 Prevent race conditions between two threads that call LLClientView.Close() simultaneously (e.g. ack timeout and an attempt to reconnect) 2012-07-19 22:32:27 +01:00
Justin Clark-Casey (justincc) e9a121e1b2 Add TestCreateDuplicateRootScenePresence() regression test. 2012-07-19 21:54:50 +01:00
Justin Clark-Casey (justincc) 6dda7c65ae Add EventManager.OnRegionLoginsStatusChange fired whenever logins are enabled or disabled at any point, not just during initial startup.
This replaces EventManager.OnLoginsEnabled which only fired when logins were first enabled
and was affected by a bug where it would never fire if the region started with logins disabled.
2012-07-19 00:09:22 +01:00
Justin Clark-Casey (justincc) 64db0bcbd2 Add back notification to neighbouring regions when RegionReadyModule is not active accidentally just removed in 528004d 2012-07-18 23:40:00 +01:00
Justin Clark-Casey (justincc) 528004d349 Perform other region ready actions even if simulator is configured to leave logins disabled on startup. 2012-07-18 23:35:05 +01:00
Justin Clark-Casey (justincc) 58b72933c8 Fix bug where region ready was being triggered twice in quick succession if a region contained no scripts. 2012-07-18 22:09:20 +01:00
Justin Clark-Casey (justincc) 4973fddc51 Establish EventManager.OnRegionReady event. This will only be triggerred once when the region is ready.
Switch MapImageServiceModule to use this.
2012-07-18 21:52:07 +01:00
Justin Clark-Casey (justincc) 6460e587c4 Pass entire scene object in OnLoginsEnabled event rather than just the region name.
This saves listeners from having to re-retrieve the scene from their own lists, which won't work anyway if multiple regions with the same name have been allowed
2012-07-18 21:29:12 +01:00
Justin Clark-Casey (justincc) eb590becf0 Close() the ScenePresence after we've removed it from the scene graph, to cut down race conditions when another thread manages the grab the presence after some SP structures have been reset. 2012-07-18 00:14:02 +01:00
Justin Clark-Casey (justincc) 75ab9b4b88 Change very recent AllowedViewerList and BannedViewerList config setting names in OpenSim.ini.example to AllowedClients and BannedClients to match long-existing settings in [LoginService]
Also changes separator from comma to bar to match existing [LoginService] config features.
Divergence of config names for identical facilities in different places makes for an unnecessarily confusing user experience.
2012-07-12 23:18:30 +01:00
Justin Clark-Casey (justincc) f3134b5cf6 When an attachment is detached to inv or derezzed, stop the scripts, update the known item with script state still in the script engine and then remove the scripts.
This is to fix a regression starting from 5301648 where attachments had to start being deleted before persistence in order to avoid race conditions with hud update threads.
2012-07-10 22:41:11 +01:00
Justin Clark-Casey (justincc) 7ff4eec79c Remove redundant SetScene() function in Scene.AddSceneObject()
This is always done later on in SceneGraph.AddSceneObject() if the call hasn't failed due to sanity checks.
There's no other purpose for this method to exist and it's dangerous/pointless to call in other conditions.
2012-07-07 00:02:45 +01:00
Justin Clark-Casey (justincc) f1f390cfdf Remove now duplicate interregion object check that should have been removed a few commits ago in 43a2da9 2012-07-06 23:22:40 +01:00
Justin Clark-Casey (justincc) 056c9a59b2 Add assert to attachment regression tests to check that number of objects in the scene graph 2012-07-06 23:07:50 +01:00
Justin Clark-Casey (justincc) 43a2da9edb Pull prim crossing/teleport checks up into Scene.IncomingCreateObject() from Scene.AddObject()
Only IncomingCreateObject() needs these checks.  General object adding does not need to perform crossing perm checks
2012-07-06 22:33:16 +01:00
Justin Clark-Casey (justincc) f7b4802577 Correct spelling mistake m_BanedViewers to m_BannedViewers 2012-07-03 23:26:02 +01:00
Michelle Argus 3399596e0e Adds a list of viewers that are allowed or banned from the region.
Signed-off-by: Melanie <melanie@t-data.com>
2012-07-02 18:45:11 +01:00
Justin Clark-Casey (justincc) a4551b027b Removing unused handling of incoming create object by userID and itemID only.
It appears this was never actually used since attachments were rezzed in other code.
This was never available on remote simulator comms, only local.
2012-06-30 01:14:49 +01:00
Justin Clark-Casey (justincc) 56c776066c Remove code listed for removal in 0.7.3 that handled script restart for incoming attachments from pre-fatpack regions (versions of OpenSimulator more than a year old) 2012-06-30 01:06:37 +01:00
Justin Clark-Casey (justincc) f202c36106 Add IScene.Name for code clarity to replace the RegionInfo.RegionName used in many, many log messages. 2012-06-29 00:03:22 +01:00
Justin Clark-Casey (justincc) e5b739aaeb When attachments are being saved and deleted for a closing root agent, delete first to avoid a hud race condition with update threads.
If delete doesn't occur first then the update thread can outrace the IsAttachment = false necessary to save attachments and send hud artifacts to other viewers.
2012-06-25 22:48:13 +01:00
Justin Clark-Casey (justincc) 9737e6d52e If RegionReady is active, don't falsely say that logins are enabled in the main scene loop before RegionReady is signalled when initial script compilation finishes.
Also raises this logging level to Info from Debug since this information is of high importance.  This matches the behaviour of the RegionReady module
2012-06-20 00:07:03 +01:00
Justin Clark-Casey (justincc) 8c7149063b In PresenceDetector.OnConnectionClose(), use the IsChildAgent check already available on IClientAPI.SceneAgent rather than retrieving it again by scanning all scenes. 2012-06-12 01:25:09 +01:00
Justin Clark-Casey (justincc) 30f4a33f01 Don't make duplicate call to ScenePresence.Close() separately in ETM.DoTeleport() if an agent needs closing.
This is always done as part of Scene.RemoveClient()
Also refactors try/catching in Scene.RemoveClient() to log NREs instead of silently discarding, since these are useful symptoms of problems.
2012-06-08 01:26:43 +01:00
Justin Clark-Casey (justincc) d547bcf8d1 Remove duplicate update of user count in Scene.IncomingCloseAgent()
This is already done in Scene.RemoveClient() which IncomingCloseAgent() always ends up calling.
2012-06-08 00:40:38 +01:00
Justin Clark-Casey (justincc) b56673c920 Fix bug with "kick user" reducing agent counts by 2 instead of 1.
This is done by making the kick user command call IClientAPI.Close() rather than routing through Scene.IncomingCloseAgent(), which also called IClientAPI.Close()
DisableSimulator for child agents is moved from IncomingCloseAgent() to RemoveClient(), this is not a functional change since IncomingCloseAgent() always ends up calling RemoveClient()
2012-06-08 00:18:25 +01:00
Justin Clark-Casey (justincc) 0c5fefacb4 Record the fact that child agents can have asset transactions.
Also change code to grab the agent asset transaction module once.
2012-06-07 23:51:04 +01:00
Justin Clark-Casey (justincc) de87e4871b Don't send kill object messages to clients when a child agent is closed. 2012-06-07 23:35:21 +01:00
Justin Clark-Casey (justincc) 655625ab87 Start sending spare frame time MS viewer stat. Make frame time correctly display total frame time, not just non-spare time.
This makes it easier to see when components of frame time exceed normal permitted frame time.
Currently reflect scene frame times.
2012-06-05 00:17:55 +01:00
Justin Clark-Casey (justincc) 72219eae7d Instead of updating sim stats root agent, child, objects and scripts accounts every single scene frame, update in the once every 3 seconds SimStatsReporter run 2012-06-01 04:47:11 +01:00
Justin Clark-Casey (justincc) 43a6f28620 If restating a region, clean up the physics scene after the main scene has been closed not before.
If this is done before then on ODE agent update calls still incoming can fail as they try to use a raycastmanager that has been disposed.
Bullet plugin does nothing on Dispose()
However, I wouldn't be at all surprised if individual region restarting was buggy in lots of other areas.
2012-05-26 01:55:35 +01:00
Justin Clark-Casey (justincc) 40c78b0624 Stop it being possible for an agent to teleport back to its source region before the source region has finished cleaning up old agent data and structures.
If this is allowed, then the client usually gets forcibly logged out and data structures might be put into bad states.
To prevent this, the binary state machine of EMT.m_agentsInTransit is replaced with a 4 state machine (Preparing, Transferring, ReceivedAtDestination, CleaningUp).
This is necessary because the source region needs to know when the destination region has received the user but a teleport back cannot happen until the source region has cleaned up.
Tested on standalone, grid and with v1 and v3 clients.
2012-05-25 02:02:53 +01:00
Justin Clark-Casey (justincc) 459c7635af If an agent is still registered as 'in transit' by the source region, don't allow an immediate teleport back.
This is to help relieve a race condition when an agent teleports then immediately attempts to teleport back before the source region has properly cleaned up/demoted the old ScenePresence.
This is rare in viewers but much more possible via scripting or region module.
However, more needs to be done since virtually all clean up happens after the transit flag is cleared .
Possibly need to add a 'cleaning up' state to in transit.
This change required making the EntityTransferModule and HGEntityTransferModule per-region rather than shared, in order to allow separate transit lists.
Changes were also required in LocalSimulationConnector.
Tested in standalone, grid and with local and remote region crossings with attachments.
2012-05-24 00:31:14 +01:00
Justin Clark-Casey (justincc) ee98b9c394 Add "show scene" command which lists stats for the currently selected console scene(s)
This includes prim count, script count, avatar count, etc.
Information is currently the same as "show stats", though show stats can only show one scene at a time because it listens for the latest outgoing stats packet (a bad approach that needs to change).
Might be better to tie this module into the other stats module to display arbitrary stats rather than fetching directly from scene.SimStatsReporter.
Console command is "show scene" because "show region" already exists for the grid service, which is unfortunate.
Might need to make a distinction between "scene" relating to a live scene and "region" relating to more static region data (url, coords, etc.)
2012-05-23 04:10:45 +01:00
BlueWall 247a56593f Further refinement on properties 2012-05-18 20:02:32 -04:00
BlueWall 895dadbdbd Cleanup + change properties to set fields with private set : Thanks Justin for the tip. 2012-05-18 19:34:12 -04:00
BlueWall c05f87b50c Provide Telehub setting to allow use of landmarks
Setting to allow use of landmarks to override telehub routing. Default is off.
2012-05-18 17:51:38 -04:00
Justin Clark-Casey (justincc) 4d34763f8c Check agent limit against root agent count rather than both root and child agents
From sl docs such as http://community.secondlife.com/t5/English-Knowledge-Base/Managing-Private-Regions/ta-p/700115
agent should apply to avatars only.
This makes sense from a user perspective, and also from a code perspective since child agents with no physics or actions take up a fraction of root agent resources.
As such, the check is now only performed in Scene.QueryAccess() - cross and teleport check this before allowing an agent to translocate.
This also removes an off-by-one error that could occur in certain circumstances on teleport when a new child agent was double counted when a pre-teleport agent update was performed.
This does not affect an existing bug where limits or other QueryAccess() checks are not applied to avatars logging directly into a region.
2012-05-17 23:33:26 +01:00
Justin Clark-Casey (justincc) deeac69312 minor: comment out individual attachment transfer log messages for now 2012-05-14 18:48:40 +01:00
BlueWall 7c229c8b81 Add configurable SpawnPointRouting
Will use one of three selected methods to route avatar landing
	points when using Telehubs. The setting is in [Startup] using
        SpawnPointRouting = closest/random/sequence

	closest: The default setting. Routes avatar to the nearest SpawnPoint
	to the location.

	random: Picks random SpawnPoints to land the avatar.

	sequence: Follows a sequence to place the avatar on the next available
	SpawnPoint location

Conflicts:

	OpenSim/Region/Framework/Scenes/Scene.cs
2012-05-13 17:20:54 -04:00
Dan Lake f374b63ac8 Add even for terrain tainting and synchronize terrain module with physics scene before physics simulation step rather than after 2012-05-10 14:42:46 -07:00
Justin Clark-Casey (justincc) 07e62df558 Add regression test for teleporting an agent between separated regions on the same simulator.
This involves a large amount of change in test scene setup code to allow test scenes to share shared modules
SetupScene is now an instance method that requires an instantiation of SceneHelpers, though other SceneHelpers methods are still static
May split these out into separate classes in the future.
2012-04-27 00:58:54 +01:00
Justin Clark-Casey (justincc) ca228c4770 Comment out old Scene.HandleLogOffUserFromGrid() to reduce client closing analysis complexity 2012-04-26 16:20:53 +01:00
Justin Clark-Casey (justincc) e52fe03fff minor: Add avatar name to removing agent log message 2012-04-26 00:42:37 +01:00
Mic Bowman a2d544c938 Add a configuration switch to turn on/off the use of the trash
folder when deleting objects from a scene. The use of the trash
folder causes assets to be created and stored everytime you delete
an object from the scene (slows down the delete and adds mostly useless
assets to your database).

Default is on (use the trash folder) which is the standard behavior.
2012-04-25 11:54:57 -07:00
Justin Clark-Casey (justincc) 8205fe79ce Fix bug where setting phantom on a prim would result in a server log message rather than setting phantom.
This was an oversight when removing some race conditions from PhysicsActor setting recently.
Regression tests extended to probe this code path.
Extending regression tests required implementation of a BasicPhysicsPrim (there was none before).  However, BasicPhysics plugin is still of no current practical use other than to fill in as a component for other parts of regression testing.
2012-04-22 19:51:51 +01:00
Justin Clark-Casey (justincc) 7d8bb33c5b Store FromItemID for attachments once on SOG instead of on every SOP and only ever using the root part entry.
This eliminates some pointless memory use.
2012-04-07 00:33:02 +01:00
Justin Clark-Casey (justincc) 633f4bb3d8 remove possible PhysActor unexpectedly null race conditions when changing prim collision status
factor out common SOP physics scene adding code into a common SOP.AddToPhysics() that is the counterpart to the existing RemoveFromPhysics()
2012-04-03 09:28:17 +01:00