Compare commits

...

1344 Commits

Author SHA1 Message Date
Melanie
e321306517 Prevent object loss and positioning outside the region with failed object sim
crossings
2012-02-14 00:02:53 +01:00
Melanie
acfe7e555e Merge branch 'master' into careminster 2012-02-10 23:59:10 +00:00
Melanie
5023cc86f0 Change parser to leave embedded quotes alone if the pattern is recognized
as an OptionSet long option
2012-02-10 23:58:39 +00:00
Melanie
4455140f30 Change parser to leave embedded quotes alone if the pattern is recognized
as an OptionSet long option
2012-02-10 23:52:06 +00:00
Justin Clark-Casey (justincc)
71e484516a minor: Remove warning from RegionInfo due to repeated config.GetString() call where the first was unused. 2012-02-10 23:41:14 +00:00
Justin Clark-Casey (justincc)
38f878952c Merge branch 'master' of ssh://opensimulator.org/var/git/opensim 2012-02-10 23:39:59 +00:00
Justin Clark-Casey (justincc)
d80422eba7 Add line numbers to Util.PrintCallStack() 2012-02-10 23:39:32 +00:00
BlueWall
ee078f717a Merge branch 'master' of ssh://opensimulator.org/var/git/opensim 2012-02-10 16:28:11 -05:00
BlueWall
73f34de1f9 Merge branch 'master' of /home/opensim/var/repo/opensim 2012-02-10 16:27:14 -05:00
Justin Clark-Casey (justincc)
b3d152f3ba Fix an npc delete race condition with LSL sensors where an initial presence check could succeed but then the npc removed before the subequent npc check.
The resulting null would cause an exception.  We now check for null before looking at SenseAsAgent.
Hopefully fixes http://opensimulator.org/mantis/view.php?id=5872
2012-02-10 21:26:05 +00:00
PixelTomsen
a7dc7e636e Fix: Covenant view fails after updates or cache-clean see mantis http://opensimulator.org/mantis/view.php?id=2879
Signed-off-by: BlueWall <jamesh@bluewallgroup.com>
2012-02-10 15:45:03 -05:00
Justin Clark-Casey (justincc)
44d84bc277 Fix bug where somebody taking a copy of an object they didn't own that was rezzed before the region was restarted would wrongly place the copy in the object owner's inventory.
Addresses http://opensimulator.org/mantis/view.php?id=5825
2012-02-10 19:58:34 +00:00
Melanie
215acbcc96 Merge branch 'master' into careminster
Conflicts:
	OpenSim/Region/CoreModules/Framework/InventoryAccess/InventoryAccessModule.cs
	OpenSim/Region/OptionalModules/World/NPC/NPCModule.cs
2012-02-10 10:20:51 +00:00
PixelTomsen
7273e05995 Fix: Unable to remove AV from friend list (sqldb-bug) http://opensimulator.org/mantis/view.php?id=3731 2012-02-10 02:30:55 +00:00
Justin Clark-Casey (justincc)
ddca5347c3 When an asset is uploaded (e.g. a mesh) set individual copy/move/transfer permissions, not PermissionMask.All
Setting PermissionMask.All will cause next permissions to replace current permissions when the object is rezzed, since bit 4 will be set.
This is not correct behaviour for a freshly uploaded mesh.  Freshly rezzed in-world prims also do not have bit 4 set (don't yet know exactly what this is).
Should resolve http://opensimulator.org/mantis/view.php?id=5651
2012-02-10 02:13:15 +00:00
Justin Clark-Casey (justincc)
e8cc1bd329 Fix another Torture test build break on Windows. 2012-02-09 20:12:29 +00:00
Justin Clark-Casey (justincc)
9c84a8162f If NPCModule.CreateNPC() fails to create the required ScenePresence (which should in theory never happen), don't add the NPC to the npc list but return UUID.Zero instead. 2012-02-09 01:17:59 +00:00
Justin Clark-Casey (justincc)
16c4636048 Add NPC torture tests for 100, 1000 and 2000 create and delete NPC calls. 2012-02-09 00:38:09 +00:00
Melanie
7c888f6af1 Merge branch 'master' into careminster
Conflicts:
	OpenSim/Region/Framework/Scenes/SceneGraph.cs
2012-02-09 00:19:37 +00:00
Justin Clark-Casey (justincc)
dbe32a1f6d minor: put in commented out logging statements for future reuse 2012-02-09 00:10:45 +00:00
Justin Clark-Casey (justincc)
3fa61c4a39 Merge branch 'master' of ssh://opensimulator.org/var/git/opensim 2012-02-08 22:21:15 +00:00
Justin Clark-Casey (justincc)
dfa19e23f0 Stop a scene object from attempting to link with itself (which results in an exception and constant complaints in v3 viewers).
Aims to address http://opensimulator.org/mantis/view.php?id=5878
2012-02-08 22:19:34 +00:00
Melanie
9c6ba8d18f Push more NPC stuff into threads 2012-02-08 13:04:23 +01:00
Robert Adams
d5c08c44bf Add missing reference to prebuild.xml for torture tests 2012-02-07 16:40:09 -08:00
Justin Clark-Casey (justincc)
bef2a368f4 Make WebStats logging report consistently as WEB STATS MODULE instead of VC, VS and WEBSTATS 2012-02-07 23:38:53 +00:00
Melanie
236e1c45f2 Merge branch 'master' into careminster 2012-02-07 23:30:48 +00:00
Justin Clark-Casey (justincc)
a4367e75d3 Set UseMeshiesPhysicsMesh = true in [Mesh] by default
This means that uploaded meshes will get a physics (collision) mesh if uploaded with that option via a viewer.
2012-02-07 23:15:23 +00:00
Justin Clark-Casey (justincc)
c87751a822 Add start GC memory and end GC memory to object stress test printouts.
This illustrates that references to Scene, SOG, etc. are not currently being released when a stress test ends (or at regression test end in general).
This means even the current stress tests take much more memory than they need, a problem that will have to be addressed.
2012-02-07 23:03:53 +00:00
Justin Clark-Casey (justincc)
1f402fdf5e Add url to logging if SynchronousRestFormsRequester.MakRequest() throws an exception in service connectors 2012-02-07 21:40:28 +00:00
Justin Clark-Casey (justincc)
bd928218dd Add TestAddTaskInventoryItem() 2012-02-07 21:00:47 +00:00
Justin Clark-Casey (justincc)
773994723a Add warning about only uncommenting EstateConnectionString if you know what you're doing to GridCommon.ini.example (was already in StandaloneCommon.ini.example) 2012-02-07 20:35:04 +00:00
Justin Clark-Casey (justincc)
7583768b9e Remove debug logging if physics actor is null in SOP.ApplyPhysics()
This is not valid in the case of BasicPhysics which can return a null PhysicsActor (though I think it should really return a do-nothing PhysicsActor).
2012-02-07 20:26:26 +00:00
Melanie
de255321f1 Merge branch 'master' of ssh://3dhosting.de/var/git/careminster 2012-02-07 20:52:04 +01:00
Melanie
37049180f6 Merge branch 'master' into careminster
Conflicts:
	OpenSim/Region/Framework/Scenes/SceneObjectPartInventory.cs
	OpenSim/Region/ScriptEngine/XEngine/XEngine.cs
2012-02-07 21:09:04 +00:00
Justin Clark-Casey (justincc)
c22970448f Add TestCompileAndStart100Scripts() torture test. 2012-02-07 19:42:32 +00:00
Justin Clark-Casey (justincc)
038d1bf742 Add a regression test to compile and start a script. Remove Path.GetDirectoryName when getting assembly loading path in Compiler.CompileFromDotNetText().
The Path.GetDirectoryName call in Compiler.CompileFromDotNetText is unnecessary since AppDomain.CurrentDomain.BaseDirectory is always a directory.
Later path concatenation is already done by Path.Combine() which handles any trailing slash.
Removing Path.GetDirectoryName() will not affect the runtime but allows NUnit to work since it doesn't add a trailing slash to AppDomain.CurrentDomain.BaseDirectory.
2012-02-07 17:44:37 +00:00
Melanie
a829f20828 Experimental. Expand Fire & Forget for NPC delete 2012-02-06 22:26:25 +01:00
Melanie
54fc78013d Merge branch 'master' into careminster
Conflicts:
	OpenSim/Region/Framework/Scenes/Scene.cs
2012-02-05 20:58:04 +00:00
Melanie
130b1c0665 Revert my two quick fixes for the lag issue and put in the real fix, which
is to only write to the database if data was changed. I was writing to the db
on every step of every avatar. Sure to give us lag, that.
2012-02-05 20:47:02 +00:00
Melanie
a5fcdde179 Revert "Remove checks on ban list expiry on every move. To be re-added on parcel"
This reverts commit 35f14a262d.
2012-02-05 20:12:45 +00:00
Melanie
0904772a6f Revert "Check ban list for a particular parcel only when an avatar moves into it."
This reverts commit 8923ad755d.
2012-02-05 20:12:35 +00:00
BlueWall
4e11983c7c Make configuration uniform
Pickup the max physical prim size in Scene to make it uniform since adding code to get default size from the OpenSim*.ini.
2012-02-05 12:38:20 -05:00
Melanie
8923ad755d Check ban list for a particular parcel only when an avatar moves into it.
This restores functionality remove in the last commit without reintroducing
the performance penalty.
2012-02-05 04:03:32 +00:00
Melanie
35f14a262d Remove checks on ban list expiry on every move. To be re-added on parcel
boundary crossing only as soon as I'm properly awake. This should fix
recent performance issues
2012-02-05 03:44:15 +00:00
BlueWall
13999dfc1d Set PhysPrimMax default to 0 so ini files won't be overridden 2012-02-04 21:52:55 -05:00
nebadon
36ed0dcdaa change NonPhysicalPrimMax to NonphysicalPrimMax in Scenes.cs to make the
variable in OpenSim.ini and Regions.ini match
2012-02-04 19:45:10 -07:00
nebadon
44badf452e change NonPhysicalPrimMax to NonphysicalPrimMax to make this variable
work correctly, it was being ignored because of the case, this effects
OpenSim.ini.example and OpenSimDefaults.ini
2012-02-04 19:41:25 -07:00
BlueWall
df07b97abd Make NonphysicalPrimMax setting work properly
RegionInfo setting will override only if it is > 0
2012-02-04 21:30:16 -05:00
BlueWall
43b4e4cfc3 Quiet the map module logging 2012-02-04 19:08:52 -05:00
Melanie
ce5e900721 Merge branch 'master' into careminster
Conflicts:
	OpenSim/Data/MySQL/Resources/RegionStore.migrations
	OpenSim/Region/Framework/Scenes/Scene.Inventory.cs
2012-02-04 11:48:20 +00:00
BlueWall
6034e5d112 Add default value to TelehubObject 2012-02-04 00:28:22 -05:00
Justin Clark-Casey (justincc)
8779ff3c8f Supply correct parameters to detailed authentication login fail message 2012-02-04 02:00:35 +00:00
Justin Clark-Casey (justincc)
edc11a1d39 Add missing RCERR_UNKNOWN and RCERR_SIM_PERF_LOW LSL constants that would eventually be used by llCastRay(), though OpenSim does not use these yet. 2012-02-04 01:04:00 +00:00
Justin Clark-Casey (justincc)
09d6521361 Correct RC_* LSL constants used by llCastRay().
Many thanks to WhiteStar for doing the research on this.
2012-02-04 01:00:11 +00:00
Justin Clark-Casey (justincc)
6c252a0fa1 Add TestRegionSettingsDeserialize 2012-02-04 00:55:03 +00:00
Justin Clark-Casey (justincc)
9b762a5a84 Only look for an uploaded transactional asset in Scene.UpdateTaskInventory if we have been passed a non-zero transaction ID.
This resolves the recent regression from deeb728 where notecards could not be saved in prim inventories.
This looks like a better solution than deeb728 since only non-caps updates pass in a transaction ID.
Hopefully resolves http://opensimulator.org/mantis/view.php?id=5873
2012-02-04 00:20:27 +00:00
Justin Clark-Casey (justincc)
2b6c5fcb31 Merge branch 'master' of ssh://opensimulator.org/var/git/opensim 2012-02-03 23:48:12 +00:00
Justin Clark-Casey (justincc)
312e1457dd Change SceneObjectSerializer to use common ExternalRepresentationUtils.ExecuteReadProcessors() methods.
Adds ability to submit a customized exception message to match logging.
2012-02-03 23:47:01 +00:00
Snoopy Pfeffer
bd9d7484f0 Merge branch 'master' of ssh://snoopy@opensimulator.org/var/git/opensim 2012-02-04 00:39:58 +01:00
Dan Lake
4f8f44d9c3 Merge branch 'master' of ssh://opensimulator.org/var/git/opensim 2012-02-03 15:21:37 -08:00
Dan Lake
ea19e50919 Merge branch 'master' of ssh://opensimulator.org/var/git/opensim
Conflicts:
	OpenSim/Region/Framework/Scenes/SceneObjectPart.cs
2012-02-03 15:21:07 -08:00
BlueWall
0742630d81 Merge branch 'master' of /home/opensim/src/opensim 2012-02-03 18:20:26 -05:00
Dan Lake
107cef2b0e Check for null scene in ScheduleFullUpdate and ScheduleTerseUpdate before triggering events on a potentially null Scene 2012-02-03 15:18:48 -08:00
Justin Clark-Casey (justincc)
ce34b359ad Extend m_avatars lock in NpcModule.CreateNPC over both creation of NPC scene presence and population of m_avatars.
This is required to stop a race where the SensorRepeat module can detect an NPC avatar before m_avatars is populated.
Extending the lock is the easiest to understand solution rather than getting complicated with null checks.
Hopefully resolves http://opensimulator.org/mantis/view.php?id=5872
2012-02-03 23:04:26 +00:00
PixelTomsen
5c545d1d2e Fix: Covenant changed time not set http://opensimulator.org/mantis/view.php?id=5869
Signed-off-by: BlueWall <jamesh@bluewallgroup.com>
2012-02-03 18:02:51 -05:00
Snoopy Pfeffer
83ef13a79a Changed save oar and save iar parameter -p|--profile to -h|--home, including corresponding RemoteAdmin parameter 2012-02-03 23:53:18 +01:00
Justin Clark-Casey (justincc)
6234264211 Refactor common deserialization processor code to generic method ExternalRepresentationUtils.ExecuteReadProcessors() 2012-02-03 22:45:50 +00:00
Justin Clark-Casey (justincc)
f17066b7bf Change LandDataSerializer deserialization so that in the future it won't care about extra elements or element order.
This brings it into line with other deserializations such as object and will improve future backward compatibility.
2012-02-03 22:21:54 +00:00
Snoopy Pfeffer
1a18948935 Corrected console help texts for "save iar" 2012-02-03 23:04:18 +01:00
Melanie
0dbfa70443 Merge branch 'master' into careminster 2012-02-03 08:47:26 +00:00
Dan Lake
61adf36339 Commenting out new event until I can fix OpenSim tests. Currently, testing objects does not create a Scene or EventManager so triggering events crashes some tests 2012-02-02 18:19:22 -08:00
Dan Lake
ed846f11f1 OpenSim tests do not always create an EventManager so calls to trigger events during tests must check for null EventManager 2012-02-02 18:06:34 -08:00
Dan Lake
3257dbe76d Merge branch 'master' of ssh://opensimulator.org/var/git/opensim 2012-02-02 17:44:11 -08:00
Dan Lake
146d78edfa ObjectAddedToScene event should be fired when duplicating objects 2012-02-02 17:41:05 -08:00
Dan Lake
ee2b2aadc3 fix line endings 2012-02-02 17:39:05 -08:00
Melanie
bce5dfe711 Merge branch 'master' into careminster 2012-02-03 00:09:05 +00:00
Melanie
76a658324c Merge branch 'master' of melanie@opensimulator.org:/var/git/opensim 2012-02-03 00:07:23 +00:00
Melanie
573a64ad24 Merge branch 'master' into careminster 2012-02-03 00:05:59 +00:00
Melanie
574c240202 Fix test failure 2012-02-03 00:05:36 +00:00
Melanie
bdc31bddfc Merge branch 'master' into careminster 2012-02-02 23:41:27 +00:00
Melanie
447a66d660 Replace ParcelAccessEntry with a new struct, LandAccessEntry, which more
accurately reflects the data sent by the viewer. Add times bans and the
expiration of timed bans.
Warning: Contains a Migration (and nuts)
2012-02-02 23:40:56 +00:00
Justin Clark-Casey (justincc)
54d473e200 D'oh - we want to call llGetLinkNumberOfSides() in the LSL_Stub, not llGetLinkNumber(). 2012-02-02 23:35:16 +00:00
Justin Clark-Casey (justincc)
264c83aec4 Add llGetLinkNumberOfSides to LSL_Stub and ILSL_Api
It already existed in LSL_Api but it also needs to exist in these two other places for a script to be able to see it.
Hopefully resolves http://opensimulator.org/mantis/view.php?id=5489
2012-02-02 22:48:36 +00:00
Melanie
8f8b5f9a4d Merge branch 'master' into careminster 2012-02-02 22:36:41 +00:00
Melanie
07c487a28f Make ban, eject, freeze and the scripted versions of those work. 2012-02-02 21:36:45 +01:00
Justin Clark-Casey (justincc)
17df4185ce Add stress tests for simple object add of 100 prim objects. Add time taken to output (this is unreliable). 2012-02-02 18:42:27 +00:00
Diva Canto
dbf6381e34 OpenID: server connector had a copy-and-paste error that made identity queries fail. 2012-02-02 08:39:23 -08:00
Melanie
fd7e82ee72 Streamline banning code using existing methods. 2012-02-02 16:51:39 +01:00
Melanie
857d4e60cc Rehook the eject and freeze events that had gotten unhooked in the merge 2012-02-02 13:46:46 +01:00
Melanie
567f4c51f8 Improve reliability of script state saving by covering various saving
and loading scenarios which resulted in loss of continuity on item ids
2012-02-02 01:52:17 +00:00
Melanie
6fe4b6fbe8 Fix remembering attachment point and position when an item is rezzed in world.
Also fix PRIM_LOCAL_POS returning 0 when used on child prims from a script
in the root.
2012-02-02 02:51:59 +01:00
Melanie
dbc3f1ff92 Merge branch 'master' into careminster
Conflicts:
	OpenSim/Framework/TaskInventoryItem.cs
	OpenSim/Region/Framework/Scenes/SceneObjectPartInventory.cs
2012-02-02 01:53:13 +00:00
Dan Lake
0ce9ad4a56 Add event RegionHeartbeatEnd for modules interested in coordinating activity with region heartbeats 2012-02-01 17:01:28 -08:00
Dan Lake
c10193c72b Merge branch 'master' of ssh://opensimulator.org/var/git/opensim 2012-02-01 16:25:35 -08:00
Melanie
45ad9e39a6 Improve reliability of script state saving by covering various saving
and loading scenarios which resulted in loss of continuity on item ids
2012-02-02 01:05:14 +01:00
Melanie
e5ae84b42b Re-Add the reading of attachment data hat was lost in the merge 2012-02-02 01:04:54 +01:00
Melanie
16aa00e944 Merge branch 'master' into careminster
Conflicts:
	OpenSim/Region/ScriptEngine/XEngine/XEngine.cs
2012-02-01 10:08:45 +00:00
Melanie
003bd9f1b3 Small optimization to last commit 2012-02-01 10:05:04 +00:00
Melanie
cc1476fc36 Merge branch 'master' of melanie@opensimulator.org:/var/git/opensim 2012-02-01 09:45:42 +00:00
Melanie
241ddd031f Fix copy/paste errors 2012-02-01 09:45:15 +00:00
Melanie
c08d6df7e1 Prevent a changed attachment that has been saved from being saved again. 2012-02-01 09:38:20 +00:00
Melanie
fcc1fa2c32 Straighten out some attachment mess. Don't save attachment states for HG
visitors at all. On Leaving a sim, save only the changed ones. Don't save
all scripted stuff when leaving a sim.
2012-02-01 09:36:14 +00:00
Diva Canto
3d7b5e5e93 HG: This hopefully fixes the HG teleports back home to OSGrid. Looks like Uri.ToString() drops the port when it's port 80. 2012-01-31 22:00:59 -08:00
Justin Clark-Casey (justincc)
99e71222f0 Lay out script status in property per row format, since getting too long for console lines. 2012-02-01 00:27:42 +00:00
Justin Clark-Casey (justincc)
e3680f216e Add count of events queued for a particular script in "scripts show" console command 2012-02-01 00:17:02 +00:00
Justin Clark-Casey (justincc)
8b3da1bff4 Make script console commands only show for selected region. 2012-02-01 00:10:07 +00:00
Justin Clark-Casey (justincc)
437de6743c Implement "xengine status" console command to show various xengine stats 2012-02-01 00:07:06 +00:00
Justin Clark-Casey (justincc)
f028dca711 Add "show part uuid" and "show part name" console commands.
These commands will display part/prim details for a given uuid or name
The "show object uuid" and "show object name" commands will now only display details for objects (i.e. not child parts in a linkset).
This is for consistency with the "delete object" commands which only delete objects, not parts.
2012-01-31 23:35:13 +00:00
Justin Clark-Casey (justincc)
996cc6097e Implement "show object name <name>" console command to show details of an object with the given name 2012-01-31 23:21:02 +00:00
Justin Clark-Casey (justincc)
ac7cded080 Get rid of the "no objects found" feedback for now - this doesn't work well if a command is executed over multiple scenes. 2012-01-31 23:06:48 +00:00
Justin Clark-Casey (justincc)
ab89adfaef Implement "show object uuid <uuid>" console command.
This will show details about a part with the given uuid if it's found.
2012-01-31 23:03:39 +00:00
Justin Clark-Casey (justincc)
647b326edc Add more user feedback if an object isn't found for which delete was requested. 2012-01-31 22:27:05 +00:00
Justin Clark-Casey (justincc)
77b032549e Add the name of a deleted object to the console output 2012-01-31 22:22:32 +00:00
Justin Clark-Casey (justincc)
e3e38e34c5 If a particular region is selected in the console, only try to delete objects in that region, rather than in every region on the simulator
The old wrong behaviour was in place before the command was extracted to a module.
2012-01-31 22:21:10 +00:00
Justin Clark-Casey (justincc)
9bd02b5da1 Move object delete commands into a commands region module, in preparation for adding similar show commands. 2012-01-31 21:57:45 +00:00
Melanie
727ddffb71 Merge branch 'master' into careminster 2012-01-31 21:53:32 +00:00
Justin Clark-Casey (justincc)
2f84d5397b minor: remove mono compiler warning 2012-01-31 21:14:09 +00:00
Justin Clark-Casey (justincc)
1505c22995 Use Environment.TickCount & Int32.MaxValue; instead of Util.EnvironmentTickCount(); when producing the threads report to reduce wraparound.
This matches the tickcount masking in the thread watchdog.
For some reason, Util.EnvironmentTickCount() masks ticks by 0x3fffffff instead of 0xffffffff
2012-01-31 21:09:26 +00:00
Melanie
d76ca9cd93 Merge branch 'master' of ssh://melanie@3dhosting.de/var/git/careminster into careminster 2012-01-31 20:54:04 +00:00
Melanie
1b63b21a4d Merge branch 'master' into careminster
Conflicts:
	OpenSim/Region/Application/OpenSimBase.cs
2012-01-31 20:53:49 +00:00
Justin Clark-Casey (justincc)
10b9348071 Remove scene object null check on SceneGraph.AddSceneObject(). Complain explicitly if there's an attempt to add any object with a zero UUID.
Callers themselves need to check that they're not attempting to add a null scene object.
2012-01-31 20:30:30 +00:00
Justin Clark-Casey (justincc)
f3780b9eae Add torture tests to test adding 10,000, 100,000 and 200,000 single prim scene objects.
These can be run using the "nant torture" target.  They are not part of "nant test" due to their long-run future nature.
Such tests are designed to do some testing of extreme situations and give some feedback on memory usage, etc.
However, data can be inconsistent due to different machine circumstances and virtual machine actions.
This area is under development.
2012-01-31 19:56:37 +00:00
PixelTomsen
a98a146c50 Fix:llSetText - limited text to a maximum of 254 chars
mantis: http://opensimulator.org/mantis/view.php?id=5867

Signed-off-by: nebadon <michael@osgrid.org>
2012-01-31 10:17:38 -07:00
Melanie
c305b55012 Draw brders around parcels for sale 2012-01-31 06:31:02 +01:00
Melanie
d2dfa4cfe7 Make parcel sale overlays work. No auction support. 2012-01-31 03:09:44 +00:00
Melanie
71012ef883 Make parcel sale overlays work. No auction support. 2012-01-31 02:19:34 +01:00
Melanie
fe0975dc24 Merge branch 'master' of melanie@opensimulator.org:/var/git/opensim 2012-01-30 21:39:36 +00:00
Melanie
2b84b6d8b1 Use the requested sim's map, not our own 2012-01-30 21:39:12 +00:00
Justin Clark-Casey (justincc)
dbc039783b Merge branch 'master' of ssh://opensimulator.org/var/git/opensim 2012-01-30 21:34:40 +00:00
Melanie
a0206e5a17 Comment debug spam 2012-01-30 22:30:20 +01:00
Melanie
0f181fe5d0 Fix displaying landmark and search info properly with long names 2012-01-30 22:30:02 +01:00
Melanie
cfe924e4a8 Merge branch 'master' into careminster 2012-01-30 21:40:50 +00:00
Melanie
e1cad4c34f Use the requested sim's map, not our own 2012-01-30 21:38:46 +00:00
Melanie
9dbb58ee8b Merge branch 'master' into careminster 2012-01-30 21:26:47 +00:00
Melanie
53c3faac5d Patch in the rest of the maptile stuff 2012-01-30 21:24:21 +00:00
Melanie
c4cc626dff Add the needed column in the regions table and a few tweaks.
Warning: Contains a Migration
Warning: Cannot guarantee nut free
2012-01-30 20:34:32 +00:00
Melanie
bde2ff5e78 Next step for world map overlays 2012-01-30 20:11:47 +00:00
Melanie
ea16c9f858 Merge branch 'master' of melanie@opensimulator.org:/var/git/opensim
Conflicts:
	OpenSim/Region/CoreModules/World/WorldMap/WorldMapModule.cs
2012-01-30 19:49:12 +00:00
Melanie
df9c35bc0f Some plumbing for map overlays 2012-01-30 19:46:55 +00:00
Justin Clark-Casey (justincc)
9d93c4808e lock SceneObjectGroupsByFullID in SceneGraph.ForEachSOG() to stop failure if SceneObjectGroupsByFullID is updated elsewhere at the same time. 2012-01-30 19:21:58 +00:00
BlueWall
54e6b2402c Revert "Pickup map overlay tile from RegionSettings.ParcelImageID"
This reverts commit 00d1c88c59.

Need to dig a little deeper to see exactly how V1 viewers are using this
2012-01-30 12:39:08 -05:00
BlueWall
00d1c88c59 Pickup map overlay tile from RegionSettings.ParcelImageID 2012-01-30 11:49:22 -05:00
Melanie
ad02e01e77 Merge branch 'master' of ssh://melanie@3dhosting.de/var/git/careminster into careminster 2012-01-30 16:44:26 +00:00
Melanie
1b600e7803 Merge branch 'master' into careminster
Conflicts:
	OpenSim/Data/MySQL/MySQLSimulationData.cs
2012-01-30 16:38:11 +00:00
Melanie
3de534896e Add ParcelImageID to RegionSettings so we can have that overlay.
Warning: Contains a Migration.
Warning: May contain nuts.
2012-01-30 16:22:21 +00:00
Melanie
9a86a713d3 Merge branch 'master' into careminster 2012-01-29 22:50:59 +00:00
Garmin Kawaguichi
5e60afe5ed Fix llEdgeOfWorld functionality - see mantis http://opensimulator.org/mantis/view.php?id=5865
Signed-off-by: nebadon <michael@osgrid.org>
2012-01-29 14:41:47 -07:00
PixelTomsen
e8b688b61f Fix:Get embedded objects in notecard http://opensimulator.org/mantis/view.php?id=2607
Signed-off-by: nebadon <michael@osgrid.org>
2012-01-29 12:40:43 -07:00
Melanie
7c824f02b4 Add the ability to abort a pending restart using the viewer UI or a
RemoteAdmin message
2012-01-28 22:19:10 +01:00
Melanie
498fe1afe7 Fix calculating land prim count type width issue 2012-01-28 21:23:54 +01:00
Melanie
dac826da4e Prevent an overlong description from messing up a ParcelInfoReply 2012-01-28 20:38:50 +01:00
BlueWall
f7c237c0e1 Merge branch 'master' of /home/opensim/var/repo/opensim into mapwork 2012-01-28 11:35:28 -05:00
BlueWall
ae057a7589 Adding our parcel's generated id to map packets 2012-01-28 10:36:39 -05:00
BlueWall
1a20b60d82 Merge branch 'master' of ssh://opensimulator.org/var/git/opensim 2012-01-28 08:47:25 -05:00
Bo Iwu
2e31f12cf4 Send CHANGED_TELEPORT during local TP again - partially revert cf73afec35
Signed-off-by: BlueWall <jamesh@bluewallgroup.com>
2012-01-28 08:43:58 -05:00
Justin Clark-Casey (justincc)
2ef9fd05fa Add an overloaded SceneObjectPart.UpdateTextureEntry(Primitive.TextureEntry texEntry) for region modules 2012-01-28 02:45:13 +00:00
Melanie
6fbc48ee9c Make all NPCs owned by default 2012-01-28 03:32:25 +01:00
Melanie
6db9109b3f Merge branch 'master' of ssh://3dhosting.de/var/git/careminster 2012-01-28 03:22:36 +01:00
Melanie
abffda269f Merge branch 'master' into careminster
Conflicts:
	OpenSim/Region/Framework/Scenes/Scene.Inventory.cs
2012-01-28 04:05:53 +00:00
Justin Clark-Casey (justincc)
154ba0124a Add experimental --publish option to "save oar" so that OARs reloaded to the same grid don't have the publisher as owner. 2012-01-28 02:21:41 +00:00
Melanie
fbe324cc5e Fix build break 2012-01-28 03:15:17 +01:00
Melanie
090164ff7a Completely disable NPC being sensed as agents, the abuse potential is too great 2012-01-28 03:12:56 +01:00
Melanie
428407c5e4 Merge branch 'master' into careminster 2012-01-28 01:01:23 +00:00
Justin Clark-Casey (justincc)
088f1213b4 Remove accidental /user postfix from HomeURI in [HGInventoryAccessModule] in GridCommon.ini.example and from SRV_ProfileServerURI in [LoginService] in Robust.HG.ini.example
As per http://opensimulator.org/mantis/view.php?id=5852, confirmed by diva via aiaustin
2012-01-28 01:01:19 +00:00
Justin Clark-Casey (justincc)
e391d6390c Merge branch 'master' of ssh://opensimulator.org/var/git/opensim 2012-01-28 00:44:11 +00:00
Justin Clark-Casey (justincc)
deeb7287a2 Comment out xfer section in Scene.UpdateTaskInventory() which was causing spurious errors and "script saved" messages when script properties were changed.
Viewers since at least Linden Lab 1.23 use the script upload capability to save script changes.
It's unknown whether the commented out code was working for very old viewers or not.
Code is commented out to reduce complexity and so that useful error messages don't need to be removed.
If there is a substantial population using extremely old viewers that can't upgrade to a newer version 1 viewer (e.g. 1.23) or similar TPV then this can be revisited.
2012-01-28 00:39:53 +00:00
Melanie
7352aea9ac Remove IClientAPI from the money module. It was only used to pass in the
agent id anyway
2012-01-28 00:18:12 +00:00
Justin Clark-Casey (justincc)
7837c611fb Add OS_NPC_SENSE_AS_AGENT option to osNpcCreate().
This allows NPCs to be sensed as agents by LSL sensors rather than as a specific NPC type (which is currently an OpenSimulator-only extension).
Wiki doc on this and other recent NPC functions will follow soon
2012-01-28 00:00:12 +00:00
Melanie
26a4e8a161 Merge branch 'master' into careminster 2012-01-27 23:30:26 +00:00
Justin Clark-Casey (justincc)
31b87ff07b Increment LPS script stat for OSSL functions that were not already doing this 2012-01-27 23:24:49 +00:00
Justin Clark-Casey (justincc)
7c1d075a5a Implement osIsNpc(key npc):integer. This return TRUE if the given key belongs to an NPC in the region. FALSE if not or if the NPC module isn't present. 2012-01-27 23:17:13 +00:00
Justin Clark-Casey (justincc)
abf0dd4250 Merge branch 'master' of ssh://opensimulator.org/var/git/opensim 2012-01-27 23:14:34 +00:00
Justin Clark-Casey (justincc)
9939f94f08 Implement osNpcGetOwner(key npc):key. This returns the owner for an 'owned' NPC, the npc's own key for an 'unowned' NPC and NULL_KEY is the input key was not an npc.
llGetOwnerKey() could also be extended but this does not allow one to distinguish between an unowned NPC and some other result (e.g. 'no such object' if NULL_KEY is the return.
Also, any future extensions to LSL functions by Linden Lab are unpredictable and OpenSim-specific extensions could clash.
2012-01-27 23:05:48 +00:00
Melanie
86b9e6fbed Merge branch 'master' into careminster 2012-01-27 19:47:24 +00:00
Diva Canto
91ac21b9ec HG Inventoty: Guard against items not found. 2012-01-26 17:00:58 -08:00
Melanie
9d60b84f78 Merge branch 'master' into careminster
Conflicts:
	OpenSim/Framework/EstateSettings.cs
2012-01-26 23:07:31 +00:00
BlueWall
6da82d9805 Merge branch 'master' of ssh://opensimulator.org/var/git/opensim 2012-01-26 16:29:39 -05:00
PixelTomsen
616373db16 llManageEstateAccess implementation http://wiki.secondlife.com/wiki/LlManageEstateAccess
Signed-off-by: BlueWall <jamesh@bluewallgroup.com>
2012-01-26 16:15:23 -05:00
Melanie
7229f6e64b Merge branch 'master' into careminster
Conflicts:
	OpenSim/Region/Framework/Scenes/Scene.cs
2012-01-26 10:32:22 +00:00
Melanie
da720ce9be Support rejecting a teleport if a user is banned in all parcels that have
spawn points
2012-01-26 10:21:45 +00:00
Melanie
a537f7e1a3 Merge branch 'master' into careminster 2012-01-26 09:10:46 +00:00
BlueWall
a6abecf5fa Change references from sop to sog and add protection from null ref
I had code made additions to the map module that was based on the earlier work that I did before Melanie made improvements. Updating the new code to incorporate the same changes.
2012-01-26 00:33:34 -05:00
Justin Clark-Casey (justincc)
093469c33c Add basic TestAddScript() regression test 2012-01-26 01:16:03 +00:00
Melanie
36e6edfc65 Merge branch 'master' into careminster
Conflicts:
	OpenSim/Region/ScriptEngine/Shared/Instance/ScriptInstance.cs
2012-01-26 00:44:32 +00:00
Justin Clark-Casey (justincc)
13d9b64b1d Re-enable error logging associated with assembly and script loading failure in ScriptInstance.
Swallowing exceptions just leads to more mysterious failures later on.
2012-01-26 00:28:51 +00:00
Melanie
4ce42762ee Merge branch 'master' into careminster
Conflicts:
	OpenSim/Region/Framework/Scenes/Scene.Inventory.cs
	OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs
2012-01-26 00:21:21 +00:00
Justin Clark-Casey (justincc)
55c6cbabfd refactor: change RezScriptFromAgentInventory(), RezNewScript() and AddInventoryItem() to accept an agent id rather than a full IClientAPI.
This stops some code having to make spurious client == null checks and reduces regression test complexity.
2012-01-26 00:10:37 +00:00
Justin Clark-Casey (justincc)
8e5502fdc2 Merge branch 'master' of ssh://opensimulator.org/var/git/opensim 2012-01-25 23:24:44 +00:00
Justin Clark-Casey (justincc)
2de3a1b9da refactor: decompose most of RezScript() into RezScriptFromAgentInventory(), RezNewScript() and rename one RezScript() to RezScriptFromPrim() 2012-01-25 23:22:07 +00:00
nebadon
d053625663 Update save oar and save iar help responses to reflect new -h|--home
switches which replace -p|--profile ie: "save oar
--home=http://hg.osgrid.org:80 region.oar"
2012-01-25 15:59:07 -07:00
Robert Adams
e9de7e7107 Update BulletSim.dll with some interface changes and tuning (see opensim-libs). Change BSScene to use new interface. 2012-01-25 14:40:38 -08:00
Justin Clark-Casey (justincc)
2e7c1bcfd9 Merge branch 'master' of ssh://opensimulator.org/var/git/opensim 2012-01-25 21:26:34 +00:00
Pixel Tomsen
8f53c768f5 llGetParcelMusicURL implementation http://wiki.secondlife.com/wiki/LlGetParcelMusicURL
Signed-off-by: BlueWall <jamesh@bluewallgroup.com>
2012-01-25 15:48:38 -05:00
Justin Clark-Casey (justincc)
82c3d0cf89 minor: stop the WebStatsModule logging UPDATE or INSERT every time it updates bin/LocalUserStatistics.db 2012-01-25 20:36:51 +00:00
Justin Clark-Casey (justincc)
e20cf3789b Serialize calls to ODE Collide() function across OdeScene instances to prevent ODE crashes on simulators running more than one region.
It turns out that calls to Collide() are not thread-safe even for objects in different ODE physics worlds due to ODE static caches.
For simulators running multiple regions, not serializing calls from different scene loops will sooner or later cause OpenSim to crash with a native stack trace referencing OBBCollider.
This affects the default OPCODE collider but not GIMPACT.  However, GIMPACT fails for other reasons under some current simulator loads.
ODE provides a thread local storage option, but as of ODE r1755 (and r1840) DLLs compiled with this crash OpenSim immediately.
2012-01-25 19:31:50 +00:00
Melanie
7444f3bfad Merge branch 'master' of melanie@opensimulator.org:/var/git/opensim
Conflicts:
	OpenSim/Region/CoreModules/World/WorldMap/WorldMapModule.cs
2012-01-25 15:02:54 +00:00
Melanie
f84b69cad1 Change the WorldMapModule to use SOG rather than SOP for the telehub ans
cover a potential nullref
2012-01-25 15:00:06 +00:00
Melanie
b996517c94 Typo fix 2012-01-25 15:18:31 +01:00
Melanie
24862eaf15 Spin off starting scripts in rezzed objects into a thread to avoid a recursion
into the script engine if the script was suspended inside an event.
2012-01-25 14:44:09 +01:00
Melanie
2ca80add14 Merge branch 'master' into careminster
Conflicts:
	OpenSim/Region/Framework/Scenes/SceneGraph.cs
2012-01-25 15:24:25 +00:00
BlueWall
959bcfa7f8 Merge branch 'master' of /home/opensim/src/opensim 2012-01-24 21:35:12 -05:00
BlueWall
7c514fe155 Telehub map items displayed 2012-01-24 21:33:11 -05:00
Dan Lake
3d1f43046d Removed unused delegates in SceneGraph: ObjectDuplicateDelegate, ObjectCreateDelegate, ObjectDeleteDelegate 2012-01-24 17:05:53 -08:00
Melanie
427ab55058 Merge branch 'master' into careminster
Conflicts:
	OpenSim/Region/Framework/Scenes/SceneGraph.cs
2012-01-25 00:45:57 +00:00
Justin Clark-Casey (justincc)
2d0412d366 Make errors reported by OpenSim when it halts because it can't find certain config sections or files a bit more user friendly. 2012-01-24 22:35:55 +00:00
Justin Clark-Casey (justincc)
8e0eaa980f Merge branch 'master' of ssh://opensimulator.org/var/git/opensim 2012-01-24 22:16:45 +00:00
Justin Clark-Casey (justincc)
09baa3e679 Comment out asset statistics section from periodic stats as these have not been recorded for a very long time.
Some might make a comeback in the future but others are of dubious usefuless for health check purposes, or the complexity of collection outweighs their usefulness.
Some data is available via other means (e.g. "fcache status").
2012-01-24 22:14:21 +00:00
BlueWall
3ae6345f1b Merge branch 'master' of /home/opensim/src/opensim 2012-01-24 17:14:08 -05:00
BlueWall
dc329202ef Put Telehubs on the map 2012-01-24 17:11:35 -05:00
Justin Clark-Casey (justincc)
5e445aaf7b Fix "Abnormal client thread terminations" stat in period CONNECTION STATISTICS to count the number of times clients are disconnected due to ack timeouts.
This has been broken for a long period and would only ever show 0.
2012-01-24 22:09:13 +00:00
Justin Clark-Casey (justincc)
ab8956d58f Merge branch 'master' of ssh://opensimulator.org/var/git/opensim 2012-01-24 22:04:28 +00:00
Justin Clark-Casey (justincc)
e8f1e7e96e Comment out inventory statistics section from periodic stats, since this only contained the now uncollected and irrelevant inventory cache number. 2012-01-24 22:03:30 +00:00
Dan Lake
488fe0ae9c Removed unused events in SceneGraph: OnObjectCreate, OnObjectRemove, OnObjectDuplicate 2012-01-24 13:41:26 -08:00
Justin Clark-Casey (justincc)
7e76397a26 minor: correct text and usage for "image queues show" reigon console command. 2012-01-24 20:54:35 +00:00
Justin Clark-Casey (justincc)
a704d444f2 Merge branch 'master' of ssh://opensimulator.org/var/git/opensim 2012-01-24 20:36:16 +00:00
Justin Clark-Casey (justincc)
8b035dc3c7 Restrict accessible of ODECharacter Shell and Body. Add method doc and some error log lines. 2012-01-24 18:46:24 +00:00
Melanie
18fd36cba4 Merge branch 'master' into careminster 2012-01-24 04:07:02 +00:00
Melanie
855d3a3ba5 Teleport routing, part 1 2012-01-24 04:06:37 +00:00
Melanie
a4977bbe19 Simplify and streamline telehub editing code. Verify rotations and fix
spwan point positioning on rotated telehubs.
2012-01-24 02:36:35 +00:00
Melanie
6581849d24 Merge branch 'master' of ssh://3dhosting.de/var/git/careminster 2012-01-24 03:14:47 +01:00
Melanie
ef6d6d20b9 Merge branch 'master' into careminster 2012-01-24 02:36:54 +00:00
Melanie
f10288ceae Add handling bans properly 2012-01-24 03:14:00 +01:00
Melanie
0369d21917 Add teleport routing, first part 2012-01-24 03:13:44 +01:00
Melanie
0d2e02efb1 Reverse the spawn point distance vector 2012-01-24 01:30:41 +00:00
Melanie
c0e1784e86 Correct a coordinate to make the viewer like it 2012-01-24 01:18:13 +00:00
Melanie
cc02f78d4e Simplify and streamline telehub editing code. Verify rotations and fix
spwan point positioning on rotated telehubs.
2012-01-24 01:48:38 +01:00
Melanie
d51ae0ecac Merge branch 'master' into careminster 2012-01-24 01:31:07 +00:00
Melanie
696fbdfa24 Reverse the spawn point distance vector 2012-01-24 01:29:50 +00:00
Melanie
69e4debc42 Merge branch 'master' into careminster 2012-01-24 01:18:43 +00:00
Melanie
090bf7acca Correct a coordinate to make the viewer like it 2012-01-24 01:17:41 +00:00
Melanie
8fcb9bf418 Correct some SQL syntax 2012-01-24 00:57:52 +00:00
Melanie
7a87be5015 Fix merge artefacts and build break 2012-01-24 00:45:17 +00:00
Melanie
616f2b5861 Merge branch 'master' into careminster 2012-01-24 00:38:34 +00:00
Melanie
7bb01a17ee Add a forgotten parameter 2012-01-24 00:38:00 +00:00
Melanie
07ad821157 Merge branch 'master' into careminster
Conflicts:
	OpenSim/Data/MySQL/MySQLSimulationData.cs
	OpenSim/Framework/RegionSettings.cs
2012-01-24 00:36:42 +00:00
Melanie
87799c1f3d Change Telehubs to store only the data that is really needed and not
additional redundant information.
2012-01-24 00:32:10 +00:00
Melanie
c36c916342 Merge branch 'master' of melanie@opensimulator.org:/var/git/opensim 2012-01-23 21:25:59 +00:00
Melanie
48379e6442 IMPORTANT!!!!! Please READ. DO NOT Use this version or any before it since the
Telehub commits! They will eat your babies and corrupt your database while
they munch. DO NOT use anything from the first Telehub commit to this one.
FIRST GOOD COMMIT is the one FOLLOWING this one. You have been warned.
2012-01-23 21:23:55 +00:00
BlueWall
8db64dc77f Merge branch 'master' of /home/opensim/var/repo/opensim into telehub 2012-01-23 14:54:43 -05:00
BlueWall
6a85abbd14 Add update to Telehub position and rotation before adding SpawnPoints 2012-01-23 14:53:25 -05:00
BlueWall
c1f6478a37 Merge branch 'master' of ssh://opensimulator.org/var/git/opensim 2012-01-23 11:10:56 -05:00
BlueWall
0037577814 Merge branch 'telehub' 2012-01-23 11:10:42 -05:00
BlueWall
9cfc43005d Cleanup 2012-01-23 10:28:18 -05:00
BlueWall
39c9b656c8 Cleanup unused parts, add some error handling 2012-01-23 09:42:15 -05:00
Melanie
22ae9331bb Merge branch 'master' of ssh://3dhosting.de/var/git/careminster 2012-01-23 13:51:20 +01:00
Melanie
4e0bb49394 Fix llLookAt the right way 2012-01-23 13:48:16 +01:00
Melanie
cd2bf64b87 Merge branch 'master' into careminster
Conflicts:
	OpenSim/Data/MySQL/MySQLSimulationData.cs
2012-01-23 00:24:31 +00:00
Melanie
f7bd7c5901 Merge branch 'master' of melanie@opensimulator.org:/var/git/opensim 2012-01-22 23:21:35 +00:00
Melanie
7c404375c7 Fix up some parameter naming 2012-01-22 23:20:10 +00:00
BlueWall
d1ef7ee5ca Add note about setting up test databases 2012-01-22 16:27:49 -05:00
BlueWall
74c1ed77a4 Finish connecting Telehub to database 2012-01-22 14:51:15 -05:00
BlueWall
1cd26ba85e Hooking up new telehub data to the database 2012-01-22 11:46:16 -05:00
Melanie
02572ab1d3 Merge branch 'master' into careminster
Conflicts:
	OpenSim/Framework/RegionSettings.cs
2012-01-22 16:35:14 +00:00
Melanie
24b20f6e4b Change the key name I missed in last commit 2012-01-22 15:35:14 +00:00
Melanie
68365c20c0 Move Telehub tables and data from EstateSettings to RegionSettings.
This is damage control es EstateSettings is not the place this can be put.
EstateSettings is nt unique to a region and therefore would introduce
a hard limit of one telehub per estate, completely shutting off the
option of having SL style telehubs, e.g. one per region. Whole
estate teleport routing can still be implemented id desiresd, this
way all options are open while the other way most options get closed
off.
2012-01-22 11:36:04 +00:00
BlueWall
32d58d6e3e Telehub Support:
Telehub settings now persist to the database and are saved across sim restarts. So-far this only works on MySQL. this is a work in progress, teleport routing is not yet implemented.
2012-01-21 23:26:27 -05:00
Melanie
ba3b0c69f1 Merge branch 'master' into careminster 2012-01-21 19:52:33 +00:00
BlueWall
590f707c42 Merge branch 'master' of ssh://opensimulator.org/var/git/opensim 2012-01-20 23:54:29 -05:00
BlueWall
b6f3de5028 Telehub Support:
Support for viewer side of telehub management. Can manupulate Telehubs and SpawnPoints from the viewer estate managemnt tools. This is a work in progress and does not yet persist or affect teleport routing.
2012-01-20 23:50:37 -05:00
Justin Clark-Casey (justincc)
a0fb1e1788 Revert "Change linux, windows and mac ODE libraries to use the GIMPACT collider rather than OPCODE."
This reverts commit 4eef6725f4.

Reverting for now since this fails with "terminate called after throwing an instance of 'std::bad_alloc'" on Wright Plaza instances.
2012-01-20 17:51:12 +00:00
Justin Clark-Casey (justincc)
ea72428c9d Allow a viewer UDP image request retry to trigger another asset fetch if an existing fetch hasn't responded before a timeout.
This is to stop a high priority image/texture request from blocking the entire download queue if its asset fetch got dropped for some reason.
2012-01-19 23:09:16 +00:00
Justin Clark-Casey (justincc)
d38e2c0c91 Add image not in database test for LLImageManager 2012-01-19 21:57:12 +00:00
Justin Clark-Casey (justincc)
503faaea62 refactor: separate out common parts of LLImageManagerTests 2012-01-19 21:23:40 +00:00
Justin Clark-Casey (justincc)
381f74276b Add LLImageManager regression test for discard case 2012-01-19 21:14:09 +00:00
Justin Clark-Casey (justincc)
c92a9a6640 Add "image queues clear <first-name> <last-name>" console command
This allows a way to manually clear pending image queue requests for debug purposes
2012-01-19 19:49:06 +00:00
Justin Clark-Casey (justincc)
d75899f2d1 Merge branch 'master' of ssh://opensimulator.org/var/git/opensim 2012-01-19 19:47:18 +00:00
BlueWall
8f871cca10 Add osGetGridHomeURI function
Add osGetHomeURI function to the family of osGetGrid* functions. Returns the SRV_HomeURI setting from the [LoginService] configuration.
2012-01-19 14:21:12 -05:00
Justin Clark-Casey (justincc)
9356963bd3 Add basic request and send image regression tests for LLImageManager 2012-01-19 19:00:11 +00:00
BlueWall
edb2e4c5b3 Change URI to lowercase to match existing 2012-01-19 13:55:53 -05:00
BlueWall
bf9ce4709f Add fetching of SRV_HomeURI to "/json_grid_info"
Make SRV_HomeURI available on the GridInfoService through the "/json_grid_info" URI. This i s mainly to service OSSL, but can be seen externally via the URI.
2012-01-19 13:48:31 -05:00
Dan Lake
e41f23dead Trigger event when prims are scheduled for an update. This gives modules early access to changed parameters. 2012-01-19 03:06:35 -08:00
Dan Lake
5ced49aaa8 Cleaned up Color and Text parameters in SOP and made LocalFlags public for module access. 2012-01-19 03:03:22 -08:00
Dan Lake
2c6272d11a Add a version of GetGroupByPrim to Scene which accepts UUID instead of localID 2012-01-19 03:01:37 -08:00
Dan Lake
f8079bcd72 Fixed bugs in earlier commit on custom user parameters in Regions.ini 2012-01-19 02:52:05 -08:00
BlueWall
eea726d74e RegionReady:
Back out some of the oar monitoring for the time being. Need to find  a better way to get feedback. Will re-visit this soon.
2012-01-18 20:30:57 -05:00
BlueWall
e7619f7518 Merge branch 'master' of /home/opensim/src/opensim 2012-01-17 22:44:16 -05:00
BlueWall
ba7d8cedec Add function osGetGridCustom
Add function osGetGridCustom to take an argument for the GridInfo kpv to retrieve from the GridInfoService
2012-01-17 22:38:36 -05:00
BlueWall
717656c453 Merge branch 'master' of /home/opensim/src/opensim 2012-01-17 22:10:47 -05:00
BlueWall
9ed9720861 Update osGetGrid**** functions
The osGetGrid**** functions will now get the grid settings from the GridInfoService. Set the GridInfoURI in your ./bin/config-include/GridCommon.ini [GridInfo] section.
2012-01-17 22:07:40 -05:00
BlueWall
939d60da59 Merge branch 'master' of /home/opensim/lib/osgrid/opensim 2012-01-17 21:10:31 -05:00
BlueWall
ef5575be1b Add json handler for GridInfo 2012-01-17 21:09:46 -05:00
Justin Clark-Casey (justincc)
4eef6725f4 Change linux, windows and mac ODE libraries to use the GIMPACT collider rather than OPCODE.
As discussed on the opensim-dev mailing list, this is to avoid a demonstrated ODE collider segfault when stress-testing a simulator running more than one region using the bundled pCampbot.exe
As before, the ODE revision used is r1755 - only the collider has changed.
Tests so far reveal little performance change.
However, if noticeable issues do arise, please report on mantis and/or the opensim-dev mailing list.
The previous libraries are temporarily in bin/Physics-previous-ode-libs
These can be copied back to bin if one wants to compare behaviour with the previous libraries.
2012-01-17 20:49:20 +00:00
Melanie
08b6b3bb48 Add some logging 2012-01-17 17:36:26 +01:00
Melanie
5afb70b9fe Fix prim calculations so that > 32767 prims are supported 2012-01-17 15:30:52 +01:00
Melanie
747c25e920 Spin off NPC deletion into a thread to avoid it being done on a script
microthread. A stab at fixing exceptions.
2012-01-17 11:18:56 +01:00
Melanie
7549836986 Merge branch 'master' into careminster 2012-01-16 23:10:41 +00:00
Melanie
e13a17cc0c Allow retrival of multiple user records in one operation, analog to presence 2012-01-16 23:09:24 +00:00
Melanie
b14a6acd2f Merge branch 'master' into careminster 2012-01-16 23:08:47 +00:00
Justin Clark-Casey (justincc)
59a0c50d48 Comment out noisy log lines I accidentally included in the nant build target adjustment commit.
Left in the method doc.
2012-01-16 23:04:08 +00:00
Justin Clark-Casey (justincc)
82ad9d4e04 Remove monocov and other obsolete nant build targets.
monocov was a code coverage attempt 3 years ago which no longer works.
other removed targets have been commented out or unused for a very long time
2012-01-16 22:58:58 +00:00
Melanie
d6b9504c84 Add methods to allow the groups modules to query online status and last login 2012-01-16 02:19:19 +01:00
Melanie
35911d2362 Merge branch 'master' of ssh://3dhosting.de/var/git/careminster 2012-01-15 14:51:00 +01:00
Melanie
9447b6d15f Merge branch 'master' into careminster 2012-01-15 14:40:33 +00:00
Melanie
068b8e1f9b Disable using an agent ID to clone NPCs. The griefing potential is too great 2012-01-15 14:49:32 +01:00
Mic Bowman
2e4fbe6b17 protect the region ready alerts for loading oarfiles if no post URI is set 2012-01-14 23:43:21 -08:00
nebadon
43173f1b0d commented out redundant land owner checks for osTeleportAgent there is
no need for these checks just use Allow_osTeleportAgent = PARCEL_OWNER
also increased function to severe threat level to make it harder to
accidently enable it for everyone.
2012-01-14 18:36:46 -07:00
Melanie
ec299bfa87 Allow SmtpClients and other SSL users to work with our cert handler installed 2012-01-14 06:03:27 +00:00
Melanie
4cbf8d728e Fix merge 2012-01-14 05:39:56 +01:00
Melanie
43128c9016 Merge branch 'master' into careminster
Conflicts:
	OpenSim/Region/CoreModules/Scripting/LSLHttp/UrlModule.cs
	OpenSim/Region/Framework/Scenes/SceneObjectGroup.cs
	OpenSim/Region/Framework/Scenes/SceneObjectPart.cs
	OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs
2012-01-14 06:09:19 +00:00
Melanie
72247bdaef Allow SmtpClients and other SSL users to work with our cert handler installed 2012-01-14 05:28:57 +01:00
Justin Clark-Casey (justincc)
82f0e19349 Extend scripts show command to accept a single item UUID parameter to display one script's status
Usage is now scripts show [<script-item-uuid>]
2012-01-14 00:44:19 +00:00
Justin Clark-Casey (justincc)
b5bb559cc0 Register the UrlModule for script engine events OnScriptRemoved and OnObjectRemoved just once in the UrlModule itself, rather than repeatedly for every script.
Doing this in every script is unnecessary since the event trigger is parameterized by the item id.
All that would happen is 2000 scripts would trigger 1999 unnecessary calls, and a large number of initialized scripts may eventually trigger a StackOverflowException.
Registration moved to UrlModule so that the handler is registered for all script engine implementations.
This required moving the OnScriptRemoved and OnObjectRemoved events (only used by UrlModule in core) from IScriptEngine to IScriptModule to avoid circular references.
2012-01-14 00:23:11 +00:00
Mic Bowman
a30a02e7ae Merge branch 'master' of ssh://opensimulator.org/var/git/opensim 2012-01-13 14:51:11 -08:00
Mic Bowman
e1a2c44ebe Cleaned up the LookAt code in SOP and SOG. Added support for incrementally
rotating physical objects. This does not use physics. Currently the rate
of change is determined as 1 / (PI * Strength).
2012-01-13 14:48:56 -08:00
BlueWall
cde80125ad Merge branch 'master' of /home/opensim/src/opensim 2012-01-13 17:16:20 -05:00
Bo Iwu
02d6b033d0 Fix improper code formatting introduced in 6214e6a217
Signed-off-by: BlueWall <jamesh@bluewallgroup.com>
2012-01-13 17:10:48 -05:00
Mic Bowman
adea92f8b7 Fix llRotLookAt and llLookAt for non-physical objects. Per conversation
with Melanie and Nebadon, SL behavior seems to be that non physical
objects snap to the request rotation.
2012-01-13 11:37:17 -08:00
BlueWall
57ba9ef5ad Update RegionReadyModule
Fix triggering of alerts when rezzing first script to an empty region, add login disable when loading oars.
2012-01-13 11:35:44 -05:00
Melanie
982f3d58a9 Merge branch 'master' into careminster 2012-01-13 04:04:39 +00:00
Melanie
9dc7fef4f6 Merge branch 'master' into careminster 2012-01-13 02:27:20 +00:00
BlueWall
c5594e839e Undo some prior work
Move some added fuctions out of core into the addon module to keep things clean
2012-01-12 21:19:31 -05:00
BlueWall
acbff305f5 Merge branch 'master' of /home/opensim/var/repo/opensim 2012-01-12 21:06:27 -05:00
BlueWall
d40ec1c346 Move some interfaces to a more apropriate place 2012-01-12 20:49:50 -05:00
Justin Clark-Casey (justincc)
3b59af2225 Change the default osNpcCreate() to create an 'owned' npc rather than an 'unowned' one.
An owned NPC is one that only the original creator can manipulate and delete.
An unowned NPC is one that anybody with access to the osNpc* methods and knowledge of the avatar id can manipulate.
This is to correct an oversight I made in the original reimplementation where I mistakenly assumed that avatar IDs could be treated as private.
I am not anticipating that many people were deliberately making use of unowned npcs due to their insecure nature.
If you do need an unowned NPC please call the new overloaded osCreateNpc() function with the option OS_NPC_NOT_OWNED.
2012-01-13 00:03:39 +00:00
Justin Clark-Casey (justincc)
6e7154d55c Removing osNpcCreateOwned(). Please use osNpcCreate(string user, string name, vector position, string notecard, int options) instead with option OS_NPC_CREATOR_OWNED
Please note that correct option name is OS_NPC_CREATOR_OWNED not OS_NPC_CREATE_OWNED as mistakenly put in a previous commit.
2012-01-13 00:00:18 +00:00
Justin Clark-Casey (justincc)
47377f17c6 Add missing assert to confirm owner delete succeeded to the end of TestOsNpcRemoveOwned() 2012-01-12 23:46:43 +00:00
Justin Clark-Casey (justincc)
beab155434 Add api level test for removing an owned npc 2012-01-12 22:35:11 +00:00
Melanie
c7757d1038 Fix typo 2012-01-12 23:07:38 +01:00
Melanie
aa2cde2493 Disable unowned NPCs 2012-01-12 23:04:38 +01:00
Melanie
cf166d3f1e Merge branch 'master' into careminster 2012-01-12 23:22:55 +00:00
Justin Clark-Casey (justincc)
caa207f59f Add ossl level test for removing an unowned npc 2012-01-12 21:03:54 +00:00
Justin Clark-Casey (justincc)
1ac5aa6808 Add remove test for unowned avatars 2012-01-12 20:47:19 +00:00
Justin Clark-Casey (justincc)
c4972e7734 Add osNpcCreate(string firstname, string lastname, LSL_Vector position, string notecard, int options) variant.
This will be documented soon.  Options can currently be
  OS_NPC_CREATE_OWNED - creates a 'creator owned' avatar that will only respond to osNpc* functions made by scripts owned by the npc creator
  OS_NPC_NOT_OWNED    - creates an avatar which will respond to any osNpc* functions that a caller has permission to make (through the usual OSSL permission mechanisms).

options is being added to provide better scope for future extensibility without having to add more functions
The original non-options osNpcCreate() function will continue to exist.
2012-01-12 19:37:30 +00:00
Justin Clark-Casey (justincc)
d27dd3714f Allow all NPCs to show up on sensors as all osNpc* script methods now check for ownership permission before executing.
As per #opensim-dev irc discussion.
2012-01-12 19:19:34 +00:00
Justin Clark-Casey (justincc)
ba3491c76e Add permissions checks for owned avatars to all other osNpc* functions.
This is being done outside the npc module since the check is meaningless for region module callers, who can fake any id that they like.
2012-01-12 19:06:46 +00:00
Justin Clark-Casey (justincc)
0a1d61950b Merge branch 'master' of ssh://opensimulator.org/var/git/opensim 2012-01-12 19:03:26 +00:00
Diva Canto
cadd645076 Renamed one var and deleted commented code. No functional changes. 2012-01-12 10:22:52 -08:00
Justin Clark-Casey (justincc)
b47c0d7e51 refactor: Move existing npc owner checks to NPCModule.CheckPermissions() methods and expose on interface for external calls. 2012-01-12 18:14:19 +00:00
Diva Canto
8bdd80abfa HG: normalize all externalized user ULRs to be the Home URL, i.e. the location of the user's UAS. This corrects an earlier design which had some cases pointing to the profile server. WARNING: CONFIGURATION CHANGES in both the sims (*Common.ini) and the Robust configs (Robust.HG.ini). Please check diff of the example files, but basically all vars that were pointing to profile should point to the UAS instead and should be called HomeURI. 2012-01-12 09:56:35 -08:00
Melanie
4492bc1bcd Merge branch 'master' into careminster 2012-01-12 17:52:29 +00:00
Bo Iwu
6214e6a217 Allow update of stored entries within User Management Module-this is needed for proper work of HG friends.
See http://opensimulator.org/mantis/view.php?id=5847
2012-01-12 17:51:13 +00:00
Michelle Argus
34137ed4ea Correcting ini.example were permissionmodules uses komma instead of space as separator 2012-01-12 12:27:41 -05:00
Melanie
5d9e135b5c Remove ViewObjectInventory method unsupported by core 2012-01-12 01:11:05 +01:00
Melanie
1a3a1e6665 Adapt a cast to using the new TeleportFlags 2012-01-11 19:00:17 +01:00
Justin Clark-Casey (justincc)
38db874755 If deserializing a scene object fails during IAR load then ignore the object rather than halting the IAR load with an exception. 2012-01-11 14:33:26 +00:00
Mic Bowman
5f7e392c7c Add a check to see if an asset exists before recreating it while
loading an archive. This does add an extra roundtrip to the asset
server if loading new assets but it protects against overwriting
(and potentially corrupting) existing assets.
2012-01-10 16:26:01 -08:00
Justin Clark-Casey (justincc)
53fb20880c minor: Fix wrong column length in image queues report 2012-01-10 22:02:35 +00:00
Justin Clark-Casey (justincc)
5002f06d24 rename "show image queue" to "show image queues" in line with other udp info commands.
Eliminate redundant one line methods
2012-01-10 21:36:35 +00:00
Justin Clark-Casey (justincc)
ef074deb52 Add "show image queue <first-name> <last-name>" region console command
This is so that we can inspect the image download queue (texture download via udp) for debugging purposes.
2012-01-10 21:30:12 +00:00
Melanie
8fa1108b72 Merge branch 'master' into careminster 2012-01-10 21:28:59 +00:00
Melanie
a4c2e7f599 Merge branch 'master' into careminster 2012-01-10 20:34:43 +00:00
BlueWall
a2fe3e2081 Remove DEBUG option
Remove DEBUG option from OpenSim.ini.example as it is handled in the console now with "debug teleport"
2012-01-10 15:29:08 -05:00
Diva Canto
ce44f56af9 Merge branch 'master' of ssh://opensimulator.org/var/git/opensim 2012-01-10 11:11:08 -08:00
Diva Canto
7b84942f86 HG landing points: this hopefully fixes some confusion that was making HG avies always land in 0,0 2012-01-10 11:10:47 -08:00
Justin Clark-Casey (justincc)
18497cef73 Add avatar names to appearance log messages 2012-01-10 18:54:20 +00:00
Justin Clark-Casey (justincc)
a3bb1a81de correct very minor typo in "debug scene" help 2012-01-10 18:47:30 +00:00
BlueWall
66783398d0 Merge branch 'master' of ssh://opensimulator.org/var/git/opensim 2012-01-10 13:43:42 -05:00
Justin Clark-Casey (justincc)
d67e9916b8 Merge branch 'master' of ssh://opensimulator.org/var/git/opensim 2012-01-10 18:42:37 +00:00
BlueWall
3deb52d399 Teleport Debugging
Move setting from ini to existing facitilies - thanks justincc

	toggle with console command: debug teleport
2012-01-10 13:41:35 -05:00
Justin Clark-Casey (justincc)
d67e8291c8 Add "app find <uuid-or-start-of-uuid>" command to find the appearance using a particular baked texture, if any.
This is for debugging to relate texture console entries back to particular users on the simulator end.
2012-01-10 18:41:07 +00:00
Melanie
1cc685e820 Merge branch 'master' into careminster
Conflicts:
	OpenSim/Region/Framework/Scenes/ScenePresence.cs
2012-01-10 18:33:32 +00:00
Diva Canto
a22d0dcab9 HG Friends: fixed bug introduced by 571efeddb2 (r/17672) 2012-01-10 09:58:53 -08:00
BlueWall
707c8c6f2b Add some run-time debugging support
Add configuration option - DEBUG to enable debugging methods. This is temporary for helping users testing teleport routing be able to report back the data with the test cases. We can remove when finished with this, or leave it if it proves to be useful.

	Users: set DEBUG = true in OpenSim.ini to get more information from teleport routing. The default is false. It presently prints the TeleportFlags value.
2012-01-09 18:19:55 -05:00
BlueWall
b3a12167d6 Use our TeleportFlags
Switch to our TeleportFlags enum instead of LibOMV because we need to define a type for HG Logins. Also moved some debugging in ScenePresence into a function to make it simpler to enable/disable.
2012-01-09 17:54:35 -05:00
BlueWall
95345521f0 TP Routing debug
Fix test to checking against bitfield instead of int
2012-01-09 17:04:34 -05:00
BlueWall
3640afdd95 Fix teleport routing for incoming HG+Owner
Incoming HG owner/estate manager, etc. is routed according to the rules defined for teleports within the local grid. Left some commented debugging code inside so we can test other cases. Will remove when tings are settled in.
2012-01-09 14:31:22 -05:00
Melanie
bc08cc201b Merge branch 'master' into careminster 2012-01-09 19:22:06 +00:00
BlueWall
43145c7f67 Debugging HG teleport routing
Add some temporary debugging to the teleport routing to get a better view of what happens when HG jumps are made.
2012-01-09 13:07:02 -05:00
Melanie
520b8b342e Merge branch 'master' into careminster 2012-01-09 06:52:46 +00:00
BlueWall
34c42cdab0 Fix HG teleport routing
Needed to breakout the ViaHGLogin check to it's own section. For some reason it would not factor in when combined with the other teleport flag types.
2012-01-09 01:37:28 -05:00
Melanie
0e855fea7c Fix a build break 2012-01-09 01:05:19 +00:00
Melanie
1ebd79e413 Add the HG case to landing point checks 2012-01-09 00:54:59 +00:00
Melanie
0cf59534ff Update teleport routing to match Avination 2012-01-08 23:39:23 +00:00
Melanie
d5c5bbe0a1 Update teleport routing to match Avination 2012-01-08 23:38:43 +00:00
Melanie
44cde8d5c6 Update teleport routing to match Avination 2012-01-08 23:36:49 +00:00
BlueWall
37fc19fae0 Update building instructions
a good place to trigger a test on the opensimulator site
2012-01-08 18:21:09 -05:00
BlueWall
fb16d49511 Merge branch 'master' of /home/opensim/src/opensim 2012-01-08 17:56:03 -05:00
BlueWall
266167f5a3 Fix teleport routing
Route non-owner avatars according to land settings
2012-01-08 17:41:47 -05:00
Melanie
4bf2e19898 Merge branch 'master' into careminster 2012-01-07 18:11:21 +00:00
Melanie
32eb7ddc37 Fix threat level setting on osNpcPlayAnimation 2012-01-07 18:09:53 +00:00
Melanie
6f19e231b6 Don't try to save a NPCs attachment states on NPC delete 2012-01-07 18:09:45 +00:00
Melanie
94fa6cb071 Fix threat level setting on osNpcPlayAnimation 2012-01-07 12:29:59 +01:00
Melanie
efe51fd5cb Don't try to save a NPCs attachment states on NPC delete 2012-01-07 12:06:21 +01:00
Melanie
69c0f252a4 Force the group tag of NPCs to "- NPC -" unless the name is completely blank. 2012-01-07 12:05:42 +01:00
nebadon
58cb7cd084 fix a typo "osNpcCreated" to "osNpcCreate" in OSSL threat level check 2012-01-06 23:07:48 -07:00
Melanie
38ae479249 Make sure to prefix NPC names with "NPC:" so they can't be mistaken for users 2012-01-07 02:49:52 +01:00
Justin Clark-Casey (justincc)
f4231f0628 minor: remove mono compiler warning 2012-01-07 00:32:32 +00:00
Justin Clark-Casey (justincc)
ba163ab05b Add method doc to SPA.Falling and use automatic private get property 2012-01-07 00:29:55 +00:00
Justin Clark-Casey (justincc)
c5c079f6aa Fix bug where tapping home to stop falling would stop any avatar movement other than falling again.
Addresses http://opensimulator.org/mantis/view.php?id=5839
2012-01-07 00:17:40 +00:00
Melanie
679d155a39 Fix some syntax issues 2012-01-06 23:08:18 +00:00
Melanie
9668992493 Add osNpcPlayAnimation and osNpcStopAnimation which respect ownership as well 2012-01-06 22:59:50 +00:00
Melanie
1cffd8fa03 Merge branch 'master' of melanie@opensimulator.org:/var/git/opensim 2012-01-06 22:36:35 +00:00
Melanie
7518b075b7 Add osNpcCreateOwned to create an owned NPC. Those can be sensed only by the owner, can be destroyed only by the owner and only the owner can save their appearance. Added "NPC" as a flag to llSensor to sense NPCs and exclude them from "AGENT" results. 2012-01-06 22:35:06 +00:00
Justin Clark-Casey (justincc)
3073370d0e Allow RemoteAdmin to deal with all the different kinds of region id parameter that have been used in different methods.
See http://opensimulator.org/mantis/view.php?id=5814
Thanks Michelle Argus!
2012-01-06 22:29:27 +00:00
Justin Clark-Casey (justincc)
9bab43b4d1 eliminate a few tabs from OpenSimDefaults.ini 2012-01-06 21:36:30 +00:00
Melanie
70157a4ec5 Fix some syntax issues 2012-01-06 22:33:51 +01:00
Melanie
a47aa46962 Add osNpcPlayAnimation and osNpcStopAnimation which respect ownership as well 2012-01-06 22:59:08 +00:00
Melanie
a34278cfc3 Merge branch 'master' into careminster
Conflicts:
	OpenSim/ApplicationPlugins/RemoteController/RemoteAdminPlugin.cs
2012-01-06 22:41:26 +00:00
Justin Clark-Casey (justincc)
5f682b51ec Add disabled Cap_FetchInventory2 = "" reference to [ClientStack.LindenCaps] in line with all the other ones that are there 2012-01-06 21:29:18 +00:00
John Cochran
ff5a83d192 Fixed llAngleBetween() to allow denormal rotations 2012-01-06 21:14:42 +00:00
Justin Clark-Casey (justincc)
8c445dac67 Add script instruction count back to llRot2Euler. Other minor formatting/doc changes. 2012-01-06 21:12:22 +00:00
John Cochran
eb9bf71726 Replaced llRot2Euler function.
The original function suffered from unexpected results due to rounding
errors. An error of only 1 or 2 ulps would cause the code to not detect
a singularity at Y rotation +/- PI/2 and take the non-singularity code
path. The replacement code does not suffer from wildly inaccurate
results at the +/- PI/2 singularity. The check in the code for the
singularity isn't strictly needed, but gives more consistent results
At the singularity, the X and Z rotations add. The if check simply
forces the X rotation to be zero so the entirety of the X+Z rotation is
carried by Z.

Additionally, the test code has been updated to include test cases that
caused the old code to fail. The test algorithm is also updated to
perform a more meaningful test. The original code checked if the values
against expected values. This could fail at +/- PI rotations since a
rotation around an axis by PI causes the identical effect as a rotation
by -PI. The new test code checks that the returned angles can be used
to recreate a quaternion that causes the same rotation.
2012-01-06 21:08:54 +00:00
Justin Clark-Casey (justincc)
7661a0b2a9 Implement the FetchInventory2 capability. This accompanies the existing FetchInventoryDescendents2 capability.
Not yet enabled by default.  You can enable this by setting Cap_FetchInventory2 = "localhost" in the [ClientStack.LindenCaps] section of OpenSim.ini
Enabling both FetchInventory2 and FetchInventoryDescendents2 improves the situation with properly fetching attachments and hud objects
Probably because viewers are never expecting the odd situation where FetchInventoryDescendents2 is present but not FetchInventory2
However, for some reason attachments and hud objects occasionally fail to appear, though their status is correct in inventory
For attachments, focussing on the avatar makes them appear.  Hud objects have to be reattached.
2012-01-06 21:07:34 +00:00
Melanie
de9d6096a5 Merge branch 'master' of ssh://3dhosting.de/var/git/careminster 2012-01-06 21:37:01 +01:00
Melanie
11c48ac807 Merge branch 'master' into careminster
Conflicts:
	OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs
	OpenSim/Region/ScriptEngine/Shared/Tests/LSL_ApiTest.cs
2012-01-06 21:41:36 +00:00
John Cochran
e9b9eb6a4c Replaced llRot2Euler function.
The original function suffered from unexpected results due to rounding
errors. An error of only 1 or 2 ulps would cause the code to not detect
a singularity at Y rotation +/- PI/2 and take the non-singularity code
path. The replacement code does not suffer from wildly inaccurate
results at the +/- PI/2 singularity. The check in the code for the
singularity isn't strictly needed, but gives more consistent results
At the singularity, the X and Z rotations add. The if check simply
forces the X rotation to be zero so the entirety of the X+Z rotation is
carried by Z.

Additionally, the test code has been updated to include test cases that
caused the old code to fail. The test algorithm is also updated to
perform a more meaningful test. The original code checked if the values
against expected values. This could fail at +/- PI rotations since a
rotation around an axis by PI causes the identical effect as a rotation
by -PI. The new test code checks that the returned angles can be used
to recreate a quaternion that causes the same rotation.
2012-01-06 21:30:51 +00:00
Melanie
f1846045a6 Add osNpcCreateOwned to create an owned NPC. Those can be sensed only by the owner, can be destroyed only by the owner and only the owner can save their appearance. Added "NPC" as a flag to llSensor to sense NPCs and exclude them from "AGENT" results. 2012-01-06 21:34:43 +01:00
Melanie
2304420f6d Merge branch 'master' into careminster 2012-01-06 17:44:07 +00:00
Melanie
f8c15d38a6 If dragging a script that is no copy from prim inventory into agent
inventory, stop it first in scene. If deleting from prims, move to trash
rather then making it poof.
2012-01-06 17:43:35 +00:00
Melanie
3003133a66 Merge branch 'master' of ssh://melanie@3dhosting.de/var/git/careminster into careminster 2012-01-06 17:39:39 +00:00
Melanie
81cf774fe8 Merge branch 'master' into careminster 2012-01-06 17:38:53 +00:00
Melanie
fbb2a7e90d Add ThreatLevel.NoAccess to OSSL. This allows to enable OSSL without enabling
any methods, even those without threat, automatically. It is for use with
setups wanting to allow only specific methods to specific users.
2012-01-06 17:37:22 +00:00
Melanie
31dc5aa728 If dragging a script that is no copy from prim inventory into agent
inventory, stop it first in scene. If deleting from prims, move to trash
rather then making it poof.
2012-01-06 13:15:04 +01:00
Melanie
db482cb7dd Fix up asset stuff 2012-01-06 00:04:32 +01:00
BlueWall
b06d878790 Merge branch 'master' of ssh://opensimulator.org/var/git/opensim 2012-01-05 17:55:24 -05:00
Melanie
23ce1dfc27 Remove a dangling command registration 2012-01-05 23:54:51 +01:00
Melanie
fdfc4ab2a8 Merge branch 'master' into careminster
Conflicts:
	OpenSim/Services/Connectors/Asset/AssetServiceConnector.cs
2012-01-06 00:08:18 +00:00
BlueWall
f252161941 Merge branch 'master' of ssh://opensimulator.org/var/git/opensim 2012-01-05 17:54:51 -05:00
Justin Clark-Casey (justincc)
b86e7715a8 Improve "j2k decode" command to tell us how many layers and components were decoded, instead of just success/failure 2012-01-05 22:54:33 +00:00
BlueWall
e393b47da8 Merge branch 'new_modules' 2012-01-05 17:54:05 -05:00
BlueWall
2b4edd659f Adding empty ISearchModule interface 2012-01-05 17:53:03 -05:00
Justin Clark-Casey (justincc)
5ea9740f1b Add a "j2k decode" region console command that allows a manual request for a JPEG2000 decode of an asset
For debugging purposes.
2012-01-05 22:40:49 +00:00
Justin Clark-Casey (justincc)
da0fc3c8f5 Make "show asset" command available simulator side. Actually make the service command be "show asset" instead of "show digest" this time.
Last time I accidnetally just changed the usage message.
2012-01-05 21:11:32 +00:00
Justin Clark-Casey (justincc)
f06acc0a85 Add size and temporary information to "show asset" command 2012-01-05 21:05:10 +00:00
Justin Clark-Casey (justincc)
5b160f5b7b Rename 'show digest' console command to 'show asset' 2012-01-05 20:56:29 +00:00
Justin Clark-Casey (justincc)
7319ba62dd Move simulator asset info commands to an optional module from the connector. Make them conform with service side commands.
This stops them appearing twice when Hypergrid is enabled.
2012-01-05 20:51:49 +00:00
Justin Clark-Casey (justincc)
f2ff6d5186 Move asset commands from AssetService to AssetServerConnector so that we can harmonise the same commands on the simulator side.
No functional change.
2012-01-05 20:33:44 +00:00
Justin Clark-Casey (justincc)
50e459d265 recomment log messages I accidentally left uncommented 2012-01-05 19:44:06 +00:00
Justin Clark-Casey (justincc)
c201b54b85 Improve "app rebake" command to return a better message if no uploaded texture ids were available for the rebake request 2012-01-05 19:40:54 +00:00
Justin Clark-Casey (justincc)
da6c816204 Commenting out DataSnapShot message "Registering service discovery capability" for now.
Please uncomment if/when needed.
2012-01-05 17:10:38 +00:00
Melanie
2c401b7359 Merge branch 'master' of melanie@opensimulator.org:/var/git/opensim 2012-01-05 08:12:34 +00:00
Melanie
97ba3c9346 Small fix to GetWorldPosition to get closer to Avination sit behavior 2012-01-05 08:11:52 +00:00
Melanie
e9296721c7 That needs to be callable from elsewhere! 2012-01-05 08:04:04 +01:00
Melanie
85d82c8140 Merge branch 'master' of ssh://3dhosting.de/var/git/careminster 2012-01-05 07:43:16 +01:00
Melanie
1ebc9d04aa Merge branch 'master' into careminster
Conflicts:
	OpenSim/Region/CoreModules/Avatar/AvatarFactory/AvatarFactoryModule.cs
	OpenSim/Region/Framework/Scenes/SceneObjectPart.cs
2012-01-05 08:15:33 +00:00
Melanie
045f3b8b11 Clean up GetWorldPosition 2012-01-05 07:37:31 +01:00
Melanie
32b8fa4a77 Prevent spurious "CHANGED_POSITION" during region backup 2012-01-05 07:37:09 +01:00
Justin Clark-Casey (justincc)
8fb70a2058 Add "appearance rebake" command to ask a specific viewer to rebake textures from the server end.
This is not as useful as it sounds, since you can only request rebakes for texture IDs already received.
In other words, if the viewer has never sent the server this information (which happens quite often) then it will have no effect.
Nonetheless, this is useful for diagnostic/debugging purposes.
2012-01-04 22:45:07 +00:00
Justin Clark-Casey (justincc)
0634c38505 Separate out rebake request code from cache validation code AvatarFactoryModule.
This allows some logic simplification and allows an external caller to manually request rebakes even if textures are uploaded (future command).
2012-01-04 22:22:46 +00:00
Justin Clark-Casey (justincc)
7e6c84c334 Merge branch 'master' of ssh://opensimulator.org/var/git/opensim 2012-01-04 21:41:28 +00:00
Justin Clark-Casey (justincc)
3a64522267 Minor formatting changes and commented out log lines for future debugging of image manager (udp texture fetch). No significant functional changes. 2012-01-04 21:40:15 +00:00
Dan Lake
3a2ac0e2ee Merge branch 'master' of ssh://opensimulator.org/var/git/opensim 2012-01-04 12:01:32 -08:00
Dan Lake
fc391d4b10 Added EventManager.OnRegionStarted which is triggered when Heartbeat is started. 2012-01-04 12:01:18 -08:00
Justin Clark-Casey (justincc)
aa625da6a6 Merge branch 'master' of ssh://opensimulator.org/var/git/opensim 2012-01-04 19:53:48 +00:00
Justin Clark-Casey (justincc)
82df5de5cf Remove the pointless LLClientView.m_imageManager null check.
Despite the code comments we never actually null it.
2012-01-04 16:15:05 +00:00
Dan Lake
ecf9824b63 Merge branch 'master' of ssh://opensimulator.org/var/git/opensim 2012-01-03 16:52:53 -08:00
Dan Lake
0ab2289cdc Access to these static methods to serialize objects are useful outside of serializer 2012-01-03 16:52:08 -08:00
Justin Clark-Casey (justincc)
6166a40440 Update C5.dll to version 1.1.1 from 1.1.0
C5 is a collections library and can be found at http://www.itu.dk/research/c5/
This is used in the UDP texture (image) sending code.
2012-01-03 20:22:15 +00:00
Justin Clark-Casey (justincc)
983b49c0c8 commented out "Prevented flyoff" log message for now as this becomes problematic with bot testing.
Please uncomment if still needed.
2012-01-03 18:25:31 +00:00
Justin Clark-Casey (justincc)
01eacd3a31 Merge branch 'master' of ssh://opensimulator.org/var/git/opensim 2012-01-03 18:22:14 +00:00
BlueWall
e78a3913e0 Merge branch 'master' of ssh://opensimulator.org/var/git/opensim 2012-01-03 12:22:13 -05:00
BlueWall
2c8e72217e Merge branch 'new_modules' 2012-01-03 12:20:49 -05:00
BlueWall
6941058824 Profile Updates
Update basic profile to use the replaceable interface, making configuration less error-prone. Add support to query avatar's home user account and profile service for regions usng the updated OpenProfileModule with Hypergrid.
2012-01-03 11:10:23 -05:00
Justin Clark-Casey (justincc)
fa79588a20 minor: add missing newlines to pCampbot usage statement 2012-01-03 15:42:36 +00:00
Melanie
a6e305063e Merge branch 'master' into careminster
Conflicts:
	OpenSim/Region/CoreModules/Scripting/HttpRequest/ScriptsHttpRequests.cs
	OpenSim/Region/Framework/Scenes/Scene.cs
	OpenSim/Services/Connectors/Asset/AssetServiceConnector.cs
	OpenSim/Services/Interfaces/IUserAccountService.cs
2012-01-02 21:41:36 +00:00
Justin Clark-Casey (justincc)
fac8c25851 Reduce accessibility of some J2KImage/LLImageManager properties and methods to reduce potential code complexity and make code reading easier. 2012-01-02 21:31:42 +00:00
Justin Clark-Casey (justincc)
014a86c26b Adding commented out log messages and some minor formatting for future bug hunting. No functional changes. 2012-01-02 19:46:30 +00:00
BlueWall
87374274b9 Fix for failed http request status
Thanks "sendapatch" for fixes to llHTTPRequest status reporting.
2012-01-01 23:44:46 -05:00
Diva Canto
56dbcae402 Bug fix in map tiles in standalone: the map has been blank since commit 01ae916bad r/17324 (Nov.18, justincc). But the root cause comes from commit 02e54c57c4 Author: Oren Hurvitz Date: 7/22/2011
This is a nasty situation. The map tile UUID is, in principle, stored authoritatively in RegionSettings. However, it also needs to be stored in the Grid Service because that's how other sims can retrieve it to send it in Map Blocks to non-V3 viewers. So every time the tile image changes, that change needs to propagate to the Grid Service, and this is done via RegisterRegion (ugh!). Interestingly, this problem didn't affect grids because by default AllowRemoteDelete is false, so the prior images aren't being deleted from the asset servers -- but they were not being correctly updated in the map either, the map was stuck with old images.
2011-12-30 21:32:28 -08:00
Diva Canto
5d8ed077bc Bring back the Hyperlinker to the Robust console. Moved the config to [GridService]. Changed all HG-related .inis, including HyperSimianGrid. No changes in user-facing inis. 2011-12-30 19:17:35 -08:00
Diva Canto
5aad1f7afe Default LocalToGrid to true. Fixes minor bug introduced yesterday where old robust UserAccount service would result is LocalToGrid at the sim being false. 2011-12-30 10:40:57 -08:00
Mic Bowman
967ea51980 Set the local grid flag in the user account through the simian connector
This should make bi-directional hypergrid work.
2011-12-29 16:37:16 -08:00
Diva Canto
571efeddb2 Added UserManagementModule.IsLocalGridUser(UUID) to be used throughout region Scenes and Modules. Changed existing modules to use it instead of assuming that foreign = null account. 2011-12-29 16:12:06 -08:00
Diva Canto
42f5394677 Added field LocalToGrid in UserAccount. Context: make HG work in Simian. 2011-12-29 15:39:12 -08:00
Diva Canto
98ab3dffa3 Deleted two obsolete files in Inventory modules. 2011-12-29 15:33:04 -08:00
Diva Canto
ef4d989f37 Deleted unused methods from HGAssetBroker 2011-12-29 15:21:56 -08:00
Diva Canto
6974596e83 Fixed mix-up in UserAccount fields when passing UserAccounts remotely. 2011-12-29 12:34:57 -08:00
Diva Canto
b756077269 Merge branch 'master' of ssh://opensimulator.org/var/git/opensim 2011-12-29 12:18:22 -08:00
Diva Canto
70e36ee2b4 HG: more adjustments for making HG Simian work. Added server_uri as new key on get_agent_home in UAS. 2011-12-29 12:17:58 -08:00
Melanie
bde004c08e Merge branch 'master' into careminster 2011-12-28 09:24:35 +00:00
Melanie
5b52440e61 Introduce a LightShare kill packet ans send it when needed. Currently only
understood by AVN v0.3
2011-12-28 09:24:02 +00:00
Melanie
bf4d727cd5 Fix permissions being lost and correct slam behavior, removing icompatible
code inherited from core and dead code.
2011-12-27 14:04:49 +01:00
Melanie
ad1c6442cd Remove a debug spam 2011-12-27 01:40:44 +01:00
BlueWall
f36fe45fa7 Add Copy task to Prebuild.exe (vsxxxx targets)
<Files>
    <Match pattern="*.cs" recurse="true"/>
    <Match pattern="../bin/MyConfig.xml" buildAction="Copy" recurse="false" destination="$(OutputPath)" />
  </Files>
2011-12-25 00:04:42 -05:00
Diva Canto
b6cfe15c7c HG: more / love for Xmas 2011-12-24 07:44:26 -08:00
Melanie
41f6d6a5ff Introduce a LightShare kill packet ans send it when needed. Currently only
understood by AVN v0.3
2011-12-24 16:18:01 +01:00
Melanie
2e07d24199 Merge branch 'master' of ssh://3dhosting.de/var/git/careminster 2011-12-24 01:46:04 +01:00
Melanie
c4e16b26bb Merge branch 'master' into careminster 2011-12-24 02:21:35 +00:00
Melanie
c9dbcfbb31 Merge branch 'master' of ssh://3dhosting.de/var/git/careminster 2011-12-24 01:43:44 +01:00
Melanie
f2855d3668 Add setter for Acceleration on physics objects. 2011-12-24 01:41:32 +01:00
Melanie
5b28e29530 Fix camera orientation for sit targets to use the prim actually sat on.
Now SL compatible.
2011-12-24 01:40:58 +01:00
Melanie
04806e02ed Add PRIM_POS_LOCAL as an alias to PRIM_POSITION for setting the position.
For SL compatibility only
2011-12-24 01:40:09 +01:00
Diva Canto
f9a1fd5748 HG: one more adjustment with trailing /s 2011-12-23 15:08:13 -08:00
Diva Canto
d38b8caf2b Merge branch 'master' of ssh://opensimulator.org/var/git/opensim 2011-12-23 10:58:55 -08:00
Diva Canto
26bb95fe3d HG: AAdded a few missing /'s at the end of URLs 2011-12-23 10:58:30 -08:00
Mic Bowman
c6ce464dbc remove the old region crossing handler 2011-12-23 10:13:32 -08:00
Melanie
b8a914b15b Merge branch 'master' into careminster 2011-12-23 01:00:34 +00:00
Mic Bowman
456c89a7a3 Fixes some problems with objects that attempt to cross a region boundary
into a region that does not exist. This is particularly problematic for
physical objects where the velocity continues to move them out of the
region causing an infinite number of failed region crossings. The patch
forces an object that fails a crossing to be non-physical and moves it
back into the starting region.
2011-12-22 16:59:51 -08:00
Mic Bowman
f394cb2e8f fix the UsesPhysics flag to reference the physics flag rather than the temponrez flag 2011-12-22 16:21:32 -08:00
Mic Bowman
6b08c051a3 Enables processing of hypergrid links through simiangrid services. Thanks
otakup0pe
2011-12-22 15:31:51 -08:00
Justin Clark-Casey (justincc)
790ca65c84 Align default ODE_STEPSIZE with that already used through OpenSimDefaults.ini 2011-12-22 20:22:15 +00:00
Justin Clark-Casey (justincc)
7ccd8f8f1d rename Scene.m_physicalPrim to PhysicalPrims since its public and access external as a property 2011-12-22 19:57:50 +00:00
Melanie
eef6f92029 Merge branch 'master' into careminster 2011-12-22 19:52:59 +00:00
Justin Clark-Casey (justincc)
f7dbdba447 Remove unused m_physicalPrim parameter from SOG.ApplyPhysics() 2011-12-22 19:52:09 +00:00
Justin Clark-Casey (justincc)
48113f0fc8 Make it possible to force all prims to be phantom via the collidable_prim boolean setting in the OpenSim.ini config [Startup] section.
Naturally, default is true.
When set to false, "phantom" flags on prims can be set as usual but all prims remain phantom.
This setting is for test purposes.
This switch does not affect the collision of avatars with the terrain.
2011-12-22 19:44:52 +00:00
Melanie
a15a58a7c1 Merge branch 'master' into careminster 2011-12-22 17:33:31 +00:00
Diva Canto
469955889e Region crossings redone: (1) removed WaitForCallback. Now that we are passing the entire agent with attachs in one big message we don't necessarily need to wait for confirmation. The callback sometimes is problematic and it adds delay to the process. (2) Z velocity sent to the viewer = 0. This is an heuristic; the Z velocity usually is negative, and it makes the viewer move the avie down. This only matters while the agent is in transit and therefore not being physically simulated by neither region. As soon as the receiving region receives CompleteMovement from the viewer, the position and velocity get corrected. 2011-12-22 09:30:06 -08:00
Melanie
b72dd852b7 Merge branch 'master' into careminster 2011-12-22 16:58:38 +00:00
Melanie
7f527814d5 And a typo fix 2011-12-22 16:57:49 +00:00
Melanie
66a0471efa Merge branch 'master' into careminster 2011-12-22 16:52:14 +00:00
Melanie
6412349dec Add a few comments, correct a merge artefact 2011-12-22 16:51:51 +00:00
Melanie
c63d5f8e0c Merge branch 'master' into careminster 2011-12-22 16:49:15 +00:00
Melanie
2347593dac Harmonizing SP with Avination 2011-12-22 16:48:52 +00:00
Melanie
b970d4f976 Merge branch 'master' into careminster
Conflicts:
	OpenSim/Region/Framework/Scenes/ScenePresence.cs
2011-12-22 16:37:25 +00:00
Diva Canto
219ec7ef20 Fixing a bug introduced yesterday. This put the precondition test inside CheckForBorderCrossing the right way. 2011-12-22 08:18:03 -08:00
Diva Canto
bb0c6a498b Merge branch 'master' of ssh://opensimulator.org/var/git/opensim 2011-12-21 15:17:44 -08:00
Diva Canto
ddff2f246c Moved an external test into the method that uses those preconditions. 2011-12-21 15:17:26 -08:00
Diva Canto
651f9f47d0 HG: Verify that the user is local 2011-12-21 14:56:38 -08:00
Dan Lake
7693e6a3a8 Merge branch 'master' of ssh://opensimulator.org/var/git/opensim 2011-12-20 14:46:44 -08:00
Dan Lake
41b02a7208 Remove unused SetAcceleration and add set on Acceleration parameter 2011-12-20 14:45:32 -08:00
Melanie
ca6113a4d5 Merge branch 'master' into careminster
Conflicts:
	OpenSim/Region/Framework/Scenes/SceneCommunicationService.cs
2011-12-20 21:51:43 +00:00
Dan Lake
a1dc4e830d Remove unused SetAcceleration and add set on Acceleration parameter 2011-12-20 13:40:24 -08:00
Justin Clark-Casey (justincc)
fa0a71253f Though the viewer warns about receiving this, not sending appears to break baked texture caching when crossing region boundaries.
Needs further investigation.

Revert "Stop sending the viewer its own AvatarAppearance packet."

This reverts commit 92039f295d.
2011-12-20 18:54:15 +00:00
Diva Canto
dd69c9fd20 Merge branch 'master' of ssh://opensimulator.org/var/git/opensim 2011-12-20 09:53:05 -08:00
Diva Canto
25cbba9bca Fixed bug of avie going under the terrain when crossing regions in certain directions. This was a 1-off bug: the terrain was being placed in 127, 127 resulting in a bounding box if -2, 256. I placed it in 128, 128 resulting in a bounding box of -1, 257. 2011-12-20 09:43:39 -08:00
Melanie
2b4ebe657c Merge branch 'master' into careminster 2011-12-19 23:16:20 +00:00
Justin Clark-Casey (justincc)
87a2d8d51b Move HandleObjectGroupUpdate() from GroupsModule to Scene.PacketHandlers.cs as this is updating SOG/SOP.GroupID, which is arguably generic. 2011-12-19 23:03:45 +00:00
Melanie
efa4284391 Merge branch 'master' into careminster 2011-12-19 21:30:57 +00:00
Justin Clark-Casey (justincc)
92039f295d Stop sending the viewer its own AvatarAppearance packet.
The viewer warns in the log if it receives this.
Stopping this doesn't appear to have adverse effects on viewer 1 or viewer 3 - the viewer gets its own appearance from body parts/clothes and self-baked textures.
2011-12-19 20:13:48 +00:00
Justin Clark-Casey (justincc)
2899de1a5c Stop unnecessarily sending the TextureEntry in client avatar updates.
As far as I know, viewers don't use this mechanism to recieve new TextureEntry data for avatars.  This is done via the AvatarAppearance packet instead.
Tested this back to viewer 1.23.
Replacing with Utils.EmptyBytes since converting the texture entry to bytes on each AvatarUpdate (or which there are many) is not cost-free.
2011-12-19 19:19:05 +00:00
Justin Clark-Casey (justincc)
e8fbeeba5f Fix race condition where the appearance update timer could be stopped just after another thread had started it on QueueAppearanceSave() or *Send()
However, the window for this race is very small, and the next queued appearance save or send would restart the timer anyway.
2011-12-19 19:08:24 +00:00
Justin Clark-Casey (justincc)
fc9400db07 Merge branch 'master' of ssh://opensimulator.org/var/git/opensim 2011-12-19 19:07:35 +00:00
Justin Clark-Casey (justincc)
0b91ec8dd2 Migrate detailed "appearance show" report generation up to AvatarFactoryModule from AppearanceInfoModule so that it can be used in debug (inactive).
Further filters "debug packet <level>" to exclused [Request]ObjectPropertiesFamily if level is below 25.
Adjust some method doc
Minor changes to some logging messages.
2011-12-19 18:58:05 +00:00
nebadon
6baee2e10b addresses mantis #5827
RAdmin - admin_save_oar fails if noassets parameter missing
thanks Michelle Argus
2011-12-19 11:51:03 -07:00
Melanie
759f1d2dbe Merge branch 'master' into careminster 2011-12-18 10:49:45 +00:00
Melanie
c4f1906b0a Make raycast more efficient by checking exclusion flags earlier 2011-12-17 12:57:20 +01:00
Melanie
8a9a8ed5c9 Fix hit testing link sets properly. Fix raycasting for LSL. 2011-12-17 12:31:25 +01:00
Justin Clark-Casey (justincc)
4d065f0453 Provide user feedback on execution of "backup" region console command 2011-12-17 02:42:43 +00:00
Justin Clark-Casey (justincc)
684482352c Fix bug where objects couldn't be set back to the "none" group.
This is handled by treating UUID.Zero as a special case.
Currently, asking for the "none" group returns nothing because XMLRPC groups, at least, is not properly handling this case.
It may be better in the future to have GroupsModule return an appropriate GroupsData structure instead or require the underlying services to behave appropriately.
This is a further component of http://opensimulator.org/mantis/view.php?id=5588
2011-12-17 02:35:08 +00:00
Justin Clark-Casey (justincc)
f9137c923b Fix bug where objects could not be set to a new group if the group had been created in that client session, or if no other action has been performed on the object.
There were two problems here:
1) On object group update, we looked for the group is the IClientAPI group cache rather than in the groups service.  This fails to groups created newly in that session
2) On object group update, we weren't setting the HasGroupChanged flag.  This meant that the change was not persisted unless some other action set this flag.
This commit fixes these issues and hopefully addresses http://opensimulator.org/mantis/view.php?id=5588
This commit also moves HandleObjectGroupUpdate() to the GroupsModule from the Scene.PacketHandlers.cs file
2011-12-17 02:23:24 +00:00
Diva Canto
964ec57ffe Changed the async approach on close child agents. This may improve crossings a little bit. 2011-12-16 17:24:50 -08:00
Diva Canto
99623894c7 Commented a couple of verbose debug messages. 2011-12-16 17:23:30 -08:00
Justin Clark-Casey (justincc)
9b56cc69c1 Add Garmin Kawaguichi to CONTRIBUTORS.txt 2011-12-17 00:29:42 +00:00
Justin Clark-Casey (justincc)
7f019cc196 If a startup simulator script is present, run it after the normal region selection code rather than before.
This allows the script to change the selected region without having it immediately undone.
Thanks to Garmin Kawaguichi for this patch.
2011-12-17 00:27:19 +00:00
Justin Clark-Casey (justincc)
4f628849f3 Add more documentation to EstateConnectorString in StandaloneCommon.ini.example 2011-12-17 00:14:48 +00:00
Justin Clark-Casey (justincc)
1bf05fbb1f refactor: simplify methods in Scene.PacketHandlers.cs by using GetGroupByPrim() rather than retrieving GetEntities() and inspecting the entire list 2011-12-17 00:11:17 +00:00
Justin Clark-Casey (justincc)
a3a17e929e Stop generating client flags when we send out full object updates.
These were entirely unused.
2011-12-16 23:20:12 +00:00
Justin Clark-Casey (justincc)
5c4056660f Don't pass on ChaneWaterHeight event from EventManager is new water height is less than 0
This is to stop bad values and subsequent viewer crashes.
Thanks to Michelle Argus for this patch.
2011-12-16 21:16:01 +00:00
Justin Clark-Casey (justincc)
5d79f857b0 Comment out accidentally left in "Adding physics prim" log message 2011-12-16 20:54:28 +00:00
Justin Clark-Casey (justincc)
a9b39d6e5d Tunnel [GroupsModule] DebugEnabled setting down into XmlRpcGroupsServicesConnectorModule so that we can record cache misses 2011-12-16 20:53:50 +00:00
Diva Canto
8300bb651e Sends the consistent child agent position upon creation of the child agent in other regions, as opposed to <128, 128, 70> 2011-12-16 09:33:22 -08:00
Diva Canto
3bf699ad36 No functional changes. Changed the prefix of that log message [CONNECTION BEGIN] to [SCENE] because that's where the message happens.
Also changed the instantiation of a vector object to be done only once instead of every time we receive a position update.
2011-12-16 08:59:33 -08:00
Diva Canto
7e4a2d69d5 HG minor bug fix and marked one method obsolete in UAS. 2011-12-16 08:48:29 -08:00
Justin Clark-Casey (justincc)
8013c0d2f5 Stop pointlessly setting the m_colliderarr[] to false in the ODECharacter constructor 2011-12-15 22:33:14 +00:00
Justin Clark-Casey (justincc)
c0ba99e5ad Stop having to call SetHeight again in ScenePresence.AddToPhysicalScene() when we've already passed size information to the avatar at PhysicsScene.AddAvatar()
Eliminate some copypasta for height setting in OdeCharacter
2011-12-15 22:29:36 +00:00
Justin Clark-Casey (justincc)
99570d8ebb Merge branch 'master' of ssh://opensimulator.org/var/git/opensim 2011-12-15 21:59:01 +00:00
Justin Clark-Casey (justincc)
937c06db54 Code cleanup related to ScenePresence.PhysicsActor and OdeScene/OdeCharacter
Stop hiding RemoveAvatar failure, add log messages when characters are removed through defects or re-added unexpectedly.
Add commented out log lines for future use.
Use automatic property for PhysicsActor for better code readability and simplicity
2011-12-15 21:57:22 +00:00
nebadon
58ba81ae4e minor fix to MegaRegions, typo spotted by Ubit! 2011-12-15 10:49:15 -07:00
Justin Clark-Casey (justincc)
6f2d80cc93 minor: add some currently commented log lines for use in debugging 2011-12-14 21:27:47 +00:00
Melanie
69f29cb53e Merge branch 'master' into careminster 2011-12-14 19:50:43 +00:00
Justin Clark-Casey (justincc)
e830a77860 Simplify some manipulation of _taintedActors in OdeScene 2011-12-14 18:33:44 +00:00
Justin Clark-Casey (justincc)
a110a7bd6a Eliminate _taintedPrimsH and _taintedPrimsL (and _taintedPrimLock) in favour of just a _taintedPrims HashSet.
There's no point maintaining a list because any pending taint operations are all carried out in the same call anyway.
2011-12-14 18:03:25 +00:00
Justin Clark-Casey (justincc)
cec88872ae Merge branch 'master' of ssh://opensimulator.org/var/git/opensim 2011-12-14 17:59:55 +00:00
Justin Clark-Casey (justincc)
84023c8162 Fix off by one bug in objects GrabbingBehaviour of pCampBot.exe
Also fix usage message.
2011-12-14 16:43:49 +00:00
Melanie
898549d13e Merge branch 'master' into careminster 2011-12-14 08:57:55 +00:00
Dan Lake
f43e5f92fd Just adding a comment to SendFullUpdatToClient 2011-12-13 23:34:59 -08:00
Dan Lake
39736e52d8 Reorder clearing of upate schedule on SOP to before sending updates. Fix potential race condition. 2011-12-13 21:37:17 -08:00
Justin Clark-Casey (justincc)
b242ceda1e In AvatarFactoryModule.SetApperance(), perform ValidateBakedTextureCache() in the same thread rather than on another one.
The caller is already an async thread from LLClientView so this doesn't hold up the client.
However, launching on a separate thread does remove the effect of m_setAppearanceLock
This was potentially allowing two different SetAppearance threads to interfere with each other, though this probably rarely happens, if at all.
2011-12-13 20:42:39 +00:00
Melanie
df65245671 Spin off terrain save into a new thread and make it so that it uses the old
values for places where NaN are found.
2011-12-13 12:58:28 +01:00
Melanie
6d1d1c0dbf Comment debug spam 2011-12-13 00:36:44 +01:00
Melanie
d18a9f22e7 Prevent a nasty deadlock on teleport 2011-12-12 23:43:45 +01:00
Justin Clark-Casey (justincc)
3a06640730 Get rid of the 'lolcat' library asset.
This was both unused and an invalid jpeg2000 texture from way back in 2008
2011-12-12 21:17:01 +00:00
Justin Clark-Casey (justincc)
4dfd2c7d47 minor: remove pointless comment from OdeScene.cs 2011-12-12 19:31:50 +00:00
Justin Clark-Casey (justincc)
e9b59e7627 Remove long unused libdb_dotNET43.dll 2011-12-12 19:31:12 +00:00
Melanie
8418288e26 Make m_attachments private 2011-12-12 18:29:54 +01:00
Melanie
afab4b276e Remove spammy log messages when querying sim health 2011-12-12 13:51:31 +01:00
Dan Lake
c34ab0ee66 Cleaned up ScenePresence parameters for Flying, WasFlying, FlyingOld and IsColliding 2011-12-12 02:43:38 -08:00
Melanie
95d533ce8a Merge branch 'master' of ssh://3dhosting.de/var/git/careminster 2011-12-12 11:09:13 +01:00
Melanie
52a4dbccbe Merge branch 'master' into careminster
Conflicts:
	OpenSim/Framework/RegionInfo.cs
	OpenSim/Region/Framework/Scenes/ScenePresence.cs
2011-12-12 11:42:22 +00:00
Melanie
943b37b8e6 Send changed animation event asynchronously 2011-12-12 11:08:50 +01:00
Dan Lake
3c55d2e776 Merge branch 'master' of ssh://opensimulator.org/var/git/opensim 2011-12-12 00:41:53 -08:00
Dan Lake
db8fd1eb9f Added an option for extra settings within region ini file. Any non-hardcoded key-value string pair can be added per-region and referenced by any part of OpenSim with access to the RegionInfo 2011-12-12 00:21:19 -08:00
nebadon
8ae824ff09 Mantis 5816: osParseJSON Decoding Problems
osParseJSON uses hand-crafted decoding that has two issues
* does not seem to handle top-level JSON lists
* does not seem to handle unicode text
thanks otakup0pe!
2011-12-11 23:25:12 -07:00
Melanie
3a91085ac2 Implement handler for TeleportCancel inbound packet 2011-12-10 15:17:34 +00:00
Melanie
323ffd7a89 Fix a regression that causes data from the attachments module to fail loading 2011-12-10 15:28:32 +01:00
Melanie
db98698bbe Prevent spurious error message when client tries to move a null item 2011-12-10 14:47:00 +01:00
Melanie
6b080d57cb Merge branch 'master' into careminster 2011-12-10 15:19:31 +00:00
Melanie
3f42183797 Merge branch 'master' into careminster
Conflicts:
	OpenSim/Region/CoreModules/Avatar/AvatarFactory/AvatarFactoryModule.cs
2011-12-10 00:40:41 +00:00
Justin Clark-Casey (justincc)
e88ad5aab9 minor: remove a mono compiler warning 2011-12-09 23:55:54 +00:00
Justin Clark-Casey (justincc)
5f276c3212 Print out one log message for every missing baked texture, rather than two. 2011-12-09 23:54:39 +00:00
Justin Clark-Casey (justincc)
0daa5d8b4d minor: comment out "unpacked appearance" log mesasge for now 2011-12-09 23:44:34 +00:00
Justin Clark-Casey (justincc)
f24898d049 Comment out ChildAgentDataUpdate.Pack() "Pack data" message for now. 2011-12-09 23:24:52 +00:00
Justin Clark-Casey (justincc)
13b1c8c173 Do some clean up Scene.cs log messages.
This prints out both exception message and stacktrace (Exception.ToString()) isn't enough on Windows.
This also uses m_log.*Format() which is more efficient than string concat.
2011-12-09 23:21:54 +00:00
Justin Clark-Casey (justincc)
af3cd00048 Get rid of IScene.PresenceChildStatus() which always had to execute a lookup in favour of IClientAPI.ISceneAgent.IsChildAgent instead. 2011-12-09 23:07:53 +00:00
Melanie
5f6a4c4111 Merge branch 'master' into careminster 2011-12-09 22:55:08 +00:00
Justin Clark-Casey (justincc)
fc27806e90 remove some unused fields in ScenePresence 2011-12-09 22:52:54 +00:00
Justin Clark-Casey (justincc)
cb0da425d5 Fix "fix-phantoms" help message. Thanks Garmin Kawaguichi. 2011-12-09 22:41:39 +00:00
Justin Clark-Casey (justincc)
94c242f792 Move client id check in Scene.Inventory.cs:UpdateInventoryItemAsset so that it doesn't trigger an exception if the item hasn't been found.
In this situation we will now put out a slightly more meaningful log error message instead.
2011-12-09 22:36:51 +00:00
Justin Clark-Casey (justincc)
4e9f50b878 Add commented log lines to FetchInventoryDescendents2 path for future use.
Haven't been able to resolve issue where attachments are removed by the viewer on relog on a localhost
2011-12-09 22:32:28 +00:00
Melanie
00b36eb0fe Restore the Avination way of position and angle calculation so resizers
work again.
2011-12-09 20:55:48 +01:00
Melanie
f025387f10 Set adaptive throttles false by default because it doesn't play nice with AVN
code
2011-12-09 19:56:03 +01:00
Melanie
07c26111af Fix llGetLinkKey to report avatars properly 2011-12-09 16:36:25 +01:00
Melanie
cf97809ff1 Reverse the last one 2011-12-09 10:59:47 +01:00
Melanie
4eb3622bfe Dummy commit 2011-12-09 10:58:47 +01:00
Melanie
96b3eed1b0 Merge branch 'careminster' into bigmerge 2011-12-09 11:23:34 +00:00
Melanie
d913303875 Merge branch 'master' into bigmerge 2011-12-09 08:13:57 +00:00
Justin Clark-Casey (justincc)
63fe673af1 Revert "Revert "Stop performing the asset save part of baked texture uploading on the UploadBakedTexture cap asynchronously.""
This turned out not to be the upload texture issue.

This reverts commit 8721841fc3.
2011-12-08 23:45:53 +00:00
Justin Clark-Casey (justincc)
50eebb5cba Don't reply with an ack packet if the client is not authorized. 2011-12-08 22:00:59 +00:00
Justin Clark-Casey (justincc)
32d0ef89c6 Extend TestAddClient() to check that the first packet received is an ack packet 2011-12-08 21:45:02 +00:00
Justin Clark-Casey (justincc)
14e407aff3 Add OpenSim.Region.ClientStack.LindenUDP.Tests.dll back into the test suite 2011-12-08 20:55:38 +00:00
Justin Clark-Casey (justincc)
bc13855e64 Reactivate BasicCircuitTests.TestAddClient()
This checks that the initial UseCircuitCode packet is handled correctly for a normal client login.
2011-12-08 20:52:34 +00:00
Justin Clark-Casey (justincc)
0e265889dd Remove unnecessary AgentCircuitData null check from Scene.AddNewClient().
The only caller is the LLUDP stack and this has to validate the UDP circuit itself, so we know that it exists.
This allows us to eliminate another null check elsewhere and simplifies the method contract
2011-12-08 19:25:24 +00:00
Justin Clark-Casey (justincc)
55de189752 minor: remove some mono compiler warnings 2011-12-08 18:56:07 +00:00
Justin Clark-Casey (justincc)
54360dd20e When a client connects to a scene, send other avatar appearance data asynchronously to reduce hold up in the IN UDP packet processing loop.
This is already being done for the initial object data send.
2011-12-08 18:39:56 +00:00
Justin Clark-Casey (justincc)
f61e54892f On a new client circuit, send the initial reply ack to let the client know it's live before sending other data.
This means that avatar/appearance data of other avatars and scene objects for a client will be sent after the ack rather than possibly before.
This may stop some avatars appearing grey on login.
This introduces a new OpenSim.Framework.ISceneAgent to accompany the existing OpenSim.Framework.ISceneObject and ISceneEntity
This allows IClientAPI to handle this as it can't reference OpenSim.Region.Framework.Interfaces
2011-12-08 18:34:23 +00:00
Melanie
3b991a2222 Merge branch 'bigmerge' of ssh://melanie@3dhosting.de/var/git/careminster into bigmerge 2011-12-08 18:30:09 +00:00
Melanie
96539ffc79 Merge branch 'master' into bigmerge
Conflicts:
	OpenSim/Region/Framework/Scenes/Scene.cs
2011-12-08 18:29:19 +00:00
Justin Clark-Casey (justincc)
355cde464a Simplify Scene.AddNewClient()
If sp becomes null right after we've checked or created it, then behaviour down the line is going to be wrong anyway.
So instead retain the check/create ScenePresence reference and use this.
2011-12-08 16:10:47 +00:00
Melanie
8d7c353500 Merge branch 'master' into bigmerge 2011-12-08 05:47:45 +00:00
Melanie
43732794dd Remove a left over log output 2011-12-08 05:46:59 +00:00
Melanie
3217bccfcd Merge branch 'bigmerge' of ssh://3dhosting.de/var/git/careminster into bigmerge 2011-12-08 05:29:13 +01:00
Melanie
1e4842eaba Remove superfluous try block 2011-12-08 05:28:54 +01:00
Melanie
7c7dd6269a Merge branch 'bigmerge' of ssh://3dhosting.de/var/git/careminster into bigmerge 2011-12-08 03:37:48 +01:00
Melanie
ea1f5fb08d Merge branch 'master' into bigmerge 2011-12-08 03:53:30 +00:00
Melanie
603ad905e1 Adapt to justincc's remote admin refactor 2011-12-08 03:53:09 +00:00
Melanie
ac82fc60f9 Merge commit 'fb2f4f158c42ecfea114eb7cefd9074dc001626f' into bigmerge 2011-12-08 03:30:23 +00:00
Melanie
50aa89dae6 Merge commit 'eda770e978c09c756d15ba62dbbf6ee34a61b2f5' into bigmerge
Conflicts:
	OpenSim/Region/Framework/Scenes/Scene.cs
2011-12-08 03:24:25 +00:00
Melanie
b459239833 Recover from an internal mess-up in the outgoing packet queues by creating
a new queue object.
2011-12-08 01:08:40 +01:00
Justin Clark-Casey (justincc)
dae58e0937 Remove warning in admin_save_oar xmlrpc method where noassets == true was comparing against an object rather than a string 2011-12-07 22:42:05 +00:00
Justin Clark-Casey (justincc)
2b4de8f881 Have admin_load_heighmap and admin_save_heightmap xmlrpcadmin methods return success = true on success rather than false 2011-12-07 22:40:23 +00:00
Justin Clark-Casey (justincc)
fb2f4f158c Refactor RemoteAdminPlugin so that every xmlrpc method calls a common block of code to do password checks, etc., instead of copy/pasting this code into every method 2011-12-07 22:39:12 +00:00
Justin Clark-Casey (justincc)
eda770e978 Remove unused SceneManager.TryGetAvatarsScene()
It makes far more sense anyway to use TryGetRootScenePresence().Scene, in common with the rest of the code
This method could also return any scene for child or root agents, depending in which order the scenes happened to lie in the list
2011-12-07 21:17:13 +00:00
Justin Clark-Casey (justincc)
3d95015686 On an Exception in Scene.RemoveClient(), always remove the client (and SP) structure so that logout on unexpired packets isn't retriggered, causing the same exception 2011-12-07 18:43:48 +00:00
Justin Clark-Casey (justincc)
2b02d3dc84 Merge branch 'master' of ssh://opensimulator.org/var/git/opensim 2011-12-07 17:33:06 +00:00
Justin Clark-Casey (justincc)
415b7b7ec4 Implement XMLRPCAdmin command admin_teleport_agent.
This allows someone with access to this command on the XMLRPCAdmin interface to teleport an avatar to an arbitrary region and/or position.
2011-12-07 17:31:57 +00:00
BlueWall
33c6067098 Trigger a Jenkins build 2011-12-07 11:21:50 -05:00
BlueWall
0fcd55aff3 Merge branch 'master' of ssh://opensimulator.org/var/git/opensim 2011-12-07 10:39:25 -05:00
BlueWall
fd023b317a Update libomv to 0.9.1 2011-12-07 09:56:15 -05:00
Justin Clark-Casey (justincc)
a8ed185c00 properly lock CapsHandlers.m_capsHandlers 2011-12-07 14:55:01 +00:00
BlueWall
6ec59ee892 Merge branch 'master' of /home/opensim/var/repo/opensim 2011-12-07 07:52:24 -05:00
Justin Clark-Casey (justincc)
e6272b8d56 Stop also adding an ordinary http handler when we set up a poll http handler.
It appears that this is entirely unnecessary since the poll http handlers are dealt with on a separate code path.
2011-12-07 12:28:42 +00:00
Melanie
ccba04f345 Fix intersim object give messages 2011-12-07 01:27:52 +01:00
Melanie
f317953290 Fix up intersim give messaging 2011-12-07 01:02:46 +01:00
Melanie
d6486fe14a Fix task inventory giving 2011-12-07 00:43:59 +01:00
Melanie
62d0a0cdbf Remove harmless merge artefact 2011-12-06 22:58:00 +01:00
Justin Clark-Casey (justincc)
8e542cfa03 Stop accidentally setting up the UploadTexture caps handler with the same url for all users
This meant that if a user exited the region, the UploadTexture handler would be effectively removed for everyone, causing subsequent failures.
This hopefully resolves the recent UploadTexture LLSD problems
This was a regression in 5640f2e (Thu Dec 1 23:24:15 2011 +0000)
2011-12-06 21:42:56 +00:00
Melanie
5490a3e549 Fix phantom and temp flags not taking 2011-12-06 19:44:45 +01:00
Melanie
28da235888 Merge branch 'master' into bigmerge 2011-12-06 19:01:05 +00:00
Justin Clark-Casey (justincc)
8721841fc3 Revert "Stop performing the asset save part of baked texture uploading on the UploadBakedTexture cap asynchronously."
This is a possible cause of the dramatic upswing in "Unable to upload... No handler registered for LLSD requests..."
Needs more investigation.

This reverts commit 1854c52ea3.
2011-12-06 18:37:13 +00:00
Justin Clark-Casey (justincc)
136a6a6e0f Make "show appearance" a synonym for "appearance show" 2011-12-06 18:36:11 +00:00
Justin Clark-Casey (justincc)
b9a461c5ad In "appearance show", if a particular avatar is specified, print out texture UUID for each bake type and whether the simulator can find it. 2011-12-06 18:32:27 +00:00
Justin Clark-Casey (justincc)
ec4f217af8 Actually send the avatar data if an individual avatar is specified, rather than accidentally doing nothing 2011-12-06 18:06:29 +00:00
Justin Clark-Casey (justincc)
1b9eb52850 Allow "appearance show" command to take an optional avatar name 2011-12-06 18:03:16 +00:00
Justin Clark-Casey (justincc)
4be85eeaa5 Make it possible to manually send appearance information via the "appearance send" command for a chosen avatar as well as all 2011-12-06 16:42:44 +00:00
Justin Clark-Casey (justincc)
d33d12ba83 Provide feedback as to which avatars are resending appearance informion on "appearance send" console command 2011-12-06 16:07:24 +00:00
Justin Clark-Casey (justincc)
319507f521 Add test for not found response from GetTexture cap handler.
Add OpenSim.Region.Capabilities.Handlers.Tests.dll into test suite
2011-12-05 21:04:17 +00:00
Justin Clark-Casey (justincc)
af9ccfa15c Merge branch 'master' of ssh://opensimulator.org/var/git/opensim 2011-12-05 20:50:44 +00:00
Justin Clark-Casey (justincc)
4567555c49 Implement IOSHttpRequest and IOSHttpResponse http interfaces and use instead of OSHttpRequest/OSHttpResponse.
This is required for the substitution of different HTTP servers or the newer HttpServer.dll without having to commit to a particular implementation.
This is also required to write regression tests that involve the HTTP layer.
If you need to recompile, all you need to do is replace OSHttpRequest/OSHttpResponse references with IOSHttpRequest/IOSHttpResponse.
2011-12-05 20:44:20 +00:00
BlueWall
2d3dda6db3 Merge branch 'master' of /home/opensim/var/repo/opensim 2011-12-05 15:29:00 -05:00
Melanie
09c043fe52 Adapt GodsModule to core changes 2011-12-05 21:26:43 +01:00
Melanie
5b07370ec4 Remove erroneous message about hyperlinks when entering an invalid region name
in map search.
2011-12-05 21:26:06 +01:00
Melanie
bc17e2e9cf Merge branch 'master' into bigmerge 2011-12-05 20:32:35 +00:00
Melanie
47d0a50a19 Add the proper result code as per the LL announcement for llTransferLindenDollars 2011-12-05 20:02:27 +01:00
Melanie
e7cb63fcf7 Merge branch 'master' of melanie@opensimulator.org:/var/git/opensim 2011-12-05 19:01:35 +00:00
Melanie
66f4ce354f Fix CHANGED_TEXTURE and CHANGED_COLOR. 2011-12-05 19:01:14 +00:00
Justin Clark-Casey (justincc)
37889eb3fa For the GetTexture capability, if a data range is requested that covers the whole asset length, return HTTP PartialContent instead of NotFound
NotFound is obviously wrong, and this change stops viewer 3.2.2 (and v probably earlier) complaining in the log about missing textures that are actually present.
We still return PartialContent even if the range requested is a superset of the data range as per httpd's behaviour
https://issues.apache.org/bugzilla/show_bug.cgi?id=51878
Viewer 3.2.2 and very probably earlier appear happy with this.
Whether fixing this NotFound bug has any practical effect apart from resolve viewer log messages is unknown.
2011-12-05 18:35:03 +00:00
Melanie
6362df1202 Serialize the Volume Detect field 2011-12-05 19:33:25 +01:00
Melanie
1ece4feccd Merge branch 'master' into bigmerge
Conflicts:
	OpenSim/Region/Framework/Scenes/SceneObjectPart.cs
2011-12-05 19:08:19 +00:00
Melanie
cc482ee865 Merge branch 'bigmerge' of ssh://melanie@3dhosting.de/var/git/careminster into bigmerge 2011-12-05 18:54:31 +00:00
Melanie
2a8a46a32d Fix CHANGED_TEXTURE and CHANGED_COLOR. 2011-12-05 18:32:40 +01:00
Melanie
5ab536a1e9 Merge branch 'master' into bigmerge
Conflicts:
	OpenSim/Region/CoreModules/Framework/EntityTransfer/EntityTransferModule.cs
	OpenSim/Region/Framework/Scenes/ScenePresence.cs
2011-12-05 17:10:51 +00:00
Melanie
3281b99362 Strip CR from http responses and limit them to 2048 chars 2011-12-05 15:57:47 +01:00
Melanie
b7c9eb4bf7 Don't allow deletion of a terrain from the database unless we have one to replace it with 2011-12-05 15:46:57 +01:00
Melanie
68bdd0b7fe Fix setting seated avatar position and make llSameGroup work as in SL. 2011-12-05 15:26:49 +01:00
Melanie
35800d6a86 Reinstate setter for OffsetPosition to allow setting the offset by script
while seated
2011-12-05 15:26:22 +01:00
Melanie
19d6aa2bc9 Don't allow position update on sitting avatar. Don't bounds check sitting
avatars as they will be crossed by the vehicle and not individually
2011-12-04 20:16:07 +01:00
Diva Canto
a2d98c7293 HG: Added HEAD method to Helo service. This is the preferred method, but its wide use will have to wait a few releases. So the sims are still calling GET for now. 2011-12-04 10:10:09 -08:00
Diva Canto
080dfcc9c9 HG: Renamed one method 2011-12-04 08:24:16 -08:00
Melanie
ec8c93aa5e Implement ChangeInventoryItemFlagsPacket handling 2011-12-04 12:35:01 +01:00
Justin Clark-Casey (justincc)
a82aea53f8 Split up test SceneHelpers to provide an AddChildScenePresence() call 2011-12-03 19:32:59 +00:00
Justin Clark-Casey (justincc)
a4d82895be Remove T012_TestAddNeighbourRegion() and T013_TestRemoveNeighbourRegion() since they don't do anything useful. 2011-12-03 19:14:37 +00:00
Justin Clark-Casey (justincc)
3852f05e6e Extend TestCreateChildScenePresence to make assertions both at CreateAgent stage and then at Scene.AddClient() 2011-12-03 19:10:32 +00:00
Justin Clark-Casey (justincc)
4919c60560 Add beginning of ScenePresenceAgentTests.TestCreateChildScenePresence()
This required an option to be added to NullRegionData via ConnectionString for it to act as a non-static instance, so that regression tests (which only load this class once) don't get hopeless confused and complex to compensate.
Normal standalone operation unaffected.
2011-12-03 18:59:54 +00:00
Justin Clark-Casey (justincc)
ced820bd5e Improve locking in AgentCircuitManager 2011-12-03 16:19:11 +00:00
Justin Clark-Casey (justincc)
c934901a05 Use GetAgentCircuits() to receive a copy of the AgentCircuitsByUUID dictionary rather than AgentCircuitManager.AgentCircuits directly in "show circuits" to avoid enumeration exceptions 2011-12-03 16:11:47 +00:00
Justin Clark-Casey (justincc)
aac3f2d04e Add agent circuit number checks to TestCloseAgent() 2011-12-03 16:04:11 +00:00
Justin Clark-Casey (justincc)
aba42d8543 Correct SOP.GetNumberOfSides() to return 8 for meshes rather than 7
We are returning the actual number of 'sides', not the maximum index number.
Also minor format corrections.
2011-12-03 15:54:06 +00:00
marc
e75bcd4c59 Workaround for mesh to correct the number of faces in GetNumberOfSides(). Meshs are handeled as sculpts but can have up to 8 faces (SL restriction the collada format can handle even more). The patch enables all LSL function that adressing faces to behave correct. Like llGetNumberOfSides(); llSetLinkPrimitiveParamsFast(); llSetPrimitiveParams(); llSetColor();
Signed-off-by: marc <mare@sounddog.net>
2011-12-03 15:49:19 +00:00
BlueWall
6541fc08d4 Merge branch 'master' of /home/opensim/var/repo/opensim 2011-12-02 22:46:37 -05:00
Justin Clark-Casey (justincc)
585fc5e79d Update SP.PhysicsCollisionUpdate() doc.
It might be inefficient, but there are collisions every frame if the avatar is walking/standing on the ground or a prim surface
2011-12-03 02:51:17 +00:00
Justin Clark-Casey (justincc)
e26ef8aeca change misleading login = http://127.0.0.1:9000/ in GridInfoService in Robust.ini.example to 8002 2011-12-03 02:48:16 +00:00
Justin Clark-Casey (justincc)
b66fe3e9ff Add method doc to SP.PhysicsCollisionUpdate() to make it clear that it's called continuously even where there are no collisions 2011-12-03 02:45:02 +00:00
Justin Clark-Casey (justincc)
a009871827 Add basic TestFlyingAnimation() regression test 2011-12-03 02:39:21 +00:00
Justin Clark-Casey (justincc)
feef1dd732 Stop calling Animator.UpdateMovementAnimations() at the end of HandleAgentUpdate().
There's no point doing this if it's being called via PhysicsCollisionUpdate
2011-12-03 02:05:11 +00:00
BlueWall
f144baa9a8 Merge branch 'master' of /home/opensim/var/repo/opensim 2011-12-02 20:53:35 -05:00
Justin Clark-Casey (justincc)
f08aad8a40 For now, disable mechanism to limit avatar animation updates since this causes avatars to never reach the correct animation after some actions.
This reverts to situation where animation updates are made each frame on SP.PhysicsCollisionUpdate (though a packet is only sent if the anim actually changes).
m_updateCount was not being update on various avatar state changes, causing the correct animations to never be sent.
Always setting in HandleAgentUpdate() is not enough since the avatar is continually sending AgentUpdate packets.
One would need to identify all the conditions under which animations need to play out and set m_updateCount appropriately in SP.HandleAgentUpdate()
2011-12-03 01:47:12 +00:00
BlueWall
b94ab10922 Merge branch 'master' of /home/opensim/var/repo/opensim 2011-12-02 20:21:35 -05:00
Justin Clark-Casey (justincc)
0ca8491bbe refactor: Use just ScenePresenceAnimator.CurrentMovementAnimation rather than duplicating it with m_movementAnimation 2011-12-03 00:40:08 +00:00
Justin Clark-Casey (justincc)
5bbfb082dd Use agent.Animator.CurrentMovementAnimation in llGetAgentInfo() rather than asking for a new determination 2011-12-03 00:33:24 +00:00
Justin Clark-Casey (justincc)
8185ce8b4a Do a cagent.Anims != null check in SP.CopyFrom() 2011-12-03 00:30:13 +00:00
Justin Clark-Casey (justincc)
5ba8ca5662 Rename ScenePresenceAnimator.GetMovementAnimation() -> DetermineMovementAnimation() for better code readability 2011-12-03 00:27:21 +00:00
Justin Clark-Casey (justincc)
96c191f4fd Stop SP.HandleAgentUpdate() and PhysicsCollisionUpdate() from being processed if we're dealing with a child ScenePresence.
Neither of these can have any effect on child agents
Now leaving warning about trying to set animation on a child agent active.  Might temporarily pop up now and again.
2011-12-03 00:09:18 +00:00
BlueWall
21f4ee8a3d Merge branch 'master' of /home/opensim/var/repo/opensim 2011-12-02 18:57:57 -05:00
Justin Clark-Casey (justincc)
054ebe8878 Stop some places where we're trying to reset animations in child agents where such requests are ignored. 2011-12-02 23:56:01 +00:00
Justin Clark-Casey (justincc)
2a6597f61e Remove pointless Animator.TrySetMovementAnimation("STAND") in ScenePresnece constructor.
Comment was right - it is indeed useless since SP always starts off as child and TrySetMovementAnimation screens out child SP
2011-12-02 22:14:47 +00:00
Justin Clark-Casey (justincc)
1854c52ea3 Stop performing the asset save part of baked texture uploading on the UploadBakedTexture cap asynchronously.
This prevents a possible race condition where the client would be told all baked textures had updated before they were in the asset service.
The client would then trigger a set appearance which, after a delay, would send the avatar appearance out to other clients.
The race condition seems unlikely because of this delay but it's still possible.
Might help with grey avatar appearances.
2011-12-01 23:38:25 +00:00
Justin Clark-Casey (justincc)
5460f2e035 refactor: Separate the upload baked texture handler out from BunchOfCaps 2011-12-01 23:24:15 +00:00
Melanie
516c3dfbbb Remove some debug code that had snuck in 2011-12-01 16:12:09 +01:00
Melanie
797982ee11 Implement llTransferLindenDollars 2011-12-01 13:30:10 +01:00
Melanie
8f2d7881bd Merge branch 'bigmerge' of ssh://3dhosting.de/var/git/careminster into bigmerge 2011-12-01 11:56:40 +01:00
Melanie
b60ff651a3 Merge branch 'master' into bigmerge 2011-12-01 12:16:59 +00:00
BlueWall
e7930b1d0f Make fix to Nini for null references in some cases. 2011-11-29 22:25:03 -05:00
Justin Clark-Casey (justincc)
2a9c9ae340 Provide more user feedback when "debug http" is set 2011-11-29 21:53:15 +00:00
Justin Clark-Casey (justincc)
fa63054c4f On "show caps", stop excluding the seed cap but do exclude it elsewhere 2011-11-29 20:37:03 +00:00
Justin Clark-Casey (justincc)
679a5f6c0b With "debug http 1", show the path with the query string instead of just the path.
Also simplifies debug levels to just 0 and 1
2011-11-29 17:26:45 +00:00
Justin Clark-Casey (justincc)
658d02b5e9 Improve some of the debug help messages 2011-11-29 16:56:31 +00:00
Justin Clark-Casey (justincc)
a17f93ff44 minor: remove mono compile warning, a Vector3 can never be null since it's a struct 2011-11-29 16:31:10 +00:00
Justin Clark-Casey (justincc)
d3a46b03bf tabulate "show caps" output for easier readability 2011-11-29 16:29:11 +00:00
Justin Clark-Casey (justincc)
ff0d020007 Correct mistake in "debug eq" help 2011-11-29 16:18:14 +00:00
Justin Clark-Casey (justincc)
b6b0bc7b32 Add "debug http" command for currently simple extra debug logging of non-event queue inbound http requests to a simulator 2011-11-29 16:15:52 +00:00
Melanie
dc612d0f08 Merge branch 'master' into bigmerge
Conflicts:
	OpenSim/Region/Framework/Scenes/SceneObjectPartInventory.cs
2011-11-28 11:06:38 +00:00
Melanie
80148bf784 Merge branch 'bigmerge' of ssh://3dhosting.de/var/git/careminster into bigmerge 2011-11-28 11:21:15 +01:00
BlueWall
19c10c892a Merge branch 'master' of ssh://opensimulator.org/var/git/opensim 2011-11-26 17:20:20 -05:00
BlueWall
ea0fc7b12c Add missing property to llGetLinkPrimitiveParams 2011-11-26 17:06:28 -05:00
Justin Clark-Casey (justincc)
4efd9a3b7b When removing an LSL sensor for a script (e.g. through llResetScript() or state change), don't also remove sensors for other scripts in the same prim.
Hopefully fixes http://opensimulator.org/mantis/view.php?id=4448 and http://opensimulator.org/mantis/view.php?id=4452
2011-11-26 01:55:36 +00:00
Justin Clark-Casey (justincc)
86cc00aaa8 minor: formatting changes in Scene.PacketHandlers.cs 2011-11-26 01:52:12 +00:00
Justin Clark-Casey (justincc)
46e1bcb6b6 minor: remove mono compiler warning 2011-11-26 01:40:46 +00:00
Justin Clark-Casey (justincc)
bafea2282a Rip out unused Scene.HandleFetchInventoryDescendentsCAPS().
This has been handled by WebFetchInvDescHandler.Fetch() for some time.
2011-11-26 01:39:23 +00:00
Justin Clark-Casey (justincc)
11c19b0d2e Use the same web fetch handler for every request from every avatar, since it contains no instance code 2011-11-26 00:29:01 +00:00
Justin Clark-Casey (justincc)
c5b636469d Stop locking the requests coming in to WebFetchInvDecHandler.
There's no technical reason for this as the methods are thread safe.  However, it might have served to slow down requests.
2011-11-26 00:13:04 +00:00
Justin Clark-Casey (justincc)
95a686dbf5 Fix config so that you can have both WebFetchInventoryDescendents and FetchInvnetoryDescendents2 caps active at once 2011-11-25 23:45:29 +00:00
Justin Clark-Casey (justincc)
5b4fe23f7f Resolve error where an unknown asset type would cause the fetch inventory descendents cap to fail.
Introduced just a few commits ago in 0688861
2011-11-25 23:43:57 +00:00
Justin Clark-Casey (justincc)
676d32974a Implement the FetchInventoryDescendents2 capability using the same code as WebFetchInventoryDescendents.
Enabling this by setting Cap_FetchInventoryDescendents2 = "localhost" in the [ClientStack.LindenCaps] section of OpenSim.ini downloads inventory via http rather than udp in later viewers.
2011-11-25 22:46:42 +00:00
Justin Clark-Casey (justincc)
b785f204ce remove some mono compiler warnings 2011-11-25 22:19:57 +00:00
Justin Clark-Casey (justincc)
0688861aa7 Use the more extensive Utils.AssetTypeToString()/InventoryTypeToString() conversion rather than the arrays in TaskInventoryItem 2011-11-25 22:15:29 +00:00
Justin Clark-Casey (justincc)
8c82ff16ad Fix WebFetchInventoryDescendents cap to use Utils.AssetTypeTostring/InventoryTypeToString to convert types to strings
These cover a wider range of types.
2011-11-25 21:54:31 +00:00
Justin Clark-Casey (justincc)
0a0aa77cfd Adding missing CrossBehaviour.cs file to fix build 2011-11-24 22:46:43 +00:00
Justin Clark-Casey (justincc)
8e32ce85a7 Remove bizarre call to PhysicsScene.Simulate(0) in Scene.GetNearestAllowedPosition()
At least on ODE, this wasn't doing any harm but there wasn't any point to it either
2011-11-24 22:45:29 +00:00
Justin Clark-Casey (justincc)
2ae5b40ca6 On pCampBot, add bot as a property on behaviours instead of passing it in every time 2011-11-24 22:36:45 +00:00
Justin Clark-Casey (justincc)
cbbd992df4 minor: remove mono compiler warning 2011-11-24 22:11:54 +00:00
Justin Clark-Casey (justincc)
a58f5b2f66 When setting packet level logging via "debug packet", apply to all clients, not just root ones.
Also adds scene name and client type (root|child) to logged information.
2011-11-24 22:08:34 +00:00
Justin Clark-Casey (justincc)
0a60e9537f comment out a noisy log line I accidentally left in from the last commit 2011-11-24 21:30:40 +00:00
Justin Clark-Casey (justincc)
63c137820b Stop passing a request handler to the initial caps.RegisterHandler in EventQueueGetModule since this is immediatley replaced by a poll server handler.
This allows us to comment out a bunch of code and simplify the codebase and readability.
2011-11-24 21:27:35 +00:00
Justin Clark-Casey (justincc)
0174e326e3 Add a "debug eq" console command for debugging.
This will log outgoing event queue message names if turned on.
2011-11-24 20:27:11 +00:00
Justin Clark-Casey (justincc)
decabe1181 Merge branch 'master' of ssh://opensimulator.org/var/git/opensim 2011-11-24 20:22:17 +00:00
Justin Clark-Casey (justincc)
bdcfd6afee Add disabled CrossBehaviour to pCampBot, which is designed to cross test bots between neighbouring regions.
Not yet enabled since there is a bug where the initial cross will work but all subsequent movements on the receiving simulator appear to fail.
2011-11-24 17:35:33 +00:00
Melanie
a8270cb48c Merge branch 'master' into bigmerge 2011-11-24 01:16:37 +00:00
Dan Lake
89b2fb2ff4 Append asset ID to URL for storage requests to allow caching proxies to work with Simian 2011-11-23 16:41:30 -08:00
Dan Lake
5485e3da46 Merge branch 'master' of git://opensimulator.org/git/opensim 2011-11-23 16:11:17 -08:00
Dan Lake
0cb33a5398 Line endings 2011-11-23 16:09:11 -08:00
Melanie
11dfd7711b Merge branch 'bigmerge' of ssh://3dhosting.de/var/git/careminster into bigmerge 2011-11-24 00:54:52 +01:00
Justin Clark-Casey (justincc)
ed7ddeecf2 Print out what behaviours are active when pCampBot starts up 2011-11-23 22:18:10 +00:00
Justin Clark-Casey (justincc)
d145750e87 Add teleport behaviour to pCampBot
This teleports the bot to any other regions +/- 5 on the x or y axis.
Quite aggressive at the moment since teleports keep occuring at a 1-10secs random interval.
No checking yet to see if teleport was successful.
2011-11-23 22:05:11 +00:00
Justin Clark-Casey (justincc)
1126efdcd0 In pCampbot, change "show status" command to "show bots" 2011-11-23 21:33:54 +00:00
Justin Clark-Casey (justincc)
9ae0641871 Rename Bot.BotManager to Manager 2011-11-23 21:33:10 +00:00
Justin Clark-Casey (justincc)
e9f2a9bddb get pCampBot to extract nearby and store nearby region information 2011-11-23 21:19:10 +00:00
Justin Clark-Casey (justincc)
617f139aac Merge branch 'master' of ssh://opensimulator.org/var/git/opensim 2011-11-23 21:10:50 +00:00
Justin Clark-Casey (justincc)
e394f83df0 Change random number generator property name in pCampbot 2011-11-23 18:00:41 +00:00
BlueWall
0738fc43e4 Merge branch 'master' of ssh://opensimulator.org/var/git/opensim 2011-11-23 10:50:29 -05:00
BlueWall
d4e3a7fe81 Shell Environment Variables in config
Adding updated Nini and support to use shell environment variables in OpenSimulator configuration.

  Nini @ https://github.com/BlueWall/Nini-Dev
2011-11-23 10:11:47 -05:00
Justin Clark-Casey (justincc)
b56410285b Log error if we attempt to add/remove an OdeCharacter from the _characters list inappropriately 2011-11-22 22:46:25 +00:00
Justin Clark-Casey (justincc)
ace4324e75 Stop removing actor from the hash maps in OdeScene.RemoveCharacter() since this is now being down in OdeCharacter.DestroyOdeStructures() 2011-11-22 22:37:06 +00:00
Justin Clark-Casey (justincc)
af90b52731 Comment out uncalled OdeScene.UnCombine() 2011-11-22 22:28:46 +00:00
Justin Clark-Casey (justincc)
fcb066cb5f Comment out unimplemented and uncalled RegionCombinerModule.UnCombineRegion() 2011-11-22 22:23:52 +00:00
Justin Clark-Casey (justincc)
d639f7fdf3 minor: remove mono compiler warning 2011-11-22 22:16:09 +00:00
Justin Clark-Casey (justincc)
b0fe0464af Stop an exception being thrown and a teleport/border cross failing if the desintation sim has no active script engines.
This involves getting IScene.RequestModuleInterfaces() to return an empty array (as was stated in the method doc) rather than an array containing one null entry.
Callers adjusted to stop checking for the list reference being null (which never happened anyway)
2011-11-22 22:13:57 +00:00
Justin Clark-Casey (justincc)
daf99f8c0a slightly simplify OdeScene.Simulate() by removing bool processtaints, since we can inspect count of taint lists instead.
also groups OdeCharacter.CreateOdeStructures() and DestroyOdeStructures() together
2011-11-22 21:51:00 +00:00
Justin Clark-Casey (justincc)
b89c48b1be Improve the error messages returned if the HelloNeighbour call fails.
This is the message a region sends to its neighbours when it comes up
2011-11-21 22:06:43 +00:00
Justin Clark-Casey (justincc)
c4e4a29478 Slightly improve "Unable to space collide" logging message, though I don't think I've ever seen this. 2011-11-21 21:31:26 +00:00
Justin Clark-Casey (justincc)
4ddff7eb0f Get rid of OdeCharacter != null checks since OdeScene._characters can never contain a null character.
Ignoring the ancient code glyphs not to do this....
2011-11-21 21:29:56 +00:00
Justin Clark-Casey (justincc)
82dc7886fc remove unnecessary OdeScene._activeprims locking. Code is single-threaded 2011-11-21 21:15:15 +00:00
Justin Clark-Casey (justincc)
7480f2fd0e Restore defects list. In hindsight, the reason for this is becuase we can't remove the character whilst iterating over the list.
This commit also removes locking on OdeScene._characters since code is single threaded
2011-11-21 21:04:24 +00:00
Justin Clark-Casey (justincc)
546259b2ff simplify operation of OdeScene._perloopContact 2011-11-21 20:30:37 +00:00
Justin Clark-Casey (justincc)
25d9001de1 don't bother locking OdeScene._perloopContact in single threaded code 2011-11-21 20:17:36 +00:00
Justin Clark-Casey (justincc)
e33b0fa35b don't lock OdeScene.contacts since only ever accessed by a single thread 2011-11-21 20:12:04 +00:00
Justin Clark-Casey (justincc)
e67ba0ad06 rename ODECharacter.AvatarGeomAndBodyCreation() -> CreateOdeStructures() to match existing DestroyOdeStructures() 2011-11-21 20:01:34 +00:00
Justin Clark-Casey (justincc)
063f0f5d97 refactor: Eliminate one line ODECharacter.doForce() method for code clarity 2011-11-21 19:58:37 +00:00
Justin Clark-Casey (justincc)
225b925f4e Comment out calls to OdeScene.waitForSpaceUnlock() since that method does nothing right now 2011-11-21 19:48:31 +00:00
Justin Clark-Casey (justincc)
54789706f4 Reduce complexity of OdeScene.Simulate() by fully removing bad characters at point of detection rather than later on. 2011-11-21 19:45:22 +00:00
Justin Clark-Casey (justincc)
3becda919e move geom/actor map maintenance into DestroyODEStructures()/AvatarGeomAndBodyCreation().
This saves us having to do it separately when a character capsule size is changed
2011-11-21 19:31:29 +00:00
Justin Clark-Casey (justincc)
4faac1f090 When changing avatar size in ODE, remove the old actor from the name and actor maps 2011-11-21 19:06:53 +00:00
Justin Clark-Casey (justincc)
898904d83d When an ODECharacter is removed (e.g. when an avatar leaves a scene), remove the actor reference in OdeScene.actor_name_map rather than leaving it dangling.
This also largely centralizes adds/removes in OdeScene.AddCharacter()/RemoveCharacter()
2011-11-21 18:27:41 +00:00
Justin Clark-Casey (justincc)
cead87005b Have ODECharacter and ODEPrim both use PhysicsActor.Name instead of maintaining their own properties 2011-11-21 18:06:04 +00:00
Justin Clark-Casey (justincc)
4fdcfd79e4 Actually remove PhysicsActor.SOPDescription this time 2011-11-21 17:55:54 +00:00
Justin Clark-Casey (justincc)
39c1ae2408 Chain SOP constructors together rather than having copy/paste code 2011-11-21 17:55:10 +00:00
Justin Clark-Casey (justincc)
58a1147870 refactor: Make SOP.Description an automatic property 2011-11-21 17:51:38 +00:00
Justin Clark-Casey (justincc)
e0887944a0 Remove unused PhysicsActor.SOPDescription 2011-11-21 17:47:30 +00:00
Justin Clark-Casey (justincc)
4485007fce Instead of generating a new list for bad characters on every physics pass, keep reusing the same list. 2011-11-21 17:04:54 +00:00
Justin Clark-Casey (justincc)
a94ce3f1df Move DeleteScriptsOnStartup switch from [Startup] to [XEngine] in OpenSim.ini.example.
If anybody was changing this and wondering why there was no effect, this is why.
2011-11-21 15:30:00 +00:00
Melanie
bdb5ac96d9 Merge branch 'master' into bigmerge
Conflicts:
	OpenSim/Region/Framework/Scenes/SceneCommunicationService.cs
	OpenSim/Region/ScriptEngine/XEngine/XEngine.cs
2011-11-19 22:39:15 +00:00
Melanie
dec8b9c98d Merge branch 'bigmerge' of ssh://3dhosting.de/var/git/careminster into bigmerge 2011-11-19 22:26:41 +01:00
Justin Clark-Casey (justincc)
2206e2fc96 Remove the "[LOCAL SIMULATION CONNECTOR]: Did not find region {0} for SendCreateChildAgent" message
This is misleading since a simulator will call this method before successfully trying remote regions.
Also comments out spammy "[SIMULATION]: Stream handler called" AgentHandlers messages for now.
2011-11-19 01:32:21 +00:00
Justin Clark-Casey (justincc)
726ca72c47 minor: Make HelloNeighbour messages more informative 2011-11-19 01:27:06 +00:00
Justin Clark-Casey (justincc)
10a23a823e Get rid of the spurious [WEB UTIL] couldn't decode <OpenSim agent 57956c4b-ff2e-4fc1-9995-613c6256cc98>: Invalid character 'O' in input string messages
These are just the result of an attempt to canonicalize received messages - it's not important that we constantly log them.
Also finally get the deregister grid service message working properly
2011-11-19 01:16:07 +00:00
Justin Clark-Casey (justincc)
21353de9b7 Enable v2/v3 map tile url setting on robust as default in config
This is necessary to see map tiles on v2/v3 viewers and appears to work fine
2011-11-19 00:34:56 +00:00
Justin Clark-Casey (justincc)
b89534ad0a Remove mono compiler warnings. Fix problem with co-ordinate given in deregister region message 2011-11-19 00:34:13 +00:00
Justin Clark-Casey (justincc)
d05d065d85 Improve some grid region log messages to express regions at co-ordinate (e.g. 1000, 1000) rather than meter positions (256000, 256000) 2011-11-19 00:29:52 +00:00
Justin Clark-Casey (justincc)
7a18078177 improve region deregistration log message 2011-11-19 00:10:29 +00:00
Justin Clark-Casey (justincc)
01ae916bad Don't register a region twice on both official registration and maptile regeneration.
Maptile storage appears orthogonal to region registration
2011-11-19 00:07:34 +00:00
justincc
f72c4bdba5 Replace HttpServer_OpenSim.dll with Oren Hurvitz's patch applied.
This will hopefully address mantis 5471, 5694 and 5718.
This code is now in opensim-libs, along with Diva's slightly older patches (which were already applied to the DLLs in the opensim tree).
Thanks Oren!
2011-11-18 22:52:59 +00:00
Justin Clark-Casey (justincc)
9d458fdd7f Turn the [RegionReady] module on by default and login_disable = true while scripts are loading.
From field experience, we know that simulators can be unstable if a user logs in before the scripts have finished loading.
This commit turns login_disable = true in [RegionReady] on by default which prevents this from happening.
If you want the old behaviour, please copy these section from OpenSimDefaults.ini into OpenSim.ini and set login_disable = false
2011-11-18 21:31:23 +00:00
Justin Clark-Casey (justincc)
169387b390 Turn SellEnabled in the [EconomyModule] on by default.
This only provides enough functionality to allow operations for no money (e.g. sell for $0).
2011-11-17 23:53:25 +00:00
justincc
6dbe793112 Fix Windows build break 2011-11-17 23:10:58 +00:00
Justin Clark-Casey (justincc)
9c928e9dc6 For TerrainModule.SaveToFile(), don't bother throwing the exception onwards after printing out the error, since this method is invoked by users.
Still throwing the exception on the stream method since this invoked programatically
2011-11-17 22:15:46 +00:00
Justin Clark-Casey (justincc)
352672eaf2 Make "terrain save" more friendly by telling the user if we have saved and putting out a useful complaint message if we haven't for some reason 2011-11-17 22:13:32 +00:00
Justin Clark-Casey (justincc)
cacc028835 If the entire simulator is shutting down then don't bother to unload the scripts from the appdomain in XEngine.
All the other actions (script state save, etc.) still occur.
This makes shutdown where there are many scripts vastly quicker.
2011-11-17 21:03:08 +00:00
Melanie
31736b1aac Merge branch 'master' into bigmerge
Conflicts:
	OpenSim/Region/Framework/Scenes/SceneCommunicationService.cs
2011-11-17 19:04:27 +00:00
Melanie
d1c80efd41 Merge branch 'bigmerge' of ssh://3dhosting.de/var/git/careminster into bigmerge 2011-11-17 19:15:41 +01:00
Melanie
e9c386f6a6 Force a sim exit when hearbeat isn't restarting successfully 2011-11-17 19:15:11 +01:00
Justin Clark-Casey (justincc)
b6d83e9c0f Stop OdePrim and OdeCharacter insanely overriding set LocalID to set their own private m_localID property but leaving get to return the then unset PhysicsActor.LocalId!
Instead, just have both subclasses use the PhysicsActor.LocalID property.
This restores collision functionality that fell away in 45c7789 yesterday
2011-11-16 23:01:59 +00:00
Dan Lake
bd01c4a5cb Call public ForEach instead of using m_entities directly. No semantic changes, just cleanup 2011-11-16 02:33:56 -08:00
Dan Lake
baa65d4a15 In AddNewClient, iterator over copy of entities rather than copying under read lock 2011-11-15 17:09:17 -08:00
Justin Clark-Casey (justincc)
e21949deaf Comment out the vebose logging on HGFriendsModule.
Recent issues in http://opensimulator.org/mantis/view.php?id=5794 were not related to HG friends
2011-11-16 00:26:54 +00:00
Justin Clark-Casey (justincc)
9488b235d1 Fix the build break 2011-11-16 00:10:55 +00:00
Justin Clark-Casey (justincc)
33b1e385ec Look up a homeURL only when it's not null, in addition to not being string.Empty 2011-11-16 00:01:21 +00:00
Justin Clark-Casey (justincc)
92dff85afb Enable log message to tell us what type of url is being requested from a user's homeurl 2011-11-15 23:38:24 +00:00
Justin Clark-Casey (justincc)
31ffd5450b Make tracked per scene thread names conform to the majorirty format.
This is <thread-name> (<region-name>)
2011-11-15 23:34:28 +00:00
Justin Clark-Casey (justincc)
aea547cd11 fix build break on UserManagementModule.
This also adds time since started to "show threads".  Unfortunately these two changes got mixed in.
2011-11-15 23:24:51 +00:00
Justin Clark-Casey (justincc)
5b9fe4497d Do proper locking of UserManagementModule.m_UserCache when getting.
This might help with
[USER AGENT CONNECTOR]: new connector to  ()
[USER AGENT CONNECTOR]: Unable to contact remote server  for GetServerURLs
[USER AGENT CONNECTOR]: Malformed Uri : Argument cannot be null.
Parameter name: uriString
2011-11-15 23:12:41 +00:00
Justin Clark-Casey (justincc)
29eb3b2eb5 improve formatting of "show threads" 2011-11-15 22:51:12 +00:00
Justin Clark-Casey (justincc)
ccae787d03 send a watchdog heartbeat for a poll worker thread when it's actually run 2011-11-15 22:20:44 +00:00
Justin Clark-Casey (justincc)
122304317c temporarily increasing logging in HGFriendsModule for debugging 2011-11-15 22:14:31 +00:00
Justin Clark-Casey (justincc)
e11b9dddb6 distinguish between FriendsSimConnector and FriendsServiceConnector in log 2011-11-15 21:51:45 +00:00
Justin Clark-Casey (justincc)
7db38a351c Add number of milliseconds since last update to "show threads" 2011-11-15 21:49:13 +00:00
Justin Clark-Casey (justincc)
94b1c16398 Dont' bother with a userAgentService != null check right after we've constructed it 2011-11-15 20:37:49 +00:00
Justin Clark-Casey (justincc)
828e4a5b09 Add comments about trying to avoid synchronous work off the EventManager.OnMakeRootAgent event since this is on the critical path for transfer of avatars from one region to another. 2011-11-15 20:26:42 +00:00
Justin Clark-Casey (justincc)
e16d7fe1da Instead of having scene add/remove collision events directly to the OdeScene collision event dictionary, marshall them via a change dictionary first.
This is to avoid a complicated tri-thread deadlock on region crossing for avatars with attachments, where
1) XEngine starting up scripts can lock XEngine.m_Scripts and then try to lock OdeScene._collisionEventPrim while starting up a script due to avatar border crossing
2) An existing collision event will lock OdeScene._collisionEventPrim and then try to lock SP.m_attachments while trying to send the collision event to attachments
3) The avatar still entering the region will lock SP.m_attachments and then try to lock m_Scripts to start more attachment scripts.
2011-11-15 20:02:09 +00:00
Justin Clark-Casey (justincc)
45c7789b54 use a more efficient dictionary in OdeScene._collisionEventPrim rather than a list 2011-11-15 19:42:33 +00:00
Justin Clark-Casey (justincc)
a3c5f76942 Removed unused and mostly commented out SceneCommunicationService methods
As far as I can see, the SCS is only now used for informing neighbours of up/down status and possibly sending child agent updates and close requests
2011-11-15 18:16:43 +00:00
Justin Clark-Casey (justincc)
affec18625 Remove prebuild reference to now gone PumaCode.SvnDotNet.dll 2011-11-15 17:40:13 +00:00
Justin Clark-Casey (justincc)
20f26eeb17 Remove unused RegionCommsListener/IRegionCommsListener.
All this is now being handled through IEntityTransferModule and SimulationService instead, and has been for some time.
2011-11-15 17:38:55 +00:00
Justin Clark-Casey (justincc)
64784bc0cf remove SceneCommunicationService.OnAvatarCrossingIntoRegion. This stuff is not being used any more - it's now IEntityTransferModule and SimulationService instead 2011-11-15 17:30:58 +00:00
Justin Clark-Casey (justincc)
430821d837 Rename FetchFriendslist() -> CacheFriends() and RefetchFriends() -> RecacheFriends() to reflect their intended function 2011-11-15 16:12:35 +00:00
Justin Clark-Casey (justincc)
2b5b4ac167 refactor: rename m_NeedsListOfFriends => m_NeedsListOfOnlineFriends to better reflect its actual function 2011-11-15 16:05:08 +00:00
Justin Clark-Casey (justincc)
50803dfe2c For clients that are entering a simulator from initial login, stop executing FriendsModule.FetchFriendslist() asychronously.
Executing this asynchronously allows a race condition where subsequent friends fetches hit a cache that FetchFriendsList() had not yet populated.
Changing this to synchronous may improve issues where a user does not see friends as online even though they are.
I don't believe synchronous is a problem here, but if it is, then a more complicated signalling mechanism is required.  Locking the cache isn't sufficient.
2011-11-15 15:57:53 +00:00
Justin Clark-Casey (justincc)
8d0aaa359f refactor: Don't create a new UUID for passing uuids to client - UUIDs are structs are so not passed by reference (and they're immutable!) 2011-11-15 15:05:10 +00:00
Justin Clark-Casey (justincc)
89632f3ea8 Add test for removing a friendship. 2011-11-14 20:56:56 +00:00
Dan Lake
ed19284d85 Merge branch 'remove-scene-viewer' 2011-11-14 12:37:48 -08:00
Melanie
df35720cf5 Merge branch 'master' into bigmerge
Conflicts:
	OpenSim/Region/Framework/Scenes/SceneViewer.cs
2011-11-14 20:34:49 +00:00
Melanie
17f32b7773 Fix build break 2011-11-14 20:33:39 +00:00
Justin Clark-Casey (justincc)
e5ff7f389b Improved method doc for AddFriend() - it actually does set up a two-way relationship.
Rename IFriendsModule.AddFriend() to AddFriendship()
2011-11-14 20:31:16 +00:00
Melanie
afca742392 Merge branch 'master' into bigmerge
Conflicts:
	OpenSim/Region/CoreModules/Avatar/Friends/FriendsModule.cs
2011-11-14 20:03:47 +00:00
Justin Clark-Casey (justincc)
a64def8b73 minor: remove some mono compiler warnings 2011-11-14 18:16:14 +00:00
Justin Clark-Casey (justincc)
348d15707d Add test for adding a friend whilst online 2011-11-14 18:08:02 +00:00
Justin Clark-Casey (justincc)
de895ee54a Add very simple FriendsModuleTests.TestNoFriends() 2011-11-14 17:18:51 +00:00
Justin Clark-Casey (justincc)
ff36a1bc7b If a friends identifier which is too short is given to HGFriendsModule.GetOnlineFriends() then spit out a warning rather than failing on the String.Substring().
This is to progress http://opensimulator.org/mantis/view.php?id=5789
2011-11-14 16:06:06 +00:00
Justin Clark-Casey (justincc)
49ec85ae15 Do a ScenePresence null check in HGMessageTransferModule.SendIMToScene() to stop a NullReferenceException being thrown if an HG IM is sent to a simulator running multiple regions
This is an attempt to address http://opensimulator.org/mantis/view.php?id=5791
2011-11-14 15:24:02 +00:00
Melanie
6daa61d6ba Merge branch 'master' into bigmerge 2011-11-12 12:36:52 +00:00
Melanie
efc6c6db7c Fix taking or returning locked objects losing permissions for owner 2011-11-12 12:09:28 +01:00
Dan Lake
5fd1749150 Remove SceneViewer from ScenePresence to reduce quadruple queueing of
prim update to only triple queuing. Existing method was:
1. Schedule prim for update, adding to scene update list
2. Update on SOGs during heartbeat queues update onto each SceneViewer
3. Update on SPs during heartbeat queues update onto each IClientAPI
4. ProcessEntityUpdates queues updates into UDP send stack

Now the SceneViewer has been eliminated so updates are scheduled at any
time and then put onto the IClientAPI priority queues immediately during
SceneGraph.UpdateObjectGroups.
2011-11-11 17:16:52 -08:00
Justin Clark-Casey (justincc)
e61ea79c72 doh - correct build break 2011-11-12 00:27:43 +00:00
Justin Clark-Casey (justincc)
f130e1a86f Add threads to the watchdog thread list before we start them.
Hopefully this wil make "WATCHDOG: Asked to update thread ## which is not being monitored" messages." go away.
2011-11-12 00:24:45 +00:00
Justin Clark-Casey (justincc)
25c32061e4 Make log messages on authentication failure more explicit 2011-11-11 23:45:08 +00:00
Melanie
a4ec97cfdd Merge branch 'master' into bigmerge
Conflicts:
	OpenSim/Region/Framework/Scenes/ScenePresence.cs
	OpenSim/Services/AuthenticationService/PasswordAuthenticationService.cs
2011-11-11 23:43:18 +00:00
Justin Clark-Casey (justincc)
6adaf1be74 extract common ScenePresence setup code into Init() method for ScenePresenceSitTests 2011-11-11 23:36:35 +00:00
Justin Clark-Casey (justincc)
84ad23234b add SP.PhysicsActor checks to other sit/stand tests 2011-11-11 23:33:55 +00:00
Justin Clark-Casey (justincc)
acaf6937c5 add sit and stand on ground test 2011-11-11 23:32:43 +00:00
Justin Clark-Casey (justincc)
a3052e40ad extract ground sit code into SP.HandleAgentSitOnGround() for consistency with other sitting code. 2011-11-11 23:28:32 +00:00
Justin Clark-Casey (justincc)
6ce3daff94 Pick up the intended ConsolePrompt from [Startup] instead of console_prompt.
Addresses http://opensimulator.org/mantis/view.php?id=5786
2011-11-11 23:15:53 +00:00
Justin Clark-Casey (justincc)
2a2cdaa211 As with prim sitting avatars, make an avatar phantom when it sits on the ground and solid again when it stands.
This is to avoid http://opensimulator.org/mantis/view.php?id=5783 when a collision with a ground sitting avatar causes that avatar to automatically stand and sometimes not be able to move
A better solution may be to keep gound sitting avatars solid but remove their collision status.  However, this requires some physics code work.
2011-11-11 23:10:43 +00:00
Justin Clark-Casey (justincc)
ce8441132e Restore sending of OutPacket() for object kills removed in commit c7dd7b1.
OutPacket() must be called within the m_killRecord lock.  Otherwise the following event sequence is possible
1) LLClientView.ProcessEntityUpdates() passes the kill record check for a particular part suspends before OutPacket()
2) Another thread calls LLClientView.SendKillObject() to delete the same part and modifies the kill record
3) The same thread places the kill packet on the Task queue.
4) The earlier thread resumes and places the update packet on the Task queue after the kill packet.
This results in a ghost part in the sim that only goes away after client relog.
This commit also removes the unnecessary m_entityUpdates.SyncRoot locking in SendKillObject.
2011-11-11 22:37:57 +00:00
Justin Clark-Casey (justincc)
2a7f4e0602 remove unncessary IClientAPI parameter from SP.SendSitResponse() 2011-11-11 21:53:00 +00:00
Justin Clark-Casey (justincc)
b1cb4f5b04 As per mailing list last week, remove facility that would automatically move the avatar if prim with no sit target was out of sitting range.
Now, no movement occurs.
Note that you can still sit on a prim with an explicit sit target from any distance, as was the case before.
2011-11-11 21:42:58 +00:00
Justin Clark-Casey (justincc)
a658bddbcd Bump warp sit distance up to 10 meters, as discussed on opensim-dev mailing list last week.
This means that if the avatar is within 10 meters of the selected target, it sits on it immediately without walking.
Existing autopilot outside this range will be disabled in a later commit
2011-11-11 19:59:12 +00:00
Justin Clark-Casey (justincc)
01518de0bf update minimum mono version 2011-11-11 19:43:42 +00:00
Justin Clark-Casey (justincc)
8f4955f6a9 Merge branch 'master' of ssh://opensimulator.org/var/git/opensim 2011-11-11 19:40:31 +00:00
Justin Clark-Casey (justincc)
dc200d7bb5 Add new ScenePresenceSitTests with a single sit/stand test 2011-11-11 19:38:36 +00:00
Melanie
ed9500f08c Merge branch 'master' into bigmerge 2011-11-11 16:32:08 +00:00
nebadon
ad28238ece one more jenkins test! 2011-11-10 21:40:11 -07:00
nebadon
84ce0b487b one more test of jenkins! 2011-11-10 21:31:06 -07:00
nebadon
53528b0372 one more round with leeeeeeeeeeroy jaaaaaaenkins! 2011-11-10 21:22:07 -07:00
nebadon
de24e93a1f take two on jenkins testing! 2011-11-10 20:58:38 -07:00
nebadon
621fb9aba0 test push to see if sir jenkins responds! 2011-11-10 20:54:33 -07:00
Dan Lake
10e664eedc Fix compile error from an earlier commit 2011-11-10 17:37:33 -08:00
Melanie
3a307878fd Merge branch 'master' into bigmerge
Conflicts:
	OpenSim/Region/Framework/Scenes/SceneGraph.cs
2011-11-11 01:24:53 +00:00
Dan Lake
7432ca6daf Merge branch 'master' of git://opensimulator.org/git/opensim 2011-11-10 17:21:49 -08:00
Dan Lake
96c59156a7 In SOP, replaced many references to private members with the public properties 2011-11-10 17:21:37 -08:00
Melanie
a9fbf3a4e0 Merge branch 'master' into bigmerge
Conflicts:
	OpenSim/Region/Framework/Scenes/SceneObjectPart.cs
2011-11-11 01:19:38 +00:00
Melanie
d15d5bf181 Merge branch 'master' into bigmerge 2011-11-11 00:28:21 +00:00
Melanie
a5838cf0a6 Prevent linking objects while they are deeded. On unlinking deeded objects,
set LastOwnerID properly so the parts cannot be transferred, circumventing
no trans perms
2011-11-11 00:28:12 +00:00
Melanie
2bd4eaeb19 Merge branch 'master' of melanie@opensimulator.org:/var/git/opensim 2011-11-10 23:43:29 +00:00
Melanie
0daece6f2b Fix turn left and turn right properly. Works for both built-ins and LSL AOs 2011-11-10 23:42:48 +00:00
Dan Lake
8fbaa10ade Merge branch 'master' of git://opensimulator.org/git/opensim 2011-11-10 15:23:16 -08:00
Dan Lake
9359293b11 Cleaned UpdatePermissions calls on SOP and SOG to eliminate redundant properties packet sends and so one part is not telling a different part what to do. That should be up to the SOG to manage permissions on its parts and notify clients when one of them changes. 2011-11-10 15:20:21 -08:00
Melanie
f5abae5ac6 Implement nudging support for strafing motion 2011-11-10 23:03:05 +00:00
Melanie
a081df75e2 Prevent linking objects while they are deeded. On unlinking deeded objects,
set LastOwnerID properly so the parts cannot be transferred, circumventing
no trans perms
2011-11-10 23:59:13 +01:00
Melanie
e9055cec17 Merge branch 'master' into bigmerge 2011-11-10 23:44:19 +00:00
Justin Clark-Casey (justincc)
c0d280d948 Merge branch 'master' of ssh://opensimulator.org/var/git/opensim 2011-11-10 22:58:24 +00:00
Justin Clark-Casey (justincc)
2d4ac6288d Alter commit 3758306 to allow region name to be substituted within a region console prompt
This is to allow broader subsitution in the future.  Currently, the only substitions are \R (for region name) and \\ (for a single backslash)
e.g. "Region (\R) " is the current and continuing default prompt
This renames custom_prompt in [Startup] to ConsolePrompt
2011-11-10 22:56:13 +00:00
Melanie
008b213ec0 Fix turn left and turn right properly. Works for both built-ins and LSL AOs 2011-11-10 23:15:03 +01:00
Melanie
4939d99b57 Merge branch 'master' into bigmerge 2011-11-10 23:03:50 +00:00
Dan Lake
f3fea81936 Merge branch 'master' of git://opensimulator.org/git/opensim 2011-11-10 14:09:53 -08:00
Dan Lake
18c625bda6 When updating SOG, a physics taint should not override a full update with a terse update 2011-11-10 14:09:35 -08:00
Melanie
e7fed80e85 Merge branch 'bigmerge' of ssh://3dhosting.de/var/git/careminster into bigmerge 2011-11-10 22:35:41 +01:00
Melanie
81fbe7ffb1 Implement nudging support for strafing motion 2011-11-10 22:34:54 +01:00
Justin Clark-Casey (justincc)
b990914ec4 convert tabs from commit 3758306 to spaces 2011-11-10 21:04:12 +00:00
Melanie
cb7ea68942 Merge branch 'master' into bigmerge 2011-11-10 20:56:44 +00:00
Melanie
444b345cdf Merge branch 'master' of melanie@opensimulator.org:/var/git/opensim 2011-11-10 20:54:44 +00:00
Melanie
48d2300b8a Fix misaligned sit animation on scripted sit caused by the default sit
animation being run after the scripted one.
2011-11-10 20:54:15 +00:00
Justin Clark-Casey (justincc)
9cba179dff launch pCampbot shutdown console comand asynchronously 2011-11-10 20:03:36 +00:00
Justin Clark-Casey (justincc)
f31a58bd99 Remove unused index parameter from BotManager.startupBot(). Rename startupBot() => StartBot() 2011-11-10 19:40:45 +00:00
Melanie
063920e0a2 Fix misaligned sit animation on scripted sit caused by the default sit
animation being run after the scripted one.
2011-11-10 20:26:14 +01:00
Melanie
a1426739a2 Merge branch 'master' into bigmerge 2011-11-10 17:35:35 +00:00
BlueWall
ce4560bf8f Add GuduleLapointe to list of contributors
Thanks for the patches!
2011-11-10 07:26:16 -05:00
GuduleLapointe
37583063ee Allow custom setting for the console prompt
Signed-off-by: BlueWall <jamesh@bluewallgroup.com>
2011-11-10 06:56:32 -05:00
Justin Clark-Casey (justincc)
4f6915bad5 minor: Correct misleading method doc on SOG.UpdateRootRotation() 2011-11-09 21:49:08 +00:00
Justin Clark-Casey (justincc)
bbab7b6b4d Use IsConnected status to determine whether all pCampBots have disconnected, rather than maintaining a separate count
Checking IsConnected is more reliable.
2011-11-09 21:23:23 +00:00
Justin Clark-Casey (justincc)
674b521fdd In pCampBot, don't try and pull down Primitive faces or sculpts set to null 2011-11-09 20:21:48 +00:00
Melanie
d40d0e4596 Fix the ability to move the seated avatar via LSL 2011-11-08 23:15:09 +01:00
nebadon
d9b0d7e752 one final attempt and then im giving up on panda!!!!! 2011-11-07 19:03:09 -07:00
nebadon
4f7fe58af8 yet another feeble attempt at understanding panda shmanda! 2011-11-07 18:15:21 -07:00
nebadon
554d2ddc03 another shot at making panda use mono 2.4.3!! 2011-11-07 17:49:05 -07:00
nebadon
5d8205f170 another panda test for good measure! 2011-11-07 17:39:08 -07:00
nebadon
c081d7b7dd This is a test to make sure new mono is being used with panda! 2011-11-07 17:09:32 -07:00
Justin Clark-Casey (justincc)
7e488cd635 Remove unused avariable in PollServiceRequestManager 2011-11-07 23:24:13 +00:00
Justin Clark-Casey (justincc)
39b967e214 Correct test failure in sit position check of TestSitAndStandWithNoTarget()
Curiously, a Vector3.ToString() will not display the last two places of the float.  In this case, the failure of
the assertion would confusingly report Expected: <0, 0, 0.8454993> But was:  <0, 0, 0.8454993> when actual Z figure is 0.845499337
Should fully address http://opensimulator.org/mantis/view.php?id=5779
2011-11-07 22:53:52 +00:00
Melanie
adbc69bb07 Merge branch 'master' into bigmerge
Conflicts:
	OpenSim/Region/OptionalModules/World/NPC/Tests/NPCModuleTests.cs
2011-11-07 02:41:56 +00:00
Melanie
6d92d65140 That such a trivial change can be so difficult to get right. Fix it this time. 2011-11-07 02:40:35 +00:00
Melanie
e775b3fc47 Fix build break 2011-11-07 02:03:17 +00:00
Melanie
67780b00f0 Fix up failing test to compensate for changed sit target offset 2011-11-06 21:47:12 +00:00
Melanie
69322b84ce Fix up failing test to compensate for changed sit target offset 2011-11-06 21:46:03 +00:00
Melanie
323b76cee4 Merge branch 'master' into bigmerge
Conflicts:
	OpenSim/Region/ClientStack/Linden/UDP/LLClientView.cs
	OpenSim/Region/CoreModules/Avatar/Attachments/AttachmentsModule.cs
	OpenSim/Region/CoreModules/Framework/EntityTransfer/EntityTransferModule.cs
	OpenSim/Region/Framework/Scenes/AsyncSceneObjectGroupDeleter.cs
	OpenSim/Region/Framework/Scenes/Scene.cs
	OpenSim/Region/Framework/Scenes/SceneObjectGroup.cs
2011-11-06 20:54:13 +00:00
Melanie
84a61cd00b Merge branch 'bigmerge' of ssh://melanie@3dhosting.de/var/git/careminster into bigmerge 2011-11-06 20:45:07 +00:00
Melanie
559e6e52f5 Make the AsyncSceneObjectDeleter send a list of kills. This will make large
marquee-selected deletions of single prims or small link sets nearly
instantaneous
2011-11-06 20:43:49 +00:00
Melanie
c7dd7b13a2 Convert SendKillObject to take a list of uint rather than sending one
packet per prim. More to come as we change to make use of this.
2011-11-06 20:38:07 +00:00
Melanie
51bad0f8ae Merge branch 'master' into bigmerge
Conflicts:
	OpenSim/Region/Framework/Scenes/Scene.cs
2011-11-06 20:12:57 +00:00
Melanie
fa992a020c Merge branch 'master' of melanie@opensimulator.org:/var/git/opensim 2011-11-06 20:00:47 +00:00
Melanie
0bf757e42b Allow HG and other scene presences not linked to a user account to function. 2011-11-06 20:00:03 +00:00
Melanie
c9179be1ed Small preformance tweak 2011-11-06 20:16:24 +01:00
Snoopy Pfeffer
927561383e HUD attachments: Removes some more messages sent to wrong clients. 2011-11-06 17:43:39 +01:00
Snoopy Pfeffer
dfbfc9826a Damaged assets, especially appearance textures, could crash the region server with a fatal exception.
Now, such excpetions are caught by an exception handler and just an error message is shown.
This was the kind of exception causing these fatal server crashes:

  APPLICATION EXCEPTION DETECTED: System.UnhandledExceptionEventArgs^M
  ^M
  Exception: System.ArgumentOutOfRangeException: Argument is out of range.
  Parameter name: offset exceeds the size of buffer
    at System.Net.Sockets.NetworkStream.BeginRead (System.Byte[] buffer, Int32 offset, Int32 size, System.AsyncCallback callback, System.Object state) [0x00000] in <filename unknown>:0
    at HttpServer.HttpClientContext.OnReceive (IAsyncResult ar) [0x00000] in <filename unknown>:0 ^M
  ^M
  Application is terminating: True^M
2011-11-06 15:05:19 +01:00
Melanie
89a1d7c37c Break out the parts of ScenePresence that differ from core 2011-11-05 23:37:43 +00:00
Melanie
1abb381c7a Merge branch 'master' into bigmerge 2011-11-05 23:12:23 +00:00
Melanie
bd10d14bbd Fix build break 2011-11-05 23:12:00 +00:00
Melanie
57194facdc Fix up with core changes 2011-11-05 23:06:59 +00:00
Melanie
facdc9c46e Merge branch 'master' into bigmerge
Conflicts:
	OpenSim/Region/Framework/Scenes/Scene.cs
	OpenSim/Region/Framework/Scenes/ScenePresence.cs
2011-11-05 22:56:08 +00:00
Melanie
bbbcdaa462 Remove spammy autopilot debug 2011-11-05 22:54:47 +00:00
Melanie
9bded61ca4 Whitespace fix from core 2011-11-05 22:48:32 +00:00
Melanie
01b6a4b62e Remove some left over debug and reverse experimental reordering of ifs 2011-11-05 22:46:45 +00:00
Melanie
4d3926694d Remove enableprejump config option and associated code as this is now
fully functional and cannot be disabled because that would break timings.
2011-11-05 22:43:45 +00:00
Melanie
71388fc02a Porting the ScenePresenceAnimator from Avination. Jump and fall anims now work
properly.
2011-11-05 22:41:00 +00:00
Melanie
5517e21068 Harmonize with core and remove extraneous comments with no information in them 2011-11-05 22:34:36 +00:00
Melanie
534560df8c Remove backup optimization that was causing prim contents to poof 2011-11-05 23:31:20 +01:00
Melanie
8fb6ae379a Change m_falling public to a getter property. 2011-11-05 22:05:27 +00:00
Melanie
9c6025f928 Adapt to the core SP rework 2011-11-05 21:53:05 +00:00
Melanie
ac3254a5f5 Change puvlic m_ variable to a getter property 2011-11-05 21:43:35 +00:00
Melanie
2dc452b4a7 ScenePresence part of the Avination animator fixes. 2011-11-05 21:41:16 +00:00
Melanie
b6df9e9fe4 Chnaging the sit target adjustment to a more precise approximation of SL. Some small
fixes ported from Avination. Some white space fixes.
2011-11-05 21:24:36 +00:00
Melanie
0f279b1187 Some more changes to catch up with core 2011-11-05 21:23:25 +00:00
Melanie
cc8e693fb9 Remove unused and broken OffsetRotation from ScenePresence 2011-11-05 20:39:43 +00:00
Melanie
506653ff00 Some trivial changes to get closer to core 2011-11-05 20:32:20 +00:00
Melanie
1a6b2a6429 Change comment formatting to match core for a cleaner diff 2011-11-05 20:17:02 +00:00
Melanie
bda7b3dffe Replace our patched up, broken an rebroken sit code with the code from
core which has now matured beyond what we had.
2011-11-05 19:28:16 +01:00
Melanie
03f5bbcaf2 Merge branch 'master' into bigmerge
Conflicts:
	OpenSim/Region/Framework/Scenes/SceneObjectGroup.cs
	OpenSim/Region/Framework/Scenes/ScenePresence.cs
2011-11-05 11:17:40 +00:00
Melanie
2cf6172689 Merge branch 'master' into bigmerge
Conflicts:
	OpenSim/Region/Framework/Scenes/ScenePresence.cs
2011-11-05 11:05:32 +00:00
nebadon
e8a8e462ed add myself to the contributors.txt 2011-11-05 03:03:57 -07:00
nebadon
e182cc198d Fix avatar height, removes the hip offset hack
Author: Mana Janus <mana@mjm-labs.com>
2011-11-05 02:56:52 -07:00
nebadon
4797ed6edd Multiple lines in welcome message use '\n' in the welcome message to
start a new line.
2011-11-05 02:42:21 -07:00
nebadon
f0d2fcfbe9 add Mana Janus and SpotOn3D to contributors.txt last patch was courtesy
of Mana Janus I failed to mention that, sorry!
2011-11-05 02:35:19 -07:00
nebadon
e3885625a0 Don't rotate child prims, if only the root prim is rotated. 2011-11-05 02:26:25 -07:00
Justin Clark-Casey (justincc)
cfce2529ad refactor: In sit code, compare against Vector3.Zero and Quaternion.Identity instead of individual components of a vector/quat 2011-11-05 02:04:48 +00:00
Justin Clark-Casey (justincc)
8105794121 Merge branch 'master' of ssh://opensimulator.org/var/git/opensim 2011-11-05 01:42:20 +00:00
Justin Clark-Casey (justincc)
28c4dc9be4 Fix NPC sitting for prims without a sit target.
This is to partially address http://opensimulator.org/mantis/view.php?id=5769
We don't need to call SP.HandleAgentSit() again if we are within 10m since the autopilot won't trigger.
By calling it twice, the position of the sitting NPC was wrongly adjusted, ending up near <0,0,0>.
However, this change does mean that NPCs further than 10m away will not attempt to autopilot to the prim, though this code was broken anyway (is actually a different mechanism to normal NPC movmeent).
Hopefully this can be addressed soon.
2011-11-05 01:38:42 +00:00
Melanie
b199aad037 Merge branch 'master' of melanie@opensimulator.org:/var/git/opensim 2011-11-05 00:11:10 +00:00
Melanie
c3a23ffcdc Merge branch 'master' into bigmerge 2011-11-05 00:10:53 +00:00
Melanie
c803ed28c3 Replacing te linking code with the code from Avination. Link sets prims are now
numbered properly even when sets are linked to sets.
2011-11-05 00:09:37 +00:00
Justin Clark-Casey (justincc)
f7b8c54c24 Add comment for experimental effect of removing the Thread.Sleep(20) in ODEPrim.changevelocity() 2011-11-04 23:43:17 +00:00
Justin Clark-Casey (justincc)
d7815ace4a On standup, trigger the changed link script event after the avatar has been fully changed.
This was meant to help with the script in http://opensimulator.org/mantis/view.php?id=5772 but it doesn't work.
Probably the event is fired before the physics actor has been set up again for the stood avatar.
Fixing that would be much more complicated, but processing the event last of all seems like a good idea in any case.
2011-11-04 23:24:22 +00:00
Melanie
b9f7aebde3 Merge branch 'master' into bigmerge 2011-11-04 23:21:19 +00:00
Justin Clark-Casey (justincc)
ccca6ba935 Stop llPushObject() from causing problems by adding force via a taint rather than directly.
This isn't a perfect solution since there can be a race between the taint processing and taint setting, as force needs to be reset after processing.
Needs careful locking in the future.
2011-11-04 23:12:01 +00:00
Melanie
24235006f4 Merge branch 'master' into bigmerge
Conflicts:
	OpenSim/Region/CoreModules/Avatar/Chat/ChatModule.cs
	OpenSim/Region/CoreModules/Avatar/Gods/GodsModule.cs
	OpenSim/Region/CoreModules/LightShare/LightShareModule.cs
	OpenSim/Region/CoreModules/World/Estate/EstateManagementModule.cs
2011-11-04 01:18:37 +00:00
Dan Lake
b8d50b10fb Rename ForEachAvatar back to ForEachScenePresence. The other changes
from previous commit which sort out which iterator is used are left
intact. A discussion is needed as to what constitutes an avatar vs a
ScenePresence.
2011-11-03 17:53:51 -07:00
Dan Lake
94dc7d07eb Renamed ForEachRootScenePresence to ForEachAvatar. Cleaned up calls to
the 3 iteration functions so more of them are using the correct
iteration for the action they are performing. The 3 iterators that seem
to fit all actions within OpenSim at this time are:

ForEachAvatar: Perform an action on all avatars (root presences)
ForEachClient: Perform an action on all clients (root or child clients)
ForEachRootClient: Perform an action on all clients that have an avatar

There are still a dozen places or so calling the old
ForEachScenePresence that will take a little more refactoring to
eliminate.
2011-11-03 17:06:08 -07:00
Justin Clark-Casey (justincc)
69a4057135 remove the pointless check of the face texture struct against null in Bot.Objects_NewPrim() 2011-11-03 22:52:14 +00:00
Justin Clark-Casey (justincc)
e4bdf1e78f actually remove the sleep from PhysicsBehaviour that I shifted to Bot a couple of commits ago 2011-11-03 22:50:40 +00:00
Justin Clark-Casey (justincc)
f26fdbd8da Rename PhysicsBot => Bot since it doesn't just exercise physics anymore 2011-11-03 22:39:06 +00:00
Justin Clark-Casey (justincc)
ca2c25ece2 Move one of the old physics sleeps out into the main bot loop, so leaving out PhysicsBehaviour doesn't result in continuous other behaviours 2011-11-03 22:35:21 +00:00
Justin Clark-Casey (justincc)
5a67940acc Add click/grab behaviour to pCampbot, which gets bots to randomly click things.
This can be specified on pCampbot.exe by using g in the list of behaviours for the new -behaviours,-b switch
e.g. -b p,g to get both existing physics and grabbing behaviours.
grabbing is primitive, it attempts grabs on random prims whether they're actually signalled as clickable or not.
behaviour is currently primitive overall, behaviours are just executed in a list
2011-11-03 22:31:31 +00:00
Justin Clark-Casey (justincc)
3ea379e4cd Move PhysicsBehaviour into a spearate behaviours folder 2011-11-03 21:25:27 +00:00
Justin Clark-Casey (justincc)
66c60c56a0 Separate out physics testing actions into a separate PhysicsBehaviour class 2011-11-03 21:16:24 +00:00
Justin Clark-Casey (justincc)
a62ccb5c4c Merge branch 'master' of ssh://opensimulator.org/var/git/opensim 2011-11-03 20:12:10 +00:00
Mic Bowman
40a1eddfd1 Drop the CopyTo parameter from Int32.MaxValue to 4096. This is a buffer size
not a target size. Mono 2.10 appears to try to allocate the full buffer which
immediately crashes. Tested on mono 2.6.7 and 2.10.5
2011-11-02 18:55:54 -07:00
Melanie
457195466d Merge branch 'master' into bigmerge 2011-11-03 00:23:58 +00:00
Melanie
6b4ae4f30c Revert "fix CopyTo call that was breaking under mono 2.10"
This reverts commit d30971fdc2.
2011-11-03 00:23:32 +00:00
Mic Bowman
99a347ee11 Merge branch 'master' of ssh://opensimulator.org/var/git/opensim 2011-11-02 17:11:10 -07:00
Mic Bowman
d30971fdc2 fix CopyTo call that was breaking under mono 2.10 2011-11-02 17:10:59 -07:00
Melanie
e746840226 Merge branch 'master' of melanie@opensimulator.org:/var/git/opensim 2011-11-02 23:51:48 +00:00
Melanie
08fcf958c2 Port the Avination offline messaging system to Core 2011-11-02 23:50:47 +00:00
Melanie
26a4f32013 Merge branch 'bigmerge' of ssh://3dhosting.de/var/git/careminster into bigmerge 2011-11-02 23:42:37 +01:00
Melanie
afde92d8cc Merge branch 'master' into bigmerge 2011-11-03 00:07:29 +00:00
Melanie
243acef917 Merge branch 'master' into bigmerge
Conflicts:
	OpenSim/Region/Framework/Scenes/SceneGraph.cs
	OpenSim/Region/Framework/Scenes/SceneObjectGroup.cs
	OpenSim/Region/Framework/Scenes/SceneObjectPart.cs
	OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs
2011-11-03 00:06:14 +00:00
Melanie
52d8fa2d0f Merge branch 'master' into bigmerge 2011-11-02 23:51:12 +00:00
Melanie
ce8419fdd0 Fix link order when linking sets to sets 2011-11-02 23:42:09 +01:00
Dan Lake
a724ebacd7 Merge branch 'master' of git://opensimulator.org/git/opensim 2011-11-02 14:59:34 -07:00
Dan Lake
e2c51a977d Changes UpdateFlag in SOP to an enumeration of NONE, TERSE and FULL.
UpdateFlag is now referenced/used only within SOP and SOG. Outsiders are
using ScheduleFullUpdate, ScheduleTerseUpdate or ClearUpdateSchedule on
SOP consistently now. Also started working toward eliminating those
calls to ScheduleFullUpdate, ScheduleTerseUpdate or ClearUpdateSchedule
from outside SOP in favor of just setting properties on SOP and let SOP
decide if an update should be scheduled. This consolidates the update
policy within SOP and the client rather than everywhere that makes
changes to SOP. Some places forget to call update while others call it
multiple times, "just to be sure".

UpdateFlag and Schedule*Update will both be made private shortly.

UpdateFlag is intended to be transient and internal to SOP so it has
been removed from XML serializer for SOPs.
2011-11-02 14:59:00 -07:00
Justin Clark-Casey (justincc)
59232a6ea8 Change default say distance to 20m from 30m, the same as on the big grid. This is to improve the migration of scripts that expect a 20m say distance.
If you want to keep a 30m say distance then please set this as the say_distance parameter in the [Chat] section of OpenSim.ini.
2011-11-02 20:05:31 +00:00
Justin Clark-Casey (justincc)
72923134e9 Get some hopefully more useful exception information when OpenJPEG.EncodeFromImage() fails in VectorRender and DynamicTexture modules 2011-11-02 18:40:49 +00:00
Justin Clark-Casey (justincc)
03993d0b14 Fix race condition that would sometimes send or save appearance for the wrong avatar.
In AvatarFactoryModule.HandleAppearanceUpdateTimer(), we loop through appearance save and send requests and dispatch via a FireAndForget thread.
If there was more than one request in the save or send queue, then this led to a subtle race condition where the foreach loop would load in the next KeyValuePair before the thread was dispatched.
This gave the thread the wrong avatar ID, leaving some avatar appearance cloudy since appearance data was never sent.
This change loads the fields into local references so that this doesn't happen.
2011-11-02 18:25:03 +00:00
Justin Clark-Casey (justincc)
b6873a7b5d Catch any exceptions exiting the top of the robust console, as we already do for the main simulator.
This prevents issues such as transient mono console problems from crashing the server.
2011-11-02 13:16:02 +00:00
Melanie
afae9eafbe Merge branch 'master' into bigmerge
Conflicts:
	OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs
2011-11-02 12:34:57 +00:00
Melanie
c5fb39e21f Restore the recursive calling of PRIM_LINK_TARGET because the version I made
breaks LINK_SET et al.
2011-11-02 12:09:18 +00:00
Melanie
1b9ae3fb51 Some positioning fixes from AVN trunk 2011-11-02 12:02:44 +00:00
Melanie
c55e161dc4 Merge branch 'master' into bigmerge
Conflicts:
	OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs
2011-11-02 11:49:25 +00:00
Melanie
b9e700b60d Streamline PRIM_LINK_TARGET, eliminating a recursion and a failure scenario 2011-11-02 11:43:16 +00:00
Dan Lake
7c8bfac11b Removed redundant SceneContents property from Scene. It's the same as SceneGraph property. 2011-11-01 17:20:12 -07:00
Dan Lake
3bead3eb50 Part 2 of see_into_this_sim_from_neighbor configuration option removal 2011-11-01 17:11:43 -07:00
Melanie
9a8715ec9a Merge branch 'master' into bigmerge 2011-11-02 00:07:59 +00:00
Melanie
b69f679122 Merge branch 'master' into bigmerge
Conflicts:
	OpenSim/Region/CoreModules/World/WorldMap/WorldMapModule.cs
2011-11-01 23:54:09 +00:00
Dan Lake
4b58d4ff95 Removed see_into_this_sim_from_neighbor configuration option. 2011-11-01 16:51:14 -07:00
Justin Clark-Casey (justincc)
9456a540c5 Add "appearance send" command to allow manual sending of appearance. 2011-11-01 23:23:45 +00:00
Justin Clark-Casey (justincc)
8e2e4c47d9 Add "show status" command to pCambot 2011-11-01 22:09:21 +00:00
Justin Clark-Casey (justincc)
40750b44a0 Listen only for non SimShutdown Network.Disconnect firing so that we don't quite the program before all bots have actually logged off. 2011-11-01 21:47:14 +00:00
Justin Clark-Casey (justincc)
53f3b76a84 get rid of unused m_verbose field 2011-11-01 21:18:28 +00:00
Justin Clark-Casey (justincc)
12bd0ebd34 stop recording the threads on which we happen to start bots. These are pointless since they terminate quickly 2011-11-01 21:15:47 +00:00
Justin Clark-Casey (justincc)
9ef5107157 Merge branch 'master' of ssh://opensimulator.org/var/git/opensim 2011-11-01 21:02:03 +00:00
Justin Clark-Casey (justincc)
87ec8a4ecb Retain a reference to an action thread rather than starting an infinite loop via a timer, so that we can actually abort the action thread on shutdown 2011-11-01 18:36:29 +00:00
Dan Lake
9d214d4903 Merge branch 'master' of git://opensimulator.org/git/opensim 2011-10-31 16:42:50 -07:00
Dan Lake
3c55f3015f Removed unused show commands from Scene.cs and SceneBase.cs. The show modules command in OpenSim.cs now shows both shared modules and region modules. 2011-10-31 16:42:28 -07:00
Justin Clark-Casey (justincc)
b951c7fb1e Make bots share a cache so that asset downloads attempts are only made once instead of once for each bot 2011-10-31 23:22:55 +00:00
Justin Clark-Casey (justincc)
210868a832 Remove OpenSim.TestSuite
Hasn't been touched since 2009 and wasn't more than another copy of pCampBot
2011-10-31 23:10:10 +00:00
Justin Clark-Casey (justincc)
d366a08ebb Stop individual bots attempting to download the same asset more than once 2011-10-31 22:52:49 +00:00
Justin Clark-Casey (justincc)
0c6509098a Merge branch 'master' of ssh://opensimulator.org/var/git/opensim 2011-10-31 22:27:35 +00:00
Justin Clark-Casey (justincc)
43e07efbc8 Fix bot disconnection 2011-10-31 22:27:12 +00:00
Dan Lake
3a2dcc7298 Merge branch 'master' of git://opensimulator.org/git/opensim 2011-10-31 15:21:39 -07:00
Dan Lake
d3153f47fa Adding green dots to map response should be for root agents only 2011-10-31 15:20:57 -07:00
Justin Clark-Casey (justincc)
b1647f6d04 adjust pCampbot so it starts up bots with the name format "<firstname> <lastname>_<bot-number>"
e.g. starting up two bots called "Ima Bot" will give them the names "Ima Bot_0" and "Ima Bot_1"
This is necessary since bots with random names can no longer be created, as there's no easy way to turn off account authentication
2011-10-31 22:14:49 +00:00
Justin Clark-Casey (justincc)
74cc834fec Remove unused PumaCode.SvnDotNet library 2011-10-31 21:37:35 +00:00
Justin Clark-Casey (justincc)
e3f51df3c2 Stop pCampbot from firing connected event twice, which results in double counting. 2011-10-31 21:33:25 +00:00
Melanie
a9a24062a5 Plug a security hole in the inventory service 2011-10-31 11:11:36 +00:00
Melanie
4002e205cb Merge branch 'master' into bigmerge 2011-10-31 10:53:17 +00:00
Melanie
e431d5dae4 Plug a security hole in the inventory service 2011-10-31 10:18:25 +01:00
Dan Lake
14646f2524 Fix line endings 2011-10-30 23:43:17 -07:00
Dan Lake
a85ff884d9 Experimental reorder of Heartbeat loop now simulates physics and sends updates to clients prior to sleep. Existing behavior was to sleep BEFORE sending updates. We found this patch reduced latency to clients by 1-2 heartbeat periods. 2011-10-30 23:39:39 -07:00
Melanie
083b28de8c Merge branch 'master' into bigmerge
Conflicts:
	OpenSim/Region/Framework/Scenes/SceneObjectGroup.cs
2011-10-30 10:16:25 +00:00
Justin Clark-Casey (justincc)
9bdf118e0d Add missing max_listens_per_region to [LL_Functions] config section in OpenSimDefaults.ini + explanation.
This setting controls the maximum number of listeners in a region
2011-10-29 02:45:50 +01:00
Justin Clark-Casey (justincc)
6d97545b6b Remove the SyncRoot locking from Scene which was only being done around the main physics loop and ScenePresence position and velocity setting
This is no longer necessary with ODECharacter taints (ODEPrim was already not taking part in this).  BSCharacter was already tainting.
2011-10-29 02:42:53 +01:00
Justin Clark-Casey (justincc)
9fdd1753fa Add taint target velocity for ODECharacters as is already done for ODECharacter position and position and velocity for ODEPrims.
This is to help stop surprises if the velocity is set in the middle of physics calculations, though this probably isn't a huge problem.
It's more for consistency and for the next step of removing some scene locks
2011-10-29 02:30:33 +01:00
Justin Clark-Casey (justincc)
ef8370fb8e tidy up OdeCharacter so that we just use OpenMetaverse.Vector3 assignment directly where possible, instead of transferring X, Y and Z components separately
some of this is probably a hold over from using ODE.Vector3, which is still necessary in some places.
2011-10-29 02:07:28 +01:00
Justin Clark-Casey (justincc)
a5ea9f8830 Move position set from taint to logically better position at top of ODECharacter.ProcessTaints() though this makes no practical difference 2011-10-29 01:46:22 +01:00
Justin Clark-Casey (justincc)
5ae8de3c00 Stop setting _position as well as m_taint_position in ODECharacter.Position
setting position at the same time as taint appears to undermine the whole purpose of taint
testing doesn't reveal any obvious regressions in doing this
2011-10-29 01:39:48 +01:00
Justin Clark-Casey (justincc)
61e97ee4c8 Remove completely unused SOG.Rotation parameter
We always use SOP.Rotation instead
2011-10-29 00:39:01 +01:00
Justin Clark-Casey (justincc)
c2da1c4580 set grp.RootPart.GroupPosition for code consistency (and readability) rather than calling SOP.OffsetForNewRegion 2011-10-28 23:43:31 +01:00
Justin Clark-Casey (justincc)
9bf8c3e7b7 Add missing doc to rotation/position methods in SOG 2011-10-28 23:38:57 +01:00
Justin Clark-Casey (justincc)
0fe756e42c Merge branch 'master' of ssh://opensimulator.org/var/git/opensim 2011-10-28 23:16:46 +01:00
Justin Clark-Casey (justincc)
7b46506822 fetch SOP.RotationOffset once in UpdateRotation() and compare rather than fetch four separate times.
No functional change.
2011-10-28 23:15:51 +01:00
Melanie
175d74e68c Fix the offline message module to revert core changes and restore avn
specific behavior
2011-10-28 23:10:54 +02:00
Melanie
9b6ce41b0e Reduce severity and remove duplication if a common log message regarding
baked textures
2011-10-28 23:10:22 +02:00
Melanie
955144584d Merge branch 'bigmerge' of ssh://3dhosting.de/var/git/careminster into bigmerge 2011-10-27 17:45:51 +02:00
Melanie
b975cbcbed Merge branch 'master' into bigmerge
Conflicts:
	OpenSim/Region/CoreModules/Avatar/Chat/ChatModule.cs
	OpenSim/Region/CoreModules/Avatar/Gods/GodsModule.cs
	OpenSim/Region/CoreModules/Avatar/InstantMessage/MessageTransferModule.cs
	OpenSim/Region/CoreModules/World/Estate/EstateManagementModule.cs
	OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs
2011-10-27 18:14:38 +01:00
Dan Lake
272bf71279 Removed use of 'is' operator and casting to find the root ScenePresence in MessageTransfer modules and Groups module. 2011-10-27 02:26:37 -07:00
Dan Lake
06577d7299 Continuation of previous checkin. Found more places where ForEachScenePresence can be changed to ForEachRootScenePresence. 2011-10-27 01:25:12 -07:00
Dan Lake
b98613091c Added new ForEachRootScenePresence to Scene since almost every delegate passed to ForEachScenePresence checks for !IsChildAgent first. It consolidates child and root handling for coming refactors. 2011-10-27 00:42:21 -07:00
Justin Clark-Casey (justincc)
40bee97015 For now, comment out error message on new script engine console commands.
This causes false positives if a simulator has more than 1 region and the current region is 'root' since this sends the command separately to each region and each region has its own XEngine
2011-10-27 03:01:27 +01:00
Justin Clark-Casey (justincc)
76c50d23f2 Comment out inventory folder bulk update code on InventoryAccepted message introduced in commit db91044 on Aug 22 2011
This should be unecessary since the folder update is already made at the time of the offer (and moved to trash if not accepted).
This code was also not taking into account the situation where an item was accepted.
Needs more fixing if this results in an aggression elsewhere.
2011-10-27 02:56:08 +01:00
Justin Clark-Casey (justincc)
e210d95821 Don't blow our brains out if LLClientView.BulkInventoryUpdate() is wrongly passed a null node reference.
Addresses worst aspect of http://opensimulator.org/mantis/view.php?id=5752
2011-10-27 02:50:58 +01:00
Justin Clark-Casey (justincc)
2db6a8ce8f Merge branch 'master' of ssh://opensimulator.org/var/git/opensim 2011-10-27 02:06:59 +01:00
Justin Clark-Casey (justincc)
820242bc49 Fix a bug I introduced yesterday in ODE physics where prim scripts would only receive the very first collision. 2011-10-27 02:05:59 +01:00
Melanie
6a96c9546d Merge branch 'master' into bigmerge
Conflicts:
	OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs
2011-10-26 17:48:51 +01:00
Melanie
c763419043 Merge branch 'bigmerge' of ssh://3dhosting.de/var/git/careminster into bigmerge 2011-10-26 17:55:53 +02:00
BlueWall
4a472b74c7 Merge branch 'master' of /home/opensim/var/repo/opensim 2011-10-26 10:38:21 -04:00
Michelle Argus
41395d5443 Added optional owner classes to existing OSSL agent Permissions
PARCEL_GROUP, PARCEL_OWNER, ESTATE_MANAGER and REGION_OWNER can be combined with the existing agent uuid option to limit ossl functions to agents and owner classes.

Signed-off-by: BlueWall <jamesh@bluewallgroup.com>
2011-10-26 10:35:50 -04:00
BlueWall
ae8786ea6b Merge branch 'master' of /home/opensim/src/OpenSim 2011-10-26 08:48:46 -04:00
SignpostMarv Martin
9a28e7a4e0 Implementation of PRIM_OMEGA, but only for setting
Signed-off-by: BlueWall <jamesh@bluewallgroup.com>
2011-10-26 08:41:07 -04:00
BlueWall
66bdd20628 Add some things to .gitignore to make the status cleaner 2011-10-26 08:33:17 -04:00
SignpostMarv Martin
059f4b6a3a Implementing PRIM_LINK_TARGET, but only for setting params
Signed-off-by: BlueWall <jamesh@bluewallgroup.com>
2011-10-26 07:47:44 -04:00
Melanie
fd22159d0c Merge branch 'master' into bigmerge
Conflicts:
	OpenSim/Framework/Watchdog.cs
2011-10-26 01:27:24 +01:00
Justin Clark-Casey (justincc)
c275c22928 Restart the event queue worker threads that I accidentally disabled earlier today in 8a0a78c.
Also adds these to the watchdogs with very large timeouts (should really be infinite)
2011-10-25 23:26:21 +01:00
Justin Clark-Casey (justincc)
182908d216 In Watchdog, add ability to specific timeout for a thread.
This also changes the point of registration to the StartThread() call rather than the first Update()
2011-10-25 23:16:01 +01:00
Justin Clark-Casey (justincc)
e549f2f443 Add m_threads dictionary locking to Watchdog.GetThreads() 2011-10-25 22:51:23 +01:00
Justin Clark-Casey (justincc)
6a74a4c12b Clear OdeCharacter CollisionEventUpdate when we subscribe or unsubscribe from collision events 2011-10-25 22:46:42 +01:00
Justin Clark-Casey (justincc)
0f83f87233 Remove unused fields from CollisionEventUpdate 2011-10-25 22:39:08 +01:00
Justin Clark-Casey (justincc)
c825c9a945 Get rid of the pointless null checks on collision listeners. Add warning about synchronicity for PhysicsActor.OnCollisionUpdate event doc 2011-10-25 22:35:00 +01:00
Justin Clark-Casey (justincc)
b9f106f484 When sending object collision updates, don't null out and recreate the CollisionEventUpdate() if the number of collisions falls to zero. Reuse the existing one instead. 2011-10-25 22:28:40 +01:00
Justin Clark-Casey (justincc)
5d37f0471e For ScenePresence collision events, instead of creating a new CollisionEventsThisFrame every time we need to send some new ones, reuse the existing one instead.
This assumes that the listener is using the data synchronously, which is currently the case.
2011-10-25 22:19:17 +01:00
Justin Clark-Casey (justincc)
7b6b36cee9 Fix bug where collision event listeners were not removed once the listener had gone away.
This was causing continuous use of temporary memory even when all avatars had left the scene.
Memory does leak but it does cause more calls to the garbage collector, which would pause the scene thread for a very short while during collection.
2011-10-25 21:40:51 +01:00
Justin Clark-Casey (justincc)
1fbb379536 minor: rename a parameter in OdeScene.Simulate() from actor -> prim since it's an OdePrim 2011-10-25 21:15:37 +01:00
Justin Clark-Casey (justincc)
ee4c4e5058 Add new LindenCaps test dll to panda run as well as "nant test" 2011-10-25 21:03:41 +01:00
Justin Clark-Casey (justincc)
a4d4f54848 minor: add "threads show" as synonym for "show threads" for consistency 2011-10-25 20:59:27 +01:00
Justin Clark-Casey (justincc)
968cae6c17 Add "threads abort <thread-id>" simulator console command that allows us to abort a watchdog managed thread.
This is for diagnostic purposes.
2011-10-25 20:49:46 +01:00
Justin Clark-Casey (justincc)
8a0a78cbcc Make OpenSim.Framework.Servers.HttpServer rely on OpenSim.Framework instead of the other way around.
This is necessary so that code in HttpServer can use framework facilities such as the thread watchdog for monitoring purposes.
Doing this shuffle meant that MainServer was moved into OpenSim/Framework/Servers
Also had to make OpenSim.Framework.Console rely on OpenSim.Framework rather than the other way around since it in turn relies on HttpServer
MainConsole and some new interfaces had to be moved into OpenSim/Framework to allow this.  This can be reverted if parts of OpenSim.Framework stop relying on console presence (cheifly RegionInfo)
2011-10-25 20:24:21 +01:00
Melanie
27aca49a1f Merge commit 'e14cb45b9bc4c78300cb804833cb66c1c2e62187' into bigmerge 2011-10-25 03:26:51 +01:00
Melanie
c8dfef1583 Merge commit '9ec672c70b28b8c1d6d81bab7744fcf7bf9b83c7' into bigmerge 2011-10-25 03:26:44 +01:00
Melanie
a055dd39ac Merge commit '79d5bc9beb445ca07cff9ecbd91d89b2a57e14da' into bigmerge 2011-10-25 03:26:34 +01:00
Melanie
8131ad0fb6 Merge commit '48295793b0d07579d9e31744ae6969df647f663c' into bigmerge 2011-10-25 03:26:27 +01:00
Melanie
740077a291 Merge commit 'e28e2d24c714c3fba1cba60097986a1c1c28c6c0' into bigmerge 2011-10-25 03:26:20 +01:00
Melanie
4e9457ca0c Merge commit '4c9400e6460a73baa2d687afe73a62c6efca9f37' into bigmerge
Conflicts:
	OpenSim/Services/AuthenticationService/AuthenticationServiceBase.cs
2011-10-25 03:26:09 +01:00
Melanie
e94574196f Merge commit 'b868328d519cfb3db597f684fd1f947912fc2222' into bigmerge 2011-10-25 03:19:55 +01:00
Melanie
271c798813 Merge commit 'c2272a755fc6d3b07bc9b87bd9b83f4ae063ce9f' into bigmerge 2011-10-25 03:19:49 +01:00
Melanie
84ea10a78c Merge commit '3fc47275cff5f74e370a24f63f42a6bee023ee17' into bigmerge 2011-10-25 03:19:35 +01:00
Melanie
508f2ebb76 Merge commit '655aee44c4236d7023b9274645bf033b87b17131' into bigmerge 2011-10-25 03:19:30 +01:00
Melanie
98b7bd01cb Merge commit '229ca09b7956f51fc2618dc35dff87cf04bf0fc9' into bigmerge 2011-10-25 03:19:16 +01:00
Melanie
02f0aa592d Merge commit 'ffdf59a57c936189e3b161b79b4a76a3a9b260bb' into bigmerge 2011-10-25 03:19:10 +01:00
Melanie
8639b037e1 Merge commit '30320505fa54640baf4ecaff8bb743f62ef01f86' into bigmerge 2011-10-25 03:18:59 +01:00
Melanie
de8cdbda15 Merge commit 'bc2da4eaadb0dbf8502d95fc2e40b1fdcc86e218' into bigmerge 2011-10-25 03:18:53 +01:00
Melanie
be2cfeb5c3 Merge commit 'c4f8da735914f9a9b1fb99f05313ba0537b528b9' into bigmerge 2011-10-25 03:18:49 +01:00
Melanie
da805d0cce Merge commit '5d7eaedbebd408d948321dc474927fc72d3d98c5' into bigmerge 2011-10-25 03:18:38 +01:00
Melanie
56f3da7b5a Merge commit '9b3bbedeea5c6ea2421b36e5f0e23ab798870ba0' into bigmerge 2011-10-25 03:18:29 +01:00
Melanie
1ae36695ba Merge commit 'a1f05a289dd845edb7e3d163b84ceecc85374427' into bigmerge 2011-10-25 03:18:23 +01:00
Melanie
0531b73695 Merge commit '4241ee5dfab99d4e247624a2f368a8a931d2e54c' into bigmerge 2011-10-25 03:18:10 +01:00
Melanie
564563d273 Merge commit '30fe66d3ab534422407415817b570a66096c543b' into bigmerge 2011-10-25 03:18:04 +01:00
Melanie
6d4480c1ca Merge commit '9c430208769ab7fd7877093e278e8fcae02ecef3' into bigmerge 2011-10-25 03:17:59 +01:00
Melanie
3d0d84aff7 Merge commit '6837e44d0707e501795df2d690c6005f5ba1d591' into bigmerge 2011-10-25 03:17:45 +01:00
Melanie
e35835602f Merge commit 'b63ec987b0a1692da4c5e84facf0ea149d4cfe90' into bigmerge 2011-10-25 03:17:40 +01:00
Melanie
e058b0822f Merge commit 'f16d125027aba098e45dc026f9d507a430bc2b10' into bigmerge 2011-10-25 03:17:26 +01:00
Melanie
bfc0c96379 Merge commit '9ab2943abf5f890a53dc8ada48bf63ed15331c07' into bigmerge 2011-10-25 03:17:18 +01:00
Melanie
d1028b3647 Merge commit 'eac29396d98a4864923a69e0eb73cecdd8a225b3' into bigmerge 2011-10-25 03:17:11 +01:00
Melanie
68682d6faa Merge commit '8b20faf06c4850df800945c8135aa90c2eebe034' into bigmerge 2011-10-25 03:16:58 +01:00
Melanie
04678836c3 Merge commit 'da794f34a56f7c88904315ae538de8f3790e6891' into bigmerge 2011-10-25 03:16:47 +01:00
Melanie
635b1bf18e Merge commit '601dabb1b73a894e4f2f61abe6e9053d380008cd' into bigmerge 2011-10-25 03:16:40 +01:00
Melanie
85d40ce1d1 Merge commit '5607fd3af828846291de3358067bb1214619489e' into bigmerge
Conflicts:
	OpenSim/Region/ScriptEngine/Shared/Instance/ScriptInstance.cs
	OpenSim/Region/ScriptEngine/XEngine/XEngine.cs
2011-10-25 03:16:26 +01:00
Melanie
df430d572d Merge commit '3cf7fb4eca2ad57835311e8098868f2571709392' into bigmerge
Conflicts:
	OpenSim/Region/ScriptEngine/Shared/Instance/ScriptInstance.cs
	OpenSim/Region/ScriptEngine/XEngine/XEngine.cs
2011-10-25 03:10:54 +01:00
Melanie
1bb0e3c800 Merge commit 'b45219065c7a81b3ec488b3a6734773c34268618' into bigmerge
Conflicts:
	OpenSim/Region/ScriptEngine/XEngine/XEngine.cs
2011-10-25 03:07:25 +01:00
Melanie
1ec82bb000 Merge commit '116fbe8258e336be3f6ac1e11119214629799faa' into bigmerge
Conflicts:
	OpenSim/Region/ScriptEngine/Shared/Instance/ScriptInstance.cs
2011-10-25 03:06:18 +01:00
Melanie
89e973805d Merge commit 'ecad9f9fd589f90d1c7a20faf14af0304804b616' into bigmerge 2011-10-25 02:57:01 +01:00
Melanie
a71c60ee6d Merge commit 'd9184eceab5ff9087801b0f0d447dec2f5227a50' into bigmerge 2011-10-25 02:56:56 +01:00
Melanie
b6881187d0 Merge commit 'fe484ab331871e1419ee78afefca7c8856e2dfb4' into bigmerge 2011-10-25 02:56:45 +01:00
Melanie
752b744105 Merge commit '178b8d0926a53d82f54d60c088f36c7bad13dc87' into bigmerge 2011-10-25 02:56:40 +01:00
Melanie
1b87a0c229 Merge commit '4cffdf15ba320b71650ade9edddec2286b1c5258' into bigmerge 2011-10-25 02:56:30 +01:00
Melanie
3555987fe9 Merge commit '9f171041c950d55d86481cdcee7a04c623bea8b2' into bigmerge 2011-10-25 02:56:22 +01:00
Melanie
e1ff72209f Merge commit '97c66f8eac648229b55ba5a000d57e4b9377c663' into bigmerge 2011-10-25 02:56:15 +01:00
Melanie
cdca0fb387 Merge commit '9d59b285bbc84aa620200e7da69be0f347dd69f4' into bigmerge 2011-10-25 02:56:03 +01:00
Melanie
f5e2bdebef Merge commit 'c85a780583cb36bac95f69c5d704f60a758d56bb' into bigmerge 2011-10-25 02:55:57 +01:00
Melanie
71b4486356 Merge commit '581885da75c57250201b34e2d585d32c8f07089a' into bigmerge 2011-10-25 02:55:46 +01:00
Melanie
6a01246cc6 Merge commit '03202ada2918c0c0837e8de50e3a0436e4407c91' into bigmerge 2011-10-25 02:55:38 +01:00
Melanie
10dff1da7f Merge commit '1d4cd76e8a8c64da71fc384ff9c654d7f4f849c1' into bigmerge 2011-10-25 02:55:25 +01:00
Melanie
2134f23da0 Merge commit 'f10a824e47549806c1fa647c4e9fba4c8cf6ad13' into bigmerge 2011-10-25 02:55:19 +01:00
Melanie
43751d0cfd Merge commit '5515c45e3b42497f64f8e5846697471b1de952c5' into bigmerge 2011-10-25 02:55:14 +01:00
Melanie
7ac9463e35 Merge commit '71d221cdc090cdedf371ead534421bb7074908cd' into bigmerge 2011-10-25 02:55:01 +01:00
Melanie
90f17785c3 Merge commit '352002fd0b74a87f62ea82c76969e4110ba2542f' into bigmerge 2011-10-25 02:54:53 +01:00
Melanie
0cbba1da8d Merge commit 'aeb4ff02744573cb91e8991bf9df81412b80e156' into bigmerge 2011-10-25 02:54:41 +01:00
Melanie
dc24ac4f20 Merge commit '120114e96becc6fee1311300359dcefaf4013c0e' into bigmerge 2011-10-25 02:54:34 +01:00
Melanie
51fd5bac5e Merge commit '96ff2c63ed47e29a92cc79b6e8753d21e54da061' into bigmerge
Conflicts:
	OpenSim/Region/ClientStack/Linden/UDP/LLClientView.cs
2011-10-25 02:54:24 +01:00
Melanie
b7237ef059 Merge commit '62a63f834b7cc056ee37c396034d0e268f66b4a8' into bigmerge
Conflicts:
	OpenSim/Region/Framework/Scenes/ScenePresence.cs
2011-10-25 02:35:33 +01:00
Melanie
5c09cffe55 Merge commit '79c13cd99728f09a5175dff1750dcb9d7790fcdc' into bigmerge 2011-10-25 02:27:35 +01:00
Melanie
496c647ab5 Merge commit 'de161585c0960a93911f446f0179441ba5470245' into bigmerge 2011-10-25 02:27:26 +01:00
Melanie
8c5c32fc45 Merge commit 'ddcb88ff53d2348dfc81451a3ec61bb643c49aff' into bigmerge 2011-10-25 02:27:13 +01:00
Melanie
e2de57ca29 Merge commit '0c041ce12f393367e2754e88d9b8dad5e45f88c4' into bigmerge
Conflicts:
	OpenSim/Region/Framework/Scenes/ScenePresence.cs
2011-10-25 02:26:56 +01:00
Melanie
f6ea36b4fa Fix a missing locking call 2011-10-25 03:15:28 +02:00
Melanie
4215aea036 Merge commit '730460169f2a45e934b42b2464f7c7472f7fac48' into bigmerge 2011-10-25 02:15:13 +01:00
Melanie
57b51287ae Merge commit 'bbd0e68c06b79acf0781d78e81fa292f549d676b' into bigmerge 2011-10-25 02:15:06 +01:00
Melanie
f387e84e51 Merge commit 'b9930a6305e9c8bb9197fc9dc49219f4fb7ff32c' into bigmerge 2011-10-25 02:15:01 +01:00
Melanie
353f0c0e03 Merge commit 'ddf54b5537f2701deeb615ef8e1eeef20b746ea1' into bigmerge
Conflicts:
	OpenSim/Region/Framework/Scenes/Scene.cs
2011-10-25 02:14:39 +01:00
Melanie
585f1b189f Merge 2011-10-25 02:08:43 +01:00
Melanie
f50538c81a Merge commit '528cc8136e567b5bac583728fbb0235baaba2f02' into bigmerge
Conflicts:
	OpenSim/Region/Framework/Scenes/Scene.cs
	OpenSim/Region/Framework/Scenes/SceneObjectPart.cs
2011-10-25 01:55:01 +01:00
Melanie
3cdea11e29 Merge commit '5ddefc256468e4b394d82a2c4bc69fe28c4b59ea' into bigmerge 2011-10-25 01:54:07 +01:00
Melanie
8841b77cd1 Merge commit '3843efe478ed682fd08bf12ea8bd7377c68a36fb' into bigmerge 2011-10-25 01:53:53 +01:00
Melanie
9dd7d9c16c Merge commit 'f2889d7ce97a01086dc7fc0690865a1eae452364' into bigmerge 2011-10-25 01:53:24 +01:00
Melanie
28d2103439 Merge commit '732e9373795a35ed1965bbb93a02117fcf0a8c3e' into bigmerge 2011-10-25 01:53:02 +01:00
Melanie
e43e1b49db Merge commit 'c93c9ea072f319125f466c913f5f4fe1f6864045' into bigmerge 2011-10-25 01:52:54 +01:00
Melanie
077e3500b2 Merge commit '978fb3d482072d840e6280aa5acd090b67ee6205' into bigmerge 2011-10-25 01:52:42 +01:00
Melanie
a09e72c8cc Merge commit '9cc2694776e261868138c325a82ce5481c2908ec' into bigmerge 2011-10-25 01:52:26 +01:00
Melanie
63cbdb9b2a Merge commit 'f2132329a358db2c66c29501d35ef54eae8d6eed' into bigmerge 2011-10-25 01:52:19 +01:00
Melanie
3eb51e9a79 Merge commit 'bea65b06a445c267ecb77be08452146cb7fee1ce' into bigmerge 2011-10-25 01:52:12 +01:00
Melanie
2d4ba1a871 Merge commit '03102864f0d9851b6937ca5472f48f10ec861a26' into bigmerge 2011-10-25 01:52:00 +01:00
Melanie
f4e4026a7a Merge commit '4bfc2f5cdea4b739110cae3b37945d88ad527334' into bigmerge 2011-10-25 01:51:49 +01:00
Melanie
fe014a05ac Merge commit '83c7b9b609d3c78d099a0bf18de8685676184f94' into bigmerge 2011-10-25 01:51:37 +01:00
Melanie
2895789bd0 Merge commit 'aa19ccf65c9cd235e0ba941e9832c5240df4412c' into bigmerge 2011-10-25 01:51:24 +01:00
Melanie
24e260744a Merge commit '77c65951e06c1d309f2bc8f6d2451b2b9a82c9df' into bigmerge 2011-10-25 01:51:06 +01:00
Melanie
69b480770a Merge commit 'ee84c0589ccca1e7f3216ca1395c3002b773f30f' into bigmerge
Conflicts:
	OpenSim/Region/ScriptEngine/XEngine/XEngine.cs
2011-10-25 01:50:55 +01:00
Melanie
b4395143e7 Merge commit '4e7d4330c2b2c61e64c9f82efa7b824b717b2e4d' into bigmerge
Conflicts:
	OpenSim/Region/Framework/Scenes/Scene.cs
2011-10-25 01:50:07 +01:00
Melanie
0a65e7cadc Merge commit '128d8dfd8b355f84a71e2093e942937ca720c5c6' into bigmerge 2011-10-25 01:47:38 +01:00
Melanie
be3939358b Merge commit 'fd274a668803bc3da4cec95180538116038b503a' into bigmerge
Conflicts:
	OpenSim/Region/Framework/Scenes/Scene.cs
2011-10-25 01:47:35 +01:00
Melanie
506769c6a2 Merge commit 'a6fa15e8b65a123d79a1bea8cccb459f76139314' into bigmerge 2011-10-25 01:43:27 +01:00
Melanie
53caaa8236 Merge commit 'ceb326284e49f0817fa0f848136ff60e6f66568f' into bigmerge 2011-10-25 01:43:12 +01:00
Melanie
747786aac0 Merge commit '20da04fd0c909a00c0cdc2585f242e95c868801a' into bigmerge 2011-10-25 01:43:05 +01:00
Melanie
d68b73bfba Merge commit '227db07f2ff8a1ba840a0d3018bb242a34d6038f' into bigmerge 2011-10-25 01:42:56 +01:00
Melanie
a8cc81a37e Merge commit 'f08664f422f984fa57cc0ecb97c04eee3dccd183' into bigmerge
Conflicts:
	OpenSim/Region/Framework/Scenes/Scene.cs
	OpenSim/Region/Framework/Scenes/ScenePresence.cs
2011-10-25 01:42:52 +01:00
Melanie
9ceb98344a Merge commit '631d5e16ef8c5340b6283b1a9ed9cc95aea3e3a1' into bigmerge 2011-10-25 01:37:11 +01:00
Melanie
13d635d1d7 Merge commit 'f5f7ca47ea7a27fb7f82367cc7a4e04e11cb5155' into bigmerge 2011-10-25 01:37:01 +01:00
Melanie
8e69dde397 Merge commit 'ea7366ddc6f0e13519589fcaa3729fd36b5eef79' into bigmerge
Conflicts:
	OpenSim/Region/ScriptEngine/XEngine/XEngine.cs
2011-10-25 01:36:39 +01:00
Melanie
0b833c458a Merge commit 'c5826d589ab2f33a71105bc2d3015ffbb7dd2973' into bigmerge 2011-10-25 01:35:51 +01:00
Melanie
b8352c153b Merge commit '36e73dbc9b7fb46885865f5537c43a29239fd559' into bigmerge 2011-10-25 01:35:38 +01:00
Justin Clark-Casey (justincc)
e14cb45b9b Drop some unnecessary ContainsKey() checking before Remove() in BaseHttpServer()
Remove() presumably does this check anyway since it just returns false if the key is not in the collection.
2011-10-24 23:26:41 +01:00
Justin Clark-Casey (justincc)
9ec672c70b Fix bugs in EventQueueGetModule.ClientClosed() and BaseHttpServer.RemovePollServerHTTPHandler() that stopped existing code in ClientClosed() from actually tearing down the poll handler
Actually doing the tear down appear to have no ill effects with region crossing and teleport.
2011-10-24 23:16:03 +01:00
Justin Clark-Casey (justincc)
79d5bc9beb separate out future common setup code from EventQueueTests.AddForClient() 2011-10-24 22:29:13 +01:00
Justin Clark-Casey (justincc)
48295793b0 re-enable running linden udp tests in local.include, though no tests are currently active there 2011-10-24 22:25:38 +01:00
Justin Clark-Casey (justincc)
e28e2d24c7 Add new EventQueueTests with basic test to check that adding a client registers an http poll 2011-10-24 22:23:41 +01:00
Justin Clark-Casey (justincc)
4c9400e646 Add optional getauthinfo and setauthinfo authentication service calls.
These are disabled by default, as before.  Please only turn these on in secure grids, since they allow the same facilities as the existing SetPassword call (also disabled by default)
These facilities can be helpful when integrating external systems, in addition to the existing option of adapting an IAuthenticationService or using WebLoginKey
2011-10-24 21:40:36 +01:00
Justin Clark-Casey (justincc)
b868328d51 Comment out the uuid gatherer lines that I accidentally left in. 2011-10-23 03:14:32 +01:00
Pixel Tomsen
c2272a755f Fix missing Busy-Mode Response
http://opensimulator.org/mantis/view.php?id=5748
2011-10-22 13:17:07 -04:00
BlueWall
3fc47275cf Add case to Lightshare/Windlight
Thanks thomax for a patch to add handling for Sun/Moon pos.
2011-10-22 13:06:34 -04:00
Justin Clark-Casey (justincc)
655aee44c4 Rename some of the example commented out server names to mygridserver.com like all the others.
This is to make it easier to change all these names at once, where all grids services are running from the same location.
Also rearranges some lines in [Modules] so that StandaloneCommon.ini.example and GridCommon.ini.exmaple are consistent.
2011-10-22 02:51:41 +01:00
Justin Clark-Casey (justincc)
229ca09b79 Make config comments about choosing assetcache modules clearer.
OpenSim needs an asset cache.  Running without one will cause problems.
Thanks to Ai Austin for the suggestions in http://opensimulator.org/mantis/view.php?id=4850
2011-10-22 02:47:53 +01:00
Justin Clark-Casey (justincc)
ffdf59a57c Get UUIDGatherer to scan notecards in the graph for asset uuids.
This is to support npc baked texture saving in oars and iars.
May address http://opensimulator.org/mantis/view.php?id=5743
2011-10-22 02:16:46 +01:00
Justin Clark-Casey (justincc)
30320505fa redirect UserInventoryHelpers to use a different CreateNotecardAsset() so we can comment out some inconsistency 2011-10-22 00:58:56 +01:00
Justin Clark-Casey (justincc)
bc2da4eaad correct misleading method doc on CreateNotecardAsset() 2011-10-22 00:55:50 +01:00
Justin Clark-Casey (justincc)
c4f8da7359 in AssetHelpers, store the actual text passed in to the method, not the string "data" 2011-10-22 00:45:47 +01:00
Justin Clark-Casey (justincc)
5d7eaedbeb encode notecard assets in proper format for tests, rather than just using whatever string is given 2011-10-22 00:21:45 +01:00
Justin Clark-Casey (justincc)
9b3bbedeea refactor: rename some AssetHelpers.CreateAsset() methods to CreateNotecardAsset() 2011-10-22 00:13:46 +01:00
Michelle Argus
a1f05a289d RemoteAdmin - Added optional terrain loading on region create using parameter heightmap_file to specify the terrain file to be loaded 2011-10-21 23:12:01 +01:00
Justin Clark-Casey (justincc)
4241ee5dfa very minor removal of old commented out line of code in OdeScene 2011-10-21 00:04:36 +01:00
Justin Clark-Casey (justincc)
30fe66d3ab remove unnecessary null check on _collisionEventPrim 2011-10-20 20:58:29 +01:00
Justin Clark-Casey (justincc)
9c43020876 Get OdeScene to use passed in time step rather than hard-coded 0.089
However, I still don't recommend changing MinFrameTime from 0.089, high values do not work well and lower values don't seem to make much difference
2011-10-20 20:48:51 +01:00
Justin Clark-Casey (justincc)
6837e44d07 Pass PhysicsScene.Simulate() only the MinFrameTime rather than the useless Math.Max(SinceLastFrame.TotalSeconds, MinFrameTime)
SinceLastFrame was calculating the interval between any sleep that had occurred to pad out the frame time and the start of the next frame.
This would usually be below MinFrameTime but occasionally if the sleep was long it would be above, often due to the time required to update the watchdog.
This doesn't appear to play much practical role right now.
ODE was actually ignoring it entirely.  Bullet might be helped slightly by receiving a non-varying value.
2011-10-20 19:44:59 +01:00
Justin Clark-Casey (justincc)
b63ec987b0 For now, stop passing timeStep into methods where it's not actually used. 2011-10-20 17:54:32 +01:00
Justin Clark-Casey (justincc)
f16d125027 Change wording on asset requests.
Not all 'notified missing' assets are a problem.  Some are invalid references which happen to be buried in other text.
2011-10-19 23:56:17 +01:00
Dan Lake
9ab2943abf Removed redundant NotInTransit function from ScenePresence. IsInTransit=false does the same thing and NotInTransit was not used anywhere. 2011-10-19 15:50:09 -07:00
Dan Lake
eac29396d9 Moved HaveNeighbor utility function from ScenePresence to Scene. Fixed line endings from previous commit. 2011-10-19 15:38:25 -07:00
Dan Lake
8b20faf06c Merge branch 'master' of git://opensimulator.org/git/opensim 2011-10-19 14:43:16 -07:00
Dan Lake
da794f34a5 Renamed and rearranged AvatarFactoryModule to eliminate redundant lookups of scene presence by client ID. 2011-10-19 14:41:44 -07:00
Justin Clark-Casey (justincc)
601dabb1b7 Extend scripts stop/start/suspend/resume console commands to allow action on a single script by giving the script item id (which can be found via scripts show).
Not an ideal way to do this on a region with many scripts.  Needs refinement later.
2011-10-19 22:30:31 +01:00
Justin Clark-Casey (justincc)
32c3faedd6 Add "scripts stop" and "scripts start" console commands.
These will stop all running scripts and start all stopped scripts respectively.
A stopped script does not save any events for later processing.
2011-10-19 21:40:28 +01:00
Justin Clark-Casey (justincc)
f836710af5 minor: improve command help on scripts suspend/resume 2011-10-19 21:34:55 +01:00
Justin Clark-Casey (justincc)
5607fd3af8 Fix resume scripts.
On resume, we need to place requeue the script for event processing if there are any events on the queue.
Also need to do this under m_Script lock in order to avoid a race
2011-10-19 21:30:37 +01:00
Justin Clark-Casey (justincc)
3cf7fb4eca Add "scripts suspend" and "scripts resume" commands.
These aim currently to suspend and resume all scripts.
However, resume isn't currently working due to what looks like a bug in resume functionality itself.
2011-10-19 20:53:24 +01:00
Justin Clark-Casey (justincc)
b45219065c on log and "show scripts" messages, show script item UUID rather than asset UUID
The item ID is the one required for any script manipulation on the command line, so I think it's somewhat more useful to show this bearing in mind the limited space available
2011-10-19 20:26:05 +01:00
Justin Clark-Casey (justincc)
116fbe8258 add current script status to "scripts show" command (running, suspended, etc.) 2011-10-19 20:24:07 +01:00
Justin Clark-Casey (justincc)
ecad9f9fd5 Add "show scripts" command to show all scripts currently known to the script engine in the current region.
Also added synonym of "scripts show"
2011-10-19 20:09:02 +01:00
Justin Clark-Casey (justincc)
d9184eceab Add option to allow remote http calls to setpassword in the AuthenticationService.
This is switched on by setting AllowSetPassword = true in the [AuthenticationService] section of Robust.ini or Robust.HG.ini
Default is false as before.
2011-10-19 19:03:17 +01:00
Justin Clark-Casey (justincc)
fe484ab331 Slightly change log message in LoadRegionsPlugin 2011-10-19 01:22:07 +01:00
Pixel Tomsen
178b8d0926 Region-UUID - can not be zero-uuid
http://opensimulator.org/mantis/view.php?id=3426
2011-10-19 01:19:21 +01:00
Justin Clark-Casey (justincc)
4cffdf15ba Make ScopeID optional for http GetAccount and GetAccounts
If not specified then it assumes UUID.Zero. as occurs elsewhere in the codebase
2011-10-19 00:34:54 +01:00
Justin Clark-Casey (justincc)
9f171041c9 Make PrincipalID a synonym for UserID in GetUserAccount 2011-10-19 00:23:06 +01:00
Justin Clark-Casey (justincc)
97c66f8eac Get new NewUser and SetUserAccount calls to accept PrincipalID instead of UserID for consistency with output 2011-10-19 00:16:53 +01:00
Justin Clark-Casey (justincc)
9d59b285bb Allow an http call to set account details if AllowSetAccount = true in [UserAccountService].
As before, default is false to not allow these calls.
2011-10-19 00:06:40 +01:00
Justin Clark-Casey (justincc)
c85a780583 Provide an option to allow remote calls to the CreateUser method on the UserAccountService
Default is false, as before.
Enabling AllowCreateUser in [UserAccountService] for ROBUST allows avatars to be created via an http call, with viewer 2 appropriate bits and pieces.
Only Ruths can be created at present.
Please don't rely on the config since at some point CreateUser will be moved to a separate co-ordinating service.
2011-10-18 22:51:40 +01:00
Justin Clark-Casey (justincc)
581885da75 Temporarily put in log lines to record time taken to set terrain in OdeScene. 2011-10-18 21:21:15 +01:00
Justin Clark-Casey (justincc)
03202ada29 Store scene identifier passed in to OdeScene for later debug messages 2011-10-18 21:11:13 +01:00
Justin Clark-Casey (justincc)
1d4cd76e8a Don't bother taking OdeLock during OdeScene construction, since there can be no contention until the object is constructed. 2011-10-18 21:03:41 +01:00
Justin Clark-Casey (justincc)
f10a824e47 Remove unnecessary lock of OdeLock in OdePrim.changeadd()
This taint can only ever be processed from the OdeScene.Simulate() loop, which already locks OdeLock.
2011-10-18 20:58:59 +01:00
Justin Clark-Casey (justincc)
5515c45e3b minor: method doc to explain a lock of OdeLock 2011-10-18 20:56:11 +01:00
Justin Clark-Casey (justincc)
71d221cdc0 Remove the unused CollisionLocker from ODE
Despite its name, this wasn't actually being used in any collision checking
2011-10-18 17:35:58 +01:00
Justin Clark-Casey (justincc)
352002fd0b Set enable_adaptive_throttles = true in OpenSimDefaults.ini
As discussed in http://lists.berlios.de/pipermail/opensim-dev/2011-October/010599.html and the preceeding thread mails,
the aim of this setting is to avoid overloading the viewer UDP connection where the client is failing to ack packets.
Please mantis any anomalous viewer connection behaviour which wasn't there before.
2011-10-17 22:11:56 +01:00
Justin Clark-Casey (justincc)
aeb4ff0274 Allow an avatar to be explicitly named to the "debug packet" command 2011-10-17 20:58:23 +01:00
Justin Clark-Casey (justincc)
120114e96b refactor: Make IClientAPI.DebugPacketFormat a property rather than a setter without a getter 2011-10-17 20:50:29 +01:00
Justin Clark-Casey (justincc)
96ff2c63ed Add avatar names to debug packet output 2011-10-17 20:37:01 +01:00
Justin Clark-Casey (justincc)
62a63f834b refactor: Use SOP.SitTargetAvatar instead of calling a special GetAvatarOnSitTarget() which returned exactly the same thing 2011-10-17 02:04:20 +01:00
Justin Clark-Casey (justincc)
79c13cd997 rename OS_NPC_SIT_IMMEDIATE to OS_NPC_SIT_NOW since it's shorter and more understandable
This makes something like osNpcSit(npc, llGetKey(), OS_NPC_IMMEDIATE) now become
osNpcSit(npc, llGetKey(), OS_NPC_SIT_NOW);
This is why it's in development :)
2011-10-17 01:57:23 +01:00
Justin Clark-Casey (justincc)
de161585c0 Implement osNpcStand(<npc-id>)
Allows you to stand an NPC that has sat.
2011-10-17 01:56:25 +01:00
Justin Clark-Casey (justincc)
ddcb88ff53 Merge branch 'master' of ssh://opensimulator.org/var/git/opensim 2011-10-17 01:45:41 +01:00
Justin Clark-Casey (justincc)
0c041ce12f Implement osNpcSit(). This is still in development so don't trust it
Format is osNpcSit(<npc-uuid>, <target-uuid>, OS_NPC_SIT_IMMEDIATE)
e.g. osNpcSit(npc, llGetKey(), OS_NPC_SIT_IMMEDIATE);
At the moment, sit only succeeds if the part has a sit target set.
NPC immediately sits on the target even if miles away - they do not walk up to it.
This method is in development - it may change so please don't trust it yet.
Standing will follow shortly since that's kind of important once you're sitting :)
2011-10-17 01:42:31 +01:00
Diva Canto
730460169f Bug fix on the bug fix on UserAccountService.cs 2011-10-16 16:13:24 -07:00
Diva Canto
bbd0e68c06 Guard HGAssetService against uninitialized variables and null arguments. 2011-10-15 20:23:26 -07:00
Justin Clark-Casey (justincc)
b9930a6305 improve method doc on Scene.OtherRegionUp()
this is really just to trigger panda.
2011-10-15 03:17:58 +01:00
Justin Clark-Casey (justincc)
ddf54b5537 move see_into_this_sim_from_neighbor [Startup] flag parsing into Scene with the others 2011-10-15 03:03:05 +01:00
Justin Clark-Casey (justincc)
528cc8136e fetch physical_prim switch from [Startup] config from inside scene, as is done for most other scene config params 2011-10-15 02:54:43 +01:00
Justin Clark-Casey (justincc)
5ddefc2564 remove now redundant m_physical_prim flag from SOP.ApplyPhysics() 2011-10-15 02:47:27 +01:00
Justin Clark-Casey (justincc)
3843efe478 Restore [Startup] physical_prim flag which can stop any prims being subject to physics
This had stopped working.  However, at the moment it still allows the physics flag to be set even though this has no effect.  This needs to be fixed.
Default for this flag is true as previously.
2011-10-15 02:42:43 +01:00
Justin Clark-Casey (justincc)
f2889d7ce9 remove redundant PhysActor.IsPhysical call from SOP.UpdatePrimFlags() as its done immediately afterwards in DoPhysicsPropertyUpdate() 2011-10-15 02:12:46 +01:00
Justin Clark-Casey (justincc)
732e937379 refactor: Remove redundant code in SOP.UpdatePrimFlags() 2011-10-15 02:07:05 +01:00
Justin Clark-Casey (justincc)
c93c9ea072 factor common code out into SOP.RemoveFromPhysics() 2011-10-15 02:02:39 +01:00
Justin Clark-Casey (justincc)
978fb3d482 reduce access to ODECharacter methods to make code analysis easier. Eliminate redundant argument on ProcessTaints() 2011-10-15 01:41:39 +01:00
Justin Clark-Casey (justincc)
9cc2694776 restrict unnecessary access levels on ODEPrim fields/properties 2011-10-15 01:31:09 +01:00
Justin Clark-Casey (justincc)
f2132329a3 refactor: make methods that do not need to be public in ODE private or internal to aid code reading/analysis. Remove some unused method arguments 2011-10-15 01:20:40 +01:00
Justin Clark-Casey (justincc)
bea65b06a4 Add back the missing bin/addon-modules directory that I somehow managed to accidentally delete in 2fbc98f (Jul 7 2011) 2011-10-14 23:32:15 +01:00
Justin Clark-Casey (justincc)
03102864f0 change default ODE world_stepsize to 0.0178 from 0.02
This exactly fits five ODE steps in the default frame time (0.089).
This means that ODE execution time now matches the default minimum frame time.
This eliminates errors between distance travelled as calculated by ODE in clear air and simple extrapolation.
On the old values, ODE would actually do calculations over 0.1 seconds rather than 0.089.
This means that once the avatar is at top speed, no additional packets need to be sent for smooth movement, since no error develops between server and viewer.
This approach replaces the tweaks previously discussed on the opensim-dev mailing list
2011-10-14 21:11:00 +01:00
Justin Clark-Casey (justincc)
4bfc2f5cde Change hardcoded ODE total frame time to match the default total frame time (0.09375 -> 0.089).
No apparant ill effects - because the default stepsize is 0.2, there are still 5 physics steps per physics frame.
This is a precursor to using the elapsed value passed in (and now changeable in config).
2011-10-14 21:07:57 +01:00
Diva Canto
83c7b9b609 Bug fix -- Test User on first run standalone might not be created properly: let all instances of UserAccountService have all its service references properly initialized, and register console commands on only one. 2011-10-13 18:03:19 -07:00
Justin Clark-Casey (justincc)
aa19ccf65c refactor: rename IClientAPI.SendPrimUpdate() to SendEntityUpdate() since it sends entity updates (including presence ones), not just prims. 2011-10-14 01:45:46 +01:00
Justin Clark-Casey (justincc)
77c65951e0 Extract NullPhysicsScene from PhysicsScene to improve code readability 2011-10-14 01:38:14 +01:00
Justin Clark-Casey (justincc)
ee84c0589c Don't execute rest of code in XEngine.RemoveRegion() and Close() if the module is disabled. 2011-10-14 01:06:43 +01:00
Justin Clark-Casey (justincc)
4e7d4330c2 Expose minimum frame time and update periods for experimentation.
Settings are at bottom of [Startup] in OpenSimDefaults.ini, override in OpenSim.ini to change
Defaults are the same as previously.
More information to come on opensim-dev shortly.
Feel free to tweak but if you do please don't expect any support unless feedback on certain tweaks is explicitly requested.
2011-10-13 23:47:37 +01:00
Justin Clark-Casey (justincc)
128d8dfd8b refactor: Put the frame update period when temporary objects are cleaned up in a field, like all the other update periods 2011-10-13 22:28:42 +01:00
Justin Clark-Casey (justincc)
fd274a6688 refactor: chain the two scene constructors together to eliminate more copypasta 2011-10-13 22:21:03 +01:00
Justin Clark-Casey (justincc)
a6fa15e8b6 Tie reported FPS correction factor into the minimum frame time rather than setting separately.
This makes reported FPS scale as required if min frame time changes
2011-10-13 22:07:55 +01:00
Justin Clark-Casey (justincc)
ceb326284e Move fps stat adjustment factor into field rather than hard-coded. 2011-10-13 21:55:51 +01:00
Justin Clark-Casey (justincc)
20da04fd0c More method doc and formatting changes. Makes DestroyOdeStructures() private 2011-10-13 21:42:24 +01:00
Justin Clark-Casey (justincc)
227db07f2f refactor: move 3x copy/pasted ode structure removal code in ODECharacter into a DestroyOdeStructures() method
also adds some method doc
2011-10-13 18:19:13 +01:00
Justin Clark-Casey (justincc)
f08664f422 remove some mono compiler warnings 2011-10-12 21:54:25 +01:00
Justin Clark-Casey (justincc)
631d5e16ef Get rid of some traces of the old pre-ROBUST grid architecture config 2011-10-12 21:51:34 +01:00
Justin Clark-Casey (justincc)
f5f7ca47ea Bring LindenUDP.Tests back from the dead. No tests are running.
Code drift means that most of this stuff doesn't compile but the structure is still useful.
2011-10-12 21:31:22 +01:00
Justin Clark-Casey (justincc)
ea7366ddc6 When shutting down XEngine, log how many scripts are being shutdown so the user knows why they are waiting. 2011-10-12 19:42:04 +01:00
Justin Clark-Casey (justincc)
c5826d589a minor: insert some commented out log lines which are a blunt but useful instrument to see packet expiry and received acks 2011-10-12 19:35:40 +01:00
Justin Clark-Casey (justincc)
36e73dbc9b Merge branch 'master' of ssh://opensimulator.org/var/git/opensim 2011-10-12 19:24:03 +01:00
Melanie Thielker
3e97b3ae33 Fix the XMREngine not starting scripts on region startup. Turns out it
was a dumb merge artefact that caused it.
2010-07-25 21:55:31 +02:00
Tom Grimshaw
8e137e31cd Fix the XmlRpcRouterModule so it reads from the correct config section ([XMLRPC] not [Startup]) and disable by default (since it's disabled in the ini by default) 2010-07-24 11:34:43 -07:00
Tom Grimshaw
81186e76b6 Add an m_enabled flag to XmlRpcRouterModule so it won't try to bind the xmlrpc_uri event if it's not mentioned in the ini. 2010-07-24 10:43:57 -07:00
Tom Grimshaw
3057974f31 Merge branch 'master' of ssh://3dhosting.de/var/git/careminster 2010-07-22 18:06:16 -07:00
Tom Grimshaw
bfd883f533 ... Then, make sure we also check the old-style module stack before we throw a tantrum 2010-07-22 18:05:56 -07:00
Tom Grimshaw
da5b7e199a First, change DefaultPermissionsModule so it returns the correct name... 2010-07-22 18:04:55 -07:00
Melanie Thielker
64cc76bd79 Fix up the name of the default permissions module to match it's config name 2010-07-23 01:32:29 +02:00
Tom Grimshaw
bf374705c6 Merge branch 'master' of ssh://3dhosting.de/var/git/careminster 2010-07-22 10:49:14 -07:00
Tom Grimshaw
9ce2f95f37 Add config option securePermissionsLoading which will stop the region from loading if the specified permissions modules fail to load. 2010-07-22 10:46:57 -07:00
Melanie Thielker
316854dc13 Allow megaregions to be used in M7, should we so decide 2010-07-21 19:25:40 +01:00
Melanie
9136e02ed3 Merge branch '0.6.9-post-fixes' into careminster 2010-07-21 19:24:18 +01:00
Melanie
1d6735f0ec Fix the XML serializationt to provide an empty script state element if
the script hasn't yet saved state, or can't save state because of a loop
2010-07-20 21:47:28 +01:00
Melanie
373ac90156 Allow Megaregions to start properly after an unclean shutdown 2010-07-17 07:19:58 +01:00
Melanie
6f591376dd Merge branch '0.6.9-post-fixes' into careminster 2010-07-17 03:09:27 +01:00
Justin Clark-Casey (justincc)
95d9c773d9 Stop occasional permanently high 100% utilization when the server is started with many scripts
See http://opensimulator.org/mantis/view.php?id=4799 for more details
This is the equivalent patch that was applied to master 3.5 weeks ago, seemingly without bad consequences
Thanks Snoopy!
2010-07-17 01:18:43 +01:00
Justin Clark-Casey (justincc)
4ae04dd0a8 extend exception catching for DoCreateChildAgentCall() from just WebException to Exception on feedback from Chris Hart.
See http://opensimulator.org/mantis/view.php?id=4810
2010-07-17 01:00:23 +01:00
unknown
61f9b3c2cf Bug in 0.6.9 sometimes restoring script state causes region console to crash due to unhandled file lock exception. Attempt to resolve by wrapping several instances of file create / read logic in using statements and added some error handling for locked file exceptions. If it is IDisposable, it must be disposed! The close statements are unnecessary but harmless so I have left those in. The end of the using block will close and dispose automagically. 2010-07-17 00:44:54 +01:00
Justin Clark-Casey (justincc)
b2ef5658b1 Merge branch '0.6.9-post-fixes' of ssh://opensimulator.org/var/git/opensim into 0.6.9-post-fixes 2010-07-13 23:36:56 +01:00
Justin Clark-Casey (justincc)
a7f0af41ab replace o with ; in oXmlRpcPort in OpenSim.ini.example
Thanks to Nebadon for the spot
2010-07-13 23:36:05 +01:00
dahlia
c7a2e1b2d4 llVecNorm() now returns a zero-length vector when one is supplied as input. Addresses Mantis #4752 2010-07-08 10:17:28 -07:00
dahlia
0116b80795 fix a potential division by zero 2010-07-08 10:14:02 -07:00
Melanie
d743a221e8 Fix scripts in rezzed objects not starting (Mantis #4775) 2010-06-30 21:27:55 +01:00
Justin Clark-Casey (justincc)
92edbd3e47 If an emergency pos is required for a new root agent, correctly preserve the z co-ord instead of accidentally resetting the incorrect x co-ord
This is a one-liner.  It has already been addressed in master and 0.7-post-fixes in a more extensive way
2010-06-30 21:23:57 +01:00
Justin Clark-Casey (justincc)
cabb70d90a Revert "stop exceptions in setting and getting state from propogating since they aren't fatal to operations"
This reverts commit ae24548216.

Reverted for now pending a fix to the underlying xengine problem instead.
2010-06-29 22:50:04 +01:00
Justin Clark-Casey (justincc)
ae24548216 stop exceptions in setting and getting state from propogating since they aren't fatal to operations
this will hopefully stop "save oar" from failing if a script asset is corrupt
2010-06-29 18:54:31 +01:00
Justin Clark-Casey (justincc)
85c20e1493 revert group membership checking to older code pending resolution of reported performance problems 2010-06-11 19:40:09 +01:00
Justin Clark-Casey (justincc)
821b8a5517 remove SimianGrid Groups OpenSim.ini.example stuff that accidentally crept in through a cherry-pick 2010-06-11 18:43:02 +01:00
Melanie
491d898db8 If a script is deleted before it gets compiled, don't even bother to try
compiling it
2010-06-09 03:52:59 +01:00
Justin Clark-Casey (justincc)
5f60eb136e Improve instructions for [Groups] setup in OpenSim.ini.example 2010-06-08 21:16:19 +01:00
Justin Clark-Casey (justincc)
8b3b89ecf4 backport xmlrpcgroups cache from master 2010-06-08 20:31:39 +01:00
Justin Clark-Casey (justincc)
0524458069 remove references to OpenSim.Framework.Commuications.Tests.dll since all relevant test code has been obsoleted
this allows the tests to pass on my local system
2010-06-08 16:10:40 +01:00
Justin Clark-Casey (justincc)
a160b44e07 Merge branch '0.6.9-post-fixes' into share-with-group 2010-06-08 15:50:21 +01:00
Justin Clark-Casey (justincc)
255e05beb5 minor: remove some commented out code and return ScenePresence.UpdatePriority() to private 2010-06-07 19:52:45 +01:00
Justin Clark-Casey (justincc)
912f0c7fde Stop some hud components disappearing on region crossings
If viewers (or at least, Linden Viewer 1.23.5) receive child hud object updates before the root prim, then the children are not displayed.
Updates were being queued in LLClientView in the right order (root first) but were being sent in a random order since they were all at the same prioritization
This commit prioritizes the root prim of a hud to its highest level when queued.
I'm not sure if the periodic reprioritization triggered via ScenePresence might reset this, but boosting priority appears to work so far.
Also committed is a belt and braces mechanism in LLClientView to prevent child hud prim being sent out before their root, but since this doesn't appear to be needed it is currently commented out.
2010-06-07 19:14:40 +01:00
Justin Clark-Casey (justincc)
693b5d0838 reapply fix for double sending of attachment update on standalone region crossing 2010-06-07 19:14:30 +01:00
Justin Clark-Casey (justincc)
50ddb20204 commit code which stops full updates being fired multiple times when attachments cross standalone region boundaries
lots of messy debug code here too which would need to be removed
2010-06-07 19:14:22 +01:00
Melanie
cc2622660b Merge branch '0.6.9-post-fixes' into careminster 2010-06-07 05:23:52 +01:00
Justin Clark-Casey (justincc)
bdeda18b52 Revert "commit code which stops full updates being fired multiple times when attachments cross standalone region boundaries"
This reverts commit 5074d290e4.

This gets rid of the massive amount of scene object log spam - sorry about that, folks
2010-06-04 18:54:58 +01:00
Justin Clark-Casey (justincc)
8eb70f9719 Fix bug where prim items were not loaded in the new sqlite database handler
This addresses mantis http://opensimulator.org/mantis/view.php?id=4739
2010-06-04 18:02:30 +01:00
Justin Clark-Casey (justincc)
2f6d401db1 Merge remote branch 'origin/0.6.9' into 0.6.9-post-fixes
This chiefly brings in the new sqlite adaptor and renames the old one to SQLiteLegacy
Existing configuratios should continue to work without changes unless you are using Mac OSX and mono 2.6 or later, in which case you will need to enable SQLiteLegacy instead.  Please se the instructions in OpenSim.ini.example and the relevant config/include .ini files

Conflicts:
	OpenSim/Framework/Servers/VersionInfo.cs
	OpenSim/Region/Framework/Scenes/Scene.Inventory.cs
2010-06-04 18:00:48 +01:00
Melanie
82d0d1c092 Revert "Next OSG test. Don't remove app domains if they contain running threads."
This reverts commit f831a1778b.

With this, post-fixes is back to normal.
2010-06-02 21:02:53 +01:00
Melanie
f831a1778b Next OSG test. Don't remove app domains if they contain running threads. 2010-06-02 19:57:03 +01:00
Melanie
20e6b7a320 Next OSG test. Cowardly refuse to save the state of badly behaved scripts, instead of forcing the issue. 2010-06-02 18:05:58 +01:00
Melanie
c38f7c96e7 Revert "Next OSG TEST RELEASE. Join aborted threads."
This reverts commit 698066d7e3.
2010-06-02 18:00:44 +01:00
Melanie
698066d7e3 Next OSG TEST RELEASE. Join aborted threads. 2010-06-02 17:41:28 +01:00
Melanie
c5cfae7bac Revert "After aborting a thread, wait for it to actually finish. EXPERIMENTAL for OSG"
This reverts commit 241ed5734e.
2010-06-02 17:39:58 +01:00
Melanie
241ed5734e After aborting a thread, wait for it to actually finish. EXPERIMENTAL for OSG
testing. DO NOT UPDATE TO THIS UNLESS YOU KNOW WHAT YOU'RE DOING!
2010-06-02 17:14:37 +01:00
Tom Grimshaw
0209033dd9 Gosh, fixing another nullref issue in cmGetAvatarList. I deserve spanks. 2010-06-01 13:22:24 -07:00
Melanie
f5ca701273 Comment and remove JScript support. Mono 2.7Dev and 2.8 no longer include the
needed libraries
2010-06-01 14:19:26 +01:00
Melanie
0526a91206 Merge branch '0.6.9-post-fixes' into careminster 2010-05-31 17:57:48 +01:00
Tom Grimshaw
4be13b1a42 Fix casting in llParcelMediaCommandList so that it actually, you know, works 2010-05-31 08:41:00 -07:00
Melanie Thielker
992efdc283 Fix a nullref in EventManager caused by RegionReady not setting the scene 2010-05-30 23:57:33 +01:00
Justin Clark-Casey (justincc)
c7d812802f Adjust Scene.DeleteAllSceneObjects() to not delete objects attached to avatars.
This is going to be the right behaviour in all cases, I should think.
This means that avatars in region when an oar is loaded do not lose their attachments
2010-05-28 18:52:30 +01:00
Justin Clark-Casey (justincc)
5074d290e4 commit code which stops full updates being fired multiple times when attachments cross standalone region boundaries
lots of messy debug code here too which would need to be removed
2010-05-27 21:35:17 +01:00
Justin Clark-Casey (justincc)
d6e1333810 If a transfer request is received for a task inventory item asset, then route the permissions request through the existing CanEditScript() and CanEditNotecard() methods.
This implements the 'share with group' flag for notecards and scripts in prim inventory since the PermissionsModule checks group membership and permissions.
Other than that, the code in PermissionsModule duplicates the checks in LLClientView so there should be no change other than allowing group members to edit embedded notecards and scripts.
For all other asset types, the permission checking code in LLClientView continues to be used, pending refactoring of suitable permissions code
This means that 'share with group' will not yet work for prim inventory items other than notecards and scripts
2010-05-26 21:12:56 +01:00
Justin Clark-Casey (justincc)
66a833796c check group membership and powers with the groups module rather than just the client's active group id
this resolves the earlier issue where notecards/scripts shared with group could only be edited if the user had that group active
2010-05-26 20:59:25 +01:00
Justin Clark-Casey (justincc)
32c43bf59a Partially implement share with group option for object inventory items
If serverside permissions are off then this works as expected.  Previously, it was impossible for more than one person to edit such items even if permissions were off.
If serverside permissions are on then this works as expected if the object was created by an avatar who had the required group active.
However, if the group for the object is later set then the contained item is still not editable.  This may be linked to a wider bug where the object is still not modifiable by the group anyway

Resolve conflict in LLClientView
2010-05-26 20:58:40 +01:00
Justin Clark-Casey (justincc)
a6c7995b71 backport from master fix for attachment display
this fix stops two full updates being sent on attachment rather than one.  Sending two can stop the client displaying attachments properly
2010-05-24 19:19:44 +01:00
Justin Clark-Casey (justincc)
8048a8a39d backport some IGroupsModule method doc and an extra exposed method from git master 2010-05-24 17:33:58 +01:00
Justin Clark-Casey (justincc)
2603f9a134 stop "load oar" reporting ignored objects when those objects were actually loaded just fine
this fix also means that loaded scripts are properly/more promptly started
here, the fix is only done in the oar module.  In master, the underlying problem was fixed instead but this is more invasive.
2010-05-24 16:53:43 +01:00
Justin Clark-Casey (justincc)
3bd2ec7b2e Apply http://opensimulator.org/mantis/view.php?id=4724
Tweak to update appearance calls
Fix for deleting inventory items from a folder.
Thanks StrawberryFride!
2010-05-21 22:40:15 +01:00
Justin Clark-Casey (justincc)
e589a31bc4 Only send dialogs and notices to root agents, not child agents
Small change for backport

Conflicts:

	OpenSim/Region/CoreModules/Avatar/Dialog/DialogModule.cs
2010-05-21 22:23:13 +01:00
Melanie
e4114799c3 Replace CSJ2K with fixed version (Mantis #3318) 2010-05-21 15:57:36 +01:00
Melanie
59546a348a Change the way the object perms are propagated to attempt to salvage
some older content
2010-05-21 15:57:16 +01:00
Justin Clark-Casey (justincc)
427ae1087f minor: correctly print out missing item id when it can't be found rather than a NullReferenceException 2010-05-20 23:44:49 +01:00
John Hurliman
1c63f6cd85 Don't append ACKs to zerocoded packets. Although this should fine in theory, I'm seeing the viewer ignore or fail to parse ACKs appended to our zerocoded packets. This should cut down on viewer->sim resend traffic 2010-05-20 23:38:38 +01:00
Justin Clark-Casey (justincc)
3b38cc10de When saving an oar/iar, don't attempt to write out the data byte array if it's empty
On Mono 2.6 (and probably before) this causes a non-obvious IOException
2010-05-20 23:35:36 +01:00
Justin Clark-Casey (justincc)
d446b19e72 minor: commented out code removal 2010-05-20 23:34:44 +01:00
Justin Clark-Casey (justincc)
e9bac02fec Completely prevent full update packets being sent after kill object packets
If a full update is sent after the kill, the object remains as in the linden viewer but in an undeletable and unowned state until relog
This patch prevents this by recording kills in LLClientView
Backport from master
2010-05-20 23:32:23 +01:00
Justin Clark-Casey (justincc)
8b5d012200 Completely prevent full update packets being sent after kill object packets
If a full update is sent after the kill, the object remains as in the linden viewer but in an undeletable and unowned state until relog
This patch prevents this by recording kills in LLClientView
2010-05-20 23:32:11 +01:00
Justin Clark-Casey (justincc)
fa8def5e70 minor: Print out port that http servers are using
do this in callers so that we know who is setting up these things
2010-05-20 23:17:56 +01:00
Justin Clark-Casey (justincc)
5fc990d9e7 put out full exception stack if something reaches top of base http server OnRequest() on both mono and .net
replace Newtonsoft.Json.XML since the updated copy got accidentally reverted by another commit
2010-05-20 23:12:02 +01:00
Justin Clark-Casey (justincc)
8d832e3231 Upgrade Newtonsoft.Json.dll from 1.3 to 3.5r6
Actually using the one built against Net 2.0 (labelled Newtonsoft.Json.Net20.dll) since the 3.5 build is not compatible with Mono 2.4 (though it is with Mono 2.6)
2010-05-20 23:02:11 +01:00
Justin Clark-Casey (justincc)
1ed7b591b2 automatically delete %temp% directory after running tests
this prevents a huge cruft buildup
2010-05-20 22:49:52 +01:00
Justin Clark-Casey (justincc)
76238715e3 move linden notecard parsing from LSL_Api.cs to SLUtil so that region modules can use it
backport from master
2010-05-20 22:43:05 +01:00
Justin Clark-Casey
009b15c436 Make "nant distbin" remove BUILDING.txt 2010-05-15 02:08:07 +01:00
Justin Clark-Casey (justincc)
dd1b99cd0d Address symptom of Mantis 4588 (though not the cause) by moving the avatar dereference inside the exception catch 2010-05-15 01:07:34 +01:00
Justin Clark-Casey (justincc)
25bb80da77 remove unrequired [Groups] section from GridCommon.ini.example, as per Nebadon 2010-05-15 00:33:05 +01:00
Justin Clark-Casey (justincc)
3a8128d309 Merge branch '0.6.9-post-fixes' of ssh://justincc@opensimulator.org/var/git/opensim into 0.6.9-post-fixes 2010-05-14 23:44:09 +01:00
unknown
2c8d25a110 * Allows both old and new OpenSim.ini params for the XmlRpc Groups Service Connector
* Fix problem with RequestingAgentID not being sent correctly to server resulting in failed xmlrpc calls

* Improved debug output
2010-05-14 23:40:40 +01:00
Justin Clark-Casey (justincc)
12ee3a3c93 change 0.6.9 flavour to post-fixes 2010-05-14 21:40:37 +01:00
Justin Clark-Casey (justincc)
e79eac238e switch 0.6.9 flavour to release 2010-05-14 21:30:53 +01:00
Justin Clark-Casey
2f6bb01370 Apply patch from http://opensimulator.org/mantis/bug_view_page.php?bug_id=4671
Fixes a bug where the viewer didn't recieve the uuid of a chat broadcasting object
Thanks crystalsgalicia!
2010-05-14 21:24:28 +01:00
Justin Clark-Casey
9209657f93 Apply patch from http://opensimulator.org/mantis/bug_view_page.php?bug_id=4671
Fixes a bug where the viewer didn't recieve the uuid of a chat broadcasting object
Thanks crystalsgalicia!
2010-05-14 21:22:53 +01:00
Melanie Thielker
547e027899 Fix linking issue introduced in my earlier commit 2010-05-14 20:57:43 +01:00
Justin Clark-Casey (justincc)
087f475893 Merge branch '0.6.9-post-fixes' into 0.6.9 2010-05-03 21:36:04 +01:00
Justin Clark-Casey (justincc)
a69cb5e390 Address symptom of Mantis 4588 (though not the cause) by moving the avatar dereference inside the exception catch 2010-05-03 21:34:38 +01:00
Justin Clark-Casey (justincc)
8938fac4fd add operation to "nant distbin" to copy StandaloneCommon.ini.example -> StandaloneCommon.ini 2010-04-30 22:36:26 +01:00
Justin Clark-Casey (justincc)
139f425f4c take out some more sqlite db console debug lines 2010-04-30 22:08:57 +01:00
Justin Clark-Casey (justincc)
8966ed9c82 fix an issue with user appearance where the new sqlite db adapter expects directly specification of byte[] type rather than base64 strings 2010-04-30 21:37:31 +01:00
Justin Clark-Casey (justincc)
0b8b302aa0 Fix a bunch of issues that crop up after the naive porting of the new sqlite db from master to 0.6.9 2010-04-30 20:05:57 +01:00
Justin Clark-Casey (justincc)
d8b604b550 take out some debug logging in the sqlite db adaptor 2010-04-30 19:29:24 +01:00
Justin Clark-Casey (justincc)
56fe4c24b8 rename SQLiteNG to SQLite and SQLite to SQLiteLegacy this seems the least evil way forward since mono 2.6 and later will see increasing usage, and this only works with what was
SQLiteNG MAC USERS WILL NEED TO CHANGE REFERENCES TO "OpenSim.Data.SQLite.dll" to "OpenSim.Data.SQLiteLegacy.dll" in OpenSim.ini and config-include/StandaloneCommon.ini (if
using standalone) See the OpenSim.ini.example and StandaloneCommon.ini.example files for more details This commit also temporarily changes unsigned ParentEstateID values in the
OpenSim.Data.Tests to signed temporarily, since the new plugin enforces creation of signed fields in the database (which is what the SQL actually specifies).  And change data
columns in sqlite is a pita.
2010-04-30 19:28:28 +01:00
Justin Clark-Casey (justincc)
955db6e4be add Mono.Data.Sqlite.dll 2010-04-30 19:12:47 +01:00
Justin Clark-Casey (justincc)
705b675d28 get region prim saving working properly in SQLiteNG
it wasn't working because of debug work that I'd forgotton to take out
2010-04-30 19:05:51 +01:00
Justin Clark-Casey (justincc)
b46380e373 dispose of the DbCommand used to execute migrations after we've finished with it rather than within the loop
disposing of it within the loop causes Mono.Data.Sqlite.dll to get upset, and it's the wrong behaviour anyway
2010-04-30 19:05:39 +01:00
Justin Clark-Casey
a90054aa16 put SQLiteNG classes in their own namespace to avoid confusion 2010-04-30 19:05:09 +01:00
Justin Clark-Casey (justincc)
362007e5d3 minor: correct the assembly information for SQLiteNG 2010-04-30 19:04:53 +01:00
Justin Clark-Casey (justincc)
7ce0ec874a Change SQLiteNG to work with mono 2.6 and above using the Mono.Data.Sqlite.dll
Include the library so that Windows builds correctly
It appears that Windows is okay with either SQLite or SQLiteNG
Incorporate the latest fixes made by Diva to OpenSim.Data.SQLite
2010-04-30 19:04:32 +01:00
Justin Clark-Casey (justincc)
959cd60225 Duplicate OpenSim.Data.SQLite into OpenSim.Data.SQLiteNG. SQLiteNG will shortly be changed to work under mono 2.6 and above 2010-04-30 18:59:10 +01:00
462 changed files with 31204 additions and 23508 deletions

18
.gitignore vendored
View File

@@ -73,4 +73,20 @@ TAGS
Makefile.local
bin/.version
compile.bat
addon-modules
OpenSim/Data/Tests/test-results/
OpenSim/Framework/Serialization/Tests/test-results/
OpenSim/Framework/Servers/Tests/test-results/
OpenSim/Framework/Tests/test-results/
OpenSim/Region/ClientStack/Linden/Caps/test-results/
OpenSim/Region/ClientStack/Linden/UDP/Tests/test-results/
OpenSim/Region/CoreModules/test-results/
OpenSim/Region/Framework/test-results/
OpenSim/Region/OptionalModules/test-results/
OpenSim/Region/Physics/BulletDotNETPlugin/
OpenSim/Region/Physics/Manager/test-results/
OpenSim/Region/Physics/OdePlugin/Tests/test-results/
OpenSim/Region/ScriptEngine/test-results/
OpenSim/Tests/Common/test-results/
OpenSim/Tests/test-results/
test-results/

View File

@@ -38,52 +38,8 @@
<include name=".hgignore"/>
</fileset>
</delete>
</target>
<!-- I don't think these targets are being actively used. But just in case, we'll just comment them out for now - justincc -->
<!--
<property name="projectdir" value="opensim-0.6.9" />
<target name="dist" depends="distdir">
<zip zipfile="${projectdir}.zip">
<fileset basedir=".">
<include name="${projectdir}/**" />
</fileset>
</zip>
<tar destfile="${projectdir}.tar.gz" compression="GZip">
<fileset basedir=".">
<include name="${projectdir}/**" />
</fileset>
</tar>
</target>
<target name="distdir">
<delete dir="${projectdir}" />
<copy todir="${projectdir}">
<fileset basedir=".">
<include name="ThirdPartyLicenses/**" />
<include name="CONTRIBUTORS.txt" />
<include name="README" />
<include name="OpenSim/**/*.cs" />
<include name="**/*.build" />
<include name="**/*.csproj" />
<include name="**/*.csproj.user" />
<include name="**/*.sln" />
<include name="bin/*.dll" />
<include name="bin/*.so" />
<include name="bin/*.config" />
<include name="bin/assets/**" />
<include name="bin/data/**" />
<include name="bin/OpenSim*xml" />
<include name="bin/OpenSim.ini" />
<include name="bin/defaultstripe.png" />
<exclude name="bin/OpenSim.*dll" />
</fileset>
</copy>
<touch file="${projectdir}/bin/startup_commands.txt" />
</target>
-->
<target name="test" depends="build, find-nunit">
<setenv name="MONO_THREADS_PER_CPU" value="100" />
@@ -112,12 +68,15 @@
</exec>
<fail message="Failures reported in unit tests." unless="${int::parse(testresult.opensim.framework.serialization.tests)==0}" />
<!--
<exec program="${nunitcmd}" failonerror="true" resultproperty="testresult.opensim.region.clientstack.lindencaps.tests">
<arg value="./bin/OpenSim.Region.ClientStack.LindenCaps.Tests.dll" />
</exec>
<fail message="Failures reported in unit tests." unless="${int::parse(testresult.opensim.region.clientstack.lindencaps.tests)==0}" />
<exec program="${nunitcmd}" failonerror="true" resultproperty="testresult.opensim.region.clientstack.lindenudp.tests">
<arg value="./bin/OpenSim.Region.ClientStack.LindenUDP.Tests.dll" />
</exec>
<fail message="Failures reported in unit tests." unless="${int::parse(testresult.opensim.region.clientstack.lindenudp.tests)==0}" />
-->
<exec program="${nunitcmd}" failonerror="true" resultproperty="testresult.opensim.region.scriptengine.tests">
<arg value="./bin/OpenSim.Region.ScriptEngine.Tests.dll" />
@@ -144,117 +103,23 @@
</exec>
<fail message="Failures reported in unit tests." unless="${int::parse(testresult.opensim.data.tests)==0}" />
<delete dir="%temp%"/>
<exec program="${nunitcmd}" failonerror="true" resultproperty="testresult.opensim.capabilities.handlers.tests">
<arg value="./bin/OpenSim.Capabilities.Handlers.Tests.dll" />
</exec>
<fail message="Failures reported in unit tests." unless="${int::parse(testresult.opensim.capabilities.handlers.tests)==0}" />
<delete dir="%temp%"/>
</target>
<target name="test-cov" depends="build">
<!-- Code Coverage Test. Prototype, only works with mono 1.2. Instructions in http://opensimulator.org/wiki/Automated_Testing -->
<mkdir dir="cov" failonerror="false" />
<exec program="mono">
<arg value="--debug" />
<arg value="--profile=monocov:outfile=./cov/OpenSim.Framework.Servers.cov,+[OpenSim.Framework.Servers]" />
<arg value="/usr/lib/nunit/nunit-console.exe" />
<arg value="./bin/OpenSim.Framework.Servers.Tests.dll" />
</exec>
<delete dir="./cov/OpenSim.Framework.Servers" />
<exec program="monocov">
<arg value="--export-html=./cov/OpenSim.Framework.Servers ./cov/OpenSim.Framework.Servers.cov" />
</exec>
<target name="torture" depends="build, find-nunit">
<setenv name="MONO_THREADS_PER_CPU" value="100" />
<!--
<exec program="mono">
<arg value="&#45;&#45;debug" />
<arg value="&#45;&#45;profile=monocov:outfile=./cov/OpenSim.Region.ClientStack.LindenUDP.cov,+[OpenSim.Region.ClientStack.LindenUDP]" />
<arg value="/usr/lib/nunit/nunit-console.exe" />
<arg value="./bin/OpenSim.Region.ClientStack.LindenUDP.Tests.dll" />
</exec>
<delete dir="./cov/OpenSim.Region.ClientStack.LindenUDP" />
<exec program="monocov">
<arg value="&#45;&#45;export-html=./cov/OpenSim.Region.ClientStack.LindenUDP ./cov/OpenSim.Region.ClientStack.LindenUDP.cov" />
</exec>
-->
<exec program="mono">
<arg value="--debug" />
<arg value="--profile=monocov:outfile=./cov/OpenSim.Region.ScriptEngine.Shared.cov,+[OpenSim.Region.ScriptEngine.Shared]" />
<arg value="/usr/lib/nunit/nunit-console.exe" />
<arg value="./bin/OpenSim.Region.ScriptEngine.Shared.Tests.dll" />
</exec>
<delete dir="./cov/OpenSim.Region.ScriptEngine.Shared" />
<exec program="monocov">
<arg value="--export-html=./cov/OpenSim.Region.ScriptEngine.Shared ./cov/OpenSim.Region.ScriptEngine.Shared.cov" />
</exec>
<exec program="mono">
<arg value="--debug" />
<arg value="--profile=monocov:outfile=./cov/OpenSim.Region.ScriptEngine.Shared.CodeTools.cov,+[OpenSim.Region.ScriptEngine.Shared.CodeTools]" />
<arg value="/usr/lib/nunit/nunit-console.exe" />
<arg value="./bin/OpenSim.Region.ScriptEngine.Shared.CodeTools.Tests.dll" />
</exec>
<delete dir="./cov/OpenSim.Region.ScriptEngine.Shared.CodeTools" />
<exec program="monocov">
<arg value="--export-html=./cov/OpenSim.Region.ScriptEngine.Shared.CodeTools ./cov/OpenSim.Region.ScriptEngine.Shared.CodeTools.cov" />
</exec>
<exec program="mono">
<arg value="--debug" />
<arg value="--profile=monocov:outfile=./cov/OpenSim.Region.CoreModules.cov,+[OpenSim.Region.CoreModules]" />
<arg value="/usr/lib/nunit/nunit-console.exe" />
<arg value="./bin/OpenSim.Region.CoreModules.Tests.dll" />
</exec>
<delete dir="./cov/OpenSim.Region.CoreModules" />
<exec program="monocov">
<arg value="--export-html=./cov/OpenSim.Region.CoreModules ./cov/OpenSim.Region.CoreModules.cov" />
</exec>
<exec program="mono">
<arg value="--debug" />
<arg value="--profile=monocov:outfile=./cov/OpenSim.Region.OptionalModules.cov,+[OpenSim.Region.OptionalModules]" />
<arg value="/usr/lib/nunit/nunit-console.exe" />
<arg value="./bin/OpenSim.Region.OptionalModules.Tests.dll" />
</exec>
<delete dir="./cov/OpenSim.Region.OptionalModules" />
<exec program="monocov">
<arg value="--export-html=./cov/OpenSim.Region.OptionalModules ./cov/OpenSim.Region.OptionalModules.cov" />
</exec>
<exec program="mono">
<arg value="--debug" />
<arg value="--profile=monocov:outfile=./cov/OpenSim.Region.Framework.cov,+[OpenSim.Region.Framework]" />
<arg value="/usr/lib/nunit/nunit-console.exe" />
<arg value="./bin/OpenSim.Region.Framework.Tests.dll" />
</exec>
<delete dir="./cov/OpenSim.Region.Framework" />
<exec program="monocov">
<arg value="--export-html=./cov/OpenSim.Region.Framework ./cov/OpenSim.Region.Framework.cov" />
</exec>
<exec program="mono">
<arg value="--debug" />
<arg value="--profile=monocov:outfile=./cov/OpenSim.Data.SQLite.cov,+[OpenSim.Data.SQLite]" />
<arg value="/usr/lib/nunit/nunit-console.exe" />
<arg value="./bin/OpenSim.Data.SQLite.Tests.dll" />
</exec>
<delete dir="./cov/OpenSim.Data.SQLite" />
<exec program="monocov">
<arg value="--export-html=./cov/OpenSim.Data.SQLite ./cov/OpenSim.Data.SQLite.cov" />
</exec>
<exec program="mono">
<arg value="--debug" />
<arg value="--profile=monocov:outfile=./cov/OpenSim.Data.MySQL.cov,+[OpenSim.Data.MySQL.Tests]" />
<arg value="/usr/lib/nunit/nunit-console.exe" />
<arg value="./bin/OpenSim.Data.MySQL.Tests.dll" />
</exec>
<delete dir="./cov/OpenSim.Data.MySQL" />
<exec program="monocov">
<arg value="--export-html=./cov/OpenSim.Data.MySQL ./cov/OpenSim.Data.MySQL.cov" />
</exec>
<delete file="C:\NUnitPrimaryTrace.txt" failonerror="false" />
<delete file="TestResult.xml" failonerror="false" />
<exec program="${nunitcmd}" failonerror="true" resultproperty="testresult.opensim.tests.torture">
<arg value="./bin/OpenSim.Tests.Torture.dll" />
</exec>
<fail message="Failures reported in unit tests." unless="${int::parse(testresult.opensim.tests.torture)==0}" />
<delete dir="%temp%"/>
</target>
<target name="find-nunit">
@@ -267,15 +132,12 @@
if="${int::parse(hasnunit2)==0}" />
<property name="nunitcmd" value="nunit-console"
if="${int::parse(hasnunit2)==1}" />
</target>
<!-- this is used for panda test execution -->
<!-- work in progress -->
<target name="test-xml" depends="build, find-nunit">
<mkdir dir="test-results" failonerror="false" />
<!-- Unit Test Assembly -->
<exec program="${nunitcmd}" failonerror="false" resultproperty="testresult.opensim.tests">
@@ -298,12 +160,15 @@
<arg value="-xml=test-results/OpenSim.Framework.Servers.Tests.dll-Results.xml" />
</exec>
<!--
<exec program="${nunitcmd}" failonerror="false" resultproperty="testresult.opensim.region.clientstack.lindencaps.tests">
<arg value="./bin/OpenSim.Region.ClientStack.LindenCaps.Tests.dll" />
<arg value="-xml=test-results/OpenSim.Region.ClientStack.LindenCaps.Tests.dll-Results.xml" />
</exec>
<exec program="${nunitcmd}" failonerror="false" resultproperty="testresult.opensim.region.clientstack.lindenudp.tests">
<arg value="./bin/OpenSim.Region.ClientStack.LindenUDP.Tests.dll" />
<arg value="-xml=test-results/OpenSim.Region.ClientStack.LindenUDP.Tests.dll-Results.xml" />
</exec>
-->
<exec program="${nunitcmd}" failonerror="false" resultproperty="testresult.opensim.region.scriptengine.tests">
<arg value="./bin/OpenSim.Region.ScriptEngine.Tests.dll" />
@@ -330,45 +195,22 @@
<arg value="-xml=test-results/OpenSim.Data.Tests.dll-Results.xml" />
</exec>
<exec program="${nunitcmd}" failonerror="false" resultproperty="testresult.opensim.capabilities.handlers.tests">
<arg value="./bin/OpenSim.Capabilities.Handlers.Tests.dll" />
<arg value="-xml=test-results/OpenSim.Capabilities.Handlers.Tests.dll-Results.xml" />
</exec>
<fail message="Failures reported in unit tests." unless="${int::parse(testresult.opensim.tests)==0}" />
<fail message="Failures reported in unit tests." unless="${int::parse(testresult.opensim.framework.tests)==0}" />
<fail message="Failures reported in unit tests." unless="${int::parse(testresult.opensim.framework.servers.tests)==0}" />
<!-- <fail message="Failures reported in unit tests." unless="${int::parse(testresult.opensim.region.clientstack.lindenudp.tests)==0}" /> -->
<fail message="Failures reported in unit tests." unless="${int::parse(testresult.opensim.region.clientstack.lindenudp.tests)==0}" />
<fail message="Failures reported in unit tests." unless="${int::parse(testresult.opensim.region.scriptengine.tests)==0}" />
<fail message="Failures reported in unit tests." unless="${int::parse(testresult.opensim.region.coremodules.tests)==0}" />
<fail message="Failures reported in unit tests." unless="${int::parse(testresult.opensim.region.optionalmodules.tests)==0}" />
<fail message="Failures reported in unit tests." unless="${int::parse(testresult.opensim.region.framework.tests)==0}" />
<fail message="Failures reported in unit tests." unless="${int::parse(testresult.opensim.data.tests)==0}" />
<fail message="Failures reported in unit tests." unless="${int::parse(testresult.opensim.capabilities.handlers.tests)==0}" />
</target>
<!-- <exec program="nunit-console.exe" failonerror="false" resultproperty="testresult.acceptancetestassembly"> -->
<!-- <arg value="AcceptanceTestAssembly.dll" /> -->
<!-- <arg value="/xml=AcceptanceTestAssembly-Results.xml" /> -->
<!-- </exec> -->
<!-- <fail message="Failures reported in unit tests." unless="${int::parse(testresult.unittestassembly)==0}" /> -->
<!-- <fail message="Failures reported in acceptance tests." unless="${int::parse(testresult.acceptancetestassembly)==0}" /> -->
<!-- </target> -->
<!-- <nunit2 failonerror="true" verbose="true"> -->
<!-- <formatter type="Xml" usefile="true" extension=".xml" outputdir="./test-results" /> -->
<!-- <test> -->
<!-- <assemblies> -->
<!-- <include name="./bin/OpenSim.Framework.Tests.dll" /> -->
<!-- <include name="./bin/OpenSim.Framework.Servers.Tests.dll" /> -->
<!-- <include name="./bin/OpenSim.Region.ClientStack.LindenUDP.Tests.dll" /> -->
<!-- <include name="./bin/OpenSim.Region.ScriptEngine.Tests.dll" /> -->
<!-- <include name="./bin/OpenSim.Region.CoreModules.Tests.dll" /> -->
<!-- <include name="./bin/OpenSim.Region.OptionalModules.Tests.dll" /> -->
<!-- <include name="./bin/OpenSim.Region.Framework.Tests.dll" /> -->
<!-- <include name="./bin/OpenSim.Data.SQLite.Tests.dll" /> -->
<!-- <include name="./bin/OpenSim.Data.MySQL.Tests.dll" /> -->
<!-- </assemblies> -->
<!-- </test> -->
<!-- </nunit2> -->
<!-- </target> -->
<target name="doxygen">
<exec program="doxygen" workingdir="doc" commandline="doxygen.conf" />

View File

@@ -12,18 +12,27 @@ Steps:
=== Building on Linux ===
Prereqs:
* Mono >= 2.4.2
* Mono >= 2.4.3
* Nant >= 0.85
* On some Linux distributions you may need to install additional packages.
See http://opensimulator.org/wiki/Dependencies for more information.
* May also use xbuild (included in mono distributions)
* May use Monodevelop, a cross-platform IDE
From the distribution type:
* ./runprebuild.sh
* nant
* nant (or xbuild)
* cd bin
* copy OpenSim.ini.example to OpenSim.ini and other appropriate files in bin/config-include
* run mono OpenSim.exe
=== Using Monodevelop ===
From the distribution type:
* ./runprebuild.sh
* type monodevelop OpenSim.sln
=== References ===
Helpful resources:

View File

@@ -14,6 +14,7 @@ people that make the day to day of OpenSim happen.
* Marck
* Mic Bowman (Intel)
* BlueWall (James Hughes)
* Nebadon Izumi (Michael Cerquoni, OSgrid)
* Snoopy Pfeffer
* Richard Adams (Intel)
@@ -79,9 +80,11 @@ what it is today.
* dmiles (Daxtron Labs)
* dslake (Intel)
* FredoChaplin
* Garmin Kawaguichi
* Gerhard
* Godfrey
* Grumly57
* GuduleLapointe
* Ewe Loon
* Fly-Man
* Flyte Xevious
@@ -102,6 +105,7 @@ what it is today.
* lulurun
* M.Igarashi
* maimedleech
* Mana Janus
* Mic Bowman
* Michelle Argus
* Michael Cortez (The Flotsam Project, http://osflotsam.org/)
@@ -133,6 +137,7 @@ what it is today.
* Salahzar Stenvaag
* sempuki
* SignpostMarv
* SpotOn3D
* Strawberry Fride
* tglion
* tlaukkan/Tommil (Tommi S. E. Laukkanen, Bubble Cloud)

View File

@@ -30,6 +30,7 @@ using System.Collections.Generic;
using System.Reflection;
using System.Threading;
using log4net;
using OpenMetaverse;
using OpenSim.Framework;
using OpenSim.Framework.RegionLoader.Filesystem;
using OpenSim.Framework.RegionLoader.Web;
@@ -152,9 +153,20 @@ namespace OpenSim.ApplicationPlugins.LoadRegions
/// <returns>True if we're sane, false if we're insane</returns>
private bool CheckRegionsForSanity(RegionInfo[] regions)
{
if (regions.Length <= 1)
if (regions.Length == 0)
return true;
foreach (RegionInfo region in regions)
{
if (region.RegionID == UUID.Zero)
{
m_log.ErrorFormat(
"[LOAD REGIONS PLUGIN]: Region {0} has invalid UUID {1}",
region.RegionName, region.RegionID);
return false;
}
}
for (int i = 0; i < regions.Length - 1; i++)
{
for (int j = i + 1; j < regions.Length; j++)

View File

@@ -148,7 +148,7 @@ namespace OpenSim.ApplicationPlugins.Rest.Inventory.Tests
Rest.main.SceneManager.ForEachScene(delegate(Scene s)
{
s.ForEachScenePresence(delegate(ScenePresence sp)
s.ForEachRootScenePresence(delegate(ScenePresence sp)
{
if (sp.Firstname == names[0] && sp.Lastname == names[1])
{

View File

@@ -41,7 +41,7 @@ namespace OpenSim.ApplicationPlugins.Rest.Regions
{
#region GET methods
public string GetHandler(string request, string path, string param,
OSHttpRequest httpRequest, OSHttpResponse httpResponse)
IOSHttpRequest httpRequest, IOSHttpResponse httpResponse)
{
// foreach (string h in httpRequest.Headers.AllKeys)
// foreach (string v in httpRequest.Headers.GetValues(h))
@@ -64,7 +64,7 @@ namespace OpenSim.ApplicationPlugins.Rest.Regions
}
}
public string GetHandlerRegions(OSHttpResponse httpResponse)
public string GetHandlerRegions(IOSHttpResponse httpResponse)
{
RestXmlWriter rxw = new RestXmlWriter(new StringWriter());
@@ -95,7 +95,7 @@ namespace OpenSim.ApplicationPlugins.Rest.Regions
return rxw.ToString();
}
public string GetHandlerRegion(OSHttpResponse httpResponse, string param)
public string GetHandlerRegion(IOSHttpResponse httpResponse, string param)
{
// be resilient and don't get confused by a terminating '/'
param = param.TrimEnd(new char[]{'/'});
@@ -180,7 +180,7 @@ namespace OpenSim.ApplicationPlugins.Rest.Regions
}
#endregion GET methods
protected string RegionTerrain(OSHttpResponse httpResponse, Scene scene)
protected string RegionTerrain(IOSHttpResponse httpResponse, Scene scene)
{
httpResponse.SendChunked = true;
httpResponse.ContentType = "text/xml";
@@ -190,7 +190,7 @@ namespace OpenSim.ApplicationPlugins.Rest.Regions
// "GET", "terrain not implemented");
}
protected string RegionStats(OSHttpResponse httpResponse, Scene scene)
protected string RegionStats(IOSHttpResponse httpResponse, Scene scene)
{
int users = scene.GetRootAgentCount();
int objects = scene.Entities.Count - users;
@@ -213,7 +213,7 @@ namespace OpenSim.ApplicationPlugins.Rest.Regions
return rxw.ToString();
}
protected string RegionPrims(OSHttpResponse httpResponse, Scene scene, Vector3 min, Vector3 max)
protected string RegionPrims(IOSHttpResponse httpResponse, Scene scene, Vector3 min, Vector3 max)
{
httpResponse.SendChunked = true;
httpResponse.ContentType = "text/xml";

View File

@@ -40,7 +40,7 @@ namespace OpenSim.ApplicationPlugins.Rest.Regions
{
#region GET methods
public string GetRegionInfoHandler(string request, string path, string param,
OSHttpRequest httpRequest, OSHttpResponse httpResponse)
IOSHttpRequest httpRequest, IOSHttpResponse httpResponse)
{
// foreach (string h in httpRequest.Headers.AllKeys)
// foreach (string v in httpRequest.Headers.GetValues(h))
@@ -64,7 +64,7 @@ namespace OpenSim.ApplicationPlugins.Rest.Regions
}
}
public string GetRegionInfoHandlerRegions(OSHttpResponse httpResponse)
public string GetRegionInfoHandlerRegions(IOSHttpResponse httpResponse)
{
RestXmlWriter rxw = new RestXmlWriter(new StringWriter());

View File

@@ -40,7 +40,7 @@ namespace OpenSim.ApplicationPlugins.Rest.Regions
#region POST methods
public string PostHandler(string request, string path, string param,
OSHttpRequest httpRequest, OSHttpResponse httpResponse)
IOSHttpRequest httpRequest, IOSHttpResponse httpResponse)
{
// foreach (string h in httpRequest.Headers.AllKeys)
// foreach (string v in httpRequest.Headers.GetValues(h))
@@ -92,7 +92,7 @@ namespace OpenSim.ApplicationPlugins.Rest.Regions
}
}
public string CreateRegion(OSHttpRequest request, OSHttpResponse response)
public string CreateRegion(IOSHttpRequest request, IOSHttpResponse response)
{
RestXmlWriter rxw = new RestXmlWriter(new StringWriter());
@@ -108,7 +108,7 @@ namespace OpenSim.ApplicationPlugins.Rest.Regions
return rxw.ToString();
}
public string LoadPrims(string requestBody, OSHttpRequest request, OSHttpResponse response, Scene scene)
public string LoadPrims(string requestBody, IOSHttpRequest request, IOSHttpResponse response, Scene scene)
{
IRegionSerialiserModule serialiser = scene.RequestModuleInterface<IRegionSerialiserModule>();
if (serialiser != null)

View File

@@ -328,7 +328,7 @@ namespace OpenSim.ApplicationPlugins.Rest
/// </summary>
/// <param name="request">HTTP request header</param>
/// <returns>true when the HTTP request came from god.</returns>
protected bool IsGod(OSHttpRequest request)
protected bool IsGod(IOSHttpRequest request)
{
string[] keys = request.Headers.GetValues("X-OpenSim-Godkey");
if (null == keys) return false;
@@ -342,7 +342,7 @@ namespace OpenSim.ApplicationPlugins.Rest
/// HTTP header is indeed the password on file for the avatar
/// specified by the UUID
/// </summary>
protected bool IsVerifiedUser(OSHttpRequest request, UUID uuid)
protected bool IsVerifiedUser(IOSHttpRequest request, UUID uuid)
{
// XXX under construction
return false;
@@ -377,7 +377,7 @@ namespace OpenSim.ApplicationPlugins.Rest
/// <param name="message">failure message</param>
/// <remarks>This should probably set a return code as
/// well. (?)</remarks>
protected string Failure(OSHttpResponse response, OSHttpStatusCode status,
protected string Failure(IOSHttpResponse response, OSHttpStatusCode status,
string method, string format, params string[] msg)
{
string m = String.Format(format, msg);
@@ -396,7 +396,7 @@ namespace OpenSim.ApplicationPlugins.Rest
/// <param name="e">exception causing the failure message</param>
/// <remarks>This should probably set a return code as
/// well. (?)</remarks>
public string Failure(OSHttpResponse response, OSHttpStatusCode status,
public string Failure(IOSHttpResponse response, OSHttpStatusCode status,
string method, Exception e)
{
string m = String.Format("exception occurred: {0}", e.Message);

View File

@@ -98,14 +98,17 @@ namespace OpenSim.Framework.Capabilities
{
get { return m_httpListener.UseSSL; }
}
public string SSLCommonName
{
get { return m_httpListener.SSLCommonName; }
}
public CapsHandlers CapsHandlers
{
get { return m_capsHandlers; }
}
public Dictionary<string, string> ExternalCapsHandlers
{
get { return m_externalCapsHandlers; }
@@ -157,11 +160,7 @@ namespace OpenSim.Framework.Capabilities
/// <summary>
/// Remove all CAPS service handlers.
///
/// </summary>
/// <param name="httpListener"></param>
/// <param name="path"></param>
/// <param name="restMethod"></param>
public void DeregisterHandlers()
{
if (m_capsHandlers != null)

View File

@@ -51,11 +51,10 @@ namespace OpenSim.Framework.Capabilities
/// supplied BaseHttpServer.
/// </summary>
/// <param name="httpListener">base HTTP server</param>
/// <param name="httpListenerHostname">host name of the HTTP
/// server</param>
/// <param name="httpListenerHostname">host name of the HTTP server</param>
/// <param name="httpListenerPort">HTTP port</param>
public CapsHandlers(BaseHttpServer httpListener, string httpListenerHostname, uint httpListenerPort)
: this (httpListener,httpListenerHostname,httpListenerPort, false)
: this(httpListener,httpListenerHostname,httpListenerPort, false)
{
}
@@ -88,44 +87,52 @@ namespace OpenSim.Framework.Capabilities
/// handler to be removed</param>
public void Remove(string capsName)
{
m_httpListener.RemoveStreamHandler("POST", m_capsHandlers[capsName].Path);
m_httpListener.RemoveStreamHandler("GET", m_capsHandlers[capsName].Path);
m_capsHandlers.Remove(capsName);
lock (m_capsHandlers)
{
m_httpListener.RemoveStreamHandler("POST", m_capsHandlers[capsName].Path);
m_httpListener.RemoveStreamHandler("GET", m_capsHandlers[capsName].Path);
m_capsHandlers.Remove(capsName);
}
}
public bool ContainsCap(string cap)
{
return m_capsHandlers.ContainsKey(cap);
lock (m_capsHandlers)
return m_capsHandlers.ContainsKey(cap);
}
/// <summary>
/// The indexer allows us to treat the CapsHandlers object
/// in an intuitive dictionary like way.
/// </summary>
/// <Remarks>
/// <remarks>
/// The indexer will throw an exception when you try to
/// retrieve a cap handler for a cap that is not contained in
/// CapsHandlers.
/// </Remarks>
/// </remarks>
public IRequestHandler this[string idx]
{
get
{
return m_capsHandlers[idx];
lock (m_capsHandlers)
return m_capsHandlers[idx];
}
set
{
if (m_capsHandlers.ContainsKey(idx))
lock (m_capsHandlers)
{
m_httpListener.RemoveStreamHandler("POST", m_capsHandlers[idx].Path);
m_capsHandlers.Remove(idx);
if (m_capsHandlers.ContainsKey(idx))
{
m_httpListener.RemoveStreamHandler("POST", m_capsHandlers[idx].Path);
m_capsHandlers.Remove(idx);
}
if (null == value) return;
m_capsHandlers[idx] = value;
m_httpListener.AddStreamHandler(value);
}
if (null == value) return;
m_capsHandlers[idx] = value;
m_httpListener.AddStreamHandler(value);
}
}
@@ -137,9 +144,12 @@ namespace OpenSim.Framework.Capabilities
{
get
{
string[] __keys = new string[m_capsHandlers.Keys.Count];
m_capsHandlers.Keys.CopyTo(__keys, 0);
return __keys;
lock (m_capsHandlers)
{
string[] __keys = new string[m_capsHandlers.Keys.Count];
m_capsHandlers.Keys.CopyTo(__keys, 0);
return __keys;
}
}
}
@@ -147,25 +157,29 @@ namespace OpenSim.Framework.Capabilities
/// Return an LLSD-serializable Hashtable describing the
/// capabilities and their handler details.
/// </summary>
public Hashtable CapsDetails
/// <param name="excludeSeed">If true, then exclude the seed cap.</param>
public Hashtable GetCapsDetails(bool excludeSeed)
{
get
{
Hashtable caps = new Hashtable();
string protocol = "http://";
if (m_useSSL)
protocol = "https://";
Hashtable caps = new Hashtable();
string protocol = "http://";
if (m_useSSL)
protocol = "https://";
string baseUrl = protocol + m_httpListenerHostName + ":" + m_httpListenerPort.ToString();
string baseUrl = protocol + m_httpListenerHostName + ":" + m_httpListenerPort.ToString();
lock (m_capsHandlers)
{
foreach (string capsName in m_capsHandlers.Keys)
{
// skip SEED cap
if ("SEED" == capsName) continue;
if (excludeSeed && "SEED" == capsName)
continue;
caps[capsName] = baseUrl + m_capsHandlers[capsName].Path;
}
return caps;
}
return caps;
}
}
}
}

View File

@@ -0,0 +1,148 @@
/*
* Copyright (c) Contributors, http://opensimulator.org/
* See CONTRIBUTORS.TXT for a full list of copyright holders.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions are met:
* * Redistributions of source code must retain the above copyright
* notice, this list of conditions and the following disclaimer.
* * Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in the
* documentation and/or other materials provided with the distribution.
* * Neither the name of the OpenSimulator Project nor the
* names of its contributors may be used to endorse or promote products
* derived from this software without specific prior written permission.
*
* THIS SOFTWARE IS PROVIDED BY THE DEVELOPERS ``AS IS'' AND ANY
* EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
* WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
* DISCLAIMED. IN NO EVENT SHALL THE CONTRIBUTORS BE LIABLE FOR ANY
* DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
* (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
* LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
* ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
using System;
using System.Collections;
using System.Collections.Generic;
using System.Reflection;
using log4net;
using Nini.Config;
using OpenMetaverse;
using OpenMetaverse.StructuredData;
using OpenSim.Framework;
using OpenSim.Framework.Capabilities;
using OpenSim.Region.Framework.Interfaces;
using OpenSim.Framework.Servers.HttpServer;
using OpenSim.Services.Interfaces;
using Caps = OpenSim.Framework.Capabilities.Caps;
using OSDArray = OpenMetaverse.StructuredData.OSDArray;
using OSDMap = OpenMetaverse.StructuredData.OSDMap;
namespace OpenSim.Capabilities.Handlers
{
public class FetchInventory2Handler
{
private static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType);
private IInventoryService m_inventoryService;
public FetchInventory2Handler(IInventoryService invService)
{
m_inventoryService = invService;
}
public string FetchInventoryRequest(string request, string path, string param, IOSHttpRequest httpRequest, IOSHttpResponse httpResponse)
{
// m_log.DebugFormat("[FETCH INVENTORY HANDLER]: Received FetchInventory capabilty request");
OSDMap requestmap = (OSDMap)OSDParser.DeserializeLLSDXml(Utils.StringToBytes(request));
OSDArray itemsRequested = (OSDArray)requestmap["items"];
string reply;
LLSDFetchInventory llsdReply = new LLSDFetchInventory();
foreach (OSDMap osdItemId in itemsRequested)
{
UUID itemId = osdItemId["item_id"].AsUUID();
InventoryItemBase item = m_inventoryService.GetItem(new InventoryItemBase(itemId));
if (item != null)
{
// We don't know the agent that this request belongs to so we'll use the agent id of the item
// which will be the same for all items.
llsdReply.agent_id = item.Owner;
llsdReply.items.Array.Add(ConvertInventoryItem(item));
}
}
reply = LLSDHelpers.SerialiseLLSDReply(llsdReply);
return reply;
}
/// <summary>
/// Convert an internal inventory item object into an LLSD object.
/// </summary>
/// <param name="invItem"></param>
/// <returns></returns>
private LLSDInventoryItem ConvertInventoryItem(InventoryItemBase invItem)
{
LLSDInventoryItem llsdItem = new LLSDInventoryItem();
llsdItem.asset_id = invItem.AssetID;
llsdItem.created_at = invItem.CreationDate;
llsdItem.desc = invItem.Description;
llsdItem.flags = (int)invItem.Flags;
llsdItem.item_id = invItem.ID;
llsdItem.name = invItem.Name;
llsdItem.parent_id = invItem.Folder;
try
{
llsdItem.type = Utils.AssetTypeToString((AssetType)invItem.AssetType);
llsdItem.inv_type = Utils.InventoryTypeToString((InventoryType)invItem.InvType);
}
catch (Exception e)
{
m_log.ErrorFormat(
"[WEB FETCH INV DESC HANDLER]: Problem setting asset {0} inventory {1} types while converting inventory item {2}: {3}",
invItem.AssetType, invItem.InvType, invItem.Name, e.Message);
}
llsdItem.permissions = new LLSDPermissions();
llsdItem.permissions.creator_id = invItem.CreatorIdAsUuid;
llsdItem.permissions.base_mask = (int)invItem.CurrentPermissions;
llsdItem.permissions.everyone_mask = (int)invItem.EveryOnePermissions;
llsdItem.permissions.group_id = invItem.GroupID;
llsdItem.permissions.group_mask = (int)invItem.GroupPermissions;
llsdItem.permissions.is_owner_group = invItem.GroupOwned;
llsdItem.permissions.next_owner_mask = (int)invItem.NextPermissions;
llsdItem.permissions.owner_id = invItem.Owner;
llsdItem.permissions.owner_mask = (int)invItem.CurrentPermissions;
llsdItem.sale_info = new LLSDSaleInfo();
llsdItem.sale_info.sale_price = invItem.SalePrice;
switch (invItem.SaleType)
{
default:
llsdItem.sale_info.sale_type = "not";
break;
case 1:
llsdItem.sale_info.sale_type = "original";
break;
case 2:
llsdItem.sale_info.sale_type = "copy";
break;
case 3:
llsdItem.sale_info.sale_type = "contents";
break;
}
return llsdItem;
}
}
}

View File

@@ -0,0 +1,70 @@
/*
* Copyright (c) Contributors, http://opensimulator.org/
* See CONTRIBUTORS.TXT for a full list of copyright holders.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions are met:
* * Redistributions of source code must retain the above copyright
* notice, this list of conditions and the following disclaimer.
* * Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in the
* documentation and/or other materials provided with the distribution.
* * Neither the name of the OpenSimulator Project nor the
* names of its contributors may be used to endorse or promote products
* derived from this software without specific prior written permission.
*
* THIS SOFTWARE IS PROVIDED BY THE DEVELOPERS ``AS IS'' AND ANY
* EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
* WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
* DISCLAIMED. IN NO EVENT SHALL THE CONTRIBUTORS BE LIABLE FOR ANY
* DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
* (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
* LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
* ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
using System;
using Nini.Config;
using OpenSim.Server.Base;
using OpenSim.Services.Interfaces;
using OpenSim.Framework.Servers.HttpServer;
using OpenSim.Server.Handlers.Base;
using OpenMetaverse;
namespace OpenSim.Capabilities.Handlers
{
public class FetchInventory2ServerConnector : ServiceConnector
{
private IInventoryService m_InventoryService;
private string m_ConfigName = "CapsService";
public FetchInventory2ServerConnector(IConfigSource config, IHttpServer server, string configName)
: base(config, server, configName)
{
if (configName != String.Empty)
m_ConfigName = configName;
IConfig serverConfig = config.Configs[m_ConfigName];
if (serverConfig == null)
throw new Exception(String.Format("No section '{0}' in config file", m_ConfigName));
string invService = serverConfig.GetString("InventoryService", String.Empty);
if (invService == String.Empty)
throw new Exception("No InventoryService in config file");
Object[] args = new Object[] { config };
m_InventoryService = ServerUtils.LoadPlugin<IInventoryService>(invService, args);
if (m_InventoryService == null)
throw new Exception(String.Format("Failed to load InventoryService from {0}; config is {1}", invService, m_ConfigName));
FetchInventory2Handler fiHandler = new FetchInventory2Handler(m_InventoryService);
IRequestHandler reqHandler
= new RestStreamHandler("POST", "/CAPS/FetchInventory/", fiHandler.FetchInventoryRequest);
server.AddStreamHandler(reqHandler);
}
}
}

View File

@@ -64,7 +64,7 @@ namespace OpenSim.Capabilities.Handlers
m_assetService = assService;
}
public override byte[] Handle(string path, Stream request, OSHttpRequest httpRequest, OSHttpResponse httpResponse)
public override byte[] Handle(string path, Stream request, IOSHttpRequest httpRequest, IOSHttpResponse httpResponse)
{
// Try to parse the texture ID from the request URL
NameValueCollection query = HttpUtility.ParseQueryString(httpRequest.Url.Query);
@@ -111,6 +111,10 @@ namespace OpenSim.Capabilities.Handlers
m_log.Warn("[GETTEXTURE]: Failed to parse a texture_id from GetTexture request: " + httpRequest.Url);
}
// m_log.DebugFormat(
// "[GETTEXTURE]: For texture {0} sending back response {1}, data length {2}",
// textureID, httpResponse.StatusCode, httpResponse.ContentLength);
httpResponse.Send();
return null;
}
@@ -123,7 +127,7 @@ namespace OpenSim.Capabilities.Handlers
/// <param name="textureID"></param>
/// <param name="format"></param>
/// <returns>False for "caller try another codec"; true otherwise</returns>
private bool FetchTexture(OSHttpRequest httpRequest, OSHttpResponse httpResponse, UUID textureID, string format)
private bool FetchTexture(IOSHttpRequest httpRequest, IOSHttpResponse httpResponse, UUID textureID, string format)
{
// m_log.DebugFormat("[GETTEXTURE]: {0} with requested format {1}", textureID, format);
AssetBase texture;
@@ -207,38 +211,43 @@ namespace OpenSim.Capabilities.Handlers
return true;
}
private void WriteTextureData(OSHttpRequest request, OSHttpResponse response, AssetBase texture, string format)
private void WriteTextureData(IOSHttpRequest request, IOSHttpResponse response, AssetBase texture, string format)
{
string range = request.Headers.GetOne("Range");
//m_log.DebugFormat("[GETTEXTURE]: Range {0}", range);
if (!String.IsNullOrEmpty(range)) // JP2's only
{
// Range request
int start, end;
if (TryParseRange(range, out start, out end))
{
// Before clamping start make sure we can satisfy it in order to avoid
// sending back the last byte instead of an error status
if (start >= texture.Data.Length)
{
response.StatusCode = (int)System.Net.HttpStatusCode.RequestedRangeNotSatisfiable;
return;
}
else
{
end = Utils.Clamp(end, 0, texture.Data.Length - 1);
start = Utils.Clamp(start, 0, end);
int len = end - start + 1;
end = Utils.Clamp(end, 0, texture.Data.Length - 1);
start = Utils.Clamp(start, 0, end);
int len = end - start + 1;
//m_log.Debug("Serving " + start + " to " + end + " of " + texture.Data.Length + " bytes for texture " + texture.ID);
//m_log.Debug("Serving " + start + " to " + end + " of " + texture.Data.Length + " bytes for texture " + texture.ID);
if (len < texture.Data.Length)
// Always return PartialContent, even if the range covered the entire data length
// We were accidentally sending back 404 before in this situation
// https://issues.apache.org/bugzilla/show_bug.cgi?id=51878 supports sending 206 even if the
// entire range is requested, and viewer 3.2.2 (and very probably earlier) seems fine with this.
response.StatusCode = (int)System.Net.HttpStatusCode.PartialContent;
response.ContentLength = len;
response.ContentType = texture.Metadata.ContentType;
response.AddHeader("Content-Range", String.Format("bytes {0}-{1}/{2}", start, end, texture.Data.Length));
response.Body.Write(texture.Data, start, len);
response.ContentLength = len;
response.ContentType = texture.Metadata.ContentType;
response.AddHeader("Content-Range", String.Format("bytes {0}-{1}/{2}", start, end, texture.Data.Length));
response.Body.Write(texture.Data, start, len);
}
}
else
{
@@ -257,6 +266,15 @@ namespace OpenSim.Capabilities.Handlers
response.ContentType = "image/" + format;
response.Body.Write(texture.Data, 0, texture.Data.Length);
}
// if (response.StatusCode < 200 || response.StatusCode > 299)
// m_log.WarnFormat(
// "[GETTEXTURE]: For texture {0} requested range {1} responded {2} with content length {3} (actual {4})",
// texture.FullID, range, response.StatusCode, response.ContentLength, texture.Data.Length);
// else
// m_log.DebugFormat(
// "[GETTEXTURE]: For texture {0} requested range {1} responded {2} with content length {3} (actual {4})",
// texture.FullID, range, response.StatusCode, response.ContentLength, texture.Data.Length);
}
private bool TryParseRange(string header, out int start, out int end)
@@ -275,7 +293,6 @@ namespace OpenSim.Capabilities.Handlers
return false;
}
private byte[] ConvertTextureData(AssetBase texture, string format)
{
m_log.DebugFormat("[GETTEXTURE]: Converting texture {0} to {1}", texture.ID, format);
@@ -350,7 +367,5 @@ namespace OpenSim.Capabilities.Handlers
}
return null;
}
}
}
}

View File

@@ -25,48 +25,39 @@
* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
using System;
using System.Collections.Generic;
using OpenMetaverse.Packets;
using System.Net;
using log4net;
using log4net.Config;
using NUnit.Framework;
using OpenMetaverse;
using OpenSim.Capabilities.Handlers;
using OpenSim.Framework;
using OpenSim.Framework.Servers.HttpServer;
using OpenSim.Region.Framework.Scenes;
using OpenSim.Tests.Common;
using OpenSim.Tests.Common.Mock;
namespace OpenSim.Region.ClientStack.LindenUDP.Tests
{
public class TestLLPacketServer : LLPacketServer
namespace OpenSim.Capabilities.Handlers.GetTexture.Tests
{
[TestFixture]
public class GetTextureHandlerTests
{
/// <summary>
/// Record counts of packets received
/// </summary>
protected Dictionary<PacketType, int> m_packetsReceived = new Dictionary<PacketType, int>();
public TestLLPacketServer(LLUDPServer networkHandler, ClientStackUserSettings userSettings)
: base(networkHandler, userSettings)
{}
public override void InPacket(uint circuitCode, Packet packet)
[Test]
public void TestTextureNotFound()
{
base.InPacket(circuitCode, packet);
if (m_packetsReceived.ContainsKey(packet.Type))
m_packetsReceived[packet.Type]++;
else
m_packetsReceived[packet.Type] = 1;
}
public int GetTotalPacketsReceived()
{
int totalCount = 0;
foreach (int count in m_packetsReceived.Values)
totalCount += count;
return totalCount;
}
public int GetPacketsReceivedFor(PacketType packetType)
{
if (m_packetsReceived.ContainsKey(packetType))
return m_packetsReceived[packetType];
else
return 0;
TestHelpers.InMethod();
// Overkill - we only really need the asset service, not a whole scene.
Scene scene = SceneHelpers.SetupScene();
GetTextureHandler handler = new GetTextureHandler(null, scene.AssetService);
TestOSHttpRequest req = new TestOSHttpRequest();
TestOSHttpResponse resp = new TestOSHttpResponse();
req.Url = new Uri("http://localhost/?texture_id=00000000-0000-1111-9999-000000000012");
handler.Handle(null, null, req, resp);
Assert.That(resp.StatusCode, Is.EqualTo((int)System.Net.HttpStatusCode.NotFound));
}
}
}
}

View File

@@ -0,0 +1,181 @@
/*
* Copyright (c) Contributors, http://opensimulator.org/
* See CONTRIBUTORS.TXT for a full list of copyright holders.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions are met:
* * Redistributions of source code must retain the above copyright
* notice, this list of conditions and the following disclaimer.
* * Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in the
* documentation and/or other materials provided with the distribution.
* * Neither the name of the OpenSimulator Project nor the
* names of its contributors may be used to endorse or promote products
* derived from this software without specific prior written permission.
*
* THIS SOFTWARE IS PROVIDED BY THE DEVELOPERS ``AS IS'' AND ANY
* EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
* WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
* DISCLAIMED. IN NO EVENT SHALL THE CONTRIBUTORS BE LIABLE FOR ANY
* DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
* (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
* LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
* ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
using System;
using System.Collections;
using System.Collections.Specialized;
using System.Drawing;
using System.Drawing.Imaging;
using System.Reflection;
using System.IO;
using System.Web;
using log4net;
using Nini.Config;
using OpenMetaverse;
using OpenMetaverse.StructuredData;
using OpenMetaverse.Imaging;
using OpenSim.Framework;
using OpenSim.Framework.Capabilities;
using OpenSim.Framework.Servers;
using OpenSim.Framework.Servers.HttpServer;
using OpenSim.Region.Framework.Interfaces;
using OpenSim.Services.Interfaces;
using Caps = OpenSim.Framework.Capabilities.Caps;
namespace OpenSim.Capabilities.Handlers
{
public class UploadBakedTextureHandler
{
private static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType);
private Caps m_HostCapsObj;
private IAssetService m_assetService;
private bool m_persistBakedTextures;
public UploadBakedTextureHandler(Caps caps, IAssetService assetService, bool persistBakedTextures)
{
m_HostCapsObj = caps;
m_assetService = assetService;
m_persistBakedTextures = persistBakedTextures;
}
/// <summary>
/// Handle a request from the client for a Uri to upload a baked texture.
/// </summary>
/// <param name="request"></param>
/// <param name="path"></param>
/// <param name="param"></param>
/// <param name="httpRequest"></param>
/// <param name="httpResponse"></param>
/// <returns>The upload response if the request is successful, null otherwise.</returns>
public string UploadBakedTexture(
string request, string path, string param, IOSHttpRequest httpRequest, IOSHttpResponse httpResponse)
{
try
{
string capsBase = "/CAPS/" + m_HostCapsObj.CapsObjectPath;
string uploaderPath = Util.RandomClass.Next(5000, 8000).ToString("0000");
BakedTextureUploader uploader =
new BakedTextureUploader(capsBase + uploaderPath, m_HostCapsObj.HttpListener);
uploader.OnUpLoad += BakedTextureUploaded;
m_HostCapsObj.HttpListener.AddStreamHandler(
new BinaryStreamHandler("POST", capsBase + uploaderPath,
uploader.uploaderCaps));
string protocol = "http://";
if (m_HostCapsObj.SSLCaps)
protocol = "https://";
string uploaderURL = protocol + m_HostCapsObj.HostName + ":" +
m_HostCapsObj.Port.ToString() + capsBase + uploaderPath;
LLSDAssetUploadResponse uploadResponse = new LLSDAssetUploadResponse();
uploadResponse.uploader = uploaderURL;
uploadResponse.state = "upload";
return LLSDHelpers.SerialiseLLSDReply(uploadResponse);
}
catch (Exception e)
{
m_log.ErrorFormat("[UPLOAD BAKED TEXTURE HANDLER]: {0}{1}", e.Message, e.StackTrace);
}
return null;
}
/// <summary>
/// Called when a baked texture has been successfully uploaded by a client.
/// </summary>
/// <param name="assetID"></param>
/// <param name="data"></param>
private void BakedTextureUploaded(UUID assetID, byte[] data)
{
// m_log.DebugFormat("[UPLOAD BAKED TEXTURE HANDLER]: Received baked texture {0}", assetID.ToString());
AssetBase asset;
asset = new AssetBase(assetID, "Baked Texture", (sbyte)AssetType.Texture, m_HostCapsObj.AgentID.ToString());
asset.Data = data;
asset.Temporary = true;
asset.Local = !m_persistBakedTextures; // Local assets aren't persisted, non-local are
m_assetService.Store(asset);
}
}
class BakedTextureUploader
{
// private static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType);
public event Action<UUID, byte[]> OnUpLoad;
private string uploaderPath = String.Empty;
private UUID newAssetID;
private IHttpServer httpListener;
public BakedTextureUploader(string path, IHttpServer httpServer)
{
newAssetID = UUID.Random();
uploaderPath = path;
httpListener = httpServer;
// m_log.InfoFormat("[CAPS] baked texture upload starting for {0}",newAssetID);
}
/// <summary>
/// Handle raw uploaded baked texture data.
/// </summary>
/// <param name="data"></param>
/// <param name="path"></param>
/// <param name="param"></param>
/// <returns></returns>
public string uploaderCaps(byte[] data, string path, string param)
{
Action<UUID, byte[]> handlerUpLoad = OnUpLoad;
// Don't do this asynchronously, otherwise it's possible for the client to send set appearance information
// on another thread which might send out avatar updates before the asset has been put into the asset
// service.
if (handlerUpLoad != null)
handlerUpLoad(newAssetID, data);
string res = String.Empty;
LLSDAssetUploadComplete uploadComplete = new LLSDAssetUploadComplete();
uploadComplete.new_asset = newAssetID.ToString();
uploadComplete.new_inventory_item = UUID.Zero;
uploadComplete.state = "complete";
res = LLSDHelpers.SerialiseLLSDReply(uploadComplete);
httpListener.RemoveStreamHandler("POST", uploaderPath);
// m_log.DebugFormat("[BAKED TEXTURE UPLOADER]: baked texture upload completed for {0}", newAssetID);
return res;
}
}
}

View File

@@ -42,7 +42,6 @@ using Caps = OpenSim.Framework.Capabilities.Caps;
namespace OpenSim.Capabilities.Handlers
{
public class WebFetchInvDescHandler
{
private static readonly ILog m_log =
@@ -50,7 +49,7 @@ namespace OpenSim.Capabilities.Handlers
private IInventoryService m_InventoryService;
private ILibraryService m_LibraryService;
private object m_fetchLock = new Object();
// private object m_fetchLock = new Object();
public WebFetchInvDescHandler(IInventoryService invService, ILibraryService libService)
{
@@ -58,39 +57,42 @@ namespace OpenSim.Capabilities.Handlers
m_LibraryService = libService;
}
public string FetchInventoryDescendentsRequest(string request, string path, string param, OSHttpRequest httpRequest, OSHttpResponse httpResponse)
public string FetchInventoryDescendentsRequest(string request, string path, string param, IOSHttpRequest httpRequest, IOSHttpResponse httpResponse)
{
// nasty temporary hack here, the linden client falsely
// identifies the uuid 00000000-0000-0000-0000-000000000000
// as a string which breaks us
//
// correctly mark it as a uuid
//
request = request.Replace("<string>00000000-0000-0000-0000-000000000000</string>", "<uuid>00000000-0000-0000-0000-000000000000</uuid>");
// lock (m_fetchLock)
// {
// m_log.DebugFormat("[WEB FETCH INV DESC HANDLER]: Received request {0}", request);
// nasty temporary hack here, the linden client falsely
// identifies the uuid 00000000-0000-0000-0000-000000000000
// as a string which breaks us
//
// correctly mark it as a uuid
//
request = request.Replace("<string>00000000-0000-0000-0000-000000000000</string>", "<uuid>00000000-0000-0000-0000-000000000000</uuid>");
// another hack <integer>1</integer> results in a
// System.ArgumentException: Object type System.Int32 cannot
// be converted to target type: System.Boolean
//
request = request.Replace("<key>fetch_folders</key><integer>0</integer>", "<key>fetch_folders</key><boolean>0</boolean>");
request = request.Replace("<key>fetch_folders</key><integer>1</integer>", "<key>fetch_folders</key><boolean>1</boolean>");
Hashtable hash = new Hashtable();
try
{
hash = (Hashtable)LLSD.LLSDDeserialize(Utils.StringToBytes(request));
}
catch (LLSD.LLSDParseException e)
{
m_log.ErrorFormat("[WEB FETCH INV DESC HANDLER]: Fetch error: {0}{1}" + e.Message, e.StackTrace);
m_log.Error("Request: " + request);
}
ArrayList foldersrequested = (ArrayList)hash["folders"];
string response = "";
// another hack <integer>1</integer> results in a
// System.ArgumentException: Object type System.Int32 cannot
// be converted to target type: System.Boolean
//
request = request.Replace("<key>fetch_folders</key><integer>0</integer>", "<key>fetch_folders</key><boolean>0</boolean>");
request = request.Replace("<key>fetch_folders</key><integer>1</integer>", "<key>fetch_folders</key><boolean>1</boolean>");
Hashtable hash = new Hashtable();
try
{
hash = (Hashtable)LLSD.LLSDDeserialize(Utils.StringToBytes(request));
}
catch (LLSD.LLSDParseException pe)
{
m_log.Error("[AGENT INVENTORY]: Fetch error: " + pe.Message);
m_log.Error("Request: " + request.ToString());
}
ArrayList foldersrequested = (ArrayList)hash["folders"];
string response = "";
lock (m_fetchLock)
{
for (int i = 0; i < foldersrequested.Count; i++)
{
string inventoryitemstr = "";
@@ -104,7 +106,7 @@ namespace OpenSim.Capabilities.Handlers
}
catch (Exception e)
{
m_log.Debug("[CAPS]: caught exception doing OSD deserialize" + e);
m_log.Debug("[WEB FETCH INV DESC HANDLER]: caught exception doing OSD deserialize" + e);
}
LLSDInventoryDescendents reply = FetchInventoryReply(llsdRequest);
@@ -115,7 +117,6 @@ namespace OpenSim.Capabilities.Handlers
response += inventoryitemstr;
}
if (response.Length == 0)
{
// Ter-guess: If requests fail a lot, the client seems to stop requesting descendants.
@@ -129,11 +130,12 @@ namespace OpenSim.Capabilities.Handlers
response = "<llsd><map><key>folders</key><array>" + response + "</array></map></llsd>";
}
//m_log.DebugFormat("[CAPS]: Replying to CAPS fetch inventory request with following xml");
//m_log.Debug("[CAPS] "+response);
// m_log.DebugFormat("[WEB FETCH INV DESC HANDLER]: Replying to CAPS fetch inventory request");
//m_log.Debug("[WEB FETCH INV DESC HANDLER] "+response);
}
return response;
return response;
// }
}
/// <summary>
@@ -155,7 +157,10 @@ namespace OpenSim.Capabilities.Handlers
inv.Items = new List<InventoryItemBase>();
int version = 0;
inv = Fetch(invFetch.owner_id, invFetch.folder_id, invFetch.owner_id, invFetch.fetch_folders, invFetch.fetch_items, invFetch.sort_order, out version);
inv
= Fetch(
invFetch.owner_id, invFetch.folder_id, invFetch.owner_id,
invFetch.fetch_folders, invFetch.fetch_items, invFetch.sort_order, out version);
if (inv.Folders != null)
{
@@ -176,19 +181,43 @@ namespace OpenSim.Capabilities.Handlers
contents.descendents = contents.items.Array.Count + contents.categories.Array.Count;
contents.version = version;
// m_log.DebugFormat(
// "[WEB FETCH INV DESC HANDLER]: Replying to request for folder {0} (fetch items {1}, fetch folders {2}) with {3} items and {4} folders for agent {5}",
// invFetch.folder_id,
// invFetch.fetch_items,
// invFetch.fetch_folders,
// contents.items.Array.Count,
// contents.categories.Array.Count,
// invFetch.owner_id);
return reply;
}
public InventoryCollection Fetch(UUID agentID, UUID folderID, UUID ownerID,
bool fetchFolders, bool fetchItems, int sortOrder, out int version)
/// <summary>
/// Handle the caps inventory descendents fetch.
/// </summary>
/// <param name="agentID"></param>
/// <param name="folderID"></param>
/// <param name="ownerID"></param>
/// <param name="fetchFolders"></param>
/// <param name="fetchItems"></param>
/// <param name="sortOrder"></param>
/// <param name="version"></param>
/// <returns>An empty InventoryCollection if the inventory look up failed</returns>
private InventoryCollection Fetch(
UUID agentID, UUID folderID, UUID ownerID,
bool fetchFolders, bool fetchItems, int sortOrder, out int version)
{
m_log.DebugFormat(
"[WEBFETCHINVENTORYDESCENDANTS]: Fetching folders ({0}), items ({1}) from {2} for agent {3}",
fetchFolders, fetchItems, folderID, agentID);
// m_log.DebugFormat(
// "[WEB FETCH INV DESC HANDLER]: Fetching folders ({0}), items ({1}) from {2} for agent {3}",
// fetchFolders, fetchItems, folderID, agentID);
// FIXME MAYBE: We're not handling sortOrder!
version = 0;
InventoryFolderImpl fold;
if (m_LibraryService != null && m_LibraryService.LibraryRootFolder != null && agentID == m_LibraryService.LibraryRootFolder.Owner)
{
if ((fold = m_LibraryService.LibraryRootFolder.FindFolder(folderID)) != null)
{
InventoryCollection ret = new InventoryCollection();
@@ -197,6 +226,7 @@ namespace OpenSim.Capabilities.Handlers
return ret;
}
}
InventoryCollection contents = new InventoryCollection();
@@ -207,12 +237,92 @@ namespace OpenSim.Capabilities.Handlers
containingFolder.ID = folderID;
containingFolder.Owner = agentID;
containingFolder = m_InventoryService.GetFolder(containingFolder);
if (containingFolder != null)
{
// m_log.DebugFormat(
// "[WEB FETCH INV DESC HANDLER]: Retrieved folder {0} {1} for agent id {2}",
// containingFolder.Name, containingFolder.ID, agentID);
version = containingFolder.Version;
// if (fetchItems)
// {
// List<InventoryItemBase> linkedItemsToAdd = new List<InventoryItemBase>();
//
// foreach (InventoryItemBase item in contents.Items)
// {
// if (item.AssetType == (int)AssetType.Link)
// {
// InventoryItemBase linkedItem = m_InventoryService.GetItem(new InventoryItemBase(item.AssetID));
//
// // Take care of genuinely broken links where the target doesn't exist
// // HACK: Also, don't follow up links that just point to other links. In theory this is legitimate,
// // but no viewer has been observed to set these up and this is the lazy way of avoiding cycles
// // rather than having to keep track of every folder requested in the recursion.
// if (linkedItem != null && linkedItem.AssetType != (int)AssetType.Link)
// linkedItemsToAdd.Insert(0, linkedItem);
// }
// }
//
// foreach (InventoryItemBase linkedItem in linkedItemsToAdd)
// {
// m_log.DebugFormat(
// "[WEB FETCH INV DESC HANDLER]: Inserted linked item {0} for link in folder {1} for agent {2}",
// linkedItem.Name, folderID, agentID);
//
// contents.Items.Add(linkedItem);
// }
//
// // If the folder requested contains links, then we need to send those folders first, otherwise the links
// // will be broken in the viewer.
// HashSet<UUID> linkedItemFolderIdsToSend = new HashSet<UUID>();
// foreach (InventoryItemBase item in contents.Items)
// {
// if (item.AssetType == (int)AssetType.Link)
// {
// InventoryItemBase linkedItem = m_InventoryService.GetItem(new InventoryItemBase(item.AssetID));
//
// // Take care of genuinely broken links where the target doesn't exist
// // HACK: Also, don't follow up links that just point to other links. In theory this is legitimate,
// // but no viewer has been observed to set these up and this is the lazy way of avoiding cycles
// // rather than having to keep track of every folder requested in the recursion.
// if (linkedItem != null && linkedItem.AssetType != (int)AssetType.Link)
// {
// // We don't need to send the folder if source and destination of the link are in the same
// // folder.
// if (linkedItem.Folder != containingFolder.ID)
// linkedItemFolderIdsToSend.Add(linkedItem.Folder);
// }
// }
// }
//
// foreach (UUID linkedItemFolderId in linkedItemFolderIdsToSend)
// {
// m_log.DebugFormat(
// "[WEB FETCH INV DESC HANDLER]: Recursively fetching folder {0} linked by item in folder {1} for agent {2}",
// linkedItemFolderId, folderID, agentID);
//
// int dummyVersion;
// InventoryCollection linkedCollection
// = Fetch(
// agentID, linkedItemFolderId, ownerID, fetchFolders, fetchItems, sortOrder, out dummyVersion);
//
// InventoryFolderBase linkedFolder = new InventoryFolderBase(linkedItemFolderId);
// linkedFolder.Owner = agentID;
// linkedFolder = m_InventoryService.GetFolder(linkedFolder);
//
//// contents.Folders.AddRange(linkedCollection.Folders);
//
// contents.Folders.Add(linkedFolder);
// contents.Items.AddRange(linkedCollection.Items);
// }
// }
}
}
else
{
// Lost itemsm don't really need a version
// Lost items don't really need a version
version = 1;
}
@@ -230,10 +340,11 @@ namespace OpenSim.Capabilities.Handlers
llsdFolder.folder_id = invFolder.ID;
llsdFolder.parent_id = invFolder.ParentID;
llsdFolder.name = invFolder.Name;
if (invFolder.Type < 0 || invFolder.Type >= TaskInventoryItem.Types.Length)
if (invFolder.Type == (short)AssetType.Unknown || !Enum.IsDefined(typeof(AssetType), (sbyte)invFolder.Type))
llsdFolder.type = "-1";
else
llsdFolder.type = TaskInventoryItem.Types[invFolder.Type];
llsdFolder.type = Utils.AssetTypeToString((AssetType)invFolder.Type);
llsdFolder.preferred_type = "-1";
return llsdFolder;
@@ -254,16 +365,19 @@ namespace OpenSim.Capabilities.Handlers
llsdItem.item_id = invItem.ID;
llsdItem.name = invItem.Name;
llsdItem.parent_id = invItem.Folder;
try
{
// TODO reevaluate after upgrade to libomv >= r2566. Probably should use UtilsConversions.
llsdItem.type = TaskInventoryItem.Types[invItem.AssetType];
llsdItem.inv_type = TaskInventoryItem.InvTypes[invItem.InvType];
llsdItem.type = Utils.AssetTypeToString((AssetType)invItem.AssetType);
llsdItem.inv_type = Utils.InventoryTypeToString((InventoryType)invItem.InvType);
}
catch (Exception e)
{
m_log.ErrorFormat("[CAPS]: Problem setting asset {0} inventory {1} types while converting inventory item {2}: {3}", invItem.AssetType, invItem.InvType, invItem.Name, e.Message);
m_log.ErrorFormat(
"[WEB FETCH INV DESC HANDLER]: Problem setting asset {0} inventory {1} types while converting inventory item {2}: {3}",
invItem.AssetType, invItem.InvType, invItem.Name, e.Message);
}
llsdItem.permissions = new LLSDPermissions();
llsdItem.permissions.creator_id = invItem.CreatorIdAsUuid;
llsdItem.permissions.base_mask = (int)invItem.CurrentPermissions;
@@ -294,6 +408,5 @@ namespace OpenSim.Capabilities.Handlers
return llsdItem;
}
}
}
}

View File

@@ -95,4 +95,11 @@ namespace OpenSim.Framework.Capabilities
public UUID owner_id;
public int version;
}
}
[OSDMap]
public class LLSDFetchInventory
{
public UUID agent_id;
public OSDArray items = new OSDArray();
}
}

View File

@@ -45,7 +45,7 @@ namespace OpenSim.Framework.Capabilities
}
public override byte[] Handle(string path, Stream request,
OSHttpRequest httpRequest, OSHttpResponse httpResponse)
IOSHttpRequest httpRequest, IOSHttpResponse httpResponse)
{
//Encoding encoding = Util.UTF8;
//StreamReader streamReader = new StreamReader(request, false);

View File

@@ -33,6 +33,7 @@ using System.IO;
using System.Xml;
using System.Collections.Generic;
using OpenSim.Server.Base;
using OpenSim.Framework;
using OpenSim.Framework.Console;
using OpenMetaverse;

View File

@@ -37,10 +37,30 @@ namespace OpenSim.Data
public UUID RegionID;
public UUID ScopeID;
public string RegionName;
/// <summary>
/// The position in meters of this region.
/// </summary>
public int posX;
/// <summary>
/// The position in meters of this region.
/// </summary>
public int posY;
public int sizeX;
public int sizeY;
/// <summary>
/// Return the x-coordinate of this region.
/// </summary>
public int coordX { get { return posX / (int)Constants.RegionSize; } }
/// <summary>
/// Return the y-coordinate of this region.
/// </summary>
public int coordY { get { return posY / (int)Constants.RegionSize; } }
public Dictionary<string, object> Data;
}

View File

@@ -681,7 +681,7 @@ VALUES
using (SqlCommand cmd = new SqlCommand(sql, conn))
{
conn.Open();
foreach (ParcelManager.ParcelAccessEntry parcelAccessEntry in parcel.LandData.ParcelAccessList)
foreach (LandAccessEntry parcelAccessEntry in parcel.LandData.ParcelAccessList)
{
cmd.Parameters.AddRange(CreateLandAccessParameters(parcelAccessEntry, parcel.RegionUUID));
@@ -1252,7 +1252,7 @@ VALUES
,[elevation_1_ne] = @elevation_1_ne ,[elevation_2_ne] = @elevation_2_ne ,[elevation_1_se] = @elevation_1_se ,[elevation_2_se] = @elevation_2_se
,[elevation_1_sw] = @elevation_1_sw ,[elevation_2_sw] = @elevation_2_sw ,[water_height] = @water_height ,[terrain_raise_limit] = @terrain_raise_limit
,[terrain_lower_limit] = @terrain_lower_limit ,[use_estate_sun] = @use_estate_sun ,[fixed_sun] = @fixed_sun ,[sun_position] = @sun_position
,[covenant] = @covenant , [sunvectorx] = @sunvectorx, [sunvectory] = @sunvectory, [sunvectorz] = @sunvectorz, [Sandbox] = @Sandbox, [loaded_creation_datetime] = @loaded_creation_datetime, [loaded_creation_id] = @loaded_creation_id
,[covenant] = @covenant ,[covenant_datetime] = @covenant_datetime, [sunvectorx] = @sunvectorx, [sunvectory] = @sunvectory, [sunvectorz] = @sunvectorz, [Sandbox] = @Sandbox, [loaded_creation_datetime] = @loaded_creation_datetime, [loaded_creation_id] = @loaded_creation_id
WHERE [regionUUID] = @regionUUID";
using (SqlConnection conn = new SqlConnection(m_connectionString))
@@ -1307,14 +1307,14 @@ VALUES
[block_show_in_search],[agent_limit],[object_bonus],[maturity],[disable_scripts],[disable_collisions],[disable_physics],
[terrain_texture_1],[terrain_texture_2],[terrain_texture_3],[terrain_texture_4],[elevation_1_nw],[elevation_2_nw],[elevation_1_ne],
[elevation_2_ne],[elevation_1_se],[elevation_2_se],[elevation_1_sw],[elevation_2_sw],[water_height],[terrain_raise_limit],
[terrain_lower_limit],[use_estate_sun],[fixed_sun],[sun_position],[covenant],[sunvectorx], [sunvectory], [sunvectorz],[Sandbox], [loaded_creation_datetime], [loaded_creation_id]
[terrain_lower_limit],[use_estate_sun],[fixed_sun],[sun_position],[covenant],[covenant_datetime],[sunvectorx], [sunvectory], [sunvectorz],[Sandbox], [loaded_creation_datetime], [loaded_creation_id]
)
VALUES
(@regionUUID,@block_terraform,@block_fly,@allow_damage,@restrict_pushing,@allow_land_resell,@allow_land_join_divide,
@block_show_in_search,@agent_limit,@object_bonus,@maturity,@disable_scripts,@disable_collisions,@disable_physics,
@terrain_texture_1,@terrain_texture_2,@terrain_texture_3,@terrain_texture_4,@elevation_1_nw,@elevation_2_nw,@elevation_1_ne,
@elevation_2_ne,@elevation_1_se,@elevation_2_se,@elevation_1_sw,@elevation_2_sw,@water_height,@terrain_raise_limit,
@terrain_lower_limit,@use_estate_sun,@fixed_sun,@sun_position,@covenant,@sunvectorx,@sunvectory, @sunvectorz, @Sandbox, @loaded_creation_datetime, @loaded_creation_id)";
@terrain_lower_limit,@use_estate_sun,@fixed_sun,@sun_position,@covenant, @covenant_datetime, @sunvectorx,@sunvectory, @sunvectorz, @Sandbox, @loaded_creation_datetime, @loaded_creation_id)";
using (SqlConnection conn = new SqlConnection(m_connectionString))
using (SqlCommand cmd = new SqlCommand(sql, conn))
@@ -1376,7 +1376,7 @@ VALUES
Convert.ToSingle(row["sunvectorz"])
);
newSettings.Covenant = new UUID((Guid)row["covenant"]);
newSettings.CovenantChangedDateTime = Convert.ToInt32(row["covenant_datetime"]);
newSettings.LoadedCreationDateTime = Convert.ToInt32(row["loaded_creation_datetime"]);
if (row["loaded_creation_id"] is DBNull)
@@ -1453,7 +1453,7 @@ VALUES
_Log.ErrorFormat("[PARCEL]: unable to get parcel telehub settings for {1}", newData.Name);
}
newData.ParcelAccessList = new List<ParcelManager.ParcelAccessEntry>();
newData.ParcelAccessList = new List<LandAccessEntry>();
return newData;
}
@@ -1463,12 +1463,12 @@ VALUES
/// </summary>
/// <param name="row">datarecord with landaccess data</param>
/// <returns></returns>
private static ParcelManager.ParcelAccessEntry BuildLandAccessData(IDataRecord row)
private static LandAccessEntry BuildLandAccessData(IDataRecord row)
{
ParcelManager.ParcelAccessEntry entry = new ParcelManager.ParcelAccessEntry();
LandAccessEntry entry = new LandAccessEntry();
entry.AgentID = new UUID((Guid)row["AccessUUID"]);
entry.Flags = (AccessList)Convert.ToInt32(row["Flags"]);
entry.Time = new DateTime();
entry.Expires = 0;
return entry;
}
@@ -1789,6 +1789,7 @@ VALUES
parameters.Add(_Database.CreateParameter("sunvectory", settings.SunVector.Y));
parameters.Add(_Database.CreateParameter("sunvectorz", settings.SunVector.Z));
parameters.Add(_Database.CreateParameter("covenant", settings.Covenant));
parameters.Add(_Database.CreateParameter("covenant_datetime", settings.CovenantChangedDateTime));
parameters.Add(_Database.CreateParameter("Loaded_Creation_DateTime", settings.LoadedCreationDateTime));
parameters.Add(_Database.CreateParameter("Loaded_Creation_ID", settings.LoadedCreationID));
@@ -1851,7 +1852,7 @@ VALUES
/// <param name="parcelAccessEntry">parcel access entry.</param>
/// <param name="parcelID">parcel ID.</param>
/// <returns></returns>
private SqlParameter[] CreateLandAccessParameters(ParcelManager.ParcelAccessEntry parcelAccessEntry, UUID parcelID)
private SqlParameter[] CreateLandAccessParameters(LandAccessEntry parcelAccessEntry, UUID parcelID)
{
List<SqlParameter> parameters = new List<SqlParameter>();

View File

@@ -1043,3 +1043,11 @@ FOR CreatorID
ALTER TABLE primitems ALTER COLUMN CreatorID uniqueidentifier NOT NULL
COMMIT
:VERSION 29 #---------------------
BEGIN TRANSACTION
ALTER TABLE regionsettings ADD covenant_datetime int NOT NULL default 0
COMMIT

View File

@@ -210,7 +210,6 @@ namespace OpenSim.Data.MySQL
}
LoadBanList(es);
es.EstateManagers = LoadUUIDList(es.EstateID, "estate_managers");
es.EstateAccess = LoadUUIDList(es.EstateID, "estate_users");
es.EstateGroups = LoadUUIDList(es.EstateID, "estate_groups");

View File

@@ -173,6 +173,11 @@ namespace OpenSim.Data.MySQL
int v = Convert.ToInt32(reader[name]);
m_Fields[name].SetValue(row, v);
}
else if (m_Fields[name].FieldType == typeof(uint))
{
uint v = Convert.ToUInt32(reader[name]);
m_Fields[name].SetValue(row, v);
}
else
{
m_Fields[name].SetValue(row, reader[name]);
@@ -294,4 +299,4 @@ namespace OpenSim.Data.MySQL
}
}
}
}
}

View File

@@ -794,7 +794,8 @@ namespace OpenSim.Data.MySQL
{
dbcon.Open();
using (MySqlCommand cmd = new MySqlCommand("DELETE FROM inventoryfolders WHERE folderID=?uuid", dbcon))
// System folders can never be deleted. Period.
using (MySqlCommand cmd = new MySqlCommand("DELETE FROM inventoryfolders WHERE folderID=?uuid and type=-1", dbcon))
{
cmd.Parameters.AddWithValue("?uuid", folderID.ToString());

View File

@@ -561,31 +561,46 @@ namespace OpenSim.Data.MySQL
public virtual void StoreTerrain(double[,] ter, UUID regionID)
{
m_log.Info("[REGION DB]: Storing terrain");
lock (m_dbLock)
Util.FireAndForget(delegate(object x)
{
using (MySqlConnection dbcon = new MySqlConnection(m_connectionString))
double[,] oldTerrain = LoadTerrain(regionID);
m_log.Info("[REGION DB]: Storing terrain");
lock (m_dbLock)
{
dbcon.Open();
using (MySqlCommand cmd = dbcon.CreateCommand())
using (MySqlConnection dbcon = new MySqlConnection(m_connectionString))
{
cmd.CommandText = "delete from terrain where RegionUUID = ?RegionUUID";
cmd.Parameters.AddWithValue("RegionUUID", regionID.ToString());
dbcon.Open();
ExecuteNonQuery(cmd);
using (MySqlCommand cmd = dbcon.CreateCommand())
{
cmd.CommandText = "delete from terrain where RegionUUID = ?RegionUUID";
cmd.Parameters.AddWithValue("RegionUUID", regionID.ToString());
cmd.CommandText = "insert into terrain (RegionUUID, " +
"Revision, Heightfield) values (?RegionUUID, " +
"1, ?Heightfield)";
using (MySqlCommand cmd2 = dbcon.CreateCommand())
{
try
{
cmd2.CommandText = "insert into terrain (RegionUUID, " +
"Revision, Heightfield) values (?RegionUUID, " +
"1, ?Heightfield)";
cmd.Parameters.AddWithValue("Heightfield", SerializeTerrain(ter));
cmd2.Parameters.AddWithValue("RegionUUID", regionID.ToString());
cmd2.Parameters.AddWithValue("Heightfield", SerializeTerrain(ter, oldTerrain));
ExecuteNonQuery(cmd);
ExecuteNonQuery(cmd);
ExecuteNonQuery(cmd2);
}
catch (Exception e)
{
m_log.ErrorFormat(e.ToString());
}
}
}
}
}
}
});
}
public virtual double[,] LoadTerrain(UUID regionID)
@@ -700,10 +715,10 @@ namespace OpenSim.Data.MySQL
cmd.Parameters.Clear();
cmd.CommandText = "insert into landaccesslist (LandUUID, " +
"AccessUUID, Flags) values (?LandUUID, ?AccessUUID, " +
"?Flags)";
"AccessUUID, Flags, Expires) values (?LandUUID, ?AccessUUID, " +
"?Flags, ?Expires)";
foreach (ParcelManager.ParcelAccessEntry entry in parcel.LandData.ParcelAccessList)
foreach (LandAccessEntry entry in parcel.LandData.ParcelAccessList)
{
FillLandAccessCommand(cmd, entry, parcel.LandData.GlobalID);
ExecuteNonQuery(cmd);
@@ -846,6 +861,8 @@ namespace OpenSim.Data.MySQL
}
}
LoadSpawnPoints(rs);
return rs;
}
@@ -992,9 +1009,11 @@ namespace OpenSim.Data.MySQL
"elevation_2_sw, water_height, " +
"terrain_raise_limit, terrain_lower_limit, " +
"use_estate_sun, fixed_sun, sun_position, " +
"covenant, Sandbox, sunvectorx, sunvectory, " +
"covenant, covenant_datetime, Sandbox, sunvectorx, sunvectory, " +
"sunvectorz, loaded_creation_datetime, " +
"loaded_creation_id, map_tile_ID, block_search, casino) values (?RegionUUID, ?BlockTerraform, " +
"loaded_creation_id, map_tile_ID, block_search, casino, " +
"TelehubObject, parcel_tile_ID) " +
"values (?RegionUUID, ?BlockTerraform, " +
"?BlockFly, ?AllowDamage, ?RestrictPushing, " +
"?AllowLandResell, ?AllowLandJoinDivide, " +
"?BlockShowInSearch, ?AgentLimit, ?ObjectBonus, " +
@@ -1006,10 +1025,11 @@ namespace OpenSim.Data.MySQL
"?Elevation2SE, ?Elevation1SW, ?Elevation2SW, " +
"?WaterHeight, ?TerrainRaiseLimit, " +
"?TerrainLowerLimit, ?UseEstateSun, ?FixedSun, " +
"?SunPosition, ?Covenant, ?Sandbox, " +
"?SunPosition, ?Covenant, ?CovenantChangedDateTime, ?Sandbox, " +
"?SunVectorX, ?SunVectorY, ?SunVectorZ, " +
"?LoadedCreationDateTime, ?LoadedCreationID, " +
"?TerrainImageID, ?block_search, ?casino)";
"?TerrainImageID, ?block_search, ?casino, " +
"?TelehubObject, ?ParcelImageID)";
FillRegionSettingsCommand(cmd, rs);
@@ -1017,6 +1037,7 @@ namespace OpenSim.Data.MySQL
}
}
}
SaveSpawnPoints(rs);
}
public virtual List<LandData> LoadLandObjects(UUID regionUUID)
@@ -1287,7 +1308,7 @@ namespace OpenSim.Data.MySQL
newSettings.FixedSun = Convert.ToBoolean(row["fixed_sun"]);
newSettings.SunPosition = Convert.ToDouble(row["sun_position"]);
newSettings.Covenant = DBGuid.FromDB(row["covenant"]);
newSettings.CovenantChangedDateTime = Convert.ToInt32(row["covenant_datetime"]);
newSettings.LoadedCreationDateTime = Convert.ToInt32(row["loaded_creation_datetime"]);
if (row["loaded_creation_id"] is DBNull)
@@ -1296,6 +1317,8 @@ namespace OpenSim.Data.MySQL
newSettings.LoadedCreationID = (String) row["loaded_creation_id"];
newSettings.TerrainImageID = DBGuid.FromDB(row["map_tile_ID"]);
newSettings.ParcelImageID = DBGuid.FromDB(row["parcel_tile_ID"]);
newSettings.TelehubObject = DBGuid.FromDB(row["TelehubObject"]);
newSettings.GodBlockSearch = Convert.ToBoolean(row["block_search"]);
newSettings.Casino = Convert.ToBoolean(row["casino"]);
@@ -1373,7 +1396,7 @@ namespace OpenSim.Data.MySQL
newData.ObscureMusic = Convert.ToBoolean(row["ObscureMusic"]);
newData.ObscureMedia = Convert.ToBoolean(row["ObscureMedia"]);
newData.ParcelAccessList = new List<ParcelManager.ParcelAccessEntry>();
newData.ParcelAccessList = new List<LandAccessEntry>();
return newData;
}
@@ -1383,12 +1406,12 @@ namespace OpenSim.Data.MySQL
/// </summary>
/// <param name="row"></param>
/// <returns></returns>
private static ParcelManager.ParcelAccessEntry BuildLandAccessData(IDataReader row)
private static LandAccessEntry BuildLandAccessData(IDataReader row)
{
ParcelManager.ParcelAccessEntry entry = new ParcelManager.ParcelAccessEntry();
LandAccessEntry entry = new LandAccessEntry();
entry.AgentID = DBGuid.FromDB(row["AccessUUID"]);
entry.Flags = (AccessList) Convert.ToInt32(row["Flags"]);
entry.Time = new DateTime();
entry.Expires = Convert.ToInt32(row["Expires"]);
return entry;
}
@@ -1397,7 +1420,7 @@ namespace OpenSim.Data.MySQL
/// </summary>
/// <param name="val"></param>
/// <returns></returns>
private static Array SerializeTerrain(double[,] val)
private static Array SerializeTerrain(double[,] val, double[,] oldTerrain)
{
MemoryStream str = new MemoryStream(((int)Constants.RegionSize * (int)Constants.RegionSize) *sizeof (double));
BinaryWriter bw = new BinaryWriter(str);
@@ -1406,7 +1429,11 @@ namespace OpenSim.Data.MySQL
for (int x = 0; x < (int)Constants.RegionSize; x++)
for (int y = 0; y < (int)Constants.RegionSize; y++)
{
double height = val[x, y];
double height = 20.0;
if (oldTerrain != null)
height = oldTerrain[x, y];
if (!double.IsNaN(val[x, y]))
height = val[x, y];
if (height == 0.0)
height = double.Epsilon;
@@ -1626,12 +1653,15 @@ namespace OpenSim.Data.MySQL
cmd.Parameters.AddWithValue("FixedSun", settings.FixedSun);
cmd.Parameters.AddWithValue("SunPosition", settings.SunPosition);
cmd.Parameters.AddWithValue("Covenant", settings.Covenant.ToString());
cmd.Parameters.AddWithValue("CovenantChangedDateTime", settings.CovenantChangedDateTime);
cmd.Parameters.AddWithValue("LoadedCreationDateTime", settings.LoadedCreationDateTime);
cmd.Parameters.AddWithValue("LoadedCreationID", settings.LoadedCreationID);
cmd.Parameters.AddWithValue("TerrainImageID", settings.TerrainImageID);
cmd.Parameters.AddWithValue("block_search", settings.GodBlockSearch);
cmd.Parameters.AddWithValue("casino", settings.Casino);
cmd.Parameters.AddWithValue("ParcelImageID", settings.ParcelImageID);
cmd.Parameters.AddWithValue("TelehubObject", settings.TelehubObject);
}
/// <summary>
@@ -1694,11 +1724,12 @@ namespace OpenSim.Data.MySQL
/// <param name="row"></param>
/// <param name="entry"></param>
/// <param name="parcelID"></param>
private static void FillLandAccessCommand(MySqlCommand cmd, ParcelManager.ParcelAccessEntry entry, UUID parcelID)
private static void FillLandAccessCommand(MySqlCommand cmd, LandAccessEntry entry, UUID parcelID)
{
cmd.Parameters.AddWithValue("LandUUID", parcelID.ToString());
cmd.Parameters.AddWithValue("AccessUUID", entry.AgentID.ToString());
cmd.Parameters.AddWithValue("Flags", entry.Flags);
cmd.Parameters.AddWithValue("Expires", entry.Expires.ToString());
}
/// <summary>
@@ -1833,5 +1864,72 @@ namespace OpenSim.Data.MySQL
}
}
}
private void LoadSpawnPoints(RegionSettings rs)
{
rs.ClearSpawnPoints();
lock (m_dbLock)
{
using (MySqlConnection dbcon = new MySqlConnection(m_connectionString))
{
dbcon.Open();
using (MySqlCommand cmd = dbcon.CreateCommand())
{
cmd.CommandText = "select Yaw, Pitch, Distance from spawn_points where RegionID = ?RegionID";
cmd.Parameters.AddWithValue("?RegionID", rs.RegionUUID.ToString());
using (IDataReader r = cmd.ExecuteReader())
{
while (r.Read())
{
SpawnPoint sp = new SpawnPoint();
sp.Yaw = (float)r["Yaw"];
sp.Pitch = (float)r["Pitch"];
sp.Distance = (float)r["Distance"];
rs.AddSpawnPoint(sp);
}
}
}
}
}
}
private void SaveSpawnPoints(RegionSettings rs)
{
lock (m_dbLock)
{
using (MySqlConnection dbcon = new MySqlConnection(m_connectionString))
{
dbcon.Open();
using (MySqlCommand cmd = dbcon.CreateCommand())
{
cmd.CommandText = "delete from spawn_points where RegionID = ?RegionID";
cmd.Parameters.AddWithValue("?RegionID", rs.RegionUUID.ToString());
cmd.ExecuteNonQuery();
cmd.Parameters.Clear();
cmd.CommandText = "insert into spawn_points (RegionID, Yaw, Pitch, Distance) values ( ?RegionID, ?Yaw, ?Pitch, ?Distance)";
foreach (SpawnPoint p in rs.SpawnPoints())
{
cmd.Parameters.AddWithValue("?RegionID", rs.RegionUUID.ToString());
cmd.Parameters.AddWithValue("?Yaw", p.Yaw);
cmd.Parameters.AddWithValue("?Pitch", p.Pitch);
cmd.Parameters.AddWithValue("?Distance", p.Distance);
cmd.ExecuteNonQuery();
cmd.Parameters.Clear();
}
}
}
}
}
}
}

View File

@@ -94,3 +94,12 @@ BEGIN;
alter table regions modify column regionName varchar(128) default NULL;
COMMIT;
:VERSION 9 # ------------
BEGIN;
alter table regions add column `parcelMapTexture` varchar(36) default NULL;
COMMIT;

View File

@@ -841,4 +841,45 @@ alter table regionban ENGINE = MyISAM;
alter table regionsettings ENGINE = MyISAM;
alter table terrain ENGINE = MyISAM;
COMMIT;
COMMIT;
:VERSION 39 #--------------- Telehub support
BEGIN;
CREATE TABLE IF NOT EXISTS `spawn_points` (
`RegionID` varchar(36) COLLATE utf8_unicode_ci NOT NULL,
`Yaw` float NOT NULL,
`Pitch` float NOT NULL,
`Distance` float NOT NULL,
KEY `RegionID` (`RegionID`)
) ENGINE=Innodb;
ALTER TABLE `regionsettings` ADD COLUMN `TelehubObject` varchar(36) NOT NULL;
COMMIT;
:VERSION 40 #---------------- Parcels for sale
BEGIN;
ALTER TABLE `regionsettings` ADD COLUMN `parcel_tile_ID` char(36) NOT NULL DEFAULT '00000000-0000-0000-0000-000000000000';
COMMIT;
:VERSION 41 #---------------- Timed bans/access
BEGIN;
ALTER TABLE `landaccesslist` ADD COLUMN `Expires` INTEGER NOT NULL DEFAULT 0;
COMMIT;
:VERSION 42 #--------------------- Region Covenant changed time
BEGIN;
ALTER TABLE regionsettings ADD COLUMN covenant_datetime int unsigned NOT NULL DEFAULT '0';
COMMIT;
:VERSION 43 #---------------------
BEGIN;
ALTER TABLE `regionsettings` MODIFY COLUMN `TelehubObject` VARCHAR(36) NOT NULL DEFAULT '00000000-0000-0000-0000-000000000000';
COMMIT;

View File

@@ -56,13 +56,21 @@ namespace OpenSim.Data.Null
/// <returns></returns>
public FriendsData[] GetFriends(string userID)
{
List<FriendsData> lst = m_Data.FindAll(delegate (FriendsData fdata)
List<FriendsData> lst = m_Data.FindAll(fdata =>
{
return fdata.PrincipalID == userID.ToString();
});
if (lst != null)
{
lst.ForEach(f =>
{
FriendsData f2 = m_Data.Find(candidateF2 => f.Friend == candidateF2.PrincipalID);
if (f2 != null) { f.Data["TheirFlags"] = f2.Data["Flags"]; }
});
return lst.ToArray();
}
return new FriendsData[0];
}

View File

@@ -40,24 +40,40 @@ namespace OpenSim.Data.Null
{
private static NullRegionData Instance = null;
/// <summary>
/// Should we use the static instance for all invocations?
/// </summary>
private bool m_useStaticInstance = true;
// private static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType);
Dictionary<UUID, RegionData> m_regionData = new Dictionary<UUID, RegionData>();
public NullRegionData(string connectionString, string realm)
{
if (Instance == null)
// m_log.DebugFormat(
// "[NULL REGION DATA]: Constructor got connectionString {0}, realm {1}", connectionString, realm);
// The !static connection string is a hack so that regression tests can use this module without a high degree of fragility
// in having to deal with the static reference in the once-loaded NullRegionData class.
//
// In standalone operation, we have to use only one instance of this class since the login service and
// simulator have no other way of using a common data store.
if (connectionString == "!static")
m_useStaticInstance = false;
else if (Instance == null)
Instance = this;
//Console.WriteLine("[XXX] NullRegionData constructor");
}
private delegate bool Matcher(string value);
public List<RegionData> Get(string regionName, UUID scopeID)
{
if (Instance != this)
if (m_useStaticInstance && Instance != this)
return Instance.Get(regionName, scopeID);
// m_log.DebugFormat("[NULL REGION DATA]: Getting region {0}, scope {1}", regionName, scopeID);
string cleanName = regionName.ToLower();
// Handle SQL wildcards
@@ -82,6 +98,7 @@ namespace OpenSim.Data.Null
cleanName = cleanName.Remove(cleanName.Length - 1);
}
}
Matcher queryMatch;
if (wildcardPrefix && wildcardSuffix)
queryMatch = delegate(string s) { return s.Contains(cleanName); };
@@ -110,7 +127,7 @@ namespace OpenSim.Data.Null
public RegionData Get(int posX, int posY, UUID scopeID)
{
if (Instance != this)
if (m_useStaticInstance && Instance != this)
return Instance.Get(posX, posY, scopeID);
List<RegionData> ret = new List<RegionData>();
@@ -129,7 +146,7 @@ namespace OpenSim.Data.Null
public RegionData Get(UUID regionID, UUID scopeID)
{
if (Instance != this)
if (m_useStaticInstance && Instance != this)
return Instance.Get(regionID, scopeID);
if (m_regionData.ContainsKey(regionID))
@@ -140,7 +157,7 @@ namespace OpenSim.Data.Null
public List<RegionData> Get(int startX, int startY, int endX, int endY, UUID scopeID)
{
if (Instance != this)
if (m_useStaticInstance && Instance != this)
return Instance.Get(startX, startY, endX, endY, scopeID);
List<RegionData> ret = new List<RegionData>();
@@ -156,9 +173,12 @@ namespace OpenSim.Data.Null
public bool Store(RegionData data)
{
if (Instance != this)
if (m_useStaticInstance && Instance != this)
return Instance.Store(data);
// m_log.DebugFormat(
// "[NULL REGION DATA]: Storing region {0} {1}, scope {2}", data.RegionName, data.RegionID, data.ScopeID);
m_regionData[data.RegionID] = data;
return true;
@@ -166,7 +186,7 @@ namespace OpenSim.Data.Null
public bool SetDataItem(UUID regionID, string item, string value)
{
if (Instance != this)
if (m_useStaticInstance && Instance != this)
return Instance.SetDataItem(regionID, item, value);
if (!m_regionData.ContainsKey(regionID))
@@ -179,9 +199,11 @@ namespace OpenSim.Data.Null
public bool Delete(UUID regionID)
{
if (Instance != this)
if (m_useStaticInstance && Instance != this)
return Instance.Delete(regionID);
// m_log.DebugFormat("[NULL REGION DATA]: Deleting region {0}", regionID);
if (!m_regionData.ContainsKey(regionID))
return false;

View File

@@ -466,4 +466,9 @@ ALTER TABLE `land` ADD COLUMN `MediaSize` VARCHAR(16) NOT NULL DEFAULT '0,0';
ALTER TABLE `land` ADD COLUMN `MediaLoop` BOOLEAN NOT NULL DEFAULT FALSE;
ALTER TABLE `land` ADD COLUMN `ObscureMusic` BOOLEAN NOT NULL DEFAULT FALSE;
ALTER TABLE `land` ADD COLUMN `ObscureMedia` BOOLEAN NOT NULL DEFAULT FALSE;
COMMIT;
COMMIT;
:VERSION 22
BEGIN;
ALTER TABLE regionsettings ADD COLUMN covenant_datetime INTEGER NOT NULL default 0;
COMMIT;

View File

@@ -75,7 +75,7 @@ namespace OpenSim.Data.SQLite
cmd.Parameters.AddWithValue(":PrincipalID", principalID.ToString());
cmd.Parameters.AddWithValue(":Friend", friend);
ExecuteNonQuery(cmd, cmd.Connection);
ExecuteNonQuery(cmd, m_Connection);
return true;
}

View File

@@ -759,7 +759,7 @@ namespace OpenSim.Data.SQLite
landaccesslist.Rows.Remove(rowsToDelete[iter]);
}
rowsToDelete.Clear();
foreach (ParcelManager.ParcelAccessEntry entry in parcel.LandData.ParcelAccessList)
foreach (LandAccessEntry entry in parcel.LandData.ParcelAccessList)
{
DataRow newAccessRow = landaccesslist.NewRow();
fillLandAccessRow(newAccessRow, entry, parcel.LandData.GlobalID);
@@ -1185,6 +1185,7 @@ namespace OpenSim.Data.SQLite
createCol(regionsettings, "fixed_sun", typeof (Int32));
createCol(regionsettings, "sun_position", typeof (Double));
createCol(regionsettings, "covenant", typeof(String));
createCol(regionsettings, "covenant_datetime", typeof(Int32));
createCol(regionsettings, "map_tile_ID", typeof(String));
regionsettings.PrimaryKey = new DataColumn[] { regionsettings.Columns["regionUUID"] };
return regionsettings;
@@ -1456,7 +1457,7 @@ namespace OpenSim.Data.SQLite
newData.UserLocation = Vector3.Zero;
newData.UserLookAt = Vector3.Zero;
}
newData.ParcelAccessList = new List<ParcelManager.ParcelAccessEntry>();
newData.ParcelAccessList = new List<LandAccessEntry>();
UUID authBuyerID = UUID.Zero;
UUID.TryParse((string)row["AuthbuyerID"], out authBuyerID);
@@ -1509,6 +1510,7 @@ namespace OpenSim.Data.SQLite
newSettings.FixedSun = Convert.ToBoolean(row["fixed_sun"]);
newSettings.SunPosition = Convert.ToDouble(row["sun_position"]);
newSettings.Covenant = new UUID((String) row["covenant"]);
newSettings.CovenantChangedDateTime = Convert.ToInt32(row["covenant_datetime"]);
newSettings.TerrainImageID = new UUID((String)row["map_tile_ID"]);
return newSettings;
@@ -1519,12 +1521,12 @@ namespace OpenSim.Data.SQLite
/// </summary>
/// <param name="row"></param>
/// <returns></returns>
private static ParcelManager.ParcelAccessEntry buildLandAccessData(DataRow row)
private static LandAccessEntry buildLandAccessData(DataRow row)
{
ParcelManager.ParcelAccessEntry entry = new ParcelManager.ParcelAccessEntry();
LandAccessEntry entry = new LandAccessEntry();
entry.AgentID = new UUID((string) row["AccessUUID"]);
entry.Flags = (AccessList) row["Flags"];
entry.Time = new DateTime();
entry.Expires = 0;
return entry;
}
@@ -1787,7 +1789,7 @@ namespace OpenSim.Data.SQLite
/// <param name="row"></param>
/// <param name="entry"></param>
/// <param name="parcelID"></param>
private static void fillLandAccessRow(DataRow row, ParcelManager.ParcelAccessEntry entry, UUID parcelID)
private static void fillLandAccessRow(DataRow row, LandAccessEntry entry, UUID parcelID)
{
row["LandUUID"] = parcelID.ToString();
row["AccessUUID"] = entry.AgentID.ToString();
@@ -1833,6 +1835,7 @@ namespace OpenSim.Data.SQLite
row["fixed_sun"] = settings.FixedSun;
row["sun_position"] = settings.SunPosition;
row["covenant"] = settings.Covenant.ToString();
row["covenant_datetime"] = settings.CovenantChangedDateTime;
row["map_tile_ID"] = settings.TerrainImageID.ToString();
}

View File

@@ -297,7 +297,6 @@ namespace OpenSim.Data.Tests
pbshap.ProfileEnd = ushort.MaxValue;
pbshap.ProfileHollow = ushort.MaxValue;
Vector3 scale = new Vector3(random.Next(),random.Next(),random.Next());
byte updatef = (byte) random.Next(127);
RegionInfo regionInfo = new RegionInfo();
regionInfo.RegionID = region3;
@@ -336,7 +335,6 @@ namespace OpenSim.Data.Tests
sop.LinkNum = linknum;
sop.ClickAction = clickaction;
sop.Scale = scale;
sop.UpdateFlag = updatef;
//Tests if local part accepted the parameters:
Assert.That(regionh,Is.EqualTo(sop.RegionHandle), "Assert.That(regionh,Is.EqualTo(sop.RegionHandle))");
@@ -369,7 +367,6 @@ namespace OpenSim.Data.Tests
Assert.That(linknum,Is.EqualTo(sop.LinkNum), "Assert.That(linknum,Is.EqualTo(sop.LinkNum))");
Assert.That(clickaction,Is.EqualTo(sop.ClickAction), "Assert.That(clickaction,Is.EqualTo(sop.ClickAction))");
Assert.That(scale,Is.EqualTo(sop.Scale), "Assert.That(scale,Is.EqualTo(sop.Scale))");
Assert.That(updatef,Is.EqualTo(sop.UpdateFlag), "Assert.That(updatef,Is.EqualTo(sop.UpdateFlag))");
// This is necessary or object will not be inserted in DB
sop.Flags = PrimFlags.None;
@@ -469,7 +466,6 @@ namespace OpenSim.Data.Tests
PrimitiveBaseShape pbshap = new PrimitiveBaseShape();
pbshap = PrimitiveBaseShape.Default;
Vector3 scale = new Vector3(random.Next(),random.Next(),random.Next());
byte updatef = (byte) random.Next(127);
// Updates the region with new values
SceneObjectGroup sog2 = FindSOG("Adam West", region3);
@@ -499,7 +495,6 @@ namespace OpenSim.Data.Tests
sog2.RootPart.LinkNum = linknum;
sog2.RootPart.ClickAction = clickaction;
sog2.RootPart.Scale = scale;
sog2.RootPart.UpdateFlag = updatef;
db.StoreObject(sog2, region3);
List<SceneObjectGroup> sogs = db.LoadObjects(region3);
@@ -690,7 +685,7 @@ namespace OpenSim.Data.Tests
SceneObjectGroup sog = GetMySOG("object1");
InventoryItemBase i = NewItem(item1, zero, zero, itemname1, zero);
Assert.That(sog.AddInventoryItem(null, sog.RootPart.LocalId, i, zero), Is.True);
Assert.That(sog.AddInventoryItem(zero, sog.RootPart.LocalId, i, zero), Is.True);
TaskInventoryItem t = sog.GetInventoryItem(sog.RootPart.LocalId, item1);
Assert.That(t.Name, Is.EqualTo(itemname1), "Assert.That(t.Name, Is.EqualTo(itemname1))");
@@ -767,7 +762,7 @@ namespace OpenSim.Data.Tests
i.CreationDate = creationd;
SceneObjectGroup sog = GetMySOG("object1");
Assert.That(sog.AddInventoryItem(null, sog.RootPart.LocalId, i, zero), Is.True);
Assert.That(sog.AddInventoryItem(zero, sog.RootPart.LocalId, i, zero), Is.True);
TaskInventoryItem t = sog.GetInventoryItem(sog.RootPart.LocalId, id);
Assert.That(t.Name, Is.EqualTo(name), "Assert.That(t.Name, Is.EqualTo(name))");
@@ -812,10 +807,10 @@ namespace OpenSim.Data.Tests
SceneObjectGroup sog = FindSOG("object1", region1);
Assert.That(sog.AddInventoryItem(null, sog.RootPart.LocalId, ib1, zero), Is.True);
Assert.That(sog.AddInventoryItem(null, sog.RootPart.LocalId, ib2, zero), Is.True);
Assert.That(sog.AddInventoryItem(null, sog.RootPart.LocalId, ib3, zero), Is.True);
Assert.That(sog.AddInventoryItem(null, sog.RootPart.LocalId, ib4, zero), Is.True);
Assert.That(sog.AddInventoryItem(zero, sog.RootPart.LocalId, ib1, zero), Is.True);
Assert.That(sog.AddInventoryItem(zero, sog.RootPart.LocalId, ib2, zero), Is.True);
Assert.That(sog.AddInventoryItem(zero, sog.RootPart.LocalId, ib3, zero), Is.True);
Assert.That(sog.AddInventoryItem(zero, sog.RootPart.LocalId, ib4, zero), Is.True);
TaskInventoryItem t1 = sog.GetInventoryItem(sog.RootPart.LocalId, i1);
Assert.That(t1.Name, Is.EqualTo(ib1.Name), "Assert.That(t1.Name, Is.EqualTo(ib1.Name))");

View File

@@ -296,7 +296,7 @@ namespace OpenSim.Framework
if (args["start_pos"] != null)
Vector3.TryParse(args["start_pos"].AsString(), out startpos);
m_log.InfoFormat("[AGENTCIRCUITDATA]: agentid={0}, child={1}, startpos={2}", AgentID, child, startpos);
//m_log.InfoFormat("[AGENTCIRCUITDATA]: agentid={0}, child={1}, startpos={2}", AgentID, child, startpos);
try
{
@@ -311,7 +311,7 @@ namespace OpenSim.Framework
if (args.ContainsKey("packed_appearance") && (args["packed_appearance"].Type == OSDType.Map))
{
Appearance.Unpack((OSDMap)args["packed_appearance"]);
m_log.InfoFormat("[AGENTCIRCUITDATA] unpacked appearance");
// m_log.InfoFormat("[AGENTCIRCUITDATA] unpacked appearance");
}
else
{

View File

@@ -35,22 +35,36 @@ namespace OpenSim.Framework
/// </summary>
public class AgentCircuitManager
{
public Dictionary<uint, AgentCircuitData> AgentCircuits = new Dictionary<uint, AgentCircuitData>();
public Dictionary<UUID, AgentCircuitData> AgentCircuitsByUUID = new Dictionary<UUID, AgentCircuitData>();
/// <summary>
/// Agent circuits indexed by circuit code.
/// </summary>
/// <remarks>
/// We lock this for operations both on this dictionary and on m_agentCircuitsByUUID
/// </remarks>
private Dictionary<uint, AgentCircuitData> m_agentCircuits = new Dictionary<uint, AgentCircuitData>();
/// <summary>
/// Agent circuits indexed by agent UUID.
/// </summary>
private Dictionary<UUID, AgentCircuitData> m_agentCircuitsByUUID = new Dictionary<UUID, AgentCircuitData>();
public virtual AuthenticateResponse AuthenticateSession(UUID sessionID, UUID agentID, uint circuitcode)
{
AgentCircuitData validcircuit = null;
if (AgentCircuits.ContainsKey(circuitcode))
lock (m_agentCircuits)
{
validcircuit = AgentCircuits[circuitcode];
if (m_agentCircuits.ContainsKey(circuitcode))
validcircuit = m_agentCircuits[circuitcode];
}
AuthenticateResponse user = new AuthenticateResponse();
if (validcircuit == null)
{
//don't have this circuit code in our list
user.Authorised = false;
return (user);
return user;
}
if ((sessionID == validcircuit.SessionID) && (agentID == validcircuit.AgentID))
@@ -72,7 +86,7 @@ namespace OpenSim.Framework
user.Authorised = false;
}
return (user);
return user;
}
/// <summary>
@@ -82,73 +96,93 @@ namespace OpenSim.Framework
/// <param name="agentData"></param>
public virtual void AddNewCircuit(uint circuitCode, AgentCircuitData agentData)
{
lock (AgentCircuits)
lock (m_agentCircuits)
{
if (AgentCircuits.ContainsKey(circuitCode))
if (m_agentCircuits.ContainsKey(circuitCode))
{
AgentCircuits[circuitCode] = agentData;
AgentCircuitsByUUID[agentData.AgentID] = agentData;
m_agentCircuits[circuitCode] = agentData;
m_agentCircuitsByUUID[agentData.AgentID] = agentData;
}
else
{
AgentCircuits.Add(circuitCode, agentData);
AgentCircuitsByUUID[agentData.AgentID] = agentData;
m_agentCircuits.Add(circuitCode, agentData);
m_agentCircuitsByUUID[agentData.AgentID] = agentData;
}
}
}
public virtual void RemoveCircuit(uint circuitCode)
{
lock (AgentCircuits)
lock (m_agentCircuits)
{
if (AgentCircuits.ContainsKey(circuitCode))
if (m_agentCircuits.ContainsKey(circuitCode))
{
UUID agentID = AgentCircuits[circuitCode].AgentID;
AgentCircuits.Remove(circuitCode);
AgentCircuitsByUUID.Remove(agentID);
UUID agentID = m_agentCircuits[circuitCode].AgentID;
m_agentCircuits.Remove(circuitCode);
m_agentCircuitsByUUID.Remove(agentID);
}
}
}
public virtual void RemoveCircuit(UUID agentID)
{
lock (AgentCircuits)
lock (m_agentCircuits)
{
if (AgentCircuitsByUUID.ContainsKey(agentID))
if (m_agentCircuitsByUUID.ContainsKey(agentID))
{
uint circuitCode = AgentCircuitsByUUID[agentID].circuitcode;
AgentCircuits.Remove(circuitCode);
AgentCircuitsByUUID.Remove(agentID);
uint circuitCode = m_agentCircuitsByUUID[agentID].circuitcode;
m_agentCircuits.Remove(circuitCode);
m_agentCircuitsByUUID.Remove(agentID);
}
}
}
public AgentCircuitData GetAgentCircuitData(uint circuitCode)
{
AgentCircuitData agentCircuit = null;
AgentCircuits.TryGetValue(circuitCode, out agentCircuit);
lock (m_agentCircuits)
m_agentCircuits.TryGetValue(circuitCode, out agentCircuit);
return agentCircuit;
}
public AgentCircuitData GetAgentCircuitData(UUID agentID)
{
AgentCircuitData agentCircuit = null;
AgentCircuitsByUUID.TryGetValue(agentID, out agentCircuit);
lock (m_agentCircuits)
m_agentCircuitsByUUID.TryGetValue(agentID, out agentCircuit);
return agentCircuit;
}
/// <summary>
/// Get all current agent circuits indexed by agent UUID.
/// </summary>
/// <returns></returns>
public Dictionary<UUID, AgentCircuitData> GetAgentCircuits()
{
lock (m_agentCircuits)
return new Dictionary<UUID, AgentCircuitData>(m_agentCircuitsByUUID);
}
public void UpdateAgentData(AgentCircuitData agentData)
{
if (AgentCircuits.ContainsKey((uint) agentData.circuitcode))
lock (m_agentCircuits)
{
AgentCircuits[(uint) agentData.circuitcode].firstname = agentData.firstname;
AgentCircuits[(uint) agentData.circuitcode].lastname = agentData.lastname;
AgentCircuits[(uint) agentData.circuitcode].startpos = agentData.startpos;
if (m_agentCircuits.ContainsKey((uint) agentData.circuitcode))
{
m_agentCircuits[(uint) agentData.circuitcode].firstname = agentData.firstname;
m_agentCircuits[(uint) agentData.circuitcode].lastname = agentData.lastname;
m_agentCircuits[(uint) agentData.circuitcode].startpos = agentData.startpos;
// Updated for when we don't know them before calling Scene.NewUserConnection
AgentCircuits[(uint) agentData.circuitcode].SecureSessionID = agentData.SecureSessionID;
AgentCircuits[(uint) agentData.circuitcode].SessionID = agentData.SessionID;
// Updated for when we don't know them before calling Scene.NewUserConnection
m_agentCircuits[(uint) agentData.circuitcode].SecureSessionID = agentData.SecureSessionID;
m_agentCircuits[(uint) agentData.circuitcode].SessionID = agentData.SessionID;
// m_log.Debug("update user start pos is " + agentData.startpos.X + " , " + agentData.startpos.Y + " , " + agentData.startpos.Z);
// m_log.Debug("update user start pos is " + agentData.startpos.X + " , " + agentData.startpos.Y + " , " + agentData.startpos.Z);
}
}
}
@@ -159,38 +193,37 @@ namespace OpenSim.Framework
/// <param name="newcircuitcode"></param>
public bool TryChangeCiruitCode(uint circuitcode, uint newcircuitcode)
{
lock (AgentCircuits)
lock (m_agentCircuits)
{
if (AgentCircuits.ContainsKey((uint)circuitcode) && !AgentCircuits.ContainsKey((uint)newcircuitcode))
if (m_agentCircuits.ContainsKey((uint)circuitcode) && !m_agentCircuits.ContainsKey((uint)newcircuitcode))
{
AgentCircuitData agentData = AgentCircuits[(uint)circuitcode];
AgentCircuitData agentData = m_agentCircuits[(uint)circuitcode];
agentData.circuitcode = newcircuitcode;
AgentCircuits.Remove((uint)circuitcode);
AgentCircuits.Add(newcircuitcode, agentData);
m_agentCircuits.Remove((uint)circuitcode);
m_agentCircuits.Add(newcircuitcode, agentData);
return true;
}
}
return false;
return false;
}
public void UpdateAgentChildStatus(uint circuitcode, bool childstatus)
{
if (AgentCircuits.ContainsKey(circuitcode))
{
AgentCircuits[circuitcode].child = childstatus;
}
lock (m_agentCircuits)
if (m_agentCircuits.ContainsKey(circuitcode))
m_agentCircuits[circuitcode].child = childstatus;
}
public bool GetAgentChildStatus(uint circuitcode)
{
if (AgentCircuits.ContainsKey(circuitcode))
{
return AgentCircuits[circuitcode].child;
}
lock (m_agentCircuits)
if (m_agentCircuits.ContainsKey(circuitcode))
return m_agentCircuits[circuitcode].child;
return false;
}
}
}
}

View File

@@ -53,7 +53,6 @@ namespace OpenSim.Framework
protected AvatarWearable[] m_wearables;
protected Dictionary<int, List<AvatarAttachment>> m_attachments;
protected float m_avatarHeight = 0;
protected float m_hipOffset = 0;
public virtual int Serial
{
@@ -89,11 +88,6 @@ namespace OpenSim.Framework
set { m_avatarHeight = value; }
}
public virtual float HipOffset
{
get { return m_hipOffset; }
}
public AvatarAppearance()
{
// m_log.WarnFormat("[AVATAR APPEARANCE]: create empty appearance");
@@ -184,7 +178,6 @@ namespace OpenSim.Framework
m_visualparams = (byte[])appearance.VisualParams.Clone();
m_avatarHeight = appearance.m_avatarHeight;
m_hipOffset = appearance.m_hipOffset;
// Copy the attachment, force append mode since that ensures consistency
m_attachments = new Dictionary<int, List<AvatarAttachment>>();
@@ -271,10 +264,12 @@ namespace OpenSim.Framework
}
/// <summary>
/// Set up appearance textures.
/// Returns boolean that indicates whether the new entries actually change the
/// existing values.
/// Set up appearance texture ids.
/// </summary>
/// <returns>
/// True if any existing texture id was changed by the new data.
/// False if there were no changes or no existing texture ids.
/// </returns>
public virtual bool SetTextureEntries(Primitive.TextureEntry textureEntry)
{
if (textureEntry == null)
@@ -291,25 +286,30 @@ namespace OpenSim.Framework
if (newface == null)
{
if (oldface == null) continue;
if (oldface == null)
continue;
}
else
{
if (oldface != null && oldface.TextureID == newface.TextureID) continue;
if (oldface != null && oldface.TextureID == newface.TextureID)
continue;
}
changed = true;
}
m_texture = textureEntry;
return changed;
}
/// <summary>
/// Set up visual parameters for the avatar and refresh the avatar height
/// Returns boolean that indicates whether the new entries actually change the
/// existing values.
/// </summary>
/// <returns>
/// True if any existing visual parameter was changed by the new data.
/// False if there were no changes or no existing visual parameters.
/// </returns>
public virtual bool SetVisualParams(byte[] visualParams)
{
if (visualParams == null)
@@ -347,20 +347,18 @@ namespace OpenSim.Framework
public virtual void SetHeight()
{
m_avatarHeight = 1.23077f // Shortest possible avatar height
+ 0.516945f * (float)m_visualparams[(int)VPElement.SHAPE_HEIGHT] / 255.0f // Body height
+ 0.072514f * (float)m_visualparams[(int)VPElement.SHAPE_HEAD_SIZE] / 255.0f // Head size
+ 0.3836f * (float)m_visualparams[(int)VPElement.SHAPE_LEG_LENGTH] / 255.0f // Leg length
+ 0.08f * (float)m_visualparams[(int)VPElement.SHOES_PLATFORM_HEIGHT] / 255.0f // Shoe platform height
+ 0.07f * (float)m_visualparams[(int)VPElement.SHOES_HEEL_HEIGHT] / 255.0f // Shoe heel height
+ 0.076f * (float)m_visualparams[(int)VPElement.SHAPE_NECK_LENGTH] / 255.0f; // Neck length
m_hipOffset = (((1.23077f // Half of avatar
+ 0.516945f * (float)m_visualparams[(int)VPElement.SHAPE_HEIGHT] / 255.0f // Body height
+ 0.3836f * (float)m_visualparams[(int)VPElement.SHAPE_LEG_LENGTH] / 255.0f // Leg length
+ 0.08f * (float)m_visualparams[(int)VPElement.SHOES_PLATFORM_HEIGHT] / 255.0f // Shoe platform height
+ 0.07f * (float)m_visualparams[(int)VPElement.SHOES_HEEL_HEIGHT] / 255.0f // Shoe heel height
) / 2) - m_avatarHeight / 2) * 0.31f - 0.0425f;
// Start with shortest possible female avatar height
m_avatarHeight = 1.14597f;
// Add offset for male avatars
if (m_visualparams[(int)VPElement.SHAPE_MALE] != 0)
m_avatarHeight += 0.0848f;
// Add offsets for visual params
m_avatarHeight += 0.516945f * (float)m_visualparams[(int)VPElement.SHAPE_HEIGHT] / 255.0f
+ 0.08117f * (float)m_visualparams[(int)VPElement.SHAPE_HEAD_SIZE] / 255.0f
+ 0.3836f * (float)m_visualparams[(int)VPElement.SHAPE_LEG_LENGTH] / 255.0f
+ 0.07f * (float)m_visualparams[(int)VPElement.SHOES_PLATFORM_HEIGHT] / 255.0f
+ 0.08f * (float)m_visualparams[(int)VPElement.SHOES_HEEL_HEIGHT] / 255.0f
+ 0.076f * (float)m_visualparams[(int)VPElement.SHAPE_NECK_LENGTH] / 255.0f;
}
public virtual void SetWearable(int wearableId, AvatarWearable wearable)
@@ -591,7 +589,6 @@ namespace OpenSim.Framework
data["serial"] = OSD.FromInteger(m_serial);
data["height"] = OSD.FromReal(m_avatarHeight);
data["hipoffset"] = OSD.FromReal(m_hipOffset);
// Wearables
OSDArray wears = new OSDArray(AvatarWearable.MAX_WEARABLES);
@@ -636,8 +633,6 @@ namespace OpenSim.Framework
m_serial = data["serial"].AsInteger();
if ((data != null) && (data["height"] != null))
m_avatarHeight = (float)data["height"].AsReal();
if ((data != null) && (data["hipoffset"] != null))
m_hipOffset = (float)data["hipoffset"].AsReal();
try
{

View File

@@ -335,7 +335,7 @@ namespace OpenSim.Framework
public virtual OSDMap Pack()
{
m_log.InfoFormat("[CHILDAGENTDATAUPDATE] Pack data");
// m_log.InfoFormat("[CHILDAGENTDATAUPDATE] Pack data");
OSDMap args = new OSDMap();
args["message_type"] = OSD.FromString("AgentData");
@@ -478,7 +478,7 @@ namespace OpenSim.Framework
/// <param name="hash"></param>
public virtual void Unpack(OSDMap args, IScene scene)
{
m_log.InfoFormat("[CHILDAGENTDATAUPDATE] Unpack data");
//m_log.InfoFormat("[CHILDAGENTDATAUPDATE] Unpack data");
if (args.ContainsKey("region_id"))
UUID.TryParse(args["region_id"].AsString(), out RegionID);

View File

@@ -31,19 +31,10 @@ namespace OpenSim.Framework
{
public string PhysicsEngine { get; set; }
public string MeshEngineName { get; set; }
public bool See_into_region_from_neighbor { get; set; }
public string StorageDll { get; set; }
public string ClientstackDll { get; set; }
public bool PhysicalPrim { get; set; }
public string LibrariesXMLFile { get; set; }
public const uint DefaultAssetServerHttpPort = 8003;
public const uint DefaultRegionHttpPort = 9000;
public const uint DefaultUserServerHttpPort = 8002;
public const bool DefaultUserServerHttpSSL = false;
public const uint DefaultMessageServerHttpPort = 8006;
public const bool DefaultMessageServerHttpSSL = false;
public const uint DefaultGridServerHttpPort = 8003;
public const uint DefaultInventoryServerHttpPort = 8003;
}
}

View File

@@ -33,7 +33,7 @@ using System.Reflection;
using System.Xml;
using log4net;
using OpenMetaverse;
using OpenSim.Framework.Console;
//using OpenSim.Framework.Console;
namespace OpenSim.Framework
{

View File

@@ -31,14 +31,14 @@ using System.Collections.Generic;
using System.Diagnostics;
using System.Reflection;
using System.Text;
using System.Text.RegularExpressions;
using System.Threading;
using log4net;
using OpenSim.Framework;
namespace OpenSim.Framework.Console
{
public delegate void CommandDelegate(string module, string[] cmd);
public class Commands
public class Commands : ICommands
{
/// <summary>
/// Encapsulates a command that can be invoked from the console
@@ -532,6 +532,11 @@ namespace OpenSim.Framework.Console
public class Parser
{
// If an unquoted portion ends with an element matching this regex
// and the next element contains a space, then we have stripped
// embedded quotes that should not have been stripped
private static Regex optionRegex = new Regex("^--[a-zA-Z0-9-]+=$");
public static string[] Parse(string text)
{
List<string> result = new List<string>();
@@ -545,10 +550,38 @@ namespace OpenSim.Framework.Console
if (index % 2 == 0)
{
string[] words = unquoted[index].Split(new char[] {' '});
bool option = false;
foreach (string w in words)
{
if (w != String.Empty)
{
if (optionRegex.Match(w) == Match.Empty)
option = false;
else
option = true;
result.Add(w);
}
}
// The last item matched the regex, put the quotes back
if (option)
{
// If the line ended with it, don't do anything
if (index < (unquoted.Length - 1))
{
// Get and remove the option name
string optionText = result[result.Count - 1];
result.RemoveAt(result.Count - 1);
// Add the quoted value back
optionText += "\"" + unquoted[index + 1] + "\"";
// Push the result into our return array
result.Add(optionText);
// Skip the already used value
index++;
}
}
}
else
@@ -564,14 +597,16 @@ namespace OpenSim.Framework.Console
/// <summary>
/// A console that processes commands internally
/// </summary>
public class CommandConsole : ConsoleBase
public class CommandConsole : ConsoleBase, ICommandConsole
{
private static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType);
// private static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType);
public Commands Commands = new Commands();
public ICommands Commands { get; private set; }
public CommandConsole(string defaultPrompt) : base(defaultPrompt)
{
Commands = new Commands();
Commands.AddCommand("console", false, "help", "help [<command>]",
"Get general command list or more detailed help on a specific command", Help);
}

View File

@@ -41,7 +41,7 @@ namespace OpenSim.Framework.Console
protected string prompt = "# ";
public object ConsoleScene = null;
public object ConsoleScene { get; set; }
/// <summary>
/// The default prompt text.

View File

@@ -232,9 +232,8 @@ namespace OpenSim.Framework.Console
string uri = "/ReadResponses/" + sessionID.ToString() + "/";
m_Server.AddPollServiceHTTPHandler(uri, HandleHttpPoll,
new PollServiceEventArgs(null, HasEvents, GetEvents, NoEvents,
sessionID));
m_Server.AddPollServiceHTTPHandler(
uri, new PollServiceEventArgs(null, HasEvents, GetEvents, NoEvents, sessionID));
XmlDocument xmldoc = new XmlDocument();
XmlNode xmlnode = xmldoc.CreateNode(XmlNodeType.XmlDeclaration,
@@ -266,11 +265,6 @@ namespace OpenSim.Framework.Console
return reply;
}
private Hashtable HandleHttpPoll(Hashtable request)
{
return new Hashtable();
}
private Hashtable HandleHttpCloseSession(Hashtable request)
{
DoExpire();

View File

@@ -425,5 +425,11 @@ namespace OpenSim.Framework
AllowParcelChanges = ((regionFlags & (ulong)RegionFlags.AllowParcelChanges) == (ulong)RegionFlags.AllowParcelChanges);
AllowSetHome = ((regionFlags & (ulong)RegionFlags.AllowSetHome) == (ulong)RegionFlags.AllowSetHome);
}
public bool GroupAccess(UUID groupID)
{
return l_EstateGroups.Contains(groupID);
}
}
}

View File

@@ -84,6 +84,8 @@ namespace OpenSim.Framework
public delegate void TeleportLandmarkRequest(
IClientAPI remoteClient, AssetLandmark lm);
public delegate void TeleportCancel(IClientAPI remoteClient);
public delegate void DisconnectUser();
public delegate void RequestAvatarProperties(IClientAPI remoteClient, UUID avatarID);
@@ -175,7 +177,7 @@ namespace OpenSim.Framework
public delegate void ParcelAccessListUpdateRequest(UUID agentID, uint flags,
int landLocalID, UUID transactionID, int sequenceID,
int sections, List<ParcelManager.ParcelAccessEntry> entries,
int sections, List<LandAccessEntry> entries,
IClientAPI remote_client);
public delegate void ParcelPropertiesRequest(
@@ -359,6 +361,8 @@ namespace OpenSim.Framework
public delegate void EstateChangeInfo(IClientAPI client, UUID invoice, UUID senderID, UInt32 param1, UInt32 param2);
public delegate void EstateManageTelehub(IClientAPI client, UUID invoice, UUID senderID, string cmd, UInt32 param1);
public delegate void RequestTerrain(IClientAPI remoteClient, string clientFileName);
public delegate void BakeTerrain(IClientAPI remoteClient);
@@ -503,6 +507,7 @@ namespace OpenSim.Framework
public delegate void SimWideDeletesDelegate(IClientAPI client,UUID agentID, int flags, UUID targetID);
public delegate void SendPostcard(IClientAPI client);
public delegate void ChangeInventoryItemFlags(IClientAPI client, UUID itemID, uint flags);
#endregion
@@ -706,6 +711,12 @@ namespace OpenSim.Framework
UUID AgentId { get; }
/// <summary>
/// The scene agent for this client. This will only be set if the client has an agent in a scene (i.e. if it
/// is connected).
/// </summary>
ISceneAgent SceneAgent { get; }
UUID SessionId { get; }
UUID SecureSessionId { get; }
@@ -765,6 +776,7 @@ namespace OpenSim.Framework
event ModifyTerrain OnModifyTerrain;
event BakeTerrain OnBakeTerrain;
event EstateChangeInfo OnEstateChangeInfo;
event EstateManageTelehub OnEstateManageTelehub;
// [Obsolete("LLClientView Specific.")]
event SetAppearance OnSetAppearance;
// [Obsolete("LLClientView Specific - Replace and rename OnAvatarUpdate. Difference from SetAppearance?")]
@@ -786,6 +798,7 @@ namespace OpenSim.Framework
event RequestAvatarProperties OnRequestAvatarProperties;
event SetAlwaysRun OnSetAlwaysRun;
event TeleportLandmarkRequest OnTeleportLandmarkRequest;
event TeleportCancel OnTeleportCancel;
event DeRezObject OnDeRezObject;
event Action<IClientAPI> OnRegionHandShakeReply;
event GenericCall1 OnRequestWearables;
@@ -1007,15 +1020,16 @@ namespace OpenSim.Framework
event GroupVoteHistoryRequest OnGroupVoteHistoryRequest;
event SimWideDeletesDelegate OnSimWideDeletes;
event SendPostcard OnSendPostcard;
event ChangeInventoryItemFlags OnChangeInventoryItemFlags;
event MuteListEntryUpdate OnUpdateMuteListEntry;
event MuteListEntryRemove OnRemoveMuteListEntry;
event GodlikeMessage onGodlikeMessage;
event GodUpdateRegionInfoUpdate OnGodUpdateRegionInfoUpdate;
/// <summary>
/// Set the debug level at which packet output should be printed to console.
/// </summary>
void SetDebugPacketLevel(int newDebug);
int DebugPacketLevel { get; set; }
void InPacket(object NewPack);
void ProcessInPacket(Packet NewPack);
@@ -1071,7 +1085,15 @@ namespace OpenSim.Framework
void SendWindData(Vector2[] windSpeeds);
void SendCloudData(float[] cloudCover);
/// <summary>
/// Sent when an agent completes its movement into a region.
/// </summary>
/// <remarks>
/// This packet marks completion of the arrival of a root avatar in a region, whether through login, region
/// crossing or direct teleport.
/// </remarks>
void MoveAgentIntoRegion(RegionInfo regInfo, Vector3 pos, Vector3 look);
void InformClientOfNeighbour(ulong neighbourHandle, IPEndPoint neighbourExternalEndPoint);
/// <summary>
@@ -1101,7 +1123,14 @@ namespace OpenSim.Framework
void SetChildAgentThrottle(byte[] throttle);
void SendAvatarDataImmediate(ISceneEntity avatar);
void SendPrimUpdate(ISceneEntity entity, PrimUpdateFlags updateFlags);
/// <summary>
/// Send a positional, velocity, etc. update to the viewer for a given entity.
/// </summary>
/// <param name="entity"></param>
/// <param name="updateFlags"></param>
void SendEntityUpdate(ISceneEntity entity, PrimUpdateFlags updateFlags);
void ReprioritizeUpdates();
void FlushPrimUpdates();
@@ -1123,6 +1152,8 @@ namespace OpenSim.Framework
void SendTaskInventory(UUID taskID, short serial, byte[] fileName);
void SendTelehubInfo(UUID ObjectID, string ObjectName, Vector3 ObjectPos, Quaternion ObjectRot, List<Vector3> SpawnPoint);
/// <summary>
/// Used by the server to inform the client of new inventory items and folders.
/// </summary>
@@ -1212,7 +1243,7 @@ namespace OpenSim.Framework
void SendEstateCovenantInformation(UUID covenant);
void SendDetailedEstateData(UUID invoice, string estateName, uint estateID, uint parentEstate, uint estateFlags,
uint sunPosition, UUID covenant, string abuseEmail, UUID estateOwner);
uint sunPosition, UUID covenant, uint covenantChanged, string abuseEmail, UUID estateOwner);
/// <summary>
/// Send land properties to the client.
@@ -1228,7 +1259,7 @@ namespace OpenSim.Framework
float simObjectBonusFactor, int parcelObjectCapacity, int simObjectCapacity,
uint regionFlags);
void SendLandAccessListData(List<UUID> avatars, uint accessFlag, int localLandID);
void SendLandAccessListData(List<LandAccessEntry> accessList, uint accessFlag, int localLandID);
void SendForceClientSelectObjects(List<uint> objectIDs);
void SendCameraConstraint(Vector4 ConstraintPlane);
void SendLandObjectOwners(LandData land, List<UUID> groups, Dictionary<UUID, int> ownersAndCount);

View File

@@ -0,0 +1,90 @@
/*
* Copyright (c) Contributors, http://opensimulator.org/
* See CONTRIBUTORS.TXT for a full list of copyright holders.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions are met:
* * Redistributions of source code must retain the above copyright
* notice, this list of conditions and the following disclaimer.
* * Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in the
* documentation and/or other materials provided with the distribution.
* * Neither the name of the OpenSimulator Project nor the
* names of its contributors may be used to endorse or promote products
* derived from this software without specific prior written permission.
*
* THIS SOFTWARE IS PROVIDED BY THE DEVELOPERS ``AS IS'' AND ANY
* EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
* WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
* DISCLAIMED. IN NO EVENT SHALL THE CONTRIBUTORS BE LIABLE FOR ANY
* DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
* (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
* LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
* ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
using System;
using System.Collections.Generic;
using System.Xml;
namespace OpenSim.Framework
{
public delegate void CommandDelegate(string module, string[] cmd);
public interface ICommands
{
void FromXml(XmlElement root, CommandDelegate fn);
/// <summary>
/// Get help for the given help string
/// </summary>
/// <param name="helpParts">Parsed parts of the help string. If empty then general help is returned.</param>
/// <returns></returns>
List<string> GetHelp(string[] cmd);
/// <summary>
/// Add a command to those which can be invoked from the console.
/// </summary>
/// <param name="module"></param>
/// <param name="command"></param>
/// <param name="help"></param>
/// <param name="longhelp"></param>
/// <param name="fn"></param>
void AddCommand(string module, bool shared, string command, string help, string longhelp, CommandDelegate fn);
/// <summary>
/// Add a command to those which can be invoked from the console.
/// </summary>
/// <param name="module"></param>
/// <param name="command"></param>
/// <param name="help"></param>
/// <param name="longhelp"></param>
/// <param name="descriptivehelp"></param>
/// <param name="fn"></param>
void AddCommand(string module, bool shared, string command,
string help, string longhelp, string descriptivehelp,
CommandDelegate fn);
string[] FindNextOption(string[] cmd, bool term);
string[] Resolve(string[] cmd);
XmlElement GetXml(XmlDocument doc);
}
public interface ICommandConsole : IConsole
{
ICommands Commands { get; }
/// <summary>
/// Display a command prompt on the console and wait for user input
/// </summary>
void Prompt();
void RunCommand(string cmd);
string ReadLine(string p, bool isCommand, bool e);
}
}

View File

@@ -25,44 +25,29 @@
* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
using System;
using System.Collections.Generic;
using OpenMetaverse;
namespace OpenSim.Framework
{
public delegate void ExpectUserDelegate(AgentCircuitData agent);
public delegate void UpdateNeighbours(List<RegionInfo> neighbours);
public delegate void AgentCrossing(UUID agentID, Vector3 position, bool isFlying);
public delegate void PrimCrossing(UUID primID, Vector3 position, bool isPhysical);
public delegate void AcknowledgeAgentCross(UUID agentID);
public delegate void AcknowledgePrimCross(UUID PrimID);
public delegate bool CloseAgentConnection(UUID agentID);
public delegate bool ChildAgentUpdate(ChildAgentDataUpdate cAgentData);
public delegate void LogOffUser(UUID agentID, UUID regionSecret, string message);
public delegate LandData GetLandData(uint x, uint y);
public interface IRegionCommsListener
public interface IConsole
{
event ExpectUserDelegate OnExpectUser;
event GenericCall2 OnExpectChildAgent;
event AgentCrossing OnAvatarCrossingIntoRegion;
event PrimCrossing OnPrimCrossingIntoRegion;
event AcknowledgeAgentCross OnAcknowledgeAgentCrossed;
event AcknowledgePrimCross OnAcknowledgePrimCrossed;
event UpdateNeighbours OnNeighboursUpdate;
event CloseAgentConnection OnCloseAgentConnection;
event ChildAgentUpdate OnChildAgentUpdate;
event LogOffUser OnLogOffUser;
event GetLandData OnGetLandData;
object ConsoleScene { get; }
void Output(string text, string level);
void Output(string text);
void OutputFormat(string format, params object[] components);
string CmdPrompt(string p);
string CmdPrompt(string p, string def);
string CmdPrompt(string p, List<char> excludedCharacters);
string CmdPrompt(string p, string def, List<char> excludedCharacters);
// Displays a command prompt and returns a default value, user may only enter 1 of 2 options
string CmdPrompt(string prompt, string defaultresponse, List<string> options);
// Displays a prompt and waits for the user to enter a string, then returns that string
// (Done with no echo and suitable for passwords)
string PasswdPrompt(string p);
}
}
}

View File

@@ -73,9 +73,9 @@ namespace OpenSim.Framework
bool IsRestrictedFromLand(UUID avatar);
void SendLandUpdateToClient(IClientAPI remote_client);
void SendLandUpdateToClient(bool snap_selection, IClientAPI remote_client);
List<UUID> CreateAccessListArrayByFlag(AccessList flag);
List<LandAccessEntry> CreateAccessListArrayByFlag(AccessList flag);
void SendAccessList(UUID agentID, UUID sessionID, uint flags, int sequenceID, IClientAPI remote_client);
void UpdateAccessList(uint flags, UUID transactionID, int sequenceID, int sections, List<ParcelManager.ParcelAccessEntry> entries, IClientAPI remote_client);
void UpdateAccessList(uint flags, UUID transactionID, int sequenceID, int sections, List<LandAccessEntry> entries, IClientAPI remote_client);
void UpdateLandBitmapByteArray();
void SetLandBitmapFromByteArray();
bool[,] GetLandBitmap();
@@ -130,5 +130,11 @@ namespace OpenSim.Framework
/// </summary>
/// <param name="url"></param>
void SetMusicUrl(string url);
/// <summary>
/// Get the music url for this land parcel
/// </summary>
/// <returns>The music url.</returns>
string GetMusicUrl();
}
}

View File

@@ -36,8 +36,8 @@ namespace OpenSim.Framework
int amount);
int GetBalance(UUID agentID);
bool UploadCovered(IClientAPI client, int amount);
bool AmountCovered(IClientAPI client, int amount);
bool UploadCovered(UUID agentID, int amount);
bool AmountCovered(UUID agentID, int amount);
void ApplyCharge(UUID agentID, int amount, string text);
void ApplyUploadCharge(UUID agentID, int amount, string text);
void MoveMoney(UUID fromUser, UUID toUser, int amount, string text);

View File

@@ -26,7 +26,7 @@
*/
using OpenMetaverse;
using OpenSim.Framework.Console;
//using OpenSim.Framework.Console;
using Nini.Config;
namespace OpenSim.Framework
@@ -68,12 +68,14 @@ namespace OpenSim.Framework
event restart OnRestart;
/// <summary>
/// Register the new client with the scene. The client starts off as a child agent - the later agent crossing
/// will promote it to a root agent.
/// Add a new client and create a presence for it. All clients except initial login clients will starts off as a child agent
/// - the later agent crossing will promote it to a root agent.
/// </summary>
/// <param name="client"></param>
/// <param name="type">The type of agent to add.</param>
void AddNewClient(IClientAPI client, PresenceType type);
/// <returns>
/// The scene agent if the new client was added or if an agent that already existed.</returns>
ISceneAgent AddNewClient(IClientAPI client, PresenceType type);
/// <summary>
/// Remove the given client from the scene.
@@ -87,28 +89,31 @@ namespace OpenSim.Framework
string GetSimulatorVersion();
/// <summary>
/// Is the agent denoted by the given agentID a child presence in this scene?
/// </summary>
///
/// Used by ClientView when a 'kick everyone' or 'estate message' occurs
///
/// <param name="avatarID">AvatarID to lookup</param>
/// <returns>true if the presence is a child agent, false if the presence is a root exception</returns>
/// <exception cref="System.NullReferenceException">
/// Thrown if the agent does not exist.
/// </exception>
bool PresenceChildStatus(UUID agentId);
bool TryGetScenePresence(UUID agentID, out object scenePresence);
T RequestModuleInterface<T>();
T[] RequestModuleInterfaces<T>();
/// <summary>
/// Register an interface to a region module. This allows module methods to be called directly as
/// well as via events. If there is already a module registered for this interface, it is not replaced
/// (is this the best behaviour?)
/// </summary>
/// <param name="mod"></param>
void RegisterModuleInterface<M>(M mod);
void StackModuleInterface<M>(M mod);
void AddCommand(object module, string command, string shorthelp, string longhelp, CommandDelegate callback);
/// <summary>
/// For the given interface, retrieve the region module which implements it.
/// </summary>
/// <returns>null if there is no registered module implementing that interface</returns>
T RequestModuleInterface<T>();
/// <summary>
/// For the given interface, retrieve an array of region modules that implement it.
/// </summary>
/// <returns>an empty array if there are no registered modules implementing that interface</returns>
T[] RequestModuleInterfaces<T>();
// void AddCommand(object module, string command, string shorthelp, string longhelp, CommandDelegate callback);
ISceneObject DeserializeObject(string representation);

View File

@@ -0,0 +1,75 @@
/*
* Copyright (c) Contributors, http://opensimulator.org/
* See CONTRIBUTORS.TXT for a full list of copyright holders.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions are met:
* * Redistributions of source code must retain the above copyright
* notice, this list of conditions and the following disclaimer.
* * Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in the
* documentation and/or other materials provided with the distribution.
* * Neither the name of the OpenSimulator Project nor the
* names of its contributors may be used to endorse or promote products
* derived from this software without specific prior written permission.
*
* THIS SOFTWARE IS PROVIDED BY THE DEVELOPERS ``AS IS'' AND ANY
* EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
* WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
* DISCLAIMED. IN NO EVENT SHALL THE CONTRIBUTORS BE LIABLE FOR ANY
* DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
* (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
* LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
* ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
using System;
namespace OpenSim.Framework
{
/// <summary>
/// An agent in the scene.
/// </summary>
/// <remarks>
/// Interface is a work in progress. Please feel free to add other required properties and methods.
/// </remarks>
public interface ISceneAgent : ISceneEntity
{
/// <value>
/// The client controlling this presence
/// </value>
IClientAPI ControllingClient { get; }
/// <summary>
/// What type of presence is this? User, NPC, etc.
/// </summary>
PresenceType PresenceType { get; }
/// <summary>
/// If true, then the agent has no avatar in the scene.
/// The agent exists to relay data from a region that neighbours the current position of the user's avatar.
/// Occasionally data is relayed, such as which a user clicks an item in a neighbouring region.
/// </summary>
bool IsChildAgent { get; }
/// <summary>
/// Avatar appearance data.
/// </summary>
/// <remarks>
// Because appearance setting is in a module, we actually need
// to give it access to our appearance directly, otherwise we
// get a synchronization issue.
/// </remarks>
AvatarAppearance Appearance { get; set; }
/// <summary>
/// Send initial scene data to the client controlling this agent
/// </summary>
/// <remarks>
/// This includes scene object data and the appearance data of other avatars.
/// </remarks>
void SendInitialDataToMe();
}
}

View File

@@ -34,6 +34,7 @@ namespace OpenSim.Framework
string Name { get; set; }
UUID UUID { get; }
uint LocalId { get; }
Vector3 AbsolutePosition { get; }
}
}

View File

@@ -33,6 +33,12 @@ namespace OpenSim.Framework
public interface ISceneObject
{
UUID UUID { get; }
/// <summary>
/// The owner of this object.
/// </summary>
UUID OwnerID { get; set; }
ISceneObject CloneForNewScene();
string ToXml2();
string ExtraToXmlString();

View File

@@ -34,6 +34,13 @@ using OpenMetaverse;
namespace OpenSim.Framework
{
public class LandAccessEntry
{
public UUID AgentID;
public int Expires;
public AccessList Flags;
}
/// <summary>
/// Details of a Parcel of land
/// </summary>
@@ -73,7 +80,7 @@ namespace OpenSim.Framework
private string _mediaURL = String.Empty;
private string _musicURL = String.Empty;
private UUID _ownerID = UUID.Zero;
private List<ParcelManager.ParcelAccessEntry> _parcelAccessList = new List<ParcelManager.ParcelAccessEntry>();
private List<LandAccessEntry> _parcelAccessList = new List<LandAccessEntry>();
private float _passHours = 0;
private int _passPrice = 0;
private int _salePrice = 0; //Unemeplemented. Parcels price.
@@ -450,7 +457,7 @@ namespace OpenSim.Framework
/// <summary>
/// List of access data for the parcel. User data, some bitflags, and a time
/// </summary>
public List<ParcelManager.ParcelAccessEntry> ParcelAccessList {
public List<LandAccessEntry> ParcelAccessList {
get {
return _parcelAccessList;
}
@@ -638,12 +645,12 @@ namespace OpenSim.Framework
landData._simwidePrims = _simwidePrims;
landData._parcelAccessList.Clear();
foreach (ParcelManager.ParcelAccessEntry entry in _parcelAccessList)
foreach (LandAccessEntry entry in _parcelAccessList)
{
ParcelManager.ParcelAccessEntry newEntry = new ParcelManager.ParcelAccessEntry();
LandAccessEntry newEntry = new LandAccessEntry();
newEntry.AgentID = entry.AgentID;
newEntry.Flags = entry.Flags;
newEntry.Time = entry.Time;
newEntry.Expires = entry.Expires;
landData._parcelAccessList.Add(newEntry);
}
@@ -668,4 +675,4 @@ namespace OpenSim.Framework
return land;
}
}
}
}

View File

@@ -25,13 +25,13 @@
* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
namespace OpenSim.Framework.Console
namespace OpenSim.Framework
{
public class MainConsole
{
private static CommandConsole instance;
private static ICommandConsole instance;
public static CommandConsole Instance
public static ICommandConsole Instance
{
get { return instance; }
set { instance = value; }

View File

@@ -32,19 +32,9 @@ namespace OpenSim.Framework
{
public class NetworkServersInfo
{
public string AssetSendKey = String.Empty;
public string AssetURL = "http://127.0.0.1:" + ConfigSettings.DefaultAssetServerHttpPort.ToString() + "/";
public string GridRecvKey = String.Empty;
public string GridSendKey = String.Empty;
public string GridURL = String.Empty;
public uint HttpListenerPort = ConfigSettings.DefaultRegionHttpPort;
public string InventoryURL = String.Empty;
public bool secureInventoryServer = false;
public bool isSandbox;
public string UserRecvKey = String.Empty;
public string UserSendKey = String.Empty;
public string UserURL = String.Empty;
public bool HttpUsesSSL = false;
public string HttpSSLCN = "";
public uint httpSSLPort = 9001;
@@ -55,8 +45,6 @@ namespace OpenSim.Framework
public string cert_path = String.Empty;
public string cert_pass = String.Empty;
public string MessagingURL = String.Empty;
public NetworkServersInfo()
{
}
@@ -65,33 +53,14 @@ namespace OpenSim.Framework
{
}
public void loadFromConfiguration(IConfigSource config)
{
HttpListenerPort =
(uint) config.Configs["Network"].GetInt("http_listener_port", (int) ConfigSettings.DefaultRegionHttpPort);
httpSSLPort =
(uint)config.Configs["Network"].GetInt("http_listener_sslport", ((int)ConfigSettings.DefaultRegionHttpPort+1));
HttpUsesSSL = config.Configs["Network"].GetBoolean("http_listener_ssl", false);
HttpSSLCN = config.Configs["Network"].GetString("http_listener_cn", "localhost");
GridURL =
config.Configs["Network"].GetString("grid_server_url",
"http://127.0.0.1:" + ConfigSettings.DefaultGridServerHttpPort.ToString());
GridSendKey = config.Configs["Network"].GetString("grid_send_key", "null");
GridRecvKey = config.Configs["Network"].GetString("grid_recv_key", "null");
UserURL =
config.Configs["Network"].GetString("user_server_url",
"http://127.0.0.1:" + ConfigSettings.DefaultUserServerHttpPort.ToString());
UserSendKey = config.Configs["Network"].GetString("user_send_key", "null");
UserRecvKey = config.Configs["Network"].GetString("user_recv_key", "null");
AssetURL = config.Configs["Network"].GetString("asset_server_url", AssetURL);
InventoryURL = config.Configs["Network"].GetString("inventory_server_url",
"http://127.0.0.1:" +
ConfigSettings.DefaultInventoryServerHttpPort.ToString());
secureInventoryServer = config.Configs["Network"].GetBoolean("secure_inventory_server", true);
MessagingURL = config.Configs["Network"].GetString("messaging_server_url", string.Empty);
// "Out of band management https"
ssl_listener = config.Configs["Network"].GetBoolean("https_listener",false);

View File

@@ -1,204 +0,0 @@
/*
* Copyright (c) Contributors, http://opensimulator.org/
* See CONTRIBUTORS.TXT for a full list of copyright holders.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions are met:
* * Redistributions of source code must retain the above copyright
* notice, this list of conditions and the following disclaimer.
* * Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in the
* documentation and/or other materials provided with the distribution.
* * Neither the name of the OpenSimulator Project nor the
* names of its contributors may be used to endorse or promote products
* derived from this software without specific prior written permission.
*
* THIS SOFTWARE IS PROVIDED BY THE DEVELOPERS ``AS IS'' AND ANY
* EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
* WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
* DISCLAIMED. IN NO EVENT SHALL THE CONTRIBUTORS BE LIABLE FOR ANY
* DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
* (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
* LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
* ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
using System;
using System.Collections.Generic;
using OpenMetaverse;
namespace OpenSim.Framework
{
/// <summary>
/// Sandbox mode region comms listener. There is one of these per region
/// </summary>
public class RegionCommsListener : IRegionCommsListener
{
public string debugRegionName = String.Empty;
private AcknowledgeAgentCross handlerAcknowledgeAgentCrossed = null; // OnAcknowledgeAgentCrossed;
private AcknowledgePrimCross handlerAcknowledgePrimCrossed = null; // OnAcknowledgePrimCrossed;
private AgentCrossing handlerAvatarCrossingIntoRegion = null; // OnAvatarCrossingIntoRegion;
private ChildAgentUpdate handlerChildAgentUpdate = null; // OnChildAgentUpdate;
private CloseAgentConnection handlerCloseAgentConnection = null; // OnCloseAgentConnection;
private GenericCall2 handlerExpectChildAgent = null; // OnExpectChildAgent;
private ExpectUserDelegate handlerExpectUser = null; // OnExpectUser
private UpdateNeighbours handlerNeighboursUpdate = null; // OnNeighboursUpdate;
// private PrimCrossing handlerPrimCrossingIntoRegion = null; // OnPrimCrossingIntoRegion;
private LogOffUser handlerLogOffUser = null;
private GetLandData handlerGetLandData = null;
#region IRegionCommsListener Members
public event ExpectUserDelegate OnExpectUser;
public event GenericCall2 OnExpectChildAgent;
public event AgentCrossing OnAvatarCrossingIntoRegion;
public event PrimCrossing OnPrimCrossingIntoRegion;
public event UpdateNeighbours OnNeighboursUpdate;
public event AcknowledgeAgentCross OnAcknowledgeAgentCrossed;
public event AcknowledgePrimCross OnAcknowledgePrimCrossed;
public event CloseAgentConnection OnCloseAgentConnection;
public event ChildAgentUpdate OnChildAgentUpdate;
public event LogOffUser OnLogOffUser;
public event GetLandData OnGetLandData;
#endregion
/// <summary>
///
/// </summary>
/// <param name="agent"></param>
/// <returns></returns>
public virtual bool TriggerExpectUser(AgentCircuitData agent)
{
handlerExpectUser = OnExpectUser;
if (handlerExpectUser != null)
{
handlerExpectUser(agent);
return true;
}
return false;
}
// From User Server
public virtual void TriggerLogOffUser(UUID agentID, UUID RegionSecret, string message)
{
handlerLogOffUser = OnLogOffUser;
if (handlerLogOffUser != null)
{
handlerLogOffUser(agentID, RegionSecret, message);
}
}
public virtual bool TriggerChildAgentUpdate(ChildAgentDataUpdate cAgentData)
{
handlerChildAgentUpdate = OnChildAgentUpdate;
if (handlerChildAgentUpdate != null)
{
handlerChildAgentUpdate(cAgentData);
return true;
}
return false;
}
public virtual bool TriggerExpectAvatarCrossing(UUID agentID, Vector3 position, bool isFlying)
{
handlerAvatarCrossingIntoRegion = OnAvatarCrossingIntoRegion;
if (handlerAvatarCrossingIntoRegion != null)
{
handlerAvatarCrossingIntoRegion(agentID, position, isFlying);
return true;
}
return false;
}
public virtual bool TriggerAcknowledgeAgentCrossed(UUID agentID)
{
handlerAcknowledgeAgentCrossed = OnAcknowledgeAgentCrossed;
if (handlerAcknowledgeAgentCrossed != null)
{
handlerAcknowledgeAgentCrossed(agentID);
return true;
}
return false;
}
public virtual bool TriggerAcknowledgePrimCrossed(UUID primID)
{
handlerAcknowledgePrimCrossed = OnAcknowledgePrimCrossed;
if (handlerAcknowledgePrimCrossed != null)
{
handlerAcknowledgePrimCrossed(primID);
return true;
}
return false;
}
public virtual bool TriggerCloseAgentConnection(UUID agentID)
{
handlerCloseAgentConnection = OnCloseAgentConnection;
if (handlerCloseAgentConnection != null)
{
handlerCloseAgentConnection(agentID);
return true;
}
return false;
}
/// <summary>
///
/// </summary>
/// <remarks>TODO: Doesnt take any args??</remarks>
/// <returns></returns>
public virtual bool TriggerExpectChildAgent()
{
handlerExpectChildAgent = OnExpectChildAgent;
if (handlerExpectChildAgent != null)
{
handlerExpectChildAgent();
return true;
}
return false;
}
/// <summary>
///
/// </summary>
/// <remarks>Added to avoid a unused compiler warning on OnNeighboursUpdate, TODO: Check me</remarks>
/// <param name="neighbours"></param>
/// <returns></returns>
public virtual bool TriggerOnNeighboursUpdate(List<RegionInfo> neighbours)
{
handlerNeighboursUpdate = OnNeighboursUpdate;
if (handlerNeighboursUpdate != null)
{
handlerNeighboursUpdate(neighbours);
return true;
}
return false;
}
public bool TriggerTellRegionToCloseChildConnection(UUID agentID)
{
handlerCloseAgentConnection = OnCloseAgentConnection;
if (handlerCloseAgentConnection != null)
return handlerCloseAgentConnection(agentID);
return false;
}
public LandData TriggerGetLandData(uint x, uint y)
{
handlerGetLandData = OnGetLandData;
if (handlerGetLandData != null)
return handlerGetLandData(x, y);
return null;
}
}
}

View File

@@ -36,7 +36,7 @@ using log4net;
using Nini.Config;
using OpenMetaverse;
using OpenMetaverse.StructuredData;
using OpenSim.Framework.Console;
//using OpenSim.Framework.Console;
namespace OpenSim.Framework
{
@@ -143,6 +143,8 @@ namespace OpenSim.Framework
public string RemotingAddress;
public UUID ScopeID = UUID.Zero;
private Dictionary<String, String> m_otherSettings = new Dictionary<string, string>();
// Apparently, we're applying the same estatesettings regardless of whether it's local or remote.
@@ -445,6 +447,22 @@ namespace OpenSim.Framework
m_internalEndPoint = tmpEPE;
}
public string GetOtherSetting(string key)
{
string val;
string keylower = key.ToLower();
if (m_otherSettings.TryGetValue(keylower, out val))
return val;
m_log.DebugFormat("[RegionInfo] Could not locate value for parameter {0}", key);
return null;
}
public void SetOtherSetting(string key, string value)
{
string keylower = key.ToLower();
m_otherSettings[keylower] = value;
}
private void ReadNiniConfig(IConfigSource source, string name)
{
// bool creatingNew = false;
@@ -473,30 +491,39 @@ namespace OpenSim.Framework
if (source.Configs[name] == null)
{
source.AddConfig(name);
// creatingNew = true;
}
RegionName = name;
IConfig config = source.Configs[name];
// UUID
//
string regionUUID = config.GetString("RegionUUID", string.Empty);
// Track all of the keys in this config and remove as they are processed
// The remaining keys will be added to generic key-value storage for
// whoever might need it
HashSet<String> allKeys = new HashSet<String>();
foreach (string s in config.GetKeys())
{
allKeys.Add(s);
}
// RegionUUID
//
allKeys.Remove("RegionUUID");
string regionUUID = config.GetString("RegionUUID", string.Empty);
if (regionUUID == String.Empty)
{
UUID newID = UUID.Random();
regionUUID = MainConsole.Instance.CmdPrompt("Region UUID", newID.ToString());
regionUUID = MainConsole.Instance.CmdPrompt("RegionUUID", newID.ToString());
config.Set("RegionUUID", regionUUID);
}
RegionID = new UUID(regionUUID);
originRegionID = RegionID; // What IS this?!
originRegionID = RegionID; // What IS this?! (Needed for RegionCombinerModule?)
RegionName = name;
// Location
//
allKeys.Remove("Location");
string location = config.GetString("Location", String.Empty);
if (location == String.Empty)
{
location = MainConsole.Instance.CmdPrompt("Region Location", "1000,1000");
@@ -508,13 +535,10 @@ namespace OpenSim.Framework
m_regionLocX = Convert.ToUInt32(locationElements[0]);
m_regionLocY = Convert.ToUInt32(locationElements[1]);
// Datastore (is this implemented? Omitted from example!)
DataStore = config.GetString("Datastore", String.Empty);
// Internal IP
// InternalAddress
//
IPAddress address;
allKeys.Remove("InternalAddress");
if (config.Contains("InternalAddress"))
{
address = IPAddress.Parse(config.GetString("InternalAddress", String.Empty));
@@ -525,8 +549,10 @@ namespace OpenSim.Framework
config.Set("InternalAddress", address.ToString());
}
// InternalPort
//
int port;
allKeys.Remove("InternalPort");
if (config.Contains("InternalPort"))
{
port = config.GetInt("InternalPort", 9000);
@@ -536,9 +562,11 @@ namespace OpenSim.Framework
port = Convert.ToInt32(MainConsole.Instance.CmdPrompt("Internal port", "9000"));
config.Set("InternalPort", port);
}
m_internalEndPoint = new IPEndPoint(address, port);
// AllowAlternatePorts
//
allKeys.Remove("AllowAlternatePorts");
if (config.Contains("AllowAlternatePorts"))
{
m_allow_alternate_ports = config.GetBoolean("AllowAlternatePorts", true);
@@ -550,10 +578,10 @@ namespace OpenSim.Framework
config.Set("AllowAlternatePorts", m_allow_alternate_ports.ToString());
}
// External IP
// ExternalHostName
//
allKeys.Remove("ExternalHostName");
string externalName;
if (config.Contains("ExternalHostName"))
{
externalName = config.GetString("ExternalHostName", "SYSTEMIP");
@@ -563,7 +591,6 @@ namespace OpenSim.Framework
externalName = MainConsole.Instance.CmdPrompt("External host name", "SYSTEMIP");
config.Set("ExternalHostName", externalName);
}
if (externalName == "SYSTEMIP")
{
m_externalHostName = Util.GetLocalHost().ToString();
@@ -576,24 +603,32 @@ namespace OpenSim.Framework
m_externalHostName = externalName;
}
// RegionType
m_regionType = config.GetString("RegionType", String.Empty);
allKeys.Remove("RegionType");
// Prim stuff
//
m_nonphysPrimMax = config.GetInt("NonphysicalPrimMax", 256);
m_physPrimMax = config.GetInt("PhysicalPrimMax", 10);
m_nonphysPrimMax = config.GetInt("NonphysicalPrimMax", 0);
allKeys.Remove("NonphysicalPrimMax");
m_physPrimMax = config.GetInt("PhysicalPrimMax", 0);
allKeys.Remove("PhysicalPrimMax");
m_clampPrimSize = config.GetBoolean("ClampPrimSize", false);
allKeys.Remove("ClampPrimSize");
m_objectCapacity = config.GetInt("MaxPrims", 15000);
allKeys.Remove("MaxPrims");
m_agentCapacity = config.GetInt("MaxAgents", 100);
allKeys.Remove("MaxAgents");
// Multi-tenancy
//
ScopeID = new UUID(config.GetString("ScopeID", UUID.Zero.ToString()));
allKeys.Remove("ScopeID");
foreach (String s in allKeys)
{
SetOtherSetting(s, config.GetString(s));
}
}
private void WriteNiniConfig(IConfigSource source)

View File

@@ -26,11 +26,53 @@
*/
using System;
using System.Collections.Generic;
using System.IO;
using OpenMetaverse;
namespace OpenSim.Framework
{
public struct SpawnPoint
{
public float Yaw;
public float Pitch;
public float Distance;
public void SetLocation(Vector3 pos, Quaternion rot, Vector3 point)
{
// The point is an absolute position, so we need the relative
// location to the spawn point
Vector3 offset = point - pos;
Distance = Vector3.Mag(offset);
// Next we need to rotate this vector into the spawn point's
// coordinate system
rot.W = -rot.W;
offset = offset * rot;
Vector3 dir = Vector3.Normalize(offset);
// Get the bearing (yaw)
Yaw = (float)Math.Atan2(dir.Y, dir.X);
// Get the elevation (pitch)
Pitch = (float)-Math.Atan2(dir.Z, Math.Sqrt(dir.X * dir.X + dir.Y * dir.Y));
}
public Vector3 GetLocation(Vector3 pos, Quaternion rot)
{
Quaternion y = Quaternion.CreateFromEulers(0, 0, Yaw);
Quaternion p = Quaternion.CreateFromEulers(0, Pitch, 0);
Vector3 dir = new Vector3(1, 0, 0) * p * y;
Vector3 offset = dir * (float)Distance;
offset *= rot;
return pos + offset;
}
}
public class RegionSettings
{
public delegate void SaveDelegate(RegionSettings rs);
@@ -331,6 +373,14 @@ namespace OpenSim.Framework
set { m_SunVector = value; }
}
private UUID m_ParcelImageID;
public UUID ParcelImageID
{
get { return m_ParcelImageID; }
set { m_ParcelImageID = value; }
}
private UUID m_TerrainImageID;
public UUID TerrainImageID
@@ -363,6 +413,14 @@ namespace OpenSim.Framework
set { m_Covenant = value; }
}
private int m_CovenantChanged = 0;
public int CovenantChangedDateTime
{
get { return m_CovenantChanged; }
set { m_CovenantChanged = value; }
}
private int m_LoadedCreationDateTime;
public int LoadedCreationDateTime
{
@@ -410,5 +468,58 @@ namespace OpenSim.Framework
get { return m_Casino; }
set { m_Casino = value; }
}
// Telehub support
private bool m_TelehubEnabled = false;
public bool HasTelehub
{
get { return m_TelehubEnabled; }
set { m_TelehubEnabled = value; }
}
// Connected Telehub object
private UUID m_TelehubObject;
public UUID TelehubObject
{
get
{
return m_TelehubObject;
}
set
{
m_TelehubObject = value;
}
}
// Our Connected Telehub's SpawnPoints
public List<SpawnPoint> l_SpawnPoints = new List<SpawnPoint>();
// Add a SpawnPoint
// ** These are not region coordinates **
// They are relative to the Telehub coordinates
//
public void AddSpawnPoint(SpawnPoint point)
{
l_SpawnPoints.Add(point);
}
// Remove a SpawnPoint
public void RemoveSpawnPoint(int point_index)
{
l_SpawnPoints.RemoveAt(point_index);
}
// Return the List of SpawnPoints
public List<SpawnPoint> SpawnPoints()
{
return l_SpawnPoints;
}
// Clear the SpawnPoints List of all entries
public void ClearSpawnPoints()
{
l_SpawnPoints.Clear();
}
}
}
}

View File

@@ -24,11 +24,13 @@
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
using System;
using System.Collections.Generic;
using System.IO;
using System.Reflection;
using System.Xml;
using log4net;
using OpenMetaverse;
using OpenSim.Services.Interfaces;
@@ -39,18 +41,86 @@ namespace OpenSim.Framework.Serialization.External
/// </summary>
public class ExternalRepresentationUtils
{
private static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType);
/// <summary>
/// Populate a node with data read from xml using a dictinoary of processors
/// </summary>
/// <param name="nodeToFill"></param>
/// <param name="processors">/param>
/// <param name="xtr"></param>
public static void ExecuteReadProcessors<NodeType>(
NodeType nodeToFill, Dictionary<string, Action<NodeType, XmlTextReader>> processors, XmlTextReader xtr)
{
ExecuteReadProcessors(
nodeToFill,
processors,
xtr,
(o, name, e)
=> m_log.ErrorFormat(
"[ExternalRepresentationUtils]: Exception while parsing element {0}, continuing. Exception {1}{2}",
name, e.Message, e.StackTrace));
}
/// <summary>
/// Populate a node with data read from xml using a dictinoary of processors
/// </summary>
/// <param name="nodeToFill"></param>
/// <param name="processors"></param>
/// <param name="xtr"></param>
/// <param name="parseExceptionAction">
/// Action to take if there is a parsing problem. This will usually just be to log the exception
/// </param>
public static void ExecuteReadProcessors<NodeType>(
NodeType nodeToFill,
Dictionary<string, Action<NodeType, XmlTextReader>> processors,
XmlTextReader xtr,
Action<NodeType, string, Exception> parseExceptionAction)
{
string nodeName = string.Empty;
while (xtr.NodeType != XmlNodeType.EndElement)
{
nodeName = xtr.Name;
// m_log.DebugFormat("[ExternalRepresentationUtils]: Processing: {0}", nodeName);
Action<NodeType, XmlTextReader> p = null;
if (processors.TryGetValue(xtr.Name, out p))
{
// m_log.DebugFormat("[ExternalRepresentationUtils]: Found {0} processor, nodeName);
try
{
p(nodeToFill, xtr);
}
catch (Exception e)
{
parseExceptionAction(nodeToFill, nodeName, e);
if (xtr.NodeType == XmlNodeType.EndElement)
xtr.Read();
}
}
else
{
// m_log.DebugFormat("[LandDataSerializer]: caught unknown element {0}", nodeName);
xtr.ReadOuterXml(); // ignore
}
}
}
/// <summary>
/// Takes a XML representation of a SceneObjectPart and returns another XML representation
/// with creator data added to it.
/// </summary>
/// <param name="xml">The SceneObjectPart represented in XML2</param>
/// <param name="profileURL">The URL of the profile service for the creator</param>
/// <param name="homeURL">The URL of the user agents service (home) for the creator</param>
/// <param name="userService">The service for retrieving user account information</param>
/// <param name="scopeID">The scope of the user account information (Grid ID)</param>
/// <returns>The SceneObjectPart represented in XML2</returns>
public static string RewriteSOP(string xml, string profileURL, IUserAccountService userService, UUID scopeID)
public static string RewriteSOP(string xml, string homeURL, IUserAccountService userService, UUID scopeID)
{
if (xml == string.Empty || profileURL == string.Empty || userService == null)
if (xml == string.Empty || homeURL == string.Empty || userService == null)
return xml;
XmlDocument doc = new XmlDocument();
@@ -83,7 +153,7 @@ namespace OpenSim.Framework.Serialization.External
if (!hasCreatorData && creator != null)
{
XmlElement creatorData = doc.CreateElement("CreatorData");
creatorData.InnerText = profileURL + "/" + creator.PrincipalID + ";" + creator.FirstName + " " + creator.LastName;
creatorData.InnerText = homeURL + ";" + creator.FirstName + " " + creator.LastName;
sop.AppendChild(creatorData);
}
}

View File

@@ -28,8 +28,10 @@
using System;
using System.Collections.Generic;
using System.IO;
using System.Reflection;
using System.Text;
using System.Xml;
using log4net;
using OpenMetaverse;
using OpenSim.Framework;
@@ -40,8 +42,119 @@ namespace OpenSim.Framework.Serialization.External
/// </summary>
public class LandDataSerializer
{
private static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType);
protected static UTF8Encoding m_utf8Encoding = new UTF8Encoding();
private static Dictionary<string, Action<LandData, XmlTextReader>> m_ldProcessors
= new Dictionary<string, Action<LandData, XmlTextReader>>();
private static Dictionary<string, Action<LandAccessEntry, XmlTextReader>> m_laeProcessors
= new Dictionary<string, Action<LandAccessEntry, XmlTextReader>>();
static LandDataSerializer()
{
// LandData processors
m_ldProcessors.Add(
"Area", (ld, xtr) => ld.Area = Convert.ToInt32(xtr.ReadElementString("Area")));
m_ldProcessors.Add(
"AuctionID", (ld, xtr) => ld.AuctionID = Convert.ToUInt32(xtr.ReadElementString("AuctionID")));
m_ldProcessors.Add(
"AuthBuyerID", (ld, xtr) => ld.AuthBuyerID = UUID.Parse(xtr.ReadElementString("AuthBuyerID")));
m_ldProcessors.Add(
"Category", (ld, xtr) => ld.Category = (ParcelCategory)Convert.ToSByte(xtr.ReadElementString("Category")));
m_ldProcessors.Add(
"ClaimDate", (ld, xtr) => ld.ClaimDate = Convert.ToInt32(xtr.ReadElementString("ClaimDate")));
m_ldProcessors.Add(
"ClaimPrice", (ld, xtr) => ld.ClaimPrice = Convert.ToInt32(xtr.ReadElementString("ClaimPrice")));
m_ldProcessors.Add(
"GlobalID", (ld, xtr) => ld.GlobalID = UUID.Parse(xtr.ReadElementString("GlobalID")));
m_ldProcessors.Add(
"GroupID", (ld, xtr) => ld.GroupID = UUID.Parse(xtr.ReadElementString("GroupID")));
m_ldProcessors.Add(
"IsGroupOwned", (ld, xtr) => ld.IsGroupOwned = Convert.ToBoolean(xtr.ReadElementString("IsGroupOwned")));
m_ldProcessors.Add(
"Bitmap", (ld, xtr) => ld.Bitmap = Convert.FromBase64String(xtr.ReadElementString("Bitmap")));
m_ldProcessors.Add(
"Description", (ld, xtr) => ld.Description = xtr.ReadElementString("Description"));
m_ldProcessors.Add(
"Flags", (ld, xtr) => ld.Flags = Convert.ToUInt32(xtr.ReadElementString("Flags")));
m_ldProcessors.Add(
"LandingType", (ld, xtr) => ld.LandingType = Convert.ToByte(xtr.ReadElementString("LandingType")));
m_ldProcessors.Add(
"Name", (ld, xtr) => ld.Name = xtr.ReadElementString("Name"));
m_ldProcessors.Add(
"Status", (ld, xtr) => ld.Status = (ParcelStatus)Convert.ToSByte(xtr.ReadElementString("Status")));
m_ldProcessors.Add(
"LocalID", (ld, xtr) => ld.LocalID = Convert.ToInt32(xtr.ReadElementString("LocalID")));
m_ldProcessors.Add(
"MediaAutoScale", (ld, xtr) => ld.MediaAutoScale = Convert.ToByte(xtr.ReadElementString("MediaAutoScale")));
m_ldProcessors.Add(
"MediaID", (ld, xtr) => ld.MediaID = UUID.Parse(xtr.ReadElementString("MediaID")));
m_ldProcessors.Add(
"MediaURL", (ld, xtr) => ld.MediaURL = xtr.ReadElementString("MediaURL"));
m_ldProcessors.Add(
"MusicURL", (ld, xtr) => ld.MusicURL = xtr.ReadElementString("MusicURL"));
m_ldProcessors.Add(
"ParcelAccessList", ProcessParcelAccessList);
m_ldProcessors.Add(
"PassHours", (ld, xtr) => ld.PassHours = Convert.ToSingle(xtr.ReadElementString("PassHours")));
m_ldProcessors.Add(
"PassPrice", (ld, xtr) => ld.PassPrice = Convert.ToInt32(xtr.ReadElementString("PassPrice")));
m_ldProcessors.Add(
"SalePrice", (ld, xtr) => ld.SalePrice = Convert.ToInt32(xtr.ReadElementString("SalePrice")));
m_ldProcessors.Add(
"SnapshotID", (ld, xtr) => ld.SnapshotID = UUID.Parse(xtr.ReadElementString("SnapshotID")));
m_ldProcessors.Add(
"UserLocation", (ld, xtr) => ld.UserLocation = Vector3.Parse(xtr.ReadElementString("UserLocation")));
m_ldProcessors.Add(
"UserLookAt", (ld, xtr) => ld.UserLookAt = Vector3.Parse(xtr.ReadElementString("UserLookAt")));
// No longer used here //
// m_ldProcessors.Add("Dwell", (landData, xtr) => return);
m_ldProcessors.Add(
"OtherCleanTime", (ld, xtr) => ld.OtherCleanTime = Convert.ToInt32(xtr.ReadElementString("OtherCleanTime")));
// LandAccessEntryProcessors
m_laeProcessors.Add(
"AgentID", (lae, xtr) => lae.AgentID = UUID.Parse(xtr.ReadElementString("AgentID")));
m_laeProcessors.Add(
"Time", (lae, xtr) =>
{
// We really don't care about temp vs perm here and this
// would break on old oars. Assume all bans are perm
xtr.ReadElementString("Time");
lae.Expires = 0; // Convert.ToUint( xtr.ReadElementString("Time"));
}
);
m_laeProcessors.Add(
"AccessList", (lae, xtr) => lae.Flags = (AccessList)Convert.ToUInt32(xtr.ReadElementString("AccessList")));
}
public static void ProcessParcelAccessList(LandData ld, XmlTextReader xtr)
{
if (!xtr.IsEmptyElement)
{
while (xtr.Read() && xtr.NodeType != XmlNodeType.EndElement)
{
LandAccessEntry lae = new LandAccessEntry();
xtr.ReadStartElement("ParcelAccessEntry");
ExternalRepresentationUtils.ExecuteReadProcessors<LandAccessEntry>(lae, m_laeProcessors, xtr);
xtr.ReadEndElement();
ld.ParcelAccessList.Add(lae);
}
}
xtr.Read();
}
/// <summary>
/// Reify/deserialize landData
/// </summary>
@@ -63,69 +176,14 @@ namespace OpenSim.Framework.Serialization.External
{
LandData landData = new LandData();
StringReader sr = new StringReader(serializedLandData);
XmlTextReader xtr = new XmlTextReader(sr);
xtr.ReadStartElement("LandData");
landData.Area = Convert.ToInt32( xtr.ReadElementString("Area"));
landData.AuctionID = Convert.ToUInt32( xtr.ReadElementString("AuctionID"));
landData.AuthBuyerID = UUID.Parse( xtr.ReadElementString("AuthBuyerID"));
landData.Category = (ParcelCategory)Convert.ToSByte( xtr.ReadElementString("Category"));
landData.ClaimDate = Convert.ToInt32( xtr.ReadElementString("ClaimDate"));
landData.ClaimPrice = Convert.ToInt32( xtr.ReadElementString("ClaimPrice"));
landData.GlobalID = UUID.Parse( xtr.ReadElementString("GlobalID"));
landData.GroupID = UUID.Parse( xtr.ReadElementString("GroupID"));
landData.IsGroupOwned = Convert.ToBoolean( xtr.ReadElementString("IsGroupOwned"));
landData.Bitmap = Convert.FromBase64String( xtr.ReadElementString("Bitmap"));
landData.Description = xtr.ReadElementString("Description");
landData.Flags = Convert.ToUInt32( xtr.ReadElementString("Flags"));
landData.LandingType = Convert.ToByte( xtr.ReadElementString("LandingType"));
landData.Name = xtr.ReadElementString("Name");
landData.Status = (ParcelStatus)Convert.ToSByte( xtr.ReadElementString("Status"));
landData.LocalID = Convert.ToInt32( xtr.ReadElementString("LocalID"));
landData.MediaAutoScale = Convert.ToByte( xtr.ReadElementString("MediaAutoScale"));
landData.MediaID = UUID.Parse( xtr.ReadElementString("MediaID"));
landData.MediaURL = xtr.ReadElementString("MediaURL");
landData.MusicURL = xtr.ReadElementString("MusicURL");
landData.OwnerID = UUID.Parse( xtr.ReadElementString("OwnerID"));
landData.ParcelAccessList = new List<ParcelManager.ParcelAccessEntry>();
xtr.Read();
if (xtr.Name != "ParcelAccessList")
throw new XmlException(String.Format("Expected \"ParcelAccessList\" element but got \"{0}\"", xtr.Name));
if (!xtr.IsEmptyElement)
using (XmlTextReader reader = new XmlTextReader(new StringReader(serializedLandData)))
{
while (xtr.Read() && xtr.NodeType != XmlNodeType.EndElement)
{
ParcelManager.ParcelAccessEntry pae = new ParcelManager.ParcelAccessEntry();
reader.ReadStartElement("LandData");
xtr.ReadStartElement("ParcelAccessEntry");
pae.AgentID = UUID.Parse( xtr.ReadElementString("AgentID"));
pae.Time = Convert.ToDateTime( xtr.ReadElementString("Time"));
pae.Flags = (AccessList)Convert.ToUInt32( xtr.ReadElementString("AccessList"));
xtr.ReadEndElement();
ExternalRepresentationUtils.ExecuteReadProcessors<LandData>(landData, m_ldProcessors, reader);
landData.ParcelAccessList.Add(pae);
}
reader.ReadEndElement();
}
xtr.Read();
landData.PassHours = Convert.ToSingle( xtr.ReadElementString("PassHours"));
landData.PassPrice = Convert.ToInt32( xtr.ReadElementString("PassPrice"));
landData.SalePrice = Convert.ToInt32( xtr.ReadElementString("SalePrice"));
landData.SnapshotID = UUID.Parse( xtr.ReadElementString("SnapshotID"));
landData.UserLocation = Vector3.Parse( xtr.ReadElementString("UserLocation"));
landData.UserLookAt = Vector3.Parse( xtr.ReadElementString("UserLookAt"));
// No longer used here
xtr.ReadElementString("Dwell");
landData.OtherCleanTime = Convert.ToInt32( xtr.ReadElementString("OtherCleanTime"));
xtr.ReadEndElement();
xtr.Close();
sr.Close();
return landData;
}
@@ -162,11 +220,11 @@ namespace OpenSim.Framework.Serialization.External
xtw.WriteElementString("OwnerID", landData.OwnerID.ToString());
xtw.WriteStartElement("ParcelAccessList");
foreach (ParcelManager.ParcelAccessEntry pal in landData.ParcelAccessList)
foreach (LandAccessEntry pal in landData.ParcelAccessList)
{
xtw.WriteStartElement("ParcelAccessEntry");
xtw.WriteElementString("AgentID", pal.AgentID.ToString());
xtw.WriteElementString("Time", pal.Time.ToString("s"));
xtw.WriteElementString("Time", pal.Expires.ToString());
xtw.WriteElementString("AccessList", Convert.ToString((uint)pal.Flags));
xtw.WriteEndElement();
}

View File

@@ -41,14 +41,13 @@ namespace OpenSim.Framework.Serialization.External
{
/// <summary>
/// Serialize and deserialize user inventory items as an external format.
/// </summary>
/// XXX: Please do not use yet.
/// </summary>
public class UserInventoryItemSerializer
{
private static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType);
private delegate void InventoryItemXmlProcessor(InventoryItemBase item, XmlTextReader reader);
private static Dictionary<string, InventoryItemXmlProcessor> m_InventoryItemXmlProcessors = new Dictionary<string, InventoryItemXmlProcessor>();
private static Dictionary<string, Action<InventoryItemBase, XmlTextReader>> m_InventoryItemXmlProcessors
= new Dictionary<string, Action<InventoryItemBase, XmlTextReader>>();
#region InventoryItemBase Processor initialization
static UserInventoryItemSerializer()
@@ -205,39 +204,14 @@ namespace OpenSim.Framework.Serialization.External
{
reader.ReadStartElement("InventoryItem");
string nodeName = string.Empty;
while (reader.NodeType != XmlNodeType.EndElement)
{
nodeName = reader.Name;
InventoryItemXmlProcessor p = null;
if (m_InventoryItemXmlProcessors.TryGetValue(reader.Name, out p))
{
//m_log.DebugFormat("[XXX] Processing: {0}", reader.Name);
try
{
p(item, reader);
}
catch (Exception e)
{
m_log.DebugFormat("[InventoryItemSerializer]: exception while parsing {0}: {1}", nodeName, e);
if (reader.NodeType == XmlNodeType.EndElement)
reader.Read();
}
}
else
{
// m_log.DebugFormat("[InventoryItemSerializer]: caught unknown element {0}", nodeName);
reader.ReadOuterXml(); // ignore
}
}
ExternalRepresentationUtils.ExecuteReadProcessors<InventoryItemBase>(
item, m_InventoryItemXmlProcessors, reader);
reader.ReadEndElement(); // InventoryItem
}
//m_log.DebugFormat("[XXX]: parsed InventoryItemBase {0} - {1}", obj.Name, obj.UUID);
return item;
}
public static string Serialize(InventoryItemBase inventoryItem, Dictionary<string, object> options, IUserAccountService userAccountService)
@@ -305,14 +279,14 @@ namespace OpenSim.Framework.Serialization.External
writer.WriteEndElement();
if (options.ContainsKey("creators") && inventoryItem.CreatorData != null && inventoryItem.CreatorData != string.Empty)
writer.WriteElementString("CreatorData", inventoryItem.CreatorData);
else if (options.ContainsKey("profile"))
else if (options.ContainsKey("home"))
{
if (userAccountService != null)
{
UserAccount account = userAccountService.GetUserAccount(UUID.Zero, inventoryItem.CreatorIdAsUuid);
if (account != null)
{
writer.WriteElementString("CreatorData", (string)options["profile"] + "/" + inventoryItem.CreatorIdAsUuid + ";" + account.FirstName + " " + account.LastName);
writer.WriteElementString("CreatorData", (string)options["home"] + "/" + inventoryItem.CreatorIdAsUuid + ";" + account.FirstName + " " + account.LastName);
}
writer.WriteElementString("CreatorID", inventoryItem.CreatorId);
}

View File

@@ -33,8 +33,11 @@ using OpenSim.Framework;
namespace OpenSim.Framework.Serialization.External
{
/// <summary>
/// Serialize and deserialize region settings as an external format.
/// Serialize and deserialize user profiles as an external format.
/// </summary>
/// <remarks>
/// Currently UNUSED.
/// </remarks>
public class UserProfileSerializer
{
public const int MAJOR_VERSION = 0;

View File

@@ -27,11 +27,12 @@
using System;
using System.Collections.Generic;
using OpenSim.Framework;
using OpenSim.Framework.Serialization.External;
using OpenMetaverse;
using OpenMetaverse.StructuredData;
using NUnit.Framework;
using OpenSim.Framework;
using OpenSim.Framework.Serialization.External;
using OpenSim.Tests.Common;
namespace OpenSim.Framework.Serialization.Tests
{
@@ -42,7 +43,7 @@ namespace OpenSim.Framework.Serialization.Tests
private LandData landWithParcelAccessList;
private static string preSerialized = "<?xml version=\"1.0\" encoding=\"utf-16\"?>\n<LandData>\n <Area>128</Area>\n <AuctionID>0</AuctionID>\n <AuthBuyerID>00000000-0000-0000-0000-000000000000</AuthBuyerID>\n <Category>10</Category>\n <ClaimDate>0</ClaimDate>\n <ClaimPrice>0</ClaimPrice>\n <GlobalID>54ff9641-dd40-4a2c-b1f1-47dd3af24e50</GlobalID>\n <GroupID>d740204e-bbbf-44aa-949d-02c7d739f6a5</GroupID>\n <IsGroupOwned>False</IsGroupOwned>\n <Bitmap>AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA=</Bitmap>\n <Description>land data to test LandDataSerializer</Description>\n <Flags>536870944</Flags>\n <LandingType>2</LandingType>\n <Name>LandDataSerializerTest Land</Name>\n <Status>0</Status>\n <LocalID>0</LocalID>\n <MediaAutoScale>1</MediaAutoScale>\n <MediaID>d4452578-2f25-4b97-a81b-819af559cfd7</MediaID>\n <MediaURL>http://videos.opensimulator.org/bumblebee.mp4</MediaURL>\n <MusicURL />\n <OwnerID>1b8eedf9-6d15-448b-8015-24286f1756bf</OwnerID>\n <ParcelAccessList />\n <PassHours>0</PassHours>\n <PassPrice>0</PassPrice>\n <SalePrice>0</SalePrice>\n <SnapshotID>00000000-0000-0000-0000-000000000000</SnapshotID>\n <UserLocation>&lt;0, 0, 0&gt;</UserLocation>\n <UserLookAt>&lt;0, 0, 0&gt;</UserLookAt>\n <Dwell>0</Dwell>\n <OtherCleanTime>0</OtherCleanTime>\n</LandData>";
private static string preSerializedWithParcelAccessList = "<?xml version=\"1.0\" encoding=\"utf-16\"?>\n<LandData>\n <Area>128</Area>\n <AuctionID>0</AuctionID>\n <AuthBuyerID>00000000-0000-0000-0000-000000000000</AuthBuyerID>\n <Category>10</Category>\n <ClaimDate>0</ClaimDate>\n <ClaimPrice>0</ClaimPrice>\n <GlobalID>54ff9641-dd40-4a2c-b1f1-47dd3af24e50</GlobalID>\n <GroupID>d740204e-bbbf-44aa-949d-02c7d739f6a5</GroupID>\n <IsGroupOwned>False</IsGroupOwned>\n <Bitmap>AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA=</Bitmap>\n <Description>land data to test LandDataSerializer</Description>\n <Flags>536870944</Flags>\n <LandingType>2</LandingType>\n <Name>LandDataSerializerTest Land</Name>\n <Status>0</Status>\n <LocalID>0</LocalID>\n <MediaAutoScale>1</MediaAutoScale>\n <MediaID>d4452578-2f25-4b97-a81b-819af559cfd7</MediaID>\n <MediaURL>http://videos.opensimulator.org/bumblebee.mp4</MediaURL>\n <MusicURL />\n <OwnerID>1b8eedf9-6d15-448b-8015-24286f1756bf</OwnerID>\n <ParcelAccessList>\n <ParcelAccessEntry>\n <AgentID>62d65d45-c91a-4f77-862c-46557d978b6c</AgentID>\n <Time>2009-10-01T00:00:00</Time>\n <AccessList>2</AccessList>\n </ParcelAccessEntry>\n <ParcelAccessEntry>\n <AgentID>ec2a8d18-2378-4fe0-8b68-2a31b57c481e</AgentID>\n <Time>2010-10-20T00:00:00</Time>\n <AccessList>1</AccessList>\n </ParcelAccessEntry>\n </ParcelAccessList>\n <PassHours>0</PassHours>\n <PassPrice>0</PassPrice>\n <SalePrice>0</SalePrice>\n <SnapshotID>00000000-0000-0000-0000-000000000000</SnapshotID>\n <UserLocation>&lt;0, 0, 0&gt;</UserLocation>\n <UserLookAt>&lt;0, 0, 0&gt;</UserLookAt>\n <Dwell>0</Dwell>\n <OtherCleanTime>0</OtherCleanTime>\n</LandData>";
private static string preSerializedWithParcelAccessList = "<?xml version=\"1.0\" encoding=\"utf-16\"?>\n<LandData>\n <Area>128</Area>\n <AuctionID>0</AuctionID>\n <AuthBuyerID>00000000-0000-0000-0000-000000000000</AuthBuyerID>\n <Category>10</Category>\n <ClaimDate>0</ClaimDate>\n <ClaimPrice>0</ClaimPrice>\n <GlobalID>54ff9641-dd40-4a2c-b1f1-47dd3af24e50</GlobalID>\n <GroupID>d740204e-bbbf-44aa-949d-02c7d739f6a5</GroupID>\n <IsGroupOwned>False</IsGroupOwned>\n <Bitmap>AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA=</Bitmap>\n <Description>land data to test LandDataSerializer</Description>\n <Flags>536870944</Flags>\n <LandingType>2</LandingType>\n <Name>LandDataSerializerTest Land</Name>\n <Status>0</Status>\n <LocalID>0</LocalID>\n <MediaAutoScale>1</MediaAutoScale>\n <MediaID>d4452578-2f25-4b97-a81b-819af559cfd7</MediaID>\n <MediaURL>http://videos.opensimulator.org/bumblebee.mp4</MediaURL>\n <MusicURL />\n <OwnerID>1b8eedf9-6d15-448b-8015-24286f1756bf</OwnerID>\n <ParcelAccessList>\n <ParcelAccessEntry>\n <AgentID>62d65d45-c91a-4f77-862c-46557d978b6c</AgentID>\n <Time>0</Time>\n <AccessList>2</AccessList>\n </ParcelAccessEntry>\n <ParcelAccessEntry>\n <AgentID>ec2a8d18-2378-4fe0-8b68-2a31b57c481e</AgentID>\n <Time>0</Time>\n <AccessList>1</AccessList>\n </ParcelAccessEntry>\n </ParcelAccessList>\n <PassHours>0</PassHours>\n <PassPrice>0</PassPrice>\n <SalePrice>0</SalePrice>\n <SnapshotID>00000000-0000-0000-0000-000000000000</SnapshotID>\n <UserLocation>&lt;0, 0, 0&gt;</UserLocation>\n <UserLookAt>&lt;0, 0, 0&gt;</UserLookAt>\n <Dwell>0</Dwell>\n <OtherCleanTime>0</OtherCleanTime>\n</LandData>";
[SetUp]
public void setup()
@@ -73,16 +74,16 @@ namespace OpenSim.Framework.Serialization.Tests
this.landWithParcelAccessList = this.land.Copy();
this.landWithParcelAccessList.ParcelAccessList.Clear();
ParcelManager.ParcelAccessEntry pae0 = new ParcelManager.ParcelAccessEntry();
LandAccessEntry pae0 = new LandAccessEntry();
pae0.AgentID = new UUID("62d65d45-c91a-4f77-862c-46557d978b6c");
pae0.Flags = AccessList.Ban;
pae0.Time = new DateTime(2009, 10, 01);
pae0.Expires = 0;
this.landWithParcelAccessList.ParcelAccessList.Add(pae0);
ParcelManager.ParcelAccessEntry pae1 = new ParcelManager.ParcelAccessEntry();
LandAccessEntry pae1 = new LandAccessEntry();
pae1.AgentID = new UUID("ec2a8d18-2378-4fe0-8b68-2a31b57c481e");
pae1.Flags = AccessList.Access;
pae1.Time = new DateTime(2010, 10, 20);
pae1.Expires = 0;
this.landWithParcelAccessList.ParcelAccessList.Add(pae1);
}
@@ -92,6 +93,8 @@ namespace OpenSim.Framework.Serialization.Tests
[Test]
public void LandDataSerializerSerializeTest()
{
TestHelpers.InMethod();
string serialized = LandDataSerializer.Serialize(this.land).Replace("\r\n", "\n");
Assert.That(serialized.Length > 0, "Serialize(LandData) returned empty string");
@@ -112,20 +115,32 @@ namespace OpenSim.Framework.Serialization.Tests
/// Test the LandDataSerializer.Deserialize() method
/// </summary>
[Test]
public void TestLandDataSerializerDeserializeFromStringTest()
public void TestLandDataDeserializeNoAccessLists()
{
LandData reifiedLandData = LandDataSerializer.Deserialize(LandDataSerializerTest.preSerialized);
Assert.That(reifiedLandData != null, "Deserialize(string) returned null");
Assert.That(reifiedLandData.GlobalID == this.land.GlobalID, "Reified LandData.GlobalID != original LandData.GlobalID");
Assert.That(reifiedLandData.Name == this.land.Name, "Reified LandData.Name != original LandData.Name");
TestHelpers.InMethod();
// log4net.Config.XmlConfigurator.Configure();
LandData reifiedLandDataWithParcelAccessList = LandDataSerializer.Deserialize(LandDataSerializerTest.preSerializedWithParcelAccessList);
Assert.That(reifiedLandDataWithParcelAccessList != null,
LandData ld = LandDataSerializer.Deserialize(LandDataSerializerTest.preSerialized);
Assert.That(ld != null, "Deserialize(string) returned null");
Assert.That(ld.GlobalID == this.land.GlobalID, "Reified LandData.GlobalID != original LandData.GlobalID");
Assert.That(ld.Name == this.land.Name, "Reified LandData.Name != original LandData.Name");
}
[Test]
public void TestLandDataDeserializeWithAccessLists()
{
TestHelpers.InMethod();
// log4net.Config.XmlConfigurator.Configure();
LandData ld = LandDataSerializer.Deserialize(LandDataSerializerTest.preSerializedWithParcelAccessList);
Assert.That(ld != null,
"Deserialize(string) returned null (pre-serialized with parcel access list)");
Assert.That(reifiedLandDataWithParcelAccessList.GlobalID == this.landWithParcelAccessList.GlobalID,
Assert.That(ld.GlobalID == this.landWithParcelAccessList.GlobalID,
"Reified LandData.GlobalID != original LandData.GlobalID (pre-serialized with parcel access list)");
Assert.That(reifiedLandDataWithParcelAccessList.Name == this.landWithParcelAccessList.Name,
Assert.That(ld.Name == this.landWithParcelAccessList.Name,
"Reified LandData.Name != original LandData.Name (pre-serialized with parcel access list)");
Assert.That(ld.ParcelAccessList.Count, Is.EqualTo(2));
Assert.That(ld.ParcelAccessList[0].AgentID, Is.EqualTo(UUID.Parse("62d65d45-c91a-4f77-862c-46557d978b6c")));
}
}
}
}

View File

@@ -0,0 +1,134 @@
/*
* Copyright (c) Contributors, http://opensimulator.org/
* See CONTRIBUTORS.TXT for a full list of copyright holders.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions are met:
* * Redistributions of source code must retain the above copyright
* notice, this list of conditions and the following disclaimer.
* * Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in the
* documentation and/or other materials provided with the distribution.
* * Neither the name of the OpenSimulator Project nor the
* names of its contributors may be used to endorse or promote products
* derived from this software without specific prior written permission.
*
* THIS SOFTWARE IS PROVIDED BY THE DEVELOPERS ``AS IS'' AND ANY
* EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
* WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
* DISCLAIMED. IN NO EVENT SHALL THE CONTRIBUTORS BE LIABLE FOR ANY
* DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
* (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
* LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
* ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
using System;
using System.Collections.Generic;
using OpenMetaverse;
using OpenMetaverse.StructuredData;
using NUnit.Framework;
using OpenSim.Framework;
using OpenSim.Framework.Serialization.External;
using OpenSim.Tests.Common;
namespace OpenSim.Framework.Serialization.Tests
{
[TestFixture]
public class RegionSettingsSerializerTests
{
private string m_serializedRs = @"<?xml version=""1.0"" encoding=""utf-16""?>
<RegionSettings>
<General>
<AllowDamage>True</AllowDamage>
<AllowLandResell>True</AllowLandResell>
<AllowLandJoinDivide>True</AllowLandJoinDivide>
<BlockFly>True</BlockFly>
<BlockLandShowInSearch>True</BlockLandShowInSearch>
<BlockTerraform>True</BlockTerraform>
<DisableCollisions>True</DisableCollisions>
<DisablePhysics>True</DisablePhysics>
<DisableScripts>True</DisableScripts>
<MaturityRating>1</MaturityRating>
<RestrictPushing>True</RestrictPushing>
<AgentLimit>40</AgentLimit>
<ObjectBonus>1.4</ObjectBonus>
</General>
<GroundTextures>
<Texture1>00000000-0000-0000-0000-000000000020</Texture1>
<Texture2>00000000-0000-0000-0000-000000000040</Texture2>
<Texture3>00000000-0000-0000-0000-000000000060</Texture3>
<Texture4>00000000-0000-0000-0000-000000000080</Texture4>
<ElevationLowSW>1.9</ElevationLowSW>
<ElevationLowNW>15.9</ElevationLowNW>
<ElevationLowSE>49</ElevationLowSE>
<ElevationLowNE>45.3</ElevationLowNE>
<ElevationHighSW>2.1</ElevationHighSW>
<ElevationHighNW>4.5</ElevationHighNW>
<ElevationHighSE>9.2</ElevationHighSE>
<ElevationHighNE>19.2</ElevationHighNE>
</GroundTextures>
<Terrain>
<WaterHeight>23</WaterHeight>
<TerrainRaiseLimit>17.9</TerrainRaiseLimit>
<TerrainLowerLimit>0.4</TerrainLowerLimit>
<UseEstateSun>True</UseEstateSun>
<FixedSun>true</FixedSun>
<SunPosition>12</SunPosition>
</Terrain>
</RegionSettings>";
private RegionSettings m_rs;
[SetUp]
public void Setup()
{
m_rs = new RegionSettings();
m_rs.AgentLimit = 17;
m_rs.AllowDamage = true;
m_rs.AllowLandJoinDivide = true;
m_rs.AllowLandResell = true;
m_rs.BlockFly = true;
m_rs.BlockShowInSearch = true;
m_rs.BlockTerraform = true;
m_rs.DisableCollisions = true;
m_rs.DisablePhysics = true;
m_rs.DisableScripts = true;
m_rs.Elevation1NW = 15.9;
m_rs.Elevation1NE = 45.3;
m_rs.Elevation1SE = 49;
m_rs.Elevation1SW = 1.9;
m_rs.Elevation2NW = 4.5;
m_rs.Elevation2NE = 19.2;
m_rs.Elevation2SE = 9.2;
m_rs.Elevation2SW = 2.1;
m_rs.FixedSun = true;
m_rs.SunPosition = 12.0;
m_rs.ObjectBonus = 1.4;
m_rs.RestrictPushing = true;
m_rs.TerrainLowerLimit = 0.4;
m_rs.TerrainRaiseLimit = 17.9;
m_rs.TerrainTexture1 = UUID.Parse("00000000-0000-0000-0000-000000000020");
m_rs.TerrainTexture2 = UUID.Parse("00000000-0000-0000-0000-000000000040");
m_rs.TerrainTexture3 = UUID.Parse("00000000-0000-0000-0000-000000000060");
m_rs.TerrainTexture4 = UUID.Parse("00000000-0000-0000-0000-000000000080");
m_rs.UseEstateSun = true;
m_rs.WaterHeight = 23;
}
[Test]
public void TestRegionSettingsDeserialize()
{
TestHelpers.InMethod();
// log4net.Config.XmlConfigurator.Configure();
RegionSettings deserRs = RegionSettingsSerializer.Deserialize(m_serializedRs);
Assert.That(deserRs, Is.Not.Null);
Assert.That(deserRs.TerrainTexture2, Is.EqualTo(m_rs.TerrainTexture2));
Assert.That(deserRs.DisablePhysics, Is.EqualTo(m_rs.DisablePhysics));
Assert.That(deserRs.TerrainLowerLimit, Is.EqualTo(m_rs.TerrainLowerLimit));
}
}
}

View File

@@ -192,6 +192,15 @@ namespace OpenSim.Framework.Servers
m_console.Commands.AddCommand("base", false, "show version",
"show version",
"Show server version", HandleShow);
m_console.Commands.AddCommand("base", false, "threads abort",
"threads abort <thread-id>",
"Abort a managed thread. Use \"show threads\" to find possible threads.", HandleThreadsAbort);
m_console.Commands.AddCommand("base", false, "threads show",
"threads show",
"Show thread status. Synonym for \"show threads\"",
(string module, string[] args) => Notice(GetThreadsReport()));
}
}
@@ -234,17 +243,32 @@ namespace OpenSim.Framework.Servers
/// </summary>
protected string GetThreadsReport()
{
// This should be a constant field.
string reportFormat = "{0,6} {1,35} {2,16} {3,13} {4,10} {5,30}";
StringBuilder sb = new StringBuilder();
Watchdog.ThreadWatchdogInfo[] threads = Watchdog.GetThreads();
sb.Append(threads.Length + " threads are being tracked:" + Environment.NewLine);
int timeNow = Environment.TickCount & Int32.MaxValue;
sb.AppendFormat(reportFormat, "ID", "NAME", "LAST UPDATE (MS)", "LIFETIME (MS)", "PRIORITY", "STATE");
sb.Append(Environment.NewLine);
foreach (Watchdog.ThreadWatchdogInfo twi in threads)
{
Thread t = twi.Thread;
sb.Append(
"ID: " + t.ManagedThreadId + ", Name: " + t.Name + ", TimeRunning: "
+ "Pri: " + t.Priority + ", State: " + t.ThreadState);
sb.AppendFormat(
reportFormat,
t.ManagedThreadId,
t.Name,
timeNow - twi.LastTick,
timeNow - twi.FirstTick,
t.Priority,
t.ThreadState);
sb.Append(Environment.NewLine);
}
@@ -395,6 +419,27 @@ namespace OpenSim.Framework.Servers
break;
}
}
public virtual void HandleThreadsAbort(string module, string[] cmd)
{
if (cmd.Length != 3)
{
MainConsole.Instance.Output("Usage: threads abort <thread-id>");
return;
}
int threadId;
if (!int.TryParse(cmd[2], out threadId))
{
MainConsole.Instance.Output("ERROR: Thread id must be an integer");
return;
}
if (Watchdog.AbortThread(threadId))
MainConsole.Instance.OutputFormat("Aborted thread with id {0}", threadId);
else
MainConsole.Instance.OutputFormat("ERROR - Thread with id {0} not found in managed threads", threadId);
}
protected void ShowInfo()
{
@@ -555,7 +600,7 @@ namespace OpenSim.Framework.Servers
}
public string StatReport(OSHttpRequest httpRequest)
public string StatReport(IOSHttpRequest httpRequest)
{
// If we catch a request for "callback", wrap the response in the value for jsonp
if (httpRequest.Query.ContainsKey("callback"))

View File

@@ -79,6 +79,11 @@ namespace OpenSim.Framework.Servers.HttpServer
private PollServiceRequestManager m_PollServiceManager;
/// <summary>
/// Control the printing of certain debug messages.
/// </summary>
public int DebugLevel { get; set; }
public uint SSLPort
{
get { return m_sslport; }
@@ -222,21 +227,17 @@ namespace OpenSim.Framework.Servers.HttpServer
return new List<string>(m_HTTPHandlers.Keys);
}
public bool AddPollServiceHTTPHandler(string methodName, GenericHTTPMethod handler, PollServiceEventArgs args)
public bool AddPollServiceHTTPHandler(string methodName, PollServiceEventArgs args)
{
bool pollHandlerResult = false;
lock (m_pollHandlers)
{
if (!m_pollHandlers.ContainsKey(methodName))
{
m_pollHandlers.Add(methodName,args);
pollHandlerResult = true;
m_pollHandlers.Add(methodName, args);
return true;
}
}
if (pollHandlerResult)
return AddHTTPHandler(methodName, handler);
return false;
}
@@ -442,17 +443,18 @@ namespace OpenSim.Framework.Servers.HttpServer
string path = request.RawUrl;
string handlerKey = GetHandlerKey(request.HttpMethod, path);
// m_log.DebugFormat("[BASE HTTP SERVER]: Handling {0} request for {1}", request.HttpMethod, path);
if (TryGetStreamHandler(handlerKey, out requestHandler))
{
//m_log.Debug("[BASE HTTP SERVER]: Found Stream Handler");
if (DebugLevel >= 1)
m_log.DebugFormat(
"[BASE HTTP SERVER]: Found stream handler for {0} {1}",
request.HttpMethod, request.Url.PathAndQuery);
// Okay, so this is bad, but should be considered temporary until everything is IStreamHandler.
byte[] buffer = null;
response.ContentType = requestHandler.ContentType; // Lets do this defaulting before in case handler has varying content type.
if (requestHandler is IStreamedRequestHandler)
{
IStreamedRequestHandler streamedRequestHandler = requestHandler as IStreamedRequestHandler;
@@ -480,7 +482,6 @@ namespace OpenSim.Framework.Servers.HttpServer
string[] querystringkeys = request.QueryString.AllKeys;
string[] rHeaders = request.Headers.AllKeys;
foreach (string queryname in querystringkeys)
{
keysvals.Add(queryname, request.QueryString[queryname]);
@@ -556,6 +557,7 @@ namespace OpenSim.Framework.Servers.HttpServer
{
m_log.Warn("[BASE HTTP SERVER]: XmlRpcRequest issue: " + e.Message);
}
return;
}
@@ -566,7 +568,11 @@ namespace OpenSim.Framework.Servers.HttpServer
if (strAccept.Contains("application/llsd+xml") ||
strAccept.Contains("application/llsd+json"))
{
//m_log.Info("[Debug BASE HTTP SERVER]: Found an application/llsd+xml accept header");
if (DebugLevel >= 1)
m_log.DebugFormat(
"[BASE HTTP SERVER]: Found application/llsd+xml accept header handler for {0} {1}",
request.HttpMethod, request.Url.PathAndQuery);
HandleLLSDRequests(request, response);
return;
}
@@ -577,15 +583,24 @@ namespace OpenSim.Framework.Servers.HttpServer
{
case null:
case "text/html":
// m_log.DebugFormat(
// "[BASE HTTP SERVER]: Found a text/html content type for request {0}", request.RawUrl);
if (DebugLevel >= 1)
m_log.DebugFormat(
"[BASE HTTP SERVER]: Found a {0} content type handler for {1} {2}",
request.ContentType, request.HttpMethod, request.Url.PathAndQuery);
HandleHTTPRequest(request, response);
return;
case "application/llsd+xml":
case "application/xml+llsd":
case "application/llsd+json":
//m_log.Info("[Debug BASE HTTP SERVER]: found a application/llsd+xml content type");
if (DebugLevel >= 1)
m_log.DebugFormat(
"[BASE HTTP SERVER]: Found a {0} content type handler for {1} {2}",
request.ContentType, request.HttpMethod, request.Url.PathAndQuery);
HandleLLSDRequests(request, response);
return;
@@ -602,7 +617,11 @@ namespace OpenSim.Framework.Servers.HttpServer
//m_log.Info("[Debug BASE HTTP SERVER]: Checking for LLSD Handler");
if (DoWeHaveALLSDHandler(request.RawUrl))
{
//m_log.Info("[Debug BASE HTTP SERVER]: Found LLSD Handler");
if (DebugLevel >= 1)
m_log.DebugFormat(
"[BASE HTTP SERVER]: Found a {0} content type handler for {1} {2}",
request.ContentType, request.HttpMethod, request.Url.PathAndQuery);
HandleLLSDRequests(request, response);
return;
}
@@ -610,12 +629,20 @@ namespace OpenSim.Framework.Servers.HttpServer
// m_log.DebugFormat("[BASE HTTP SERVER]: Checking for HTTP Handler for request {0}", request.RawUrl);
if (DoWeHaveAHTTPHandler(request.RawUrl))
{
// m_log.DebugFormat("[BASE HTTP SERVER]: Found HTTP Handler for request {0}", request.RawUrl);
if (DebugLevel >= 1)
m_log.DebugFormat(
"[BASE HTTP SERVER]: Found a {0} content type handler for {1} {2}",
request.ContentType, request.HttpMethod, request.Url.PathAndQuery);
HandleHTTPRequest(request, response);
return;
}
//m_log.Info("[Debug BASE HTTP SERVER]: Generic XMLRPC");
if (DebugLevel >= 1)
m_log.DebugFormat(
"[BASE HTTP SERVER]: Assuming a generic XMLRPC request for {0} {1}",
request.HttpMethod, request.Url.PathAndQuery);
// generic login request.
HandleXmlRpcRequests(request, response);
@@ -872,7 +899,9 @@ namespace OpenSim.Framework.Servers.HttpServer
byte[] buf = Encoding.UTF8.GetBytes("Not found");
response.KeepAlive = false;
m_log.ErrorFormat("[BASE HTTP SERVER]: Handler not found for http request {0}", request.RawUrl);
m_log.ErrorFormat(
"[BASE HTTP SERVER]: Handler not found for http request {0} {1}",
request.HttpMethod, request.Url.PathAndQuery);
response.SendChunked = false;
response.ContentLength64 = buf.Length;
@@ -978,7 +1007,6 @@ namespace OpenSim.Framework.Servers.HttpServer
if (llsdRequest != null)// && m_defaultLlsdHandler != null)
{
LLSDMethod llsdhandler = null;
if (TryGetLLSDHandler(request.RawUrl, out llsdhandler) && !LegacyLLSDLoginLibOMV)
@@ -1002,13 +1030,14 @@ namespace OpenSim.Framework.Servers.HttpServer
llsdResponse = GenerateNoLLSDHandlerResponse();
}
}
}
else
{
llsdResponse = GenerateNoLLSDHandlerResponse();
}
byte[] buffer = new byte[0];
if (llsdResponse.ToString() == "shutdown404!")
{
response.ContentType = "text/plain";
@@ -1837,14 +1866,7 @@ namespace OpenSim.Framework.Servers.HttpServer
public void RemovePollServiceHTTPHandler(string httpMethod, string path)
{
lock (m_pollHandlers)
{
if (m_pollHandlers.ContainsKey(httpMethod))
{
m_pollHandlers.Remove(httpMethod);
}
}
RemoveHTTPHandler(httpMethod, path);
m_pollHandlers.Remove(path);
}
public bool RemoveAgentHandler(string agent, IHttpAgentHandler handler)
@@ -1866,12 +1888,7 @@ namespace OpenSim.Framework.Servers.HttpServer
public void RemoveXmlRPCHandler(string method)
{
lock (m_rpcHandlers)
{
if (m_rpcHandlers.ContainsKey(method))
{
m_rpcHandlers.Remove(method);
}
}
m_rpcHandlers.Remove(method);
}
public bool RemoveLLSDHandler(string path, LLSDMethod handler)

View File

@@ -32,7 +32,7 @@ namespace OpenSim.Framework.Servers.HttpServer
public abstract class BaseStreamHandler : BaseRequestHandler, IStreamedRequestHandler
{
public abstract byte[] Handle(string path, Stream request,
OSHttpRequest httpRequest, OSHttpResponse httpResponse);
IOSHttpRequest httpRequest, IOSHttpResponse httpResponse);
protected BaseStreamHandler(string httpMethod, string path) : base(httpMethod, path)
{

View File

@@ -36,7 +36,7 @@ namespace OpenSim.Framework.Servers.HttpServer
{
private BinaryMethod m_method;
public override byte[] Handle(string path, Stream request, OSHttpRequest httpRequest, OSHttpResponse httpResponse)
public override byte[] Handle(string path, Stream request, IOSHttpRequest httpRequest, IOSHttpResponse httpResponse)
{
byte[] data = ReadFully(request);
string param = GetParam(path);

View File

@@ -49,7 +49,7 @@ namespace OpenSim.Framework.Servers.HttpServer
/// <summary>
/// Add a handler for an HTTP request.
/// </summary>
///
/// <remarks>
/// This handler can actually be invoked either as
///
/// http://<hostname>:<port>/?method=<methodName>
@@ -70,15 +70,15 @@ namespace OpenSim.Framework.Servers.HttpServer
/// In addition, the handler invoked by the HTTP server for any request is the one when best matches the request
/// URI. So if a handler for "/myapp/" is registered and a request for "/myapp/page" is received, then
/// the "/myapp/" handler is invoked if no "/myapp/page" handler exists.
///
/// </remarks>
/// <param name="methodName"></param>
/// <param name="handler"></param>
/// <returns>
/// true if the handler was successfully registered, false if a handler with the same name already existed.
/// </returns>
bool AddHTTPHandler(string methodName, GenericHTTPMethod handler);
bool AddPollServiceHTTPHandler(string methodName, GenericHTTPMethod handler, PollServiceEventArgs args);
bool AddPollServiceHTTPHandler(string methodName, PollServiceEventArgs args);
/// <summary>
/// Adds a LLSD handler, yay.

View File

@@ -0,0 +1,59 @@
/*
* Copyright (c) Contributors, http://opensimulator.org/
* See CONTRIBUTORS.TXT for a full list of copyright holders.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions are met:
* * Redistributions of source code must retain the above copyright
* notice, this list of conditions and the following disclaimer.
* * Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in the
* documentation and/or other materials provided with the distribution.
* * Neither the name of the OpenSimulator Project nor the
* names of its contributors may be used to endorse or promote products
* derived from this software without specific prior written permission.
*
* THIS SOFTWARE IS PROVIDED BY THE DEVELOPERS ``AS IS'' AND ANY
* EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
* WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
* DISCLAIMED. IN NO EVENT SHALL THE CONTRIBUTORS BE LIABLE FOR ANY
* DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
* (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
* LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
* ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
using System;
using System.Collections;
using System.Collections.Specialized;
using System.IO;
using System.Net;
using System.Text;
using System.Web;
namespace OpenSim.Framework.Servers.HttpServer
{
public interface IOSHttpRequest
{
string[] AcceptTypes { get; }
Encoding ContentEncoding { get; }
long ContentLength { get; }
long ContentLength64 { get; }
string ContentType { get; }
HttpCookieCollection Cookies { get; }
bool HasEntityBody { get; }
NameValueCollection Headers { get; }
string HttpMethod { get; }
Stream InputStream { get; }
bool IsSecured { get; }
bool KeepAlive { get; }
NameValueCollection QueryString { get; }
Hashtable Query { get; }
string RawUrl { get; }
IPEndPoint RemoteIPEndPoint { get; }
Uri Url { get; }
string UserAgent { get; }
}
}

View File

@@ -0,0 +1,138 @@
/*
* Copyright (c) Contributors, http://opensimulator.org/
* See CONTRIBUTORS.TXT for a full list of copyright holders.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions are met:
* * Redistributions of source code must retain the above copyright
* notice, this list of conditions and the following disclaimer.
* * Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in the
* documentation and/or other materials provided with the distribution.
* * Neither the name of the OpenSimulator Project nor the
* names of its contributors may be used to endorse or promote products
* derived from this software without specific prior written permission.
*
* THIS SOFTWARE IS PROVIDED BY THE DEVELOPERS ``AS IS'' AND ANY
* EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
* WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
* DISCLAIMED. IN NO EVENT SHALL THE CONTRIBUTORS BE LIABLE FOR ANY
* DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
* (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
* LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
* ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
using System;
using System.Collections;
using System.Collections.Specialized;
using System.IO;
using System.Net;
using System.Text;
using System.Web;
namespace OpenSim.Framework.Servers.HttpServer
{
public interface IOSHttpResponse
{
/// <summary>
/// Content type property.
/// </summary>
/// <remarks>
/// Setting this property will also set IsContentTypeSet to
/// true.
/// </remarks>
string ContentType { get; set; }
/// <summary>
/// Boolean property indicating whether the content type
/// property actively has been set.
/// </summary>
/// <remarks>
/// IsContentTypeSet will go away together with .NET base.
/// </remarks>
// public bool IsContentTypeSet
// {
// get { return _contentTypeSet; }
// }
// private bool _contentTypeSet;
/// <summary>
/// Length of the body content; 0 if there is no body.
/// </summary>
long ContentLength { get; set; }
/// <summary>
/// Alias for ContentLength.
/// </summary>
long ContentLength64 { get; set; }
/// <summary>
/// Encoding of the body content.
/// </summary>
Encoding ContentEncoding { get; set; }
bool KeepAlive { get; set; }
/// <summary>
/// Get or set the keep alive timeout property (default is
/// 20). Setting this to 0 also disables KeepAlive. Setting
/// this to something else but 0 also enable KeepAlive.
/// </summary>
int KeepAliveTimeout { get; set; }
/// <summary>
/// Return the output stream feeding the body.
/// </summary>
/// <remarks>
/// On its way out...
/// </remarks>
Stream OutputStream { get; }
string ProtocolVersion { get; set; }
/// <summary>
/// Return the output stream feeding the body.
/// </summary>
Stream Body { get; }
/// <summary>
/// Set a redirct location.
/// </summary>
string RedirectLocation { set; }
/// <summary>
/// Chunk transfers.
/// </summary>
bool SendChunked { get; set; }
/// <summary>
/// HTTP status code.
/// </summary>
int StatusCode { get; set; }
/// <summary>
/// HTTP status description.
/// </summary>
string StatusDescription { get; set; }
bool ReuseContext { get; set; }
/// <summary>
/// Add a header field and content to the response.
/// </summary>
/// <param name="key">string containing the header field
/// name</param>
/// <param name="value">string containing the header field
/// value</param>
void AddHeader(string key, string value);
/// <summary>
/// Send the response back to the remote client
/// </summary>
void Send();
}
}

View File

@@ -45,13 +45,13 @@ namespace OpenSim.Framework.Servers.HttpServer
public interface IStreamedRequestHandler : IRequestHandler
{
// Handle request stream, return byte array
byte[] Handle(string path, Stream request, OSHttpRequest httpRequest, OSHttpResponse httpResponse);
byte[] Handle(string path, Stream request, IOSHttpRequest httpRequest, IOSHttpResponse httpResponse);
}
public interface IStreamHandler : IRequestHandler
{
// Handle request stream, return byte array
void Handle(string path, Stream request, Stream response, OSHttpRequest httpReqbuest, OSHttpResponse httpResponse);
void Handle(string path, Stream request, Stream response, IOSHttpRequest httpReqbuest, IOSHttpResponse httpResponse);
}
public interface IGenericHTTPHandler : IRequestHandler

View File

@@ -39,7 +39,7 @@ using log4net;
namespace OpenSim.Framework.Servers.HttpServer
{
public class OSHttpRequest
public class OSHttpRequest : IOSHttpRequest
{
private static readonly ILog _log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType);
@@ -174,7 +174,6 @@ namespace OpenSim.Framework.Servers.HttpServer
}
private Dictionary<string, object> _whiteboard = new Dictionary<string, object>();
public OSHttpRequest() {}
public OSHttpRequest(IHttpClientContext context, IHttpRequest req)

View File

@@ -36,7 +36,7 @@ namespace OpenSim.Framework.Servers.HttpServer
/// OSHttpResponse is the OpenSim representation of an HTTP
/// response.
/// </summary>
public class OSHttpResponse
public class OSHttpResponse : IOSHttpResponse
{
/// <summary>
/// Content type property.
@@ -275,7 +275,6 @@ namespace OpenSim.Framework.Servers.HttpServer
}
}
protected IHttpResponse _httpResponse;
private IHttpClientContext _httpClientContext;
@@ -331,4 +330,4 @@ namespace OpenSim.Framework.Servers.HttpServer
}
}
}
}

View File

@@ -28,22 +28,24 @@
using System;
using System.Collections;
using System.Threading;
using System.Reflection;
using log4net;
using HttpServer;
using OpenSim.Framework;
namespace OpenSim.Framework.Servers.HttpServer
{
public class PollServiceRequestManager
{
// private static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType);
private readonly BaseHttpServer m_server;
private static Queue m_requests = Queue.Synchronized(new Queue());
private uint m_WorkerThreadCount = 0;
private Thread[] m_workerThreads;
private PollServiceWorkerThread[] m_PollServiceWorkerThreads;
private Thread m_watcherThread;
private bool m_running = true;
public PollServiceRequestManager(BaseHttpServer pSrv, uint pWorkerThreadCount, int pTimeout)
{
m_server = pSrv;
@@ -52,22 +54,26 @@ namespace OpenSim.Framework.Servers.HttpServer
m_PollServiceWorkerThreads = new PollServiceWorkerThread[m_WorkerThreadCount];
//startup worker threads
for (uint i=0;i<m_WorkerThreadCount;i++)
for (uint i = 0; i < m_WorkerThreadCount; i++)
{
m_PollServiceWorkerThreads[i] = new PollServiceWorkerThread(m_server, pTimeout);
m_PollServiceWorkerThreads[i].ReQueue += ReQueueEvent;
m_workerThreads[i] = new Thread(m_PollServiceWorkerThreads[i].ThreadStart);
m_workerThreads[i].Name = String.Format("PollServiceWorkerThread{0}",i);
//Can't add to thread Tracker here Referencing OpenSim.Framework creates circular reference
m_workerThreads[i].Start();
m_workerThreads[i]
= Watchdog.StartThread(
m_PollServiceWorkerThreads[i].ThreadStart,
String.Format("PollServiceWorkerThread{0}", i),
ThreadPriority.Normal,
false,
int.MaxValue);
}
//start watcher threads
m_watcherThread = new Thread(ThreadStart);
m_watcherThread.Name = "PollServiceWatcherThread";
m_watcherThread.Start();
Watchdog.StartThread(
this.ThreadStart,
"PollServiceWatcherThread",
ThreadPriority.Normal,
false,
1000 * 60 * 10);
}
internal void ReQueueEvent(PollServiceHttpRequest req)
@@ -82,10 +88,11 @@ namespace OpenSim.Framework.Servers.HttpServer
m_requests.Enqueue(req);
}
public void ThreadStart(object o)
public void ThreadStart()
{
while (m_running)
{
Watchdog.UpdateThread();
ProcessQueuedRequests();
Thread.Sleep(1000);
}
@@ -98,12 +105,15 @@ namespace OpenSim.Framework.Servers.HttpServer
if (m_requests.Count == 0)
return;
// m_log.DebugFormat("[POLL SERVICE REQUEST MANAGER]: Processing {0} requests", m_requests.Count);
int reqperthread = (int) (m_requests.Count/m_WorkerThreadCount) + 1;
// For Each WorkerThread
for (int tc = 0; tc < m_WorkerThreadCount && m_requests.Count > 0; tc++)
{
//Loop over number of requests each thread handles.
for (int i=0;i<reqperthread && m_requests.Count > 0;i++)
for (int i = 0; i < reqperthread && m_requests.Count > 0; i++)
{
try
{
@@ -121,14 +131,14 @@ namespace OpenSim.Framework.Servers.HttpServer
}
~PollServiceRequestManager()
{
foreach (object o in m_requests)
{
PollServiceHttpRequest req = (PollServiceHttpRequest) o;
m_server.DoHTTPGruntWork(req.PollServiceArgs.NoEvents(req.RequestID, req.PollServiceArgs.Id), new OSHttpResponse(new HttpResponse(req.HttpContext, req.Request), req.HttpContext));
m_server.DoHTTPGruntWork(
req.PollServiceArgs.NoEvents(req.RequestID, req.PollServiceArgs.Id),
new OSHttpResponse(new HttpResponse(req.HttpContext, req.Request), req.HttpContext));
}
m_requests.Clear();
@@ -140,4 +150,4 @@ namespace OpenSim.Framework.Servers.HttpServer
m_running = false;
}
}
}
}

View File

@@ -59,7 +59,7 @@ namespace OpenSim.Framework.Servers.HttpServer
m_timeout = pTimeout;
}
public void ThreadStart(object o)
public void ThreadStart()
{
Run();
}
@@ -69,6 +69,9 @@ namespace OpenSim.Framework.Servers.HttpServer
while (m_running)
{
PollServiceHttpRequest req = m_request.Dequeue();
Watchdog.UpdateThread();
try
{
if (req.PollServiceArgs.HasEvents(req.RequestID, req.PollServiceArgs.Id))

View File

@@ -45,7 +45,7 @@ namespace OpenSim.Framework.Servers.HttpServer
}
public void Handle(string path, Stream request, Stream responseStream,
OSHttpRequest httpRequest, OSHttpResponse httpResponse)
IOSHttpRequest httpRequest, IOSHttpResponse httpResponse)
{
TRequest deserial;
using (XmlTextReader xmlReader = new XmlTextReader(request))

View File

@@ -28,5 +28,5 @@
namespace OpenSim.Framework.Servers.HttpServer
{
public delegate string RestMethod(string request, string path, string param,
OSHttpRequest httpRequest, OSHttpResponse httpResponse);
IOSHttpRequest httpRequest, IOSHttpResponse httpResponse);
}

View File

@@ -211,7 +211,7 @@ namespace OpenSim.Framework.Servers.HttpServer
}
public void Handle(string path, Stream request, Stream responseStream,
OSHttpRequest httpRequest, OSHttpResponse httpResponse)
IOSHttpRequest httpRequest, IOSHttpResponse httpResponse)
{
RestSessionObject<TRequest> deserial = default(RestSessionObject<TRequest>);
bool fail = false;
@@ -270,7 +270,7 @@ namespace OpenSim.Framework.Servers.HttpServer
}
public void Handle(string path, Stream request, Stream responseStream,
OSHttpRequest httpRequest, OSHttpResponse httpResponse)
IOSHttpRequest httpRequest, IOSHttpResponse httpResponse)
{
TRequest deserial = default(TRequest);
bool fail = false;

View File

@@ -39,7 +39,7 @@ namespace OpenSim.Framework.Servers.HttpServer
get { return m_restMethod; }
}
public override byte[] Handle(string path, Stream request, OSHttpRequest httpRequest, OSHttpResponse httpResponse)
public override byte[] Handle(string path, Stream request, IOSHttpRequest httpRequest, IOSHttpResponse httpResponse)
{
Encoding encoding = Encoding.UTF8;
StreamReader streamReader = new StreamReader(request, encoding);

View File

@@ -31,7 +31,7 @@ using System.Net;
using log4net;
using OpenSim.Framework.Servers.HttpServer;
namespace OpenSim.Framework
namespace OpenSim.Framework.Servers
{
public class MainServer
{

View File

@@ -42,15 +42,15 @@ namespace OpenSim.Framework.Statistics
{
private long abnormalClientThreadTerminations;
private long assetsInCache;
private long texturesInCache;
private long assetCacheMemoryUsage;
private long textureCacheMemoryUsage;
private TimeSpan assetRequestTimeAfterCacheMiss;
private long blockedMissingTextureRequests;
// private long assetsInCache;
// private long texturesInCache;
// private long assetCacheMemoryUsage;
// private long textureCacheMemoryUsage;
// private TimeSpan assetRequestTimeAfterCacheMiss;
// private long blockedMissingTextureRequests;
private long assetServiceRequestFailures;
private long inventoryServiceRetrievalFailures;
// private long assetServiceRequestFailures;
// private long inventoryServiceRetrievalFailures;
private volatile float timeDilation;
private volatile float simFps;
@@ -79,27 +79,27 @@ namespace OpenSim.Framework.Statistics
/// </summary>
public long AbnormalClientThreadTerminations { get { return abnormalClientThreadTerminations; } }
/// <summary>
/// These statistics are being collected by push rather than pull. Pull would be simpler, but I had the
/// notion of providing some flow statistics (which pull wouldn't give us). Though admittedly these
/// haven't yet been implemented...
/// </summary>
public long AssetsInCache { get { return assetsInCache; } }
/// <value>
/// Currently unused
/// </value>
public long TexturesInCache { get { return texturesInCache; } }
/// <value>
/// Currently misleading since we can't currently subtract removed asset memory usage without a performance hit
/// </value>
public long AssetCacheMemoryUsage { get { return assetCacheMemoryUsage; } }
/// <value>
/// Currently unused
/// </value>
public long TextureCacheMemoryUsage { get { return textureCacheMemoryUsage; } }
// /// <summary>
// /// These statistics are being collected by push rather than pull. Pull would be simpler, but I had the
// /// notion of providing some flow statistics (which pull wouldn't give us). Though admittedly these
// /// haven't yet been implemented...
// /// </summary>
// public long AssetsInCache { get { return assetsInCache; } }
//
// /// <value>
// /// Currently unused
// /// </value>
// public long TexturesInCache { get { return texturesInCache; } }
//
// /// <value>
// /// Currently misleading since we can't currently subtract removed asset memory usage without a performance hit
// /// </value>
// public long AssetCacheMemoryUsage { get { return assetCacheMemoryUsage; } }
//
// /// <value>
// /// Currently unused
// /// </value>
// public long TextureCacheMemoryUsage { get { return textureCacheMemoryUsage; } }
public float TimeDilation { get { return timeDilation; } }
public float SimFps { get { return simFps; } }
@@ -123,32 +123,33 @@ namespace OpenSim.Framework.Statistics
public float ActiveScripts { get { return activeScripts; } }
public float ScriptLinesPerSecond { get { return scriptLinesPerSecond; } }
/// <summary>
/// This is the time it took for the last asset request made in response to a cache miss.
/// </summary>
public TimeSpan AssetRequestTimeAfterCacheMiss { get { return assetRequestTimeAfterCacheMiss; } }
/// <summary>
/// Number of persistent requests for missing textures we have started blocking from clients. To some extent
/// this is just a temporary statistic to keep this problem in view - the root cause of this lies either
/// in a mishandling of the reply protocol, related to avatar appearance or may even originate in graphics
/// driver bugs on clients (though this seems less likely).
/// </summary>
public long BlockedMissingTextureRequests { get { return blockedMissingTextureRequests; } }
/// <summary>
/// Record the number of times that an asset request has failed. Failures are effectively exceptions, such as
/// request timeouts. If an asset service replies that a particular asset cannot be found, this is not counted
/// as a failure
/// </summary>
public long AssetServiceRequestFailures { get { return assetServiceRequestFailures; } }
// /// <summary>
// /// This is the time it took for the last asset request made in response to a cache miss.
// /// </summary>
// public TimeSpan AssetRequestTimeAfterCacheMiss { get { return assetRequestTimeAfterCacheMiss; } }
//
// /// <summary>
// /// Number of persistent requests for missing textures we have started blocking from clients. To some extent
// /// this is just a temporary statistic to keep this problem in view - the root cause of this lies either
// /// in a mishandling of the reply protocol, related to avatar appearance or may even originate in graphics
// /// driver bugs on clients (though this seems less likely).
// /// </summary>
// public long BlockedMissingTextureRequests { get { return blockedMissingTextureRequests; } }
//
// /// <summary>
// /// Record the number of times that an asset request has failed. Failures are effectively exceptions, such as
// /// request timeouts. If an asset service replies that a particular asset cannot be found, this is not counted
// /// as a failure
// /// </summary>
// public long AssetServiceRequestFailures { get { return assetServiceRequestFailures; } }
/// <summary>
/// Number of known failures to retrieve avatar inventory from the inventory service. This does not
/// cover situations where the inventory service accepts the request but never returns any data, since
/// we do not yet timeout this situation.
/// </summary>
public long InventoryServiceRetrievalFailures { get { return inventoryServiceRetrievalFailures; } }
/// <remarks>Commented out because we do not cache inventory at this point</remarks>
// public long InventoryServiceRetrievalFailures { get { return inventoryServiceRetrievalFailures; } }
/// <summary>
/// Retrieve the total frame time (in ms) of the last frame
@@ -171,58 +172,58 @@ namespace OpenSim.Framework.Statistics
abnormalClientThreadTerminations++;
}
public void AddAsset(AssetBase asset)
{
assetsInCache++;
//assetCacheMemoryUsage += asset.Data.Length;
}
public void RemoveAsset(UUID uuid)
{
assetsInCache--;
}
// public void AddAsset(AssetBase asset)
// {
// assetsInCache++;
// //assetCacheMemoryUsage += asset.Data.Length;
// }
//
// public void RemoveAsset(UUID uuid)
// {
// assetsInCache--;
// }
//
// public void AddTexture(AssetBase image)
// {
// if (image.Data != null)
// {
// texturesInCache++;
//
// // This could have been a pull stat, though there was originally a nebulous idea to measure flow rates
// textureCacheMemoryUsage += image.Data.Length;
// }
// }
//
// /// <summary>
// /// Signal that the asset cache has been cleared.
// /// </summary>
// public void ClearAssetCacheStatistics()
// {
// assetsInCache = 0;
// assetCacheMemoryUsage = 0;
// texturesInCache = 0;
// textureCacheMemoryUsage = 0;
// }
//
// public void AddAssetRequestTimeAfterCacheMiss(TimeSpan ts)
// {
// assetRequestTimeAfterCacheMiss = ts;
// }
//
// public void AddBlockedMissingTextureRequest()
// {
// blockedMissingTextureRequests++;
// }
//
// public void AddAssetServiceRequestFailure()
// {
// assetServiceRequestFailures++;
// }
public void AddTexture(AssetBase image)
{
if (image.Data != null)
{
texturesInCache++;
// This could have been a pull stat, though there was originally a nebulous idea to measure flow rates
textureCacheMemoryUsage += image.Data.Length;
}
}
/// <summary>
/// Signal that the asset cache has been cleared.
/// </summary>
public void ClearAssetCacheStatistics()
{
assetsInCache = 0;
assetCacheMemoryUsage = 0;
texturesInCache = 0;
textureCacheMemoryUsage = 0;
}
public void AddAssetRequestTimeAfterCacheMiss(TimeSpan ts)
{
assetRequestTimeAfterCacheMiss = ts;
}
public void AddBlockedMissingTextureRequest()
{
blockedMissingTextureRequests++;
}
public void AddAssetServiceRequestFailure()
{
assetServiceRequestFailures++;
}
public void AddInventoryServiceRetrievalFailure()
{
inventoryServiceRetrievalFailures++;
}
// public void AddInventoryServiceRetrievalFailure()
// {
// inventoryServiceRetrievalFailures++;
// }
/// <summary>
/// Register as a packet queue stats provider
@@ -290,8 +291,8 @@ namespace OpenSim.Framework.Statistics
public override string Report()
{
StringBuilder sb = new StringBuilder(Environment.NewLine);
sb.Append("ASSET STATISTICS");
sb.Append(Environment.NewLine);
// sb.Append("ASSET STATISTICS");
// sb.Append(Environment.NewLine);
/*
sb.Append(
@@ -307,7 +308,8 @@ Asset service request failures: {6}"+ Environment.NewLine,
BlockedMissingTextureRequests,
AssetServiceRequestFailures));
*/
/*
sb.Append(
string.Format(
@"Asset cache contains {0,6} assets
@@ -318,7 +320,7 @@ Asset service request failures: {3}" + Environment.NewLine,
assetRequestTimeAfterCacheMiss.Milliseconds / 1000.0,
BlockedMissingTextureRequests,
AssetServiceRequestFailures));
*/
sb.Append(Environment.NewLine);
sb.Append("CONNECTION STATISTICS");
@@ -328,13 +330,13 @@ Asset service request failures: {3}" + Environment.NewLine,
"Abnormal client thread terminations: {0}" + Environment.NewLine,
abnormalClientThreadTerminations));
sb.Append(Environment.NewLine);
sb.Append("INVENTORY STATISTICS");
sb.Append(Environment.NewLine);
sb.Append(
string.Format(
"Initial inventory caching failures: {0}" + Environment.NewLine,
InventoryServiceRetrievalFailures));
// sb.Append(Environment.NewLine);
// sb.Append("INVENTORY STATISTICS");
// sb.Append(Environment.NewLine);
// sb.Append(
// string.Format(
// "Initial inventory caching failures: {0}" + Environment.NewLine,
// InventoryServiceRetrievalFailures));
sb.Append(Environment.NewLine);
sb.Append("FRAME STATISTICS");
@@ -390,17 +392,17 @@ Asset service request failures: {3}" + Environment.NewLine,
public override string XReport(string uptime, string version)
{
OSDMap args = new OSDMap(30);
args["AssetsInCache"] = OSD.FromString (String.Format ("{0:0.##}", AssetsInCache));
args["TimeAfterCacheMiss"] = OSD.FromString (String.Format ("{0:0.##}",
assetRequestTimeAfterCacheMiss.Milliseconds / 1000.0));
args["BlockedMissingTextureRequests"] = OSD.FromString (String.Format ("{0:0.##}",
BlockedMissingTextureRequests));
args["AssetServiceRequestFailures"] = OSD.FromString (String.Format ("{0:0.##}",
AssetServiceRequestFailures));
args["abnormalClientThreadTerminations"] = OSD.FromString (String.Format ("{0:0.##}",
abnormalClientThreadTerminations));
args["InventoryServiceRetrievalFailures"] = OSD.FromString (String.Format ("{0:0.##}",
InventoryServiceRetrievalFailures));
// args["AssetsInCache"] = OSD.FromString (String.Format ("{0:0.##}", AssetsInCache));
// args["TimeAfterCacheMiss"] = OSD.FromString (String.Format ("{0:0.##}",
// assetRequestTimeAfterCacheMiss.Milliseconds / 1000.0));
// args["BlockedMissingTextureRequests"] = OSD.FromString (String.Format ("{0:0.##}",
// BlockedMissingTextureRequests));
// args["AssetServiceRequestFailures"] = OSD.FromString (String.Format ("{0:0.##}",
// AssetServiceRequestFailures));
// args["abnormalClientThreadTerminations"] = OSD.FromString (String.Format ("{0:0.##}",
// abnormalClientThreadTerminations));
// args["InventoryServiceRetrievalFailures"] = OSD.FromString (String.Format ("{0:0.##}",
// InventoryServiceRetrievalFailures));
args["Dilatn"] = OSD.FromString (String.Format ("{0:0.##}", timeDilation));
args["SimFPS"] = OSD.FromString (String.Format ("{0:0.##}", simFps));
args["PhyFPS"] = OSD.FromString (String.Format ("{0:0.##}", physicsFps));

View File

@@ -40,63 +40,6 @@ namespace OpenSim.Framework
/// </summary>
private const uint FULL_MASK_PERMISSIONS_GENERAL = 2147483647;
/// <summary>
/// Inventory types
/// </summary>
public static string[] InvTypes = new string[]
{
"texture",
"sound",
"calling_card",
"landmark",
String.Empty,
String.Empty,
"object",
"notecard",
String.Empty,
String.Empty,
"lsl_text",
String.Empty,
String.Empty,
"bodypart",
String.Empty,
"snapshot",
String.Empty,
String.Empty,
"wearable",
"animation",
"gesture"
};
/// <summary>
/// Asset types
/// </summary>
public static string[] Types = new string[]
{
"texture",
"sound",
"callcard",
"landmark",
"clothing", // Deprecated
"clothing",
"object",
"notecard",
"category",
"root",
"lsltext",
"lslbyte",
"txtr_tga",
"bodypart",
"trash",
"snapshot",
"lstndfnd",
"snd_wav",
"img_tga",
"jpeg",
"animatn",
"gesture"
};
private UUID _assetID = UUID.Zero;
private uint _baseMask = FULL_MASK_PERMISSIONS_GENERAL;
@@ -121,7 +64,8 @@ namespace OpenSim.Framework
private UUID _permsGranter;
private int _permsMask;
private int _type = 0;
private UUID _oldID = UUID.Zero;
private UUID _oldID;
private UUID _loadedID = UUID.Zero;
private bool _ownerChanged = false;
@@ -291,6 +235,15 @@ namespace OpenSim.Framework
}
}
public UUID LoadedItemID {
get {
return _loadedID;
}
set {
_loadedID = value;
}
}
public UUID LastOwnerID {
get {
return _lastOwnerID;
@@ -416,8 +369,8 @@ namespace OpenSim.Framework
/// <param name="partID">The new part ID to which this item belongs</param>
public void ResetIDs(UUID partID)
{
if (_oldID == UUID.Zero)
_oldID = ItemID;
LoadedItemID = OldItemID;
OldItemID = ItemID;
ItemID = UUID.Random();
ParentPartID = partID;
ParentID = partID;

View File

@@ -194,8 +194,6 @@ namespace OpenSim.Framework.Tests
resp = agentCircuitManager.AuthenticateSession(SessionId2, AgentId2, circuitcode2);
Assert.That(!resp.Authorised);
}
}
}

View File

@@ -87,8 +87,6 @@ namespace OpenSim.Framework.Tests
anim4.SequenceNum = anim2.SequenceNum;
Assert.That(anim4.ObjectID == objUUID2 && anim4.AnimID == animUUID2 && anim4.SequenceNum == 1, "void constructor and manual field population failed to set the properties correctly.");
}
}
}

View File

@@ -146,9 +146,9 @@ namespace OpenSim.Framework.Tests
Assert.IsFalse(Util.isUUID("FOOBAR67-89ab-Cdef-0123-456789AbCdEf"),
"UUIDs with non-hex characters are recognized as correct UUIDs.");
Assert.IsFalse(Util.isUUID("01234567"),
"Too short UUIDs are regognized as correct UUIDs.");
"Too short UUIDs are recognized as correct UUIDs.");
Assert.IsFalse(Util.isUUID("01234567-89ab-Cdef-0123-456789AbCdEf0"),
"Too long UUIDs are regognized as correct UUIDs.");
"Too long UUIDs are recognized as correct UUIDs.");
Assert.IsFalse(Util.isUUID("01234567-89ab-Cdef-0123+456789AbCdEf"),
"UUIDs with wrong format are recognized as correct UUIDs.");
}

View File

@@ -46,7 +46,6 @@ using System.Threading;
using log4net;
using Nini.Config;
using Nwc.XmlRpc;
// using BclExtras;
using OpenMetaverse;
using OpenMetaverse.StructuredData;
using Amib.Threading;
@@ -59,10 +58,12 @@ namespace OpenSim.Framework
/// <remarks>
/// None is used to execute the method in the same thread that made the call. It should only be used by regression
/// test code that relies on predictable event ordering.
/// RegressionTest is used by regression tests. It fires the call synchronously and does not catch any exceptions.
/// </remarks>
public enum FireAndForgetMethod
{
None,
RegressionTest,
UnsafeQueueUserWorkItem,
QueueUserWorkItem,
BeginInvoke,
@@ -91,8 +92,10 @@ namespace OpenSim.Framework
private static readonly DateTime unixEpoch =
DateTime.ParseExact("1970-01-01 00:00:00 +0", "yyyy-MM-dd hh:mm:ss z", DateTimeFormatInfo.InvariantInfo).ToUniversalTime();
public static readonly Regex UUIDPattern
= new Regex("^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$");
private static readonly string rawUUIDPattern
= "[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}";
public static readonly Regex PermissiveUUIDPattern = new Regex(rawUUIDPattern);
public static readonly Regex UUIDPattern = new Regex(string.Format("^{0}$", rawUUIDPattern));
public static FireAndForgetMethod DefaultFireAndForgetMethod = FireAndForgetMethod.SmartThreadPool;
public static FireAndForgetMethod FireAndForgetMethod = DefaultFireAndForgetMethod;
@@ -1555,27 +1558,38 @@ namespace OpenSim.Framework
public static void FireAndForget(System.Threading.WaitCallback callback, object obj)
{
// When OpenSim interacts with a database or sends data over the wire, it must send this in en_US culture
// so that we don't encounter problems where, for instance, data is saved with a culture that uses commas
// for decimals places but is read by a culture that treats commas as number seperators.
WaitCallback realCallback = delegate(object o)
{
Culture.SetCurrentCulture();
WaitCallback realCallback;
try
if (FireAndForgetMethod == FireAndForgetMethod.RegressionTest)
{
// If we're running regression tests, then we want any exceptions to rise up to the test code.
realCallback = o => { Culture.SetCurrentCulture(); callback(o); };
}
else
{
// When OpenSim interacts with a database or sends data over the wire, it must send this in en_US culture
// so that we don't encounter problems where, for instance, data is saved with a culture that uses commas
// for decimals places but is read by a culture that treats commas as number seperators.
realCallback = o =>
{
callback(o);
}
catch (Exception e)
{
m_log.ErrorFormat(
"[UTIL]: Continuing after async_call_method thread terminated with exception {0}{1}",
e.Message, e.StackTrace);
}
};
Culture.SetCurrentCulture();
try
{
callback(o);
}
catch (Exception e)
{
m_log.ErrorFormat(
"[UTIL]: Continuing after async_call_method thread terminated with exception {0}{1}",
e.Message, e.StackTrace);
}
};
}
switch (FireAndForgetMethod)
{
case FireAndForgetMethod.RegressionTest:
case FireAndForgetMethod.None:
realCallback.Invoke(obj);
break;
@@ -1662,13 +1676,14 @@ namespace OpenSim.Framework
/// </summary>
public static void PrintCallStack()
{
StackTrace stackTrace = new StackTrace(); // get call stack
StackTrace stackTrace = new StackTrace(true); // get call stack
StackFrame[] stackFrames = stackTrace.GetFrames(); // get method calls (frames)
// write call stack method names
foreach (StackFrame stackFrame in stackFrames)
{
m_log.Debug(stackFrame.GetMethod().DeclaringType + "." + stackFrame.GetMethod().Name); // write method name
MethodBase mb = stackFrame.GetMethod();
m_log.DebugFormat("{0}.{1}:{2}", mb.DeclaringType, mb.Name, stackFrame.GetFileLineNumber()); // write method name
}
}

View File

@@ -40,19 +40,44 @@ namespace OpenSim.Framework
{
/// <summary>Timer interval in milliseconds for the watchdog timer</summary>
const double WATCHDOG_INTERVAL_MS = 2500.0d;
/// <summary>Maximum timeout in milliseconds before a thread is considered dead</summary>
const int WATCHDOG_TIMEOUT_MS = 5000;
[System.Diagnostics.DebuggerDisplay("{Thread.Name}")]
public class ThreadWatchdogInfo
{
public Thread Thread;
public int LastTick;
public Thread Thread { get; private set; }
public ThreadWatchdogInfo(Thread thread)
/// <summary>
/// Approximate tick when this thread was started.
/// </summary>
/// <remarks>
/// Not terribly good since this quickly wraps around.
/// </remarks>
public int FirstTick { get; private set; }
/// <summary>
/// First time this heartbeat update was invoked
/// </summary>
public int LastTick { get; set; }
/// <summary>
/// Number of milliseconds before we notify that the thread is having a problem.
/// </summary>
public int Timeout { get; set; }
/// <summary>
/// Is this thread considered timed out?
/// </summary>
public bool IsTimedOut { get; set; }
public ThreadWatchdogInfo(Thread thread, int timeout)
{
Thread = thread;
LastTick = Environment.TickCount;
Timeout = timeout;
FirstTick = Environment.TickCount & Int32.MaxValue;
LastTick = FirstTick;
}
}
@@ -82,7 +107,7 @@ namespace OpenSim.Framework
}
/// <summary>
/// Start a new thread that is tracked by the watchdog timer
/// Start a new thread that is tracked by the watchdog timer.
/// </summary>
/// <param name="start">The method that will be executed in a new thread</param>
/// <param name="name">A name to give to the new thread</param>
@@ -91,11 +116,37 @@ namespace OpenSim.Framework
/// thread, otherwise false</param>
/// <returns>The newly created Thread object</returns>
public static Thread StartThread(ThreadStart start, string name, ThreadPriority priority, bool isBackground)
{
return StartThread(start, name, priority, isBackground, WATCHDOG_TIMEOUT_MS);
}
/// <summary>
/// Start a new thread that is tracked by the watchdog timer
/// </summary>
/// <param name="start">The method that will be executed in a new thread</param>
/// <param name="name">A name to give to the new thread</param>
/// <param name="priority">Priority to run the thread at</param>
/// <param name="isBackground">True to run this thread as a background
/// thread, otherwise false</param>
/// <param name="timeout">
/// Number of milliseconds to wait until we issue a warning about timeout.
/// </para>
/// <returns>The newly created Thread object</returns>
public static Thread StartThread(
ThreadStart start, string name, ThreadPriority priority, bool isBackground, int timeout)
{
Thread thread = new Thread(start);
thread.Name = name;
thread.Priority = priority;
thread.IsBackground = isBackground;
ThreadWatchdogInfo twi = new ThreadWatchdogInfo(thread, timeout);
m_log.Debug("[WATCHDOG]: Started tracking thread \"" + twi.Thread.Name + "\" (ID " + twi.Thread.ManagedThreadId + ")");
lock (m_threads)
m_threads.Add(twi.Thread.ManagedThreadId, twi);
thread.Start();
return thread;
@@ -112,27 +163,40 @@ namespace OpenSim.Framework
/// <summary>
/// Stops watchdog tracking on the current thread
/// </summary>
/// <returns>True if the thread was removed from the list of tracked
/// threads, otherwise false</returns>
/// <returns>
/// True if the thread was removed from the list of tracked
/// threads, otherwise false
/// </returns>
public static bool RemoveThread()
{
return RemoveThread(Thread.CurrentThread.ManagedThreadId);
}
private static void AddThread(ThreadWatchdogInfo threadInfo)
{
m_log.Debug("[WATCHDOG]: Started tracking thread \"" + threadInfo.Thread.Name + "\" (ID " + threadInfo.Thread.ManagedThreadId + ")");
lock (m_threads)
m_threads.Add(threadInfo.Thread.ManagedThreadId, threadInfo);
}
public static bool RemoveThread(int threadID)
private static bool RemoveThread(int threadID)
{
lock (m_threads)
return m_threads.Remove(threadID);
}
public static bool AbortThread(int threadID)
{
lock (m_threads)
{
if (m_threads.ContainsKey(threadID))
{
ThreadWatchdogInfo twi = m_threads[threadID];
twi.Thread.Abort();
RemoveThread(threadID);
return true;
}
else
{
return false;
}
}
}
private static void UpdateThread(int threadID)
{
ThreadWatchdogInfo threadInfo;
@@ -144,9 +208,14 @@ namespace OpenSim.Framework
try
{
if (m_threads.TryGetValue(threadID, out threadInfo))
threadInfo.LastTick = Environment.TickCount;
{
threadInfo.LastTick = Environment.TickCount & Int32.MaxValue;
threadInfo.IsTimedOut = false;
}
else
AddThread(new ThreadWatchdogInfo(Thread.CurrentThread));
{
m_log.WarnFormat("[WATCHDOG]: Asked to update thread {0} which is not being monitored", threadID);
}
}
catch { }
}
@@ -157,7 +226,8 @@ namespace OpenSim.Framework
/// <returns></returns>
public static ThreadWatchdogInfo[] GetThreads()
{
return m_threads.Values.ToArray();
lock (m_threads)
return m_threads.Values.ToArray();
}
private static void WatchdogTimerElapsed(object sender, System.Timers.ElapsedEventArgs e)
@@ -174,10 +244,16 @@ namespace OpenSim.Framework
foreach (ThreadWatchdogInfo threadInfo in m_threads.Values)
{
if (threadInfo.Thread.ThreadState == ThreadState.Stopped || now - threadInfo.LastTick >= WATCHDOG_TIMEOUT_MS)
if (threadInfo.Thread.ThreadState == ThreadState.Stopped)
{
timedOut = threadInfo;
m_threads.Remove(threadInfo.Thread.ManagedThreadId);
RemoveThread(threadInfo.Thread.ManagedThreadId);
break;
}
else if (!threadInfo.IsTimedOut && now - threadInfo.LastTick >= threadInfo.Timeout)
{
threadInfo.IsTimedOut = true;
timedOut = threadInfo;
break;
}
}

View File

@@ -39,9 +39,7 @@ using System.Text;
using System.Web;
using System.Xml;
using System.Xml.Serialization;
using log4net;
using OpenSim.Framework.Servers.HttpServer;
using OpenMetaverse.StructuredData;
namespace OpenSim.Framework
@@ -65,35 +63,35 @@ namespace OpenSim.Framework
// a "long" call for warning & debugging purposes
public const int LongCallTime = 500;
/// <summary>
/// Send LLSD to an HTTP client in application/llsd+json form
/// </summary>
/// <param name="response">HTTP response to send the data in</param>
/// <param name="body">LLSD to send to the client</param>
public static void SendJSONResponse(OSHttpResponse response, OSDMap body)
{
byte[] responseData = Encoding.UTF8.GetBytes(OSDParser.SerializeJsonString(body));
response.ContentEncoding = Encoding.UTF8;
response.ContentLength = responseData.Length;
response.ContentType = "application/llsd+json";
response.Body.Write(responseData, 0, responseData.Length);
}
/// <summary>
/// Send LLSD to an HTTP client in application/llsd+xml form
/// </summary>
/// <param name="response">HTTP response to send the data in</param>
/// <param name="body">LLSD to send to the client</param>
public static void SendXMLResponse(OSHttpResponse response, OSDMap body)
{
byte[] responseData = OSDParser.SerializeLLSDXmlBytes(body);
response.ContentEncoding = Encoding.UTF8;
response.ContentLength = responseData.Length;
response.ContentType = "application/llsd+xml";
response.Body.Write(responseData, 0, responseData.Length);
}
// /// <summary>
// /// Send LLSD to an HTTP client in application/llsd+json form
// /// </summary>
// /// <param name="response">HTTP response to send the data in</param>
// /// <param name="body">LLSD to send to the client</param>
// public static void SendJSONResponse(OSHttpResponse response, OSDMap body)
// {
// byte[] responseData = Encoding.UTF8.GetBytes(OSDParser.SerializeJsonString(body));
//
// response.ContentEncoding = Encoding.UTF8;
// response.ContentLength = responseData.Length;
// response.ContentType = "application/llsd+json";
// response.Body.Write(responseData, 0, responseData.Length);
// }
//
// /// <summary>
// /// Send LLSD to an HTTP client in application/llsd+xml form
// /// </summary>
// /// <param name="response">HTTP response to send the data in</param>
// /// <param name="body">LLSD to send to the client</param>
// public static void SendXMLResponse(OSHttpResponse response, OSDMap body)
// {
// byte[] responseData = OSDParser.SerializeLLSDXmlBytes(body);
//
// response.ContentEncoding = Encoding.UTF8;
// response.ContentLength = responseData.Length;
// response.ContentType = "application/llsd+xml";
// response.Body.Write(responseData, 0, responseData.Length);
// }
/// <summary>
/// Make a GET or GET-like request to a web service that returns LLSD
@@ -297,10 +295,10 @@ namespace OpenSim.Framework
return result;
}
}
catch (Exception e)
catch
{
// don't need to treat this as an error... we're just guessing anyway
m_log.DebugFormat("[WEB UTIL] couldn't decode <{0}>: {1}",response,e.Message);
// m_log.DebugFormat("[WEB UTIL] couldn't decode <{0}>: {1}",response,e.Message);
}
return result;

View File

@@ -70,7 +70,7 @@ namespace OpenSim
/// <param name="networkInfo"></param>
/// <returns>A configuration that gets passed to modules</returns>
public OpenSimConfigSource LoadConfigSettings(
IConfigSource argvSource, out ConfigSettings configSettings,
IConfigSource argvSource, EnvConfigSource envConfigSource, out ConfigSettings configSettings,
out NetworkServersInfo networkInfo)
{
m_configSettings = configSettings = new ConfigSettings();
@@ -107,15 +107,13 @@ namespace OpenSim
}
else
{
m_log.ErrorFormat("Master ini file {0} not found", masterFilePath);
m_log.ErrorFormat("Master ini file {0} not found", Path.GetFullPath(masterFilePath));
Environment.Exit(1);
}
}
}
string iniFileName =
startupConfig.GetString("inifile", "OpenSim.ini");
string iniFileName = startupConfig.GetString("inifile", "OpenSim.ini");
if (IsUri(iniFileName))
{
@@ -131,8 +129,7 @@ namespace OpenSim
if (!File.Exists(Application.iniFilePath))
{
iniFileName = "OpenSim.xml";
Application.iniFilePath = Path.GetFullPath(
Path.Combine(Util.configDir(), iniFileName));
Application.iniFilePath = Path.GetFullPath(Path.Combine(Util.configDir(), iniFileName));
}
if (File.Exists(Application.iniFilePath))
@@ -142,15 +139,12 @@ namespace OpenSim
}
}
string iniDirName =
startupConfig.GetString("inidirectory", "config");
string iniDirPath =
Path.Combine(Util.configDir(), iniDirName);
string iniDirName = startupConfig.GetString("inidirectory", "config");
string iniDirPath = Path.Combine(Util.configDir(), iniDirName);
if (Directory.Exists(iniDirPath))
{
m_log.InfoFormat("Searching folder {0} for config ini files",
iniDirPath);
m_log.InfoFormat("Searching folder {0} for config ini files", iniDirPath);
string[] fileEntries = Directory.GetFiles(iniDirName);
foreach (string filePath in fileEntries)
@@ -172,7 +166,6 @@ namespace OpenSim
if (sources.Count == 0)
{
m_log.FatalFormat("[CONFIG]: Could not load any configuration");
m_log.FatalFormat("[CONFIG]: Did you copy the OpenSimDefaults.ini.example file to OpenSimDefaults.ini?");
Environment.Exit(1);
}
@@ -195,6 +188,24 @@ namespace OpenSim
// Make sure command line options take precedence
m_config.Source.Merge(argvSource);
IConfig enVars = m_config.Source.Configs["Environment"];
if( enVars != null )
{
string[] env_keys = enVars.GetKeys();
foreach ( string key in env_keys )
{
envConfigSource.AddEnv(key, string.Empty);
}
envConfigSource.LoadEnv();
m_config.Source.Merge(envConfigSource);
m_config.Source.ExpandKeyValues();
}
ReadConfigSettings();
return m_config;
@@ -362,10 +373,6 @@ namespace OpenSim
{
m_configSettings.PhysicsEngine = startupConfig.GetString("physics");
m_configSettings.MeshEngineName = startupConfig.GetString("meshing");
m_configSettings.PhysicalPrim = startupConfig.GetBoolean("physical_prim", true);
m_configSettings.See_into_region_from_neighbor = startupConfig.GetBoolean("see_into_this_sim_from_neighbor", true);
m_configSettings.StorageDll = startupConfig.GetString("storage_plugin");
m_configSettings.ClientstackDll

View File

@@ -31,12 +31,14 @@ using System.Collections.Generic;
using System.IO;
using System.Reflection;
using System.Text;
using System.Text.RegularExpressions;
using System.Timers;
using log4net;
using Nini.Config;
using OpenMetaverse;
using OpenSim.Framework;
using OpenSim.Framework.Console;
using OpenSim.Framework.Servers;
using OpenSim.Framework.Statistics;
using OpenSim.Region.Framework.Interfaces;
using OpenSim.Region.Framework.Scenes;
@@ -56,6 +58,16 @@ namespace OpenSim
protected string m_consoleType = "local";
protected uint m_consolePort = 0;
/// <summary>
/// Prompt to use for simulator command line.
/// </summary>
private string m_consolePrompt;
/// <summary>
/// Regex for parsing out special characters in the prompt.
/// </summary>
private Regex m_consolePromptRegex = new Regex(@"([^\\])\\(\w)", RegexOptions.Compiled);
private string m_timedScript = "disabled";
private Timer m_scriptTimer;
@@ -84,7 +96,9 @@ namespace OpenSim
if (networkConfig != null)
m_consolePort = (uint)networkConfig.GetInt("console_port", 0);
m_timedScript = startupConfig.GetString("timer_Script", "disabled");
if (m_logFileAppender != null)
{
if (m_logFileAppender is log4net.Appender.FileAppender)
@@ -107,6 +121,7 @@ namespace OpenSim
Util.FireAndForgetMethod = asyncCallMethod;
stpMaxThreads = startupConfig.GetInt("MaxPoolThreads", 15);
m_consolePrompt = startupConfig.GetString("ConsolePrompt", @"Region (\R) ");
}
if (Util.FireAndForgetMethod == FireAndForgetMethod.SmartThreadPool)
@@ -173,6 +188,18 @@ namespace OpenSim
}
}
// Hook up to the watchdog timer
Watchdog.OnWatchdogTimeout += WatchdogTimeoutHandler;
PrintFileToConsole("startuplogo.txt");
// For now, start at the 'root' level by default
if (m_sceneManager.Scenes.Count == 1) // If there is only one region, select it
ChangeSelectedRegion("region",
new string[] {"change", "region", m_sceneManager.Scenes[0].RegionInfo.RegionName});
else
ChangeSelectedRegion("region", new string[] {"change", "region", "root"});
//Run Startup Commands
if (String.IsNullOrEmpty(m_startupCommandsFile))
{
@@ -191,18 +218,6 @@ namespace OpenSim
m_scriptTimer.Interval = 1200*1000;
m_scriptTimer.Elapsed += RunAutoTimerScript;
}
// Hook up to the watchdog timer
Watchdog.OnWatchdogTimeout += WatchdogTimeoutHandler;
PrintFileToConsole("startuplogo.txt");
// For now, start at the 'root' level by default
if (m_sceneManager.Scenes.Count == 1) // If there is only one region, select it
ChangeSelectedRegion("region",
new string[] {"change", "region", m_sceneManager.Scenes[0].RegionInfo.RegionName});
else
ChangeSelectedRegion("region", new string[] {"change", "region", "root"});
}
/// <summary>
@@ -216,18 +231,29 @@ namespace OpenSim
HandleForceUpdate);
m_console.Commands.AddCommand("region", false, "debug packet",
"debug packet <level>",
"debug packet <level> [<avatar-first-name> <avatar-last-name>]",
"Turn on packet debugging",
"If level > 255 then all incoming and outgoing packets are logged.\n"
+ "If level <= 255 then incoming AgentUpdate and outgoing SimStats and SimulatorViewerTimeMessage packets are not logged.\n"
+ "If level <= 200 then incoming RequestImage and outgoing ImagePacket, ImageData, LayerData and CoarseLocationUpdate packets are not logged.\n"
+ "If level <= 100 then incoming ViewerEffect and AgentAnimation and outgoing ViewerEffect and AvatarAnimation packets are not logged.\n"
+ "If level <= 50 then outgoing ImprovedTerseObjectUpdate packets are not logged.\n"
+ "If level <= 0 then no packets are logged.",
+ "If level <= 0 then no packets are logged.\n"
+ "If an avatar name is given then only packets from that avatar are logged",
Debug);
m_console.Commands.AddCommand("region", false, "debug http",
"debug http <level>",
"Turn on inbound http request debugging for everything except the event queue (see debug eq).",
"If level >= 2 then the handler used to service the request is logged.\n"
+ "If level >= 1 then incoming HTTP requests are logged.\n"
+ "If level <= 0 then no extra http logging is done.\n",
Debug);
m_console.Commands.AddCommand("region", false, "debug teleport", "debug teleport", "Toggle teleport route debugging", Debug);
m_console.Commands.AddCommand("region", false, "debug scene",
"debug scene <cripting> <collisions> <physics>",
"debug scene <scripting> <collisions> <physics>",
"Turn on scene debugging", Debug);
m_console.Commands.AddCommand("region", false, "change region",
@@ -265,12 +291,16 @@ namespace OpenSim
m_console.Commands.AddCommand("region", false, "save oar",
//"save oar [-v|--version=<N>] [-p|--profile=<url>] [<OAR path>]",
"save oar [-p|--profile=<url>] [--noassets] [--perm=<permissions>] [<OAR path>]",
"save oar [-h|--home=<url>] [--noassets] [--publish] [--perm=<permissions>] [<OAR path>]",
"Save a region's data to an OAR archive.",
// "-v|--version=<N> generates scene objects as per older versions of the serialization (e.g. -v=0)" + Environment.NewLine
"-p|--profile=<url> adds the url of the profile service to the saved user information." + Environment.NewLine
"-h|--home=<url> adds the url of the profile service to the saved user information." + Environment.NewLine
+ "--noassets stops assets being saved to the OAR." + Environment.NewLine
+ "--perm stops objects with insufficient permissions from being saved to the OAR." + Environment.NewLine
+ "--publish saves an OAR stripped of owner and last owner information." + Environment.NewLine
+ " on reload, the estate owner will be the owner of all objects" + Environment.NewLine
+ " this is useful if you're making oars generally available that might be reloaded to the same grid from which you published" + Environment.NewLine
+ " this option is EXPERIMENTAL" + Environment.NewLine
+ "--perm=<permissions> stops objects with insufficient permissions from being saved to the OAR." + Environment.NewLine
+ " <permissions> can contain one or more of these characters: \"C\" = Copy, \"T\" = Transfer" + Environment.NewLine
+ "The OAR path must be a filesystem path."
+ " If this is not given then the oar is saved to region.oar in the current directory.",
@@ -321,7 +351,7 @@ namespace OpenSim
m_console.Commands.AddCommand("region", false, "backup",
"backup",
"Persist objects to the database now", RunCommand);
"Persist currently unsaved object changes immediately instead of waiting for the normal persistence call.", RunCommand);
m_console.Commands.AddCommand("region", false, "create region",
"create region [\"region name\"] <region_file.ini>",
@@ -772,6 +802,7 @@ namespace OpenSim
break;
case "backup":
MainConsole.Instance.Output("Triggering save of pending object updates to persistent store");
m_sceneManager.BackupCurrentScene();
break;
@@ -782,7 +813,7 @@ namespace OpenSim
if (m_sceneManager.TryGetScene(regRemoveName, out removeScene))
RemoveRegion(removeScene, false);
else
MainConsole.Instance.Output("no region with that name");
MainConsole.Instance.Output("No region with that name");
break;
case "delete-region":
@@ -829,7 +860,22 @@ namespace OpenSim
string regionName = (m_sceneManager.CurrentScene == null ? "root" : m_sceneManager.CurrentScene.RegionInfo.RegionName);
MainConsole.Instance.Output(String.Format("Currently selected region is {0}", regionName));
m_console.DefaultPrompt = String.Format("Region ({0}) ", regionName);
// m_log.DebugFormat("Original prompt is {0}", m_consolePrompt);
string prompt = m_consolePrompt;
// Replace "\R" with the region name
// Replace "\\" with "\"
prompt = m_consolePromptRegex.Replace(prompt, m =>
{
// m_log.DebugFormat("Matched {0}", m.Groups[2].Value);
if (m.Groups[2].Value == "R")
return m.Groups[1].Value + regionName;
else
return m.Groups[0].Value;
});
m_console.DefaultPrompt = prompt;
m_console.ConsoleScene = m_sceneManager.CurrentScene;
}
@@ -845,22 +891,42 @@ namespace OpenSim
switch (args[1])
{
case "packet":
string name = null;
if (args.Length == 5)
name = string.Format("{0} {1}", args[3], args[4]);
if (args.Length > 2)
{
int newDebug;
if (int.TryParse(args[2], out newDebug))
{
m_sceneManager.SetDebugPacketLevelOnCurrentScene(newDebug);
m_sceneManager.SetDebugPacketLevelOnCurrentScene(newDebug, name);
// We provide user information elsewhere if any clients had their debug level set.
// MainConsole.Instance.OutputFormat("Debug packet level set to {0}", newDebug);
}
else
{
MainConsole.Instance.Output("packet debug should be 0..255");
MainConsole.Instance.Output("Usage: debug packet 0..255");
}
MainConsole.Instance.Output(String.Format("New packet debug: {0}", newDebug));
}
break;
case "http":
if (args.Length == 3)
{
int newDebug;
if (int.TryParse(args[2], out newDebug))
{
MainServer.Instance.DebugLevel = newDebug;
MainConsole.Instance.OutputFormat("Debug http level set to {0}", newDebug);
break;
}
}
MainConsole.Instance.Output("Usage: debug http 0..2");
break;
case "scene":
if (args.Length == 5)
{
@@ -883,13 +949,28 @@ namespace OpenSim
}
else
{
MainConsole.Instance.Output("debug scene <scripting> <collisions> <physics> (where inside <> is true/false)");
MainConsole.Instance.Output("Usage: debug scene <scripting> <collisions> <physics> (where inside <> is true/false)");
}
break;
case "teleport":
foreach(Scene s in m_sceneManager.Scenes)
{
if (s.DEBUG)
{
s.DEBUG = false;
MainConsole.Instance.Output("Teleport debugging is disabled!");
}
else{
s.DEBUG = true;
MainConsole.Instance.Output("Teleport debugging is enabled!");
}
}
break;
default:
MainConsole.Instance.Output("Unknown debug");
MainConsole.Instance.Output("Unknown debug command");
break;
}
}
@@ -980,7 +1061,7 @@ namespace OpenSim
{
//this.HttpServer.
acd.AppendFormat("{0}:\n", scene.RegionInfo.RegionName);
foreach (AgentCircuitData aCircuit in scene.AuthenticateHandler.AgentCircuits.Values)
foreach (AgentCircuitData aCircuit in scene.AuthenticateHandler.GetAgentCircuits().Values)
acd.AppendFormat("\t{0} {1} ({2})\n", aCircuit.firstname, aCircuit.lastname, (aCircuit.child ? "Child" : "Root"));
}
);
@@ -1015,24 +1096,6 @@ namespace OpenSim
MainConsole.Instance.Output(handlers.ToString());
break;
case "pending-objects":
System.Text.StringBuilder pending = new System.Text.StringBuilder("Pending objects:\n");
m_sceneManager.ForEachScene(
delegate(Scene scene)
{
scene.ForEachScenePresence(
delegate(ScenePresence sp)
{
pending.AppendFormat("{0}: {1} {2} pending\n",
scene.RegionInfo.RegionName, sp.Name, sp.SceneViewer.GetPendingObjectsCount());
}
);
}
);
MainConsole.Instance.Output(pending.ToString());
break;
case "modules":
MainConsole.Instance.Output("The currently loaded shared modules are:");
foreach (IRegionModule module in m_moduleLoader.GetLoadedSharedModules)
@@ -1040,6 +1103,19 @@ namespace OpenSim
MainConsole.Instance.Output("Shared Module: " + module.Name);
}
m_sceneManager.ForEachScene(
delegate(Scene scene)
{
m_log.Error("The currently loaded modules in " + scene.RegionInfo.RegionName + " are:");
foreach (IRegionModule module in scene.Modules.Values)
{
if (!module.IsSharedModule)
{
m_log.Error("Region Module: " + module.Name);
}
}
});
MainConsole.Instance.Output("");
break;

View File

@@ -46,7 +46,7 @@ using OpenSim.Region.Framework;
using OpenSim.Region.Framework.Interfaces;
using OpenSim.Region.Framework.Scenes;
using OpenSim.Region.Physics.Manager;
using OpenSim.Server.Base;
using OpenSim.Server.Base;
using OpenSim.Services.Base;
using OpenSim.Services.Interfaces;
using OpenSim.Services.UserAccountService;
@@ -62,6 +62,7 @@ namespace OpenSim
// These are the names of the plugin-points extended by this
// class during system startup.
//
private const string PLUGIN_ASSET_CACHE = "/OpenSim/AssetCache";
private const string PLUGIN_ASSET_SERVER_CLIENT = "/OpenSim/AssetClient";
@@ -112,6 +113,13 @@ namespace OpenSim
get { return m_clientServers; }
}
protected EnvConfigSource m_EnvConfigSource = new EnvConfigSource();
public EnvConfigSource envConfigSource
{
get { return m_EnvConfigSource; }
}
protected List<IClientNetworkServer> m_clientServers = new List<IClientNetworkServer>();
public uint HttpServerPort
@@ -146,7 +154,7 @@ namespace OpenSim
protected virtual void LoadConfigSettings(IConfigSource configSource)
{
m_configLoader = new ConfigurationLoader();
m_config = m_configLoader.LoadConfigSettings(configSource, out m_configSettings, out m_networkServersInfo);
m_config = m_configLoader.LoadConfigSettings(configSource, envConfigSource, out m_configSettings, out m_networkServersInfo);
ReadExtraConfigSettings();
}
@@ -203,16 +211,16 @@ namespace OpenSim
// Load the simulation data service
IConfig simDataConfig = m_config.Source.Configs["SimulationDataStore"];
if (simDataConfig == null)
throw new Exception("Configuration file is missing the [SimulationDataStore] section");
throw new Exception("Configuration file is missing the [SimulationDataStore] section. Have you copied OpenSim.ini.example to OpenSim.ini to reference config-include/ files?");
string module = simDataConfig.GetString("LocalServiceModule", String.Empty);
if (String.IsNullOrEmpty(module))
throw new Exception("Configuration file is missing the LocalServiceModule parameter in the [SimulationDataStore] section");
throw new Exception("Configuration file is missing the LocalServiceModule parameter in the [SimulationDataStore] section.");
m_simulationDataService = ServerUtils.LoadPlugin<ISimulationDataService>(module, new object[] { m_config.Source });
// Load the estate data service
IConfig estateDataConfig = m_config.Source.Configs["EstateDataStore"];
if (estateDataConfig == null)
throw new Exception("Configuration file is missing the [EstateDataStore] section");
throw new Exception("Configuration file is missing the [EstateDataStore] section. Have you copied OpenSim.ini.example to OpenSim.ini to reference config-include/ files?");
module = estateDataConfig.GetString("LocalServiceModule", String.Empty);
if (String.IsNullOrEmpty(module))
throw new Exception("Configuration file is missing the LocalServiceModule parameter in the [EstateDataStore] section");
@@ -424,10 +432,14 @@ namespace OpenSim
// TODO : Try setting resource for region xstats here on scene
MainServer.Instance.AddStreamHandler(new Region.Framework.Scenes.RegionStatsHandler(regionInfo));
scene.loadAllLandObjectsFromStorage(regionInfo.originRegionID);
scene.EventManager.TriggerParcelPrimCountUpdate();
if (scene.SnmpService != null)
{
scene.SnmpService.BootInfo("Grid Registration in progress", scene);
}
try
{
scene.RegisterRegionWithGrid();
@@ -452,9 +464,6 @@ namespace OpenSim
scene.SnmpService.BootInfo("Grid Registration done", scene);
}
scene.loadAllLandObjectsFromStorage(regionInfo.originRegionID);
scene.EventManager.TriggerParcelPrimCountUpdate();
// We need to do this after we've initialized the
// scripting engines.
scene.CreateScriptInstances();
@@ -742,8 +751,8 @@ namespace OpenSim
return new Scene(
regionInfo, circuitManager, sceneGridService,
simDataService, estateDataService, m_moduleLoader, false, m_configSettings.PhysicalPrim,
m_configSettings.See_into_region_from_neighbor, m_config.Source, m_version);
simDataService, estateDataService, m_moduleLoader, false,
m_config.Source, m_version);
}
protected void ShutdownClientServer(RegionInfo whichRegion)
@@ -794,7 +803,7 @@ namespace OpenSim
public class SimStatusHandler : IStreamedRequestHandler
{
public byte[] Handle(string path, Stream request,
OSHttpRequest httpRequest, OSHttpResponse httpResponse)
IOSHttpRequest httpRequest, IOSHttpResponse httpResponse)
{
return Util.UTF8.GetBytes("OK");
}
@@ -831,7 +840,7 @@ namespace OpenSim
}
public byte[] Handle(string path, Stream request,
OSHttpRequest httpRequest, OSHttpResponse httpResponse)
IOSHttpRequest httpRequest, IOSHttpResponse httpResponse)
{
return Util.UTF8.GetBytes(m_opensim.StatReport(httpRequest));
}
@@ -872,7 +881,7 @@ namespace OpenSim
}
public byte[] Handle(string path, Stream request,
OSHttpRequest httpRequest, OSHttpResponse httpResponse)
IOSHttpRequest httpRequest, IOSHttpResponse httpResponse)
{
return Util.UTF8.GetBytes(m_opensim.StatReport(httpRequest));
}

View File

@@ -56,8 +56,6 @@ namespace OpenSim.Region.ClientStack.Linden
string assetName, string description, UUID assetID, UUID inventoryItem, UUID parentFolder,
byte[] data, string inventoryType, string assetType);
public delegate void UploadedBakedTexture(UUID assetID, byte[] data);
public delegate UUID UpdateItem(UUID itemID, byte[] data);
public delegate void UpdateTaskScript(UUID itemID, UUID primID, bool isScriptRunning, byte[] data, ref ArrayList errors);
@@ -96,8 +94,8 @@ namespace OpenSim.Region.ClientStack.Linden
private static readonly string m_notecardUpdatePath = "0004/";
private static readonly string m_notecardTaskUpdatePath = "0005/";
// private static readonly string m_fetchInventoryPath = "0006/";
private static readonly string m_copyFromNotecardPath = "0007/";
// private static readonly string m_remoteParcelRequestPath = "0009/";// This is in the LandManagementModule.
private static readonly string m_uploadBakedTexturePath = "0010/";// This is in the LandManagementModule.
// These are callbacks which will be setup by the scene so that we can update scene data when we
@@ -134,8 +132,7 @@ namespace OpenSim.Region.ClientStack.Linden
AddNewInventoryItem = m_Scene.AddUploadedInventoryItem;
ItemUpdatedCall = m_Scene.CapsUpdateInventoryItemAsset;
TaskScriptUpdatedCall = m_Scene.CapsUpdateTaskInventoryScriptAsset;
CAPSFetchInventoryDescendents = m_Scene.HandleFetchInventoryDescendentsCAPS;
GetClient = m_Scene.SceneContents.GetControllingClient;
GetClient = m_Scene.SceneGraph.GetControllingClient;
}
/// <summary>
@@ -165,8 +162,6 @@ namespace OpenSim.Region.ClientStack.Linden
IRequestHandler req = new RestStreamHandler("POST", capsBase + m_notecardTaskUpdatePath, ScriptTaskInventory);
m_HostCapsObj.RegisterHandler("UpdateScriptTaskInventory", req);
m_HostCapsObj.RegisterHandler("UpdateScriptTask", req);
m_HostCapsObj.RegisterHandler("UploadBakedTexture", new RestStreamHandler("POST", capsBase + m_uploadBakedTexturePath, UploadBakedTexture));
}
catch (Exception e)
{
@@ -186,6 +181,7 @@ namespace OpenSim.Region.ClientStack.Linden
m_HostCapsObj.RegisterHandler("UpdateNotecardAgentInventory", req);
m_HostCapsObj.RegisterHandler("UpdateScriptAgentInventory", req);
m_HostCapsObj.RegisterHandler("UpdateScriptAgent", req);
m_HostCapsObj.RegisterHandler("CopyInventoryFromNotecard", new RestStreamHandler("POST", capsBase + m_copyFromNotecardPath, CopyInventoryFromNotecard));
// As of RC 1.22.9 of the Linden client this is
// supported
@@ -229,7 +225,7 @@ namespace OpenSim.Region.ClientStack.Linden
/// <param name="httpResponse">HTTP response header object</param>
/// <returns></returns>
public string SeedCapRequest(string request, string path, string param,
OSHttpRequest httpRequest, OSHttpResponse httpResponse)
IOSHttpRequest httpRequest, IOSHttpResponse httpResponse)
{
// m_log.Debug("[CAPS]: Seed Caps Request in region: " + m_regionName);
@@ -239,7 +235,8 @@ namespace OpenSim.Region.ClientStack.Linden
return string.Empty;
}
Hashtable caps = m_HostCapsObj.CapsHandlers.CapsDetails;
Hashtable caps = m_HostCapsObj.CapsHandlers.GetCapsDetails(true);
// Add the external too
foreach (KeyValuePair<string, string> kvp in m_HostCapsObj.ExternalCapsHandlers)
caps[kvp.Key] = kvp.Value;
@@ -261,7 +258,7 @@ namespace OpenSim.Region.ClientStack.Linden
/// <param name="httpResponse">HTTP response header object</param>
/// <returns></returns>
public string ScriptTaskInventory(string request, string path, string param,
OSHttpRequest httpRequest, OSHttpResponse httpResponse)
IOSHttpRequest httpRequest, IOSHttpResponse httpResponse)
{
try
{
@@ -330,74 +327,6 @@ namespace OpenSim.Region.ClientStack.Linden
}
}
/// <summary>
/// Handle a request from the client for a Uri to upload a baked texture.
/// </summary>
/// <param name="request"></param>
/// <param name="path"></param>
/// <param name="param"></param>
/// <param name="httpRequest"></param>
/// <param name="httpResponse"></param>
/// <returns>The upload response if the request is successful, null otherwise.</returns>
public string UploadBakedTexture(string request, string path,
string param, OSHttpRequest httpRequest,
OSHttpResponse httpResponse)
{
try
{
// m_log.Debug("[CAPS]: UploadBakedTexture Request in region: " + m_regionName);
string capsBase = "/CAPS/" + m_HostCapsObj.CapsObjectPath;
string uploaderPath = Util.RandomClass.Next(5000, 8000).ToString("0000");
BakedTextureUploader uploader =
new BakedTextureUploader(capsBase + uploaderPath, m_HostCapsObj.HttpListener);
uploader.OnUpLoad += BakedTextureUploaded;
m_HostCapsObj.HttpListener.AddStreamHandler(
new BinaryStreamHandler("POST", capsBase + uploaderPath,
uploader.uploaderCaps));
string protocol = "http://";
if (m_HostCapsObj.SSLCaps)
protocol = "https://";
string uploaderURL = protocol + m_HostCapsObj.HostName + ":" +
m_HostCapsObj.Port.ToString() + capsBase + uploaderPath;
LLSDAssetUploadResponse uploadResponse =
new LLSDAssetUploadResponse();
uploadResponse.uploader = uploaderURL;
uploadResponse.state = "upload";
return LLSDHelpers.SerialiseLLSDReply(uploadResponse);
}
catch (Exception e)
{
m_log.Error("[CAPS]: " + e.ToString());
}
return null;
}
/// <summary>
/// Called when a baked texture has been successfully uploaded by a client.
/// </summary>
/// <param name="assetID"></param>
/// <param name="data"></param>
public void BakedTextureUploaded(UUID assetID, byte[] data)
{
// m_log.WarnFormat("[CAPS]: Received baked texture {0}", assetID.ToString());
AssetBase asset;
asset = new AssetBase(assetID, "Baked Texture", (sbyte)AssetType.Texture, m_HostCapsObj.AgentID.ToString());
asset.Data = data;
asset.Temporary = true;
asset.Local = !m_persistBakedTextures; // Local assets aren't persisted, non-local are
m_assetService.Store(asset);
}
/// <summary>
/// Called when new asset data for an agent inventory item update has been uploaded.
/// </summary>
@@ -439,7 +368,7 @@ namespace OpenSim.Region.ClientStack.Linden
if (mm != null)
{
if (!mm.UploadCovered(client, mm.UploadCharge))
if (!mm.UploadCovered(client.AgentId, mm.UploadCharge))
{
if (client != null)
client.SendAgentAlertMessage("Unable to upload asset. Insufficient funds.", false);
@@ -493,7 +422,7 @@ namespace OpenSim.Region.ClientStack.Linden
string assetType)
{
m_log.DebugFormat(
"Uploaded asset {0} for inventory item {1}, inv type {2}, asset type {3}",
"[BUNCH OF CAPS]: Uploaded asset {0} for inventory item {1}, inv type {2}, asset type {3}",
assetID, inventoryItem, inventoryType, assetType);
sbyte assType = 0;
@@ -696,7 +625,12 @@ namespace OpenSim.Region.ClientStack.Linden
item.AssetType = assType;
item.InvType = inType;
item.Folder = parentFolder;
item.CurrentPermissions = (uint)PermissionMask.All;
// If we set PermissionMask.All then when we rez the item the next permissions will replace the current
// (owner) permissions. This becomes a problem if next permissions are changed.
item.CurrentPermissions
= (uint)(PermissionMask.Move | PermissionMask.Copy | PermissionMask.Modify | PermissionMask.Transfer);
item.BasePermissions = (uint)PermissionMask.All;
item.EveryOnePermissions = 0;
item.NextPermissions = (uint)PermissionMask.All;
@@ -758,7 +692,7 @@ namespace OpenSim.Region.ClientStack.Linden
/// <param name="param"></param>
/// <returns></returns>
public string NoteCardAgentInventory(string request, string path, string param,
OSHttpRequest httpRequest, OSHttpResponse httpResponse)
IOSHttpRequest httpRequest, IOSHttpResponse httpResponse)
{
//m_log.Debug("[CAPS]: NoteCardAgentInventory Request in region: " + m_regionName + "\n" + request);
//m_log.Debug("[CAPS]: NoteCardAgentInventory Request is: " + request);
@@ -796,6 +730,75 @@ namespace OpenSim.Region.ClientStack.Linden
return LLSDHelpers.SerialiseLLSDReply(uploadResponse);
}
/// <summary>
/// Called by the CopyInventoryFromNotecard caps handler.
/// </summary>
/// <param name="request"></param>
/// <param name="path"></param>
/// <param name="param"></param>
public string CopyInventoryFromNotecard(string request, string path, string param,
IOSHttpRequest httpRequest, IOSHttpResponse httpResponse)
{
Hashtable response = new Hashtable();
response["int_response_code"] = 404;
response["content_type"] = "text/plain";
response["keepalive"] = false;
response["str_response_string"] = "";
try
{
OSDMap content = (OSDMap)OSDParser.DeserializeLLSDXml(request);
UUID objectID = content["object-id"].AsUUID();
UUID notecardID = content["notecard-id"].AsUUID();
UUID folderID = content["folder-id"].AsUUID();
UUID itemID = content["item-id"].AsUUID();
// m_log.InfoFormat("[CAPS]: CopyInventoryFromNotecard, FolderID:{0}, ItemID:{1}, NotecardID:{2}, ObjectID:{3}", folderID, itemID, notecardID, objectID);
if (objectID != UUID.Zero)
{
SceneObjectPart part = m_Scene.GetSceneObjectPart(objectID);
if (part != null)
{
TaskInventoryItem taskItem = part.Inventory.GetInventoryItem(notecardID);
if (!m_Scene.Permissions.CanCopyObjectInventory(notecardID, objectID, m_HostCapsObj.AgentID))
{
return LLSDHelpers.SerialiseLLSDReply(response);
}
}
}
InventoryItemBase item = null;
InventoryItemBase copyItem = null;
IClientAPI client = null;
m_Scene.TryGetClient(m_HostCapsObj.AgentID, out client);
item = m_Scene.InventoryService.GetItem(new InventoryItemBase(itemID));
if (item != null)
{
copyItem = m_Scene.GiveInventoryItem(m_HostCapsObj.AgentID, item.Owner, itemID, folderID);
if (copyItem != null && client != null)
{
m_log.InfoFormat("[CAPS]: CopyInventoryFromNotecard, ItemID:{0}, FolderID:{1}", copyItem.ID, copyItem.Folder);
client.SendBulkUpdateInventory(copyItem);
}
}
else
{
m_log.ErrorFormat("[CAPS]: CopyInventoryFromNotecard - Failed to retrieve item {0} from notecard {1}", itemID, notecardID);
if (client != null)
client.SendAlertMessage("Failed to retrieve item");
}
}
catch (Exception e)
{
m_log.ErrorFormat("[CAPS]: CopyInventoryFromNotecard : {0}", e.ToString());
}
response["int_response_code"] = 200;
return LLSDHelpers.SerialiseLLSDReply(response);
}
}
public class AssetUploader
@@ -1067,6 +1070,7 @@ namespace OpenSim.Region.ClientStack.Linden
// XXX Maybe this should be some meaningful error packet
return null;
}
///Left this in and commented in case there are unforseen issues
//private void SaveAssetToFile(string filename, byte[] data)
//{
@@ -1090,53 +1094,4 @@ namespace OpenSim.Region.ClientStack.Linden
fs.Close();
}
}
public class BakedTextureUploader
{
public event UploadedBakedTexture OnUpLoad;
private UploadedBakedTexture handlerUpLoad = null;
private string uploaderPath = String.Empty;
private UUID newAssetID;
private IHttpServer httpListener;
public BakedTextureUploader(string path, IHttpServer httpServer)
{
newAssetID = UUID.Random();
uploaderPath = path;
httpListener = httpServer;
// m_log.InfoFormat("[CAPS] baked texture upload starting for {0}",newAssetID);
}
/// <summary>
/// Handle raw uploaded baked texture data.
/// </summary>
/// <param name="data"></param>
/// <param name="path"></param>
/// <param name="param"></param>
/// <returns></returns>
public string uploaderCaps(byte[] data, string path, string param)
{
handlerUpLoad = OnUpLoad;
if (handlerUpLoad != null)
{
Util.FireAndForget(delegate(object o) { handlerUpLoad(newAssetID, data); });
}
string res = String.Empty;
LLSDAssetUploadComplete uploadComplete = new LLSDAssetUploadComplete();
uploadComplete.new_asset = newAssetID.ToString();
uploadComplete.new_inventory_item = UUID.Zero;
uploadComplete.state = "complete";
res = LLSDHelpers.SerialiseLLSDReply(uploadComplete);
httpListener.RemoveStreamHandler("POST", uploaderPath);
// m_log.InfoFormat("[CAPS] baked texture upload completed for {0}",newAssetID);
return res;
}
}
}
}

View File

@@ -39,6 +39,7 @@ using OpenMetaverse.Messages.Linden;
using OpenMetaverse.Packets;
using OpenMetaverse.StructuredData;
using OpenSim.Framework;
using OpenSim.Framework.Console;
using OpenSim.Framework.Servers;
using OpenSim.Framework.Servers.HttpServer;
using OpenSim.Region.Framework.Interfaces;
@@ -58,9 +59,15 @@ namespace OpenSim.Region.ClientStack.Linden
public class EventQueueGetModule : IEventQueue, IRegionModule
{
private static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType);
protected Scene m_scene = null;
/// <value>
/// Debug level.
/// </value>
public int DebugLevel { get; set; }
protected Scene m_scene;
private IConfigSource m_gConfig;
bool enabledYN = false;
bool enabledYN;
private Dictionary<UUID, int> m_ids = new Dictionary<UUID, int>();
@@ -97,12 +104,21 @@ namespace OpenSim.Region.ClientStack.Linden
scene.EventManager.OnClientClosed += ClientClosed;
scene.EventManager.OnMakeChildAgent += MakeChildAgent;
scene.EventManager.OnRegisterCaps += OnRegisterCaps;
MainConsole.Instance.Commands.AddCommand(
"event queue",
false,
"debug eq",
"debug eq [0|1]",
"Turn on event queue debugging",
"debug eq 1 will turn on event queue debugging. This will log all outgoing event queue messages to clients.\n"
+ "debug eq 0 will turn off event queue debugging.",
HandleDebugEq);
}
else
{
m_gConfig = null;
}
}
private void ReadConfigAndPopulate(Scene scene, IConfig startupConfig, string p)
@@ -129,6 +145,22 @@ namespace OpenSim.Region.ClientStack.Linden
}
#endregion
protected void HandleDebugEq(string module, string[] args)
{
int debugLevel;
if (!(args.Length == 3 && int.TryParse(args[2], out debugLevel)))
{
MainConsole.Instance.OutputFormat("Usage: debug eq [0|1]");
}
else
{
DebugLevel = debugLevel;
MainConsole.Instance.OutputFormat(
"Set event queue debug level to {0} in {1}", DebugLevel, m_scene.RegionInfo.RegionName);
}
}
/// <summary>
/// Always returns a valid queue
/// </summary>
@@ -205,7 +237,7 @@ namespace OpenSim.Region.ClientStack.Linden
private void ClientClosed(UUID AgentID, Scene scene)
{
//m_log.DebugFormat("[EVENTQUEUE]: Closed client {0} in region {1}", AgentID, m_scene.RegionInfo.RegionName);
// m_log.DebugFormat("[EVENTQUEUE]: Closed client {0} in region {1}", AgentID, m_scene.RegionInfo.RegionName);
int count = 0;
while (queues.ContainsKey(AgentID) && queues[AgentID].Count > 0 && count++ < 5)
@@ -217,11 +249,13 @@ namespace OpenSim.Region.ClientStack.Linden
{
queues.Remove(AgentID);
}
List<UUID> removeitems = new List<UUID>();
lock (m_AvatarQueueUUIDMapping)
{
foreach (UUID ky in m_AvatarQueueUUIDMapping.Keys)
{
// m_log.DebugFormat("[EVENTQUEUE]: Found key {0} in m_AvatarQueueUUIDMapping while looking for {1}", ky, AgentID);
if (ky == AgentID)
{
removeitems.Add(ky);
@@ -230,11 +264,13 @@ namespace OpenSim.Region.ClientStack.Linden
foreach (UUID ky in removeitems)
{
UUID eventQueueGetUuid = m_AvatarQueueUUIDMapping[ky];
m_AvatarQueueUUIDMapping.Remove(ky);
MainServer.Instance.RemovePollServiceHTTPHandler("","/CAPS/EQG/" + ky.ToString() + "/");
}
MainServer.Instance.RemovePollServiceHTTPHandler("","/CAPS/EQG/" + eventQueueGetUuid.ToString() + "/");
}
}
UUID searchval = UUID.Zero;
removeitems.Clear();
@@ -253,7 +289,6 @@ namespace OpenSim.Region.ClientStack.Linden
foreach (UUID ky in removeitems)
m_QueueUUIDAvatarMapping.Remove(ky);
}
}
@@ -312,16 +347,21 @@ namespace OpenSim.Region.ClientStack.Linden
}
// Register this as a caps handler
// FIXME: Confusingly, we need to register separate as a capability so that the client is told about
// EventQueueGet when it receive capability information, but then we replace the rest handler immediately
// afterwards with the poll service. So for now, we'll pass a null instead to simplify code reading, but
// really it should be possible to directly register the poll handler as a capability.
caps.RegisterHandler("EventQueueGet",
new RestHTTPHandler("POST", capsBase + EventQueueGetUUID.ToString() + "/",
delegate(Hashtable m_dhttpMethod)
{
return ProcessQueue(m_dhttpMethod, agentID, caps);
}));
new RestHTTPHandler("POST", capsBase + EventQueueGetUUID.ToString() + "/", null));
// delegate(Hashtable m_dhttpMethod)
// {
// return ProcessQueue(m_dhttpMethod, agentID, caps);
// }));
// This will persist this beyond the expiry of the caps handlers
MainServer.Instance.AddPollServiceHTTPHandler(
capsBase + EventQueueGetUUID.ToString() + "/", EventQueuePoll, new PollServiceEventArgs(null, HasEvents, GetEvents, NoEvents, agentID));
capsBase + EventQueueGetUUID.ToString() + "/",
new PollServiceEventArgs(null, HasEvents, GetEvents, NoEvents, agentID));
Random rnd = new Random(Environment.TickCount);
lock (m_ids)
@@ -346,6 +386,8 @@ namespace OpenSim.Region.ClientStack.Linden
public Hashtable GetEvents(UUID requestID, UUID pAgentId, string request)
{
// m_log.DebugFormat("[EVENT QUEUE GET MODULE]: Invoked GetEvents() for {0}", pAgentId);
Queue<OSD> queue = TryGetQueue(pAgentId);
OSD element;
lock (queue)
@@ -368,12 +410,31 @@ namespace OpenSim.Region.ClientStack.Linden
}
else
{
if (DebugLevel > 0 && element is OSDMap)
{
OSDMap ev = (OSDMap)element;
m_log.DebugFormat(
"[EVENT QUEUE GET MODULE]: Eq OUT {0} to {1}",
ev["message"], m_scene.GetScenePresence(pAgentId).Name);
}
array.Add(element);
lock (queue)
{
while (queue.Count > 0)
{
array.Add(queue.Dequeue());
element = queue.Dequeue();
if (DebugLevel > 0 && element is OSDMap)
{
OSDMap ev = (OSDMap)element;
m_log.DebugFormat(
"[EVENT QUEUE GET MODULE]: Eq OUT {0} to {1}",
ev["message"], m_scene.GetScenePresence(pAgentId).Name);
}
array.Add(element);
thisID++;
}
}
@@ -410,148 +471,161 @@ namespace OpenSim.Region.ClientStack.Linden
return responsedata;
}
public Hashtable ProcessQueue(Hashtable request, UUID agentID, Caps caps)
{
// TODO: this has to be redone to not busy-wait (and block the thread),
// TODO: as soon as we have a non-blocking way to handle HTTP-requests.
// if (m_log.IsDebugEnabled)
// {
// String debug = "[EVENTQUEUE]: Got request for agent {0} in region {1} from thread {2}: [ ";
// foreach (object key in request.Keys)
// public Hashtable ProcessQueue(Hashtable request, UUID agentID, Caps caps)
// {
// // TODO: this has to be redone to not busy-wait (and block the thread),
// // TODO: as soon as we have a non-blocking way to handle HTTP-requests.
//
//// if (m_log.IsDebugEnabled)
//// {
//// String debug = "[EVENTQUEUE]: Got request for agent {0} in region {1} from thread {2}: [ ";
//// foreach (object key in request.Keys)
//// {
//// debug += key.ToString() + "=" + request[key].ToString() + " ";
//// }
//// m_log.DebugFormat(debug + " ]", agentID, m_scene.RegionInfo.RegionName, System.Threading.Thread.CurrentThread.Name);
//// }
//
// Queue<OSD> queue = TryGetQueue(agentID);
// OSD element;
//
// lock (queue)
// element = queue.Dequeue(); // 15s timeout
//
// Hashtable responsedata = new Hashtable();
//
// int thisID = 0;
// lock (m_ids)
// thisID = m_ids[agentID];
//
// if (element == null)
// {
// //m_log.ErrorFormat("[EVENTQUEUE]: Nothing to process in " + m_scene.RegionInfo.RegionName);
// if (thisID == -1) // close-request
// {
// debug += key.ToString() + "=" + request[key].ToString() + " ";
// m_log.ErrorFormat("[EVENTQUEUE]: 404 in " + m_scene.RegionInfo.RegionName);
// responsedata["int_response_code"] = 404; //501; //410; //404;
// responsedata["content_type"] = "text/plain";
// responsedata["keepalive"] = false;
// responsedata["str_response_string"] = "Closed EQG";
// return responsedata;
// }
// m_log.DebugFormat(debug + " ]", agentID, m_scene.RegionInfo.RegionName, System.Threading.Thread.CurrentThread.Name);
// responsedata["int_response_code"] = 502;
// responsedata["content_type"] = "text/plain";
// responsedata["keepalive"] = false;
// responsedata["str_response_string"] = "Upstream error: ";
// responsedata["error_status_text"] = "Upstream error:";
// responsedata["http_protocol_version"] = "HTTP/1.0";
// return responsedata;
// }
//
// OSDArray array = new OSDArray();
// if (element == null) // didn't have an event in 15s
// {
// // Send it a fake event to keep the client polling! It doesn't like 502s like the proxys say!
// array.Add(EventQueueHelper.KeepAliveEvent());
// //m_log.DebugFormat("[EVENTQUEUE]: adding fake event for {0} in region {1}", agentID, m_scene.RegionInfo.RegionName);
// }
// else
// {
// array.Add(element);
//
// if (element is OSDMap)
// {
// OSDMap ev = (OSDMap)element;
// m_log.DebugFormat(
// "[EVENT QUEUE GET MODULE]: Eq OUT {0} to {1}",
// ev["message"], m_scene.GetScenePresence(agentID).Name);
// }
//
// lock (queue)
// {
// while (queue.Count > 0)
// {
// element = queue.Dequeue();
//
// if (element is OSDMap)
// {
// OSDMap ev = (OSDMap)element;
// m_log.DebugFormat(
// "[EVENT QUEUE GET MODULE]: Eq OUT {0} to {1}",
// ev["message"], m_scene.GetScenePresence(agentID).Name);
// }
//
// array.Add(element);
// thisID++;
// }
// }
// }
//
// OSDMap events = new OSDMap();
// events.Add("events", array);
//
// events.Add("id", new OSDInteger(thisID));
// lock (m_ids)
// {
// m_ids[agentID] = thisID + 1;
// }
//
// responsedata["int_response_code"] = 200;
// responsedata["content_type"] = "application/xml";
// responsedata["keepalive"] = false;
// responsedata["str_response_string"] = OSDParser.SerializeLLSDXmlString(events);
//
// m_log.DebugFormat("[EVENTQUEUE]: sending response for {0} in region {1}: {2}", agentID, m_scene.RegionInfo.RegionName, responsedata["str_response_string"]);
//
// return responsedata;
// }
Queue<OSD> queue = TryGetQueue(agentID);
OSD element;
lock (queue)
element = queue.Dequeue(); // 15s timeout
Hashtable responsedata = new Hashtable();
int thisID = 0;
lock (m_ids)
thisID = m_ids[agentID];
if (element == null)
{
//m_log.ErrorFormat("[EVENTQUEUE]: Nothing to process in " + m_scene.RegionInfo.RegionName);
if (thisID == -1) // close-request
{
m_log.ErrorFormat("[EVENTQUEUE]: 404 in " + m_scene.RegionInfo.RegionName);
responsedata["int_response_code"] = 404; //501; //410; //404;
responsedata["content_type"] = "text/plain";
responsedata["keepalive"] = false;
responsedata["str_response_string"] = "Closed EQG";
return responsedata;
}
responsedata["int_response_code"] = 502;
responsedata["content_type"] = "text/plain";
responsedata["keepalive"] = false;
responsedata["str_response_string"] = "Upstream error: ";
responsedata["error_status_text"] = "Upstream error:";
responsedata["http_protocol_version"] = "HTTP/1.0";
return responsedata;
}
OSDArray array = new OSDArray();
if (element == null) // didn't have an event in 15s
{
// Send it a fake event to keep the client polling! It doesn't like 502s like the proxys say!
array.Add(EventQueueHelper.KeepAliveEvent());
//m_log.DebugFormat("[EVENTQUEUE]: adding fake event for {0} in region {1}", agentID, m_scene.RegionInfo.RegionName);
}
else
{
array.Add(element);
lock (queue)
{
while (queue.Count > 0)
{
array.Add(queue.Dequeue());
thisID++;
}
}
}
OSDMap events = new OSDMap();
events.Add("events", array);
events.Add("id", new OSDInteger(thisID));
lock (m_ids)
{
m_ids[agentID] = thisID + 1;
}
responsedata["int_response_code"] = 200;
responsedata["content_type"] = "application/xml";
responsedata["keepalive"] = false;
responsedata["str_response_string"] = OSDParser.SerializeLLSDXmlString(events);
//m_log.DebugFormat("[EVENTQUEUE]: sending response for {0} in region {1}: {2}", agentID, m_scene.RegionInfo.RegionName, responsedata["str_response_string"]);
return responsedata;
}
public Hashtable EventQueuePoll(Hashtable request)
{
return new Hashtable();
}
public Hashtable EventQueuePath2(Hashtable request)
{
string capuuid = (string)request["uri"]; //path.Replace("/CAPS/EQG/","");
// pull off the last "/" in the path.
Hashtable responsedata = new Hashtable();
capuuid = capuuid.Substring(0, capuuid.Length - 1);
capuuid = capuuid.Replace("/CAPS/EQG/", "");
UUID AvatarID = UUID.Zero;
UUID capUUID = UUID.Zero;
// parse the path and search for the avatar with it registered
if (UUID.TryParse(capuuid, out capUUID))
{
lock (m_QueueUUIDAvatarMapping)
{
if (m_QueueUUIDAvatarMapping.ContainsKey(capUUID))
{
AvatarID = m_QueueUUIDAvatarMapping[capUUID];
}
}
if (AvatarID != UUID.Zero)
{
return ProcessQueue(request, AvatarID, m_scene.CapsModule.GetCapsForUser(AvatarID));
}
else
{
responsedata["int_response_code"] = 404;
responsedata["content_type"] = "text/plain";
responsedata["keepalive"] = false;
responsedata["str_response_string"] = "Not Found";
responsedata["error_status_text"] = "Not Found";
responsedata["http_protocol_version"] = "HTTP/1.0";
return responsedata;
// return 404
}
}
else
{
responsedata["int_response_code"] = 404;
responsedata["content_type"] = "text/plain";
responsedata["keepalive"] = false;
responsedata["str_response_string"] = "Not Found";
responsedata["error_status_text"] = "Not Found";
responsedata["http_protocol_version"] = "HTTP/1.0";
return responsedata;
// return 404
}
}
// public Hashtable EventQueuePath2(Hashtable request)
// {
// string capuuid = (string)request["uri"]; //path.Replace("/CAPS/EQG/","");
// // pull off the last "/" in the path.
// Hashtable responsedata = new Hashtable();
// capuuid = capuuid.Substring(0, capuuid.Length - 1);
// capuuid = capuuid.Replace("/CAPS/EQG/", "");
// UUID AvatarID = UUID.Zero;
// UUID capUUID = UUID.Zero;
//
// // parse the path and search for the avatar with it registered
// if (UUID.TryParse(capuuid, out capUUID))
// {
// lock (m_QueueUUIDAvatarMapping)
// {
// if (m_QueueUUIDAvatarMapping.ContainsKey(capUUID))
// {
// AvatarID = m_QueueUUIDAvatarMapping[capUUID];
// }
// }
//
// if (AvatarID != UUID.Zero)
// {
// return ProcessQueue(request, AvatarID, m_scene.CapsModule.GetCapsForUser(AvatarID));
// }
// else
// {
// responsedata["int_response_code"] = 404;
// responsedata["content_type"] = "text/plain";
// responsedata["keepalive"] = false;
// responsedata["str_response_string"] = "Not Found";
// responsedata["error_status_text"] = "Not Found";
// responsedata["http_protocol_version"] = "HTTP/1.0";
// return responsedata;
// // return 404
// }
// }
// else
// {
// responsedata["int_response_code"] = 404;
// responsedata["content_type"] = "text/plain";
// responsedata["keepalive"] = false;
// responsedata["str_response_string"] = "Not Found";
// responsedata["error_status_text"] = "Not Found";
// responsedata["http_protocol_version"] = "HTTP/1.0";
// return responsedata;
// // return 404
// }
// }
public OSD EventQueueFallBack(string path, OSD request, string endpoint)
{
@@ -715,6 +789,7 @@ namespace OpenSim.Region.ClientStack.Linden
OSD item = EventQueueHelper.GroupMembership(groupUpdate);
Enqueue(item, avatarID);
}
public void QueryReply(PlacesReplyPacket groupUpdate, UUID avatarID)
{
OSD item = EventQueueHelper.PlacesQuery(groupUpdate);

View File

@@ -0,0 +1,94 @@
/*
* Copyright (c) Contributors, http://opensimulator.org/
* See CONTRIBUTORS.TXT for a full list of copyright holders.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions are met:
* * Redistributions of source code must retain the above copyright
* notice, this list of conditions and the following disclaimer.
* * Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in the
* documentation and/or other materials provided with the distribution.
* * Neither the name of the OpenSimulator Project nor the
* names of its contributors may be used to endorse or promote products
* derived from this software without specific prior written permission.
*
* THIS SOFTWARE IS PROVIDED BY THE DEVELOPERS ``AS IS'' AND ANY
* EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
* WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
* DISCLAIMED. IN NO EVENT SHALL THE CONTRIBUTORS BE LIABLE FOR ANY
* DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
* (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
* LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
* ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
using System;
using System.Collections.Generic;
using System.Net;
using log4net.Config;
using Nini.Config;
using NUnit.Framework;
using OpenMetaverse;
using OpenMetaverse.Packets;
using OpenSim.Framework;
using OpenSim.Framework.Servers;
using OpenSim.Framework.Servers.HttpServer;
using OpenSim.Region.ClientStack.Linden;
using OpenSim.Region.CoreModules.Framework;
using OpenSim.Tests.Common;
using OpenSim.Tests.Common.Mock;
namespace OpenSim.Region.ClientStack.Linden.Tests
{
[TestFixture]
public class EventQueueTests
{
private TestScene m_scene;
[SetUp]
public void SetUp()
{
MainServer.Instance = new BaseHttpServer(9999, false, 9998, "");
IConfigSource config = new IniConfigSource();
config.AddConfig("Startup");
config.Configs["Startup"].Set("EventQueue", "true");
CapabilitiesModule capsModule = new CapabilitiesModule();
EventQueueGetModule eqgModule = new EventQueueGetModule();
m_scene = SceneHelpers.SetupScene();
SceneHelpers.SetupSceneModules(m_scene, config, capsModule, eqgModule);
}
[Test]
public void AddForClient()
{
TestHelpers.InMethod();
// log4net.Config.XmlConfigurator.Configure();
SceneHelpers.AddScenePresence(m_scene, TestHelpers.ParseTail(0x1));
// TODO: Add more assertions for the other aspects of event queues
Assert.That(MainServer.Instance.GetPollServiceHandlerKeys().Count, Is.EqualTo(1));
}
[Test]
public void RemoveForClient()
{
TestHelpers.InMethod();
// log4net.Config.XmlConfigurator.Configure();
UUID spId = TestHelpers.ParseTail(0x1);
SceneHelpers.AddScenePresence(m_scene, spId);
m_scene.IncomingCloseAgent(spId);
// TODO: Add more assertions for the other aspects of event queues
Assert.That(MainServer.Instance.GetPollServiceHandlerKeys().Count, Is.EqualTo(0));
}
}
}

View File

@@ -0,0 +1,151 @@
/*
* Copyright (c) Contributors, http://opensimulator.org/
* See CONTRIBUTORS.TXT for a full list of copyright holders.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions are met:
* * Redistributions of source code must retain the above copyright
* notice, this list of conditions and the following disclaimer.
* * Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in the
* documentation and/or other materials provided with the distribution.
* * Neither the name of the OpenSimulator Project nor the
* names of its contributors may be used to endorse or promote products
* derived from this software without specific prior written permission.
*
* THIS SOFTWARE IS PROVIDED BY THE DEVELOPERS ``AS IS'' AND ANY
* EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
* WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
* DISCLAIMED. IN NO EVENT SHALL THE CONTRIBUTORS BE LIABLE FOR ANY
* DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
* (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
* LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
* ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
using System;
using System.Collections;
using System.Reflection;
using log4net;
using Nini.Config;
using Mono.Addins;
using OpenMetaverse;
using OpenSim.Framework;
using OpenSim.Framework.Servers.HttpServer;
using OpenSim.Region.Framework.Interfaces;
using OpenSim.Region.Framework.Scenes;
using OpenSim.Services.Interfaces;
using Caps = OpenSim.Framework.Capabilities.Caps;
using OpenSim.Capabilities.Handlers;
namespace OpenSim.Region.ClientStack.Linden
{
/// <summary>
/// This module implements both WebFetchInventoryDescendents and FetchInventoryDescendents2 capabilities.
/// </summary>
[Extension(Path = "/OpenSim/RegionModules", NodeName = "RegionModule")]
public class FetchInventory2Module : INonSharedRegionModule
{
// private static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType);
public bool Enabled { get; private set; }
private Scene m_scene;
private IInventoryService m_inventoryService;
private string m_fetchInventory2Url;
private FetchInventory2Handler m_fetchHandler;
#region ISharedRegionModule Members
public void Initialise(IConfigSource source)
{
IConfig config = source.Configs["ClientStack.LindenCaps"];
if (config == null)
return;
m_fetchInventory2Url = config.GetString("Cap_FetchInventory2", string.Empty);
if (m_fetchInventory2Url != string.Empty)
Enabled = true;
}
public void AddRegion(Scene s)
{
if (!Enabled)
return;
m_scene = s;
}
public void RemoveRegion(Scene s)
{
if (!Enabled)
return;
m_scene.EventManager.OnRegisterCaps -= RegisterCaps;
m_scene = null;
}
public void RegionLoaded(Scene s)
{
if (!Enabled)
return;
m_inventoryService = m_scene.InventoryService;
// We'll reuse the same handler for all requests.
if (m_fetchInventory2Url == "localhost")
m_fetchHandler = new FetchInventory2Handler(m_inventoryService);
m_scene.EventManager.OnRegisterCaps += RegisterCaps;
}
public void PostInitialise() {}
public void Close() {}
public string Name { get { return "FetchInventory2Module"; } }
public Type ReplaceableInterface
{
get { return null; }
}
#endregion
private void RegisterCaps(UUID agentID, Caps caps)
{
RegisterFetchCap(agentID, caps, "FetchInventory2", m_fetchInventory2Url);
}
private void RegisterFetchCap(UUID agentID, Caps caps, string capName, string url)
{
string capUrl;
if (url == "localhost")
{
capUrl = "/CAPS/" + UUID.Random();
IRequestHandler reqHandler
= new RestStreamHandler("POST", capUrl, m_fetchHandler.FetchInventoryRequest);
caps.RegisterHandler(capName, reqHandler);
}
else
{
capUrl = url;
caps.RegisterHandler(capName, capUrl);
}
// m_log.DebugFormat(
// "[FETCH INVENTORY2 MODULE]: Registered capability {0} at {1} in region {2} for {3}",
// capName, capUrl, m_scene.RegionInfo.RegionName, agentID);
}
}
}

Some files were not shown because too many files have changed in this diff Show More