Compare commits

..

1334 Commits

Author SHA1 Message Date
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
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
Melanie
080a41e9f9 Merge commit 'f9ffd2538f3bf300e8f751258a6129fb780b5b0a' into bigmerge 2011-10-25 01:35:30 +01:00
Melanie
5f025d20fe Fix ground sit autopilot 2011-10-25 00:53:39 +02: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
Melanie
4a6160e7ad Fake an AgentCircuitData if none is available rather than crashing out 2011-10-24 18:22:36 +02: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
Melanie
8cca9fe23c Allow updating the movement animation while flying. This fixes falling,
splatting and ground sit. Walking to a ground sit still doesn't work.
2011-10-21 03:15:56 +02: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
Melanie
fd0e65b0b1 Fix up the animator and ScenePresence to like each other again 2011-10-20 23:11:53 +02: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
Justin Clark-Casey (justincc)
f9ffd2538f Improve some method doc for LLUDPClient, LLUDPServer and UnackedPacketCollection 2011-10-12 19:22:30 +01:00
Melanie
35def547f7 Merge branch 'master' into bigmerge 2011-10-12 16:45:48 +01:00
Melanie
4b7b9e81f7 Make it possible to disable the HG linker. On non-HG systems it spits yellow
spam, so it should not load unless HG is desired.
2011-10-12 15:41:59 +01:00
Melanie
0faa8db0ef Update OpenSimDefaults.ini to make the prior state (Groups messaging enabled
by default) the config default. This way it will work for current cases while
allowing the use of other groups modules without config bloat.
2011-10-12 09:23:57 +01:00
Melanie
ca74088d94 Change default groups messaging module in hardcode to the empty string.
Modules should not assume thet they are the one and only, but only be
enabled when explicitly configured.
2011-10-12 09:21:46 +01:00
Melanie
c9fae6f8a2 Disable Flotsam groups messaging module in our config base 2011-10-12 09:27:48 +02:00
Melanie
d2dc2316c2 Merge branch 'master' into bigmerge 2011-10-12 09:26:35 +01:00
Melanie
1d379a9c7b Make WALK animation state work again. TURNLEFT and TURNRIGHT are now rebroken 2011-10-12 07:46:13 +02:00
Melanie
e3effc4974 Merge branch 'master' into bigmerge 2011-10-12 07:29:35 +01:00
Melanie
4b069d23d0 Merge commit 'f138a2056ecea4016d75fec276a390955dbfd688' into bigmerge 2011-10-12 07:24:53 +01:00
Melanie
816d0de11a Merge commit '28f549bd64eb423ae43a5c23c1da5094e6269150' into bigmerge 2011-10-12 07:24:46 +01:00
Melanie
628ca122b8 Merge commit '353e7ce873fb139ad4050023ce08339d953ad4d5' into bigmerge 2011-10-12 07:24:34 +01:00
Melanie
de109797f2 Merge commit '62aad4c18f1ebc0780ce47cf179f3d5550ff0837' into bigmerge 2011-10-12 07:24:26 +01:00
Melanie
cc637b78fb Merge commit '19096bd391ac88bbccda00e4660a061020118bb9' into bigmerge 2011-10-12 07:24:13 +01:00
Melanie
ad46ad1ab2 Merge commit '8114f895c2973ac9e2e456ac2aaad8deb23f3852' into bigmerge 2011-10-12 07:23:54 +01:00
Melanie
98ae98510c Merge commit '2b290793ab7153c956db5637dd27dfbbd0a1cf98' into bigmerge 2011-10-12 07:23:40 +01:00
Melanie
5d3acc9ac3 Merge commit '013bf2775fc02d12ef39f6ca49ff8ecd53028e9c' into bigmerge 2011-10-12 07:23:32 +01:00
Melanie
b716d98e23 Merge commit '156385f48b2b2829f2d427c72f269406c46019fa' into bigmerge 2011-10-12 07:23:18 +01:00
Melanie
3657cd436c Merge commit 'a6c5e00c45b3d64b4e912a65c8ed7f31eb643759' into bigmerge 2011-10-12 07:23:08 +01:00
Melanie
cc4b1c69d8 Merge commit '29660fe175ef3b49ff649a26bd9bcf4c9eb7c6dd' into bigmerge 2011-10-12 07:23:02 +01:00
Melanie
3a290e581a Merge commit '71d29decc87952790b3f5264ad4a29da171b1689' into bigmerge
Conflicts:
	OpenSim/ApplicationPlugins/RemoteController/RemoteAdminPlugin.cs
2011-10-12 07:09:41 +01:00
Melanie
1c67c13d77 Merge commit '5551542c286c5db4fa47527c3167bcf539116ada' into bigmerge 2011-10-12 07:09:10 +01:00
Melanie
2c23fc9e68 Merge commit '4073cd6ced525cb36e4335e79e3f94ad4872b263' into bigmerge 2011-10-12 07:09:04 +01:00
Melanie
d03d486dbb Merge commit 'ff80113534182bbcbcb49a73035776134fb04e3e' into bigmerge 2011-10-12 07:08:46 +01:00
Melanie
2f6cc77154 Adjust CM version tag 2011-10-12 07:08:23 +01:00
Melanie
336f6f7ec4 Merge commit 'f8c06c61149b1ab3e3002247280be250b558a79e' into bigmerge 2011-10-12 07:07:37 +01:00
Melanie
e2935c1bd4 Merge commit 'b5e6209cfd1c0b655852cf40e99f50aa2db9d8fa' into bigmerge 2011-10-12 07:07:23 +01:00
Melanie
4a284110e6 Merge commit '5bc6503ae1295d00934a5f2ab92484ebcc8513a1' into bigmerge 2011-10-12 07:07:12 +01:00
Melanie
8211169876 Merge commit '1c548179778befb50ee7481be7ffc91f2d53fede' into bigmerge 2011-10-12 07:07:05 +01:00
Melanie
492a50d6f7 Merge commit 'a9b3ab0c85b567552f31490126a1ff5479352413' into bigmerge 2011-10-12 07:06:59 +01:00
Melanie
e18a76f6d6 Merge commit 'e3c522e2118108a01d2c6f77c8065224d53d6bb9' into bigmerge 2011-10-12 07:05:57 +01:00
Melanie
00285082d8 Merge commit '4b46b7a5adb1c7449725ed1cf1fa5d7122af10bb' into bigmerge 2011-10-12 07:05:47 +01:00
Melanie
9b4b022ecb Merge commit 'f26a966b8e79688ca2ed81c236492d694f34ac7d' into bigmerge 2011-10-12 07:05:39 +01:00
Melanie
abfb0c9399 Merge commit '4748c19bdbcdcaf6050e1f04a5f7394a88e0bf3e' into bigmerge 2011-10-12 07:05:18 +01:00
Melanie
b251423b11 Merge commit '1f78dc65041729567edc411a3e63dd9a32a268a3' into bigmerge 2011-10-12 07:04:28 +01:00
Melanie
65aed5f1d3 Merge commit '4c812884be59d76039afee74725fc45981356f36' into bigmerge 2011-10-12 07:04:06 +01:00
Melanie
86e28724bd Merge commit '95910f03d454e678a04ae7e800a445ba609b6003' into bigmerge 2011-10-12 07:03:58 +01:00
Melanie
265e9d094d Merge commit '9a16e76f5151c11fbf76e41b89f8eb03b1731828' into bigmerge 2011-10-12 07:02:36 +01:00
Melanie
b2090e711f Merge commit '08f264d096e1dca535a64e683fa5ab5918368085' into bigmerge
Conflicts:
	OpenSim/Region/Framework/Scenes/ScenePresence.cs
2011-10-12 07:02:15 +01:00
Melanie
f4de1a6d9b HACK: Remove advanced property resending until it is fixed properly in core. 2011-10-12 06:48:40 +02:00
Melanie
906df08ae6 Merge branch 'bigmerge' of ssh://melanie@3dhosting.de/var/git/careminster into bigmerge 2011-10-12 02:02:58 +01:00
Melanie
9733b64dc8 Merge commit 'bd9ba904c3e4d9c2c626a7749f19f124b4ddcf15' into bigmerge
Conflicts:
	OpenSim/Region/Framework/Scenes/ScenePresence.cs
2011-10-12 02:02:46 +01:00
Melanie
ba978d0d77 Merge commit '77b8fb0f86cd0342fa7331f04f56c0b5980290c2' into bigmerge 2011-10-12 01:43:52 +01:00
Melanie
4e88fe42e4 Merge commit 'ca83f99332316fda1c412a5bf2889f9cf5cf3577' into bigmerge 2011-10-12 01:42:39 +01:00
Melanie
5f2cb7caa3 Merge commit '7fa1c979cf60a981200c4ddc3ea0ff8d0ddb2aa7' into bigmerge 2011-10-12 01:42:30 +01:00
Melanie
77f9d98831 Merge commit '8a8983b3d40ba4e38569f4456c6a98d9372c3822' into bigmerge 2011-10-12 01:41:59 +01:00
Melanie
d595f9fd85 Merge commit '604708fc969b92af4f07d4acae9f3d15c7cee63e' into bigmerge 2011-10-12 01:41:52 +01:00
Melanie
b0ee174296 Merge commit '9090039324ecc45bf1005e719f61a80f0187cb73' into bigmerge 2011-10-12 01:41:44 +01:00
Melanie
e68226afd3 Merge commit '7d033187d8fd49d9a38531061c38783e81d69f5b' into bigmerge 2011-10-12 01:41:28 +01:00
Melanie
c0555f6be6 Merge commit '3142982353a121920e571e5b33acffc065b20a2e' into bigmerge 2011-10-12 01:39:38 +01:00
Melanie
2c03b6f0ae Merge commit '38d205502a83ed334d9827f43862579cec305639' into bigmerge 2011-10-12 01:39:30 +01:00
Melanie
f5e78ca616 Merge commit '146322eb34c15a5722cfe42dd012821ddf441fe6' into bigmerge
Conflicts:
	OpenSim/Region/OptionalModules/World/TreePopulator/TreePopulatorModule.cs
2011-10-12 01:31:34 +01:00
Melanie
70fc130a49 Merge commit '9a49b3b5197f41353c32443dbc5432a4bcd58958' into bigmerge 2011-10-12 01:30:25 +01:00
Melanie
6af388ded9 Merge commit 'b907a66f394b279d3ca2b1ac620bc7bb13cc6dd2' into bigmerge 2011-10-12 01:30:14 +01:00
Melanie
cd52f63b65 Merge commit '413e299045112d4a1553929eb042e87587cb3d2e' into bigmerge 2011-10-12 01:30:07 +01:00
Melanie
30b2fc6aea Merge commit 'b229a72a5fb929d4886117f39ed6bd17a6d56aef' into bigmerge 2011-10-12 01:29:47 +01:00
Melanie
f8016a730e Merge commit '8a216dc1ccdc336a22958cd476de034d065cf676' into bigmerge 2011-10-12 01:29:37 +01:00
Melanie
e3f6344f54 Merge commit 'f1986d54bb3569e6b075b2125e860f31842a60cc' into bigmerge 2011-10-12 01:29:31 +01:00
Melanie
1ebfd2fb68 Fix tree populator 2011-10-12 01:55:12 +02:00
Melanie
59e3ac1ec6 Fix rezzing coalesced object broken by core merge 2011-10-12 00:50:13 +02:00
Melanie
1c2b5d99c9 Merge branch 'bigmerge' of ssh://3dhosting.de/var/git/careminster into bigmerge 2011-10-12 00:10:15 +02:00
Melanie
e4f3ba8610 Merge commit '92c88121c72386f85472c6cf4891eca8b62b9867' into bigmerge
Conflicts:
	OpenSim/Region/CoreModules/Avatar/Attachments/AttachmentsModule.cs
	OpenSim/Region/Framework/Interfaces/IAttachmentsModule.cs
2011-10-12 00:10:30 +01:00
Melanie
29c31983d8 Merge commit 'bfa405e6f70ee31510a20f708327c1c254398926' into bigmerge 2011-10-11 23:32:46 +01:00
Melanie
a9af618842 Merge commit '460946ad62b682c7a942751f192ca9e96b662f0e' into bigmerge
Conflicts:
	OpenSim/Region/Framework/Scenes/Scene.cs
	OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs
2011-10-11 23:32:16 +01:00
Melanie
0b96991ab4 Merge commit 'c7d0d71666a92b201d639511d062a7c22726b3c9' into bigmerge 2011-10-11 23:28:16 +01:00
Melanie
b8e22b25fd Merge commit 'b98442dceccd416a493f19153f5daad2e173183e' into bigmerge
Conflicts:
	OpenSim/Region/Framework/Scenes/Animation/ScenePresenceAnimator.cs
2011-10-11 23:28:06 +01:00
Melanie
1ca86114e1 Merge commit 'a8af0a5ba873dbb8c447e16b142ba7f5af715bdb' into bigmerge 2011-10-11 23:22:23 +01:00
Melanie
3359bafc3e Merge commit '8a6e6866d9c6c60e4a2e4b980ca2e35ae3963d0d' into bigmerge 2011-10-11 23:22:08 +01:00
Melanie
57c6d79b62 Merge commit '34026887feb7ec769d1f9551bcd1ccd9b3b9ea7c' into bigmerge 2011-10-11 23:21:58 +01:00
Melanie
1b3ea64fe9 Merge commit '37ae6451f9ddb2e07402a5e79a9ab58668781104' into bigmerge
Conflicts:
	OpenSim/Region/Framework/Scenes/Scene.cs
2011-10-11 23:21:36 +01:00
Melanie
ef9a811ea6 Merge commit 'e77c919290e166f19e77f3ef040418dd39f2f5bd' into bigmerge
Conflicts:
	OpenSim/Region/Framework/Interfaces/IAttachmentsModule.cs
2011-10-11 23:17:47 +01:00
Melanie
1556389913 Merge commit '31125a5fd275a37261d87a336385f5447a62004e' into bigmerge 2011-10-11 23:16:53 +01:00
Melanie
7891433148 Merge commit '56dbab35e122e724c9277b05820417a05ad8a1be' into bigmerge 2011-10-11 23:16:43 +01:00
Melanie
0ae63d0e8b Merge commit '42fe774ad10d469c11fe58731fcab0e4df760871' into bigmerge
Conflicts:
	OpenSim/Region/Examples/SimpleModule/ComplexObject.cs
	OpenSim/Region/Examples/SimpleModule/MyNpcCharacter.cs
2011-10-11 23:16:19 +01:00
Melanie
efaa113fb9 Merge commit 'c7db3df3442657cda398ff2f90d387bce98c718a' into bigmerge 2011-10-11 23:15:41 +01:00
Melanie
95a1a804bf Merge commit 'a1875ec7600758087f6c06ccaf625507362e215c' into bigmerge 2011-10-11 23:15:29 +01:00
Melanie
ae67eb0a1f Merge commit '246443773ae52420092b483603d0e1daf9b87f00' into bigmerge 2011-10-11 23:15:17 +01:00
Melanie
ae8504f8d9 Merge commit '844b4f3a168a5fb1c19902e1f230f24d677c152f' into bigmerge 2011-10-11 23:15:00 +01:00
Melanie
20a2b5d63c Merge commit '6d0978594d1eca9ae56584afe38215f4262256e7' into bigmerge 2011-10-11 23:14:54 +01:00
Melanie
d1e681f682 Merge commit 'e742cffe15d3e50841908d7babc2e4c4a7630635' into bigmerge
Conflicts:
	OpenSim/Region/CoreModules/Avatar/Attachments/AttachmentsModule.cs
2011-10-11 23:14:23 +01:00
Melanie
61a8e35b7d Merge commit '528fcede6c31c056c3863fd19528558fcbaf475f' into bigmerge 2011-10-11 23:08:38 +01:00
Melanie
b9826035f6 Merge commit 'a3531dec1aaafdcd22a70764cc512dd5666c75fc' into bigmerge 2011-10-11 23:08:18 +01:00
Melanie
a157fdedcf Merge commit '2b2580e3a12d5c493f9a77bf9435ca32a0a0355c' into bigmerge
Conflicts:
	OpenSim/Region/Framework/Scenes/SceneObjectGroup.cs
2011-10-11 23:08:07 +01:00
Melanie
66c06c5685 Merge commit '8caf3ed49ec3403843e25db018cc9db63e2ca643' into bigmerge 2011-10-11 23:02:19 +01:00
Melanie
ea8350a526 Merge commit 'e789ab659c8a35a32f4edfc8f79f367b9a993721' into bigmerge 2011-10-11 23:02:04 +01:00
Melanie
5536cdf90c Merge commit '39d7945efc8daa6e5cd0f4728b499e7a624526cd' into bigmerge
Conflicts:
	OpenSim/Framework/RegionLoader/Web/RegionLoaderWebServer.cs
2011-10-11 23:01:52 +01:00
Melanie
ed1bb2081e Merge commit 'c14c4bc1ec5f381aa754068caf460c95e4539b17' into bigmerge 2011-10-11 22:54:03 +01:00
Melanie
308b6937ad Merge commit '839c1cdcc4e9ce410636becb5b81190463dec5bf' into bigmerge 2011-10-11 22:53:53 +01:00
Melanie
d8b78ca498 Merge commit '53646070057c9355bba6df9e181253232d97d8e9' into bigmerge 2011-10-11 22:53:38 +01:00
Melanie
fbe9216695 Merge commit 'def74404f1ea6b2a0f479c602fd67bcfced41426' into bigmerge 2011-10-11 22:53:30 +01:00
Melanie
83ec064868 Merge commit 'bec0cbe82b0de1b5fa8e214a0cc59d0db1f25959' into bigmerge
Conflicts:
	OpenSim/Region/Framework/Scenes/SceneObjectPart.cs
2011-10-11 22:53:27 +01:00
Melanie
1b2849319c Merge commit 'ceb09cde4ddaff6b7e76ce18656f0c2049bcb8ec' into bigmerge 2011-10-11 22:52:15 +01:00
Melanie
b40157fc9b Merge commit 'c8304b7f84b1a8d9fb978cae510f684e36419deb' into bigmerge
Conflicts:
	OpenSim/Region/CoreModules/Agent/AssetTransaction/AgentAssetsTransactions.cs
2011-10-11 22:51:44 +01:00
Melanie
7c897ef2a1 Merge commit '41616cad09ad5a2936635dfca4caf38c89d00b38' into bigmerge 2011-10-11 22:45:21 +01:00
Melanie
75fd256ef8 Merge commit '3ccb58c05c0a11fb4cff0f3adf90ca29d67b0c8b' into bigmerge 2011-10-11 22:43:27 +01:00
Melanie
2048976a6e Merge commit '28a482a7ee2cebab1aa720477af175d7e26d702e' into bigmerge 2011-10-11 22:43:01 +01:00
Melanie
833420e167 Merge commit '2c0bb8118db0b91c14783c2e2a401725e88aa650' into bigmerge 2011-10-11 22:42:51 +01:00
Melanie
652c59c0a9 Merge commit 'd358125cac4e01194dae4b1f0bc9afc87e463f76' into bigmerge 2011-10-11 22:42:18 +01:00
Melanie
2e47d24832 Merge commit '241e07d006fad1b54e088d8a9ddede0b98a1e800' into bigmerge
Conflicts:
	OpenSim/Region/Framework/Scenes/Scene.cs
2011-10-11 22:41:51 +01:00
Melanie
a671fcfd2c Merge commit 'f9438e7147bbb347a45b14126fa7181307f8ef43' into bigmerge 2011-10-11 22:33:58 +01:00
Melanie
e3450da66c Merge commit '572b680cb01a856f860b1e3fb40a7153a36113f2' into bigmerge
Conflicts:
	OpenSim/Region/Framework/Scenes/ScenePresence.cs
2011-10-11 22:33:53 +01:00
Melanie
67e7f25d6c Merge commit 'c9c40343afb313ee6999c6dfb2663fb06bfac407' into bigmerge 2011-10-11 22:32:21 +01:00
Melanie
6101de2316 Merge commit '8159fd7110459246ff61a41800899f5d854eceee' into bigmerge
Conflicts:
	OpenSim/Region/Framework/Scenes/ScenePresence.cs
2011-10-11 22:32:10 +01:00
Melanie
9935eb6578 Merge commit '7ec7a3cf33b3a67cb10df14bad04cf6f09262822' into bigmerge 2011-10-11 22:26:18 +01:00
Melanie
a4ba99f020 Merge commit '7829b7a6019454b8e83497456bea81539c9a4234' into bigmerge 2011-10-11 22:25:03 +01:00
Melanie
6e6c70be15 Merge commit 'fa9291512aabbe72cb6b1b0b7a9af79d9b05d253' into bigmerge 2011-10-11 22:24:40 +01:00
Melanie
1ba53850b2 Merge commit 'aadf7dd91cdeb98b48cd81c5db06481593aff993' into bigmerge 2011-10-11 22:23:40 +01:00
Melanie
34954172a1 Merge commit '1e798136c3458b8255fcb6341713bf9dbb689f4b' into bigmerge 2011-10-11 22:23:16 +01:00
Melanie
36ec9f0e94 Merge commit '27af016381f2f4aaa8cda99ce7f029980bf8ea76' into bigmerge 2011-10-11 22:22:49 +01:00
Melanie
b9de3b7f5b Merge commit 'f95033812402aaf31a9f2f66c946165d2d79669f' into bigmerge
Conflicts:
	OpenSim/Region/Physics/BulletDotNETPlugin/BulletDotNETCharacter.cs
	OpenSim/Region/Physics/BulletXPlugin/BulletXPlugin.cs
	prebuild.xml
2011-10-11 22:22:34 +01:00
Justin Clark-Casey (justincc)
fe3594c5ea Start recording object updates per second statistic (analogue of agent updates per secod) and expose via monitoring module as ObjectUpdatePerSecondMonitor
A useful diagnostic to find out how object updates are burdening a scene
2011-10-11 22:17:05 +01:00
Melanie
071c3fe721 Merge commit '6f69ab3bcb932589f102c16b718e7f8964d2c8eb' into bigmerge 2011-10-11 22:15:44 +01:00
Melanie
03d533dc1e Merge commit '385c4a210deb63c25f082ab8a3f0c63c7bff8fb5' into bigmerge 2011-10-11 22:15:25 +01:00
Melanie
45ce8db5db Merge commit '744602f6d170373882cb31155c8c899b43a5339e' into bigmerge 2011-10-11 22:14:17 +01:00
Melanie
341efb0942 Merge commit '6f542f73d4aacc0b92c2ebcff84b4ce2c8d9433b' into bigmerge 2011-10-11 22:12:25 +01:00
Melanie
68a42af30f Merge commit 'adfe713b4340771eee15371dd1216527b5662545' into bigmerge 2011-10-11 22:11:55 +01:00
Melanie
6978ae0a59 Merge commit 'b2356340d22578143af2daab979ea4633faa93dc' into bigmerge
Conflicts:
	OpenSim/Region/Framework/Scenes/ScenePresence.cs
2011-10-11 22:11:44 +01:00
Melanie
117d24be54 Merge commit 'c38b25a1d21540fd5be4ae438b38ab67ba88d166' into bigmerge 2011-10-11 21:45:01 +01:00
Melanie
634fbca6bb Merge commit 'c695e23dd9474e31b031e4d1f57b23aba386145a' into bigmerge 2011-10-11 21:41:46 +01:00
Melanie
a8747b3888 Merge commit '903d5c02cb372af3fef5884d95312110229fbc1e' into bigmerge 2011-10-11 21:41:30 +01:00
Melanie
189f766b8b Merge commit '30b68388378f96f83b3f9509f72664869a6c20c6' into bigmerge 2011-10-11 21:32:49 +01:00
Melanie
f1fa059b37 Merge commit 'a00327d0e5f512ccf56e18082c7e7c7366517379' into bigmerge 2011-10-11 21:32:24 +01:00
Melanie
3ac15c03b2 Merge commit '923f2459cfa8106c6de52dc694c700ab07d8109b' into bigmerge 2011-10-11 21:32:14 +01:00
Melanie
0fa21b7b5e Merge commit 'd4043c084a86da5f462356ec5c65eab2b861564d' into bigmerge 2011-10-11 21:31:48 +01:00
Melanie
673886d231 Merge commit '1458fab82c4dab9901d81419e6b515f47ea7320f' into bigmerge 2011-10-11 21:30:42 +01:00
Melanie
986a3838a6 Merge commit '90466515839eb34d7fd9984c92f1970ab5d6f3ad' into bigmerge 2011-10-11 21:29:58 +01:00
Melanie
288f5bd727 Merge commit '37370a8102f066dab1fe3fd9b0b4a7d3541e8b47' into bigmerge 2011-10-11 21:29:38 +01:00
Melanie
5b40389352 Merge commit '4ae4b14b5da9b828bbb7c4e5b05693ad8528556a' into bigmerge 2011-10-11 21:29:04 +01:00
Melanie
8fac7c0650 Merge commit '522d6261f11ffaf8320c3f0775beb5d0608ce226' into bigmerge
Conflicts:
	OpenSim/Region/CoreModules/ServiceConnectorsOut/UserAccounts/LocalUserAccountServiceConnector.cs
2011-10-11 21:28:23 +01:00
Melanie
9d22110c23 Merge commit 'c4efb97d49dec736151dfa3fa102efe6a5f6fbab' into bigmerge 2011-10-11 21:22:58 +01:00
Melanie
cc1fe354d0 Merge commit 'de19dc3024e5359f594d0a32c593d905163c24ea' into bigmerge
Conflicts:
	OpenSim/Region/Framework/Scenes/Scene.Inventory.cs
	OpenSim/Region/Framework/Scenes/SceneObjectPart.cs
	OpenSim/Region/Framework/Scenes/SceneObjectPartInventory.cs
2011-10-11 21:21:44 +01:00
Melanie
859a804d59 Merge commit 'a4cc5f628f053ad1f9f849addf79551cd58e9337' into bigmerge
Conflicts:
	OpenSim/Region/Framework/Scenes/SceneObjectPartInventory.cs
2011-10-11 21:10:55 +01:00
Melanie
c95c8ab246 Merge commit '8fb3e71b14e28bf8a4ddb72e3d1b529128f090ce' into bigmerge
Conflicts:
	OpenSim/Region/Framework/Scenes/SceneObjectPartInventory.cs
2011-10-11 21:06:06 +01:00
Melanie
7d2a3dc174 Merge commit '42f1b88eb2492f8d218526c1b30ac027a65d67f3' into bigmerge
Conflicts:
	OpenSim/Region/Framework/Scenes/SceneObjectPartInventory.cs
2011-10-11 20:57:31 +01:00
Justin Clark-Casey (justincc)
f138a2056e meaningless change to goose panda 2011-10-11 00:29:41 +01:00
Pixel Tomsen
28f549bd64 osSetParcelDetails - PARCEL_DETAILS_CLAIMDATE
this new flag set parcels claim date
value 0 for this flag set current unixstamp

http://opensimulator.org/mantis/view.php?id=5725
2011-10-11 00:13:26 +01:00
Justin Clark-Casey (justincc)
353e7ce873 Allow monitoring of stats by region name 2011-10-10 23:58:27 +01:00
Justin Clark-Casey (justincc)
62aad4c18f Add other region stats (total frame time, physics fps, etc.) currently missing from MonitorModule
Unlike the other 3 stats mechanisms, monitor data can be queried per individual region, which makes this useful.
This doesn't affect an of the existing monitored stats.
2011-10-10 23:48:53 +01:00
Justin Clark-Casey (justincc)
19096bd391 Convert getLastReportedSimFPS() and getLastReportedSimStats() into more idiomatic LastReportedSimFPS and LastReportedSimStats on SimStatsReporter 2011-10-10 22:23:42 +01:00
Justin Clark-Casey (justincc)
8114f895c2 Provide a way to turn the MonitorModule on and off
Default is currently on since this is the historical setting
2011-10-10 22:17:29 +01:00
Justin Clark-Casey (justincc)
2b290793ab refactor: have lsl and ossl interrogate scene.StatsReporter directly rather than going through scene
I know this goes against the law of demeter but I don't think it's that useful here and I'd rather get rid of nasty little wrapper methods
2011-10-10 21:54:08 +01:00
Justin Clark-Casey (justincc)
013bf2775f remove unused LastAssetID from DynamicTextureUpdaer 2011-10-10 15:19:23 +01:00
Justin Clark-Casey (justincc)
156385f48b Tweak to language of last commit in rejecting UUID.Zero in GridService.RegisterRegion()
Allowing regions with UUID.Zero causes problems elsewhere according to http://opensimulator.org/mantis/view.php?id=3426
It's probably a bad idea to allow these in any case.
2011-10-08 02:15:04 +01:00
Pixel Tomsen
a6c5e00c45 GridService - Region UUID can not be NULL
http://opensimulator.org/mantis/view.php?id=3426
2011-10-08 02:13:18 +01:00
Justin Clark-Casey (justincc)
29660fe175 Remove the inconsistently applied now pointless FailIfRemoteAdminDisabled() check on XMLRPC RemoteAdmin handlers.
If admin is disabled then the XMLRPC handlers are never registered, which means that they cannot be called anyway.
2011-10-08 02:00:36 +01:00
Justin Clark-Casey (justincc)
71d29decc8 replace List used by m_accessIP in RemoteAdminPlugin with the more efficient HashSet 2011-10-08 01:53:10 +01:00
Justin Clark-Casey (justincc)
5551542c28 Improve explanation of access_ip_addresses in [RemoteAdmin] to say that there are no restrictions if not set 2011-10-08 01:39:27 +01:00
Justin Clark-Casey (justincc)
4073cd6ced Add option to allow only explicitly listed IPs to access RemoteAdmin facilities.
Also adds password check to some functions where this was missing and fixes some parameter checking.
This is a patch from http://opensimulator.org/mantis/view.php?id=5715 with a few small unrelated spacing tweaks from me.
Thanks Michelle Argus.
2011-10-08 01:23:26 +01:00
Justin Clark-Casey (justincc)
ff80113534 Go back to lying that sim fps is 55 when it's actually locked at a maximum of 11.
We're been lying since 2008 so I'm sure another few years can't hurt.
To know the real fps, either divide sim fps by 5 and/or look at the frame time.
2011-10-08 00:15:15 +01:00
Justin Clark-Casey (justincc)
f8c06c6114 flip master version up to 0.7.3 2011-10-07 23:41:55 +01:00
Justin Clark-Casey (justincc)
b5e6209cfd Merge branch 'master' of ssh://opensimulator.org/var/git/opensim 2011-10-07 21:44:45 +01:00
Justin Clark-Casey (justincc)
5bc6503ae1 Correct DeleteScriptsOnRestart to DeleteScriptsOnStartup in comments in OpenSim.ini.example 2011-10-07 21:43:52 +01:00
BlueWall
1c54817977 Merge branch 'master' of ssh://opensimulator.org/var/git/opensim 2011-10-07 16:36:43 -04:00
BlueWall
a9b3ab0c85 Add note to docs
This method is used by externasl/3rd party management tools to
  create users and they depend on us to generate the UUID.
2011-10-07 16:34:33 -04:00
Justin Clark-Casey (justincc)
e3c522e211 Comment out [SCENE PRESENCE] SendAppearanceToAllOtherAgents: log message
As per earlier discussions with dslake
2011-10-07 20:51:26 +01:00
Dan Lake
4b46b7a5ad Fixed line endings from previous commit 2011-10-06 23:20:51 -07:00
Dan Lake
f26a966b8e Merge branch 'master' of ssh://opensimulator.org/var/git/opensim 2011-10-06 22:50:03 -07:00
Dan Lake
4748c19bdb Refactored "known child region" in ScenePresence. There were 4 different
ways to access the list/dictionary of child regions and locking was
inconsistent. There are now public properties which enforce locks.
Callers are no longer required to create new copies of lists.
2011-10-06 22:47:33 -07:00
Justin Clark-Casey (justincc)
1f78dc6504 remove the pointless slashes on the end of the (5!) different server stat retrieval mechanisms.
Original request URLs that end with / will still work, but this will allow one to type /simstatus as well as /simstatus/
Can't do this with webstats yet since it does insane things to the path.
2011-10-07 00:30:35 +01:00
Justin Clark-Casey (justincc)
4c812884be Merge branch 'master' of ssh://opensimulator.org/var/git/opensim 2011-10-06 23:47:41 +01:00
Pixel Tomsen
95910f03d4 WebStats - Home Link Fix
http://opensimulator.org/mantis/view.php?id=4536
2011-10-06 22:30:24 +01:00
Dan Lake
9a16e76f51 Simplified IsInTransit property on ScenePresence and removed InTransit() which called IsInTransit=true which called m_inTransit=true. Also removed NotInTransit(). 2011-10-06 12:39:19 -07:00
Dan Lake
08f264d096 Merge branch 'master' of ssh://opensimulator.org/var/git/opensim
Conflicts:
	OpenSim/Region/Framework/Scenes/ScenePresence.cs
2011-10-06 12:22:15 -07:00
Dan Lake
bd9ba904c3 Refactor ScenePresence so gets and sets are through properties. Added private sets when needed. Removed redundant code when methods replicated what the set already does 2011-10-06 12:19:31 -07:00
Melanie
9500415c61 Merge branch 'careminster-presence-refactor' into bigmerge 2011-10-06 17:57:28 +02:00
Melanie
300d357573 Fix physics proxy position when linking and rotating the root prim only 2011-10-06 17:55:20 +02:00
Melanie
363a99593d Change the asset connector to allow connection to different asset servers
depending on the first two digits of the asset id.
2011-10-06 15:39:21 +02:00
BlueWall
77b8fb0f86 Added back UserAccount that creates random UUID for new account.
This should fix recent issues with 3rd party apps that use the
old interface w/o breaking the new one.
2011-10-05 22:01:12 -04:00
Justin Clark-Casey (justincc)
ca83f99332 Instead of adding stat agentMS in all kinds of places, calculate it instead in the main Scene.Update() loop, like the other stats
Some of the places where agentMS was added were in separate threads launched by the update loop.  I don't believe this is correct, since such threads are no longer contributing to frame time.
Some of the places were also driven by client input rather than the scene loop.  I don't believe it's appropriate to add this kind of stuff to scene loop stats.
These changes hopefully have the nice affect of making the broken out frame stats actually add up to the total frame time
2011-10-06 00:45:25 +01:00
Justin Clark-Casey (justincc)
7fa1c979cf rename WebStatsModules.m_scene to m_scenes since it's a list of scenes, not a single one 2011-10-05 23:36:27 +01:00
Justin Clark-Casey (justincc)
8a8983b3d4 Add user ID to new estate user prompt, to make it clearer and consistent with the main create user prompts 2011-10-05 23:34:18 +01:00
Justin Clark-Casey (justincc)
604708fc96 Change WebStatsModule to check its config properly, instead of catching the ineviable NullReferenceException!
Also, tidy up spacing.
2011-10-05 23:31:53 +01:00
Justin Clark-Casey (justincc)
9090039324 Remove unused local variable i from OdeScene.Simulate() 2011-10-05 22:15:28 +01:00
Justin Clark-Casey (justincc)
7d033187d8 Make reported sim fps more accurate, in line with frame time ms
Also remove some unused fields and improve naming on others.
2011-10-05 22:08:56 +01:00
Dan Lake
3142982353 Removed redundant scene presence lookups in HGMessageTransferModule 2011-10-05 12:58:24 -07:00
Dan Lake
38d205502a Merge branch 'master' of ssh://opensimulator.org/var/git/opensim 2011-10-04 16:59:35 -07:00
Dan Lake
146322eb34 Removed redundant IClientAPI calls from TreePopulatorModule. Removing tree objects already triggers objectkill packet to client. No need to send again. 2011-10-04 16:59:05 -07:00
Justin Clark-Casey (justincc)
9a49b3b519 Merge branch 'master' of ssh://opensimulator.org/var/git/opensim 2011-10-04 23:53:30 +01:00
Justin Clark-Casey (justincc)
b907a66f39 When creating a new user on the comand line, give the option of allowing a UUID to be specified to override the randomly generated one.
This can be useful in some migration cases where recreating user accounts with known IDs will preserve region scene object ownership.
2011-10-04 23:48:35 +01:00
Mic Bowman
413e299045 Merge branch 'master' of ssh://opensimulator.org/var/git/opensim 2011-10-04 15:44:22 -07:00
Mic Bowman
b229a72a5f Turn off keepalives when commands are specified 2011-10-04 15:43:41 -07:00
Justin Clark-Casey (justincc)
8a216dc1cc Merge branch 'master' of ssh://opensimulator.org/var/git/opensim 2011-10-04 22:49:06 +01:00
Justin Clark-Casey (justincc)
f1986d54bb Clarify explanation of DeleteScriptsOnStartup switch in [XEngine]. 2011-10-04 22:48:28 +01:00
Dan Lake
92c88121c7 Removed all refs to IClientAPI from IAttachmentsModule. Separated client handlers for attachments to call public interface and rearranged module file into sections 2011-10-04 14:40:39 -07:00
Dan Lake
bfa405e6f7 Merge branch 'master' of ssh://opensimulator.org/var/git/opensim 2011-10-03 16:45:04 -07:00
Dan Lake
460946ad62 Removed redundant code in AttachmentsModule and simplified interfaces which converted back and forth between ScenePresence and IClientAPI. More to be done still. 2011-10-03 16:44:32 -07:00
Justin Clark-Casey (justincc)
c7d0d71666 trival tweak to trigger the continuous integration system 2011-10-04 00:37:02 +01:00
Pixel Tomsen
b98442dcec Animation-States Turning Left, Turning Right implemented/enabled
http://opensimulator.org/mantis/view.php?id=3036
2011-10-04 00:27:11 +01:00
Justin Clark-Casey (justincc)
a8af0a5ba8 Return NULL_KEY from llGetTexture if a non-existent face is indicated, rather than ""
As per http://wiki.secondlife.com/wiki/LlGetTexture
2011-10-04 00:15:48 +01:00
Justin Clark-Casey (justincc)
8a6e6866d9 For llGetTexture(), if the face texture asset is in the inventory, return the inventory name rather than the asset UUID
This is as per http://wiki.secondlife.com/wiki/LlGetTexture
Applied patch in http://opensimulator.org/mantis/view.php?id=4552 with an additional break statement if an inventory item is found to exit early.
Thanks Michelle Argus!
2011-10-04 00:07:52 +01:00
Justin Clark-Casey (justincc)
34026887fe Merge branch 'master' of ssh://opensimulator.org/var/git/opensim 2011-10-03 23:26:52 +01:00
Justin Clark-Casey (justincc)
37ae6451f9 Remove vestigal RegionStatus.SlaveScene.
This appears to be code clutter since the code that uses this has long gone.
2011-10-03 23:25:09 +01:00
Dan Lake
e77c919290 Remove usage of Linden packet types from inside Attachments Module and interface 2011-10-03 11:55:54 -07:00
Dan Lake
31125a5fd2 Add execute permission to runprebuild2010.bat 2011-10-03 11:16:48 -07:00
Justin Clark-Casey (justincc)
56dbab35e1 Remove unimplementated UpdateMovement() methods from SOG, SOP.
SP still has an implementation but this is now just a public method on SP rather than an abstract one in EntityBase.
No point making the code more complex until it actually needs to be,
2011-10-01 01:26:50 +01:00
Justin Clark-Casey (justincc)
42fe774ad1 Remove OpenSim.Region.Examples.SimpleModule
This module is more than 2 years old and at least some of the 'example' code it gives is now misleading.
Even the logs say it say some bits were broken where it was put in!
2011-10-01 01:21:20 +01:00
Pixel Tomsen
c7db3df344 llGetLinkKey, llGetLinkName Fix for sitting Avatar
when an avatar sits on a prim, we get now his key & name ;-)

http://opensimulator.org/mantis/view.php?id=4476
2011-10-01 00:41:47 +01:00
Justin Clark-Casey (justincc)
a1875ec760 Add ability to pass in the permissions option (perm) to save oar via RemoteAdmin
Applies patch in http://opensimulator.org/mantis/view.php?id=5686
Thanks Michelle Argus!
2011-10-01 00:19:09 +01:00
Justin Clark-Casey (justincc)
246443773a minor: remove clutter null check from pass in config to AvatarFactoryModule.Initialize()
This is never null
2011-10-01 00:15:30 +01:00
Justin Clark-Casey (justincc)
844b4f3a16 copy config information on allow/disallow individual os functions into OpenSim.ini.example
I this is generally useful rather than a 'default' setting
2011-09-30 23:55:02 +01:00
Justin Clark-Casey (justincc)
6d0978594d remove unused postgresql dll 2011-09-30 18:58:26 +01:00
Justin Clark-Casey (justincc)
e742cffe15 Add Enabled switch in new [Attachments] section in OpenSimDefaults.ini to allow attachments to be temporarily turned off.
This is for debugging purposes.  Defaults to Attachments Enabled
2011-09-30 01:19:22 +01:00
Pixel Tomsen
528fcede6c llAvatarOnLinkSitTarget Implementation
http://wiki.secondlife.com/wiki/LlAvatarOnLinkSitTarget
2011-09-29 01:08:05 +01:00
Justin Clark-Casey (justincc)
a3531dec1a Add en_US culture setting to the async delete to inventory thread, to avoid any issues with float serialization with machines set to non en_US locales.
Doing this to see if addresses inventory object deserialization problems in http://opensimulator.org/mantis/view.php?id=5708, though if it does I'm really surprised not to have seen it before now.
Really need to go through and systematically set the culture for every timer and change all BeginInvoke calls to FireAndForget instead.
But don't want to do something like that this close to a release.
2011-09-26 23:00:16 +01:00
Snoopy Pfeffer
2b2580e3a1 Fix for rezzing and derezzing HUDs (see Mantis #5406). From now on updates are only sent to affected clients. 2011-09-25 00:51:43 +02:00
Justin Clark-Casey (justincc)
8caf3ed49e Remove the unimplented "clear assets" command.
This was a bizarre relic of a bygone age that had no implementations.
If you're using and want to clear the flotsam asset cache then please use the existing "fcache clear" command
2011-09-24 02:22:47 +01:00
Kevin Houlihan
e789ab659c Removed uncalled region load method.
The method LoadRegionsPlugin.LoadRegionFromConfig was no longer being referenced from anywhere, so I removed it. It's function has apparently been taken on by the PostInitialise of that module.
2011-09-24 02:06:34 +01:00
Kevin Houlihan & Michelle Argus
39d7945efc Added a setting to [Startup] section of config that will allow the simulator to start up with no regions configured.
I added the boolean config setting "allow_regionless", defaulting to false. If set to true, opensim will start up ok if no region configurations are found in the specified region_info_source. It will not ask the user to create a region.
2011-09-24 01:59:02 +01:00
Justin Clark-Casey (justincc)
c14c4bc1ec Don't try and resolve user account for authorization if the agent has come in via hypergrid.
If a user account isn't available, this just passes on the name given by the agent instead.
I'm not sure this is particularly useful since I believe that agent names could be faked in this context - it might be no more useful than a viewer agent string.
In fact, there might even be an argument that passing on this name provides a false expectation of authenticity.  However, I will apply for now.
Patch applied from http://opensimulator.org/mantis/view.php?id=5696
Thanks Michelle Argus.
2011-09-24 01:39:37 +01:00
Justin Clark-Casey (justincc)
839c1cdcc4 Improve locking when access queue in EventQueueGetModule 2011-09-24 01:10:23 +01:00
Justin Clark-Casey (justincc)
5364607005 Clarify explanation of the "DeleteScriptsOnStartup" config switch and add this to OpenSim.ini.example since it's very useful if you're not updating OpenSim from source.
On reflection, "DeleteScriptsOnStartup" isn't a great name since it suggests real script deletion rather than compiled versions.
2011-09-24 00:22:23 +01:00
Justin Clark-Casey (justincc)
def74404f1 make distribution creating code to copy FlotsamCache.ini.example to FlotsamCache.ini 2011-09-24 00:18:32 +01:00
Justin Clark-Casey (justincc)
bec0cbe82b remove unused SOP.Create() method 2011-09-23 22:20:15 +01:00
Justin Clark-Casey (justincc)
ceb09cde4d Correct asset id of library default iris texture.
For this change to show up you will need to clear viewer cache.
2011-09-23 21:57:52 +01:00
Justin Clark-Casey (justincc)
c8304b7f84 Fix avatar parameter updating for viewer 3 and maybe 2.
When a slider parameter is changed, the viewer uploads a new shape (or other asset) and the item is updated to point to it.
Viewer 1 uploaded the data in the initial request itself, so the asset references was almost always correctly updated.
However, viewer 3/2 always uploads data in a subsequent xfer, which exposed a race condition where the viewer would make the item update before the asset had uploaded.
This commit shuffles the order of operations to avoid this race, the item is updated with the new asset id instead of the old one while the upload was still taking place.
A second race had to be fixed where avatar appearance would also be updated with the old asset id rather than the new one.
This was fixed by updating the avatar appearance ids when the appearance was actually saved, rather than when the wearables update was made.
2011-09-23 02:59:33 +01:00
Justin Clark-Casey (justincc)
41616cad09 Merge branch 'master' of ssh://opensimulator.org/var/git/opensim 2011-09-22 01:11:19 +01:00
Justin Clark-Casey (justincc)
3ccb58c05c Fix failure to teleport when an agent is lured on the same sim (and probably in neighbouring sims) with HG lure active
It turns out that the HG lure module was setting up a pending lure when it intercepted the instant message on its way out to the target avatar.
However, an IM would only be sent if the user was remote, so it would not be set up for users on the same sim or in an immediate neighbour.
We fix this by adding the pending lure when the message goes out and ignoring a duplicate pending lure add if it goes to out via IM.
Hopefully addresses http://opensimulator.org/mantis/view.php?id=5690
2011-09-22 01:08:38 +01:00
Dan Lake
28a482a7ee Merge branch 'master' of ssh://opensimulator.org/var/git/opensim 2011-09-21 16:24:48 -07:00
Dan Lake
2c0bb8118d Commented out new debug statements in ScenePresence 2011-09-21 16:24:19 -07:00
Justin Clark-Casey (justincc)
d358125cac Reinstate option to land an npc when it reaches a target.
This is moved into ScenePresence for now as a general facility
2011-09-22 00:16:05 +01:00
Justin Clark-Casey (justincc)
241e07d006 Move code which handles NPC movement into Scene so that this can also be used by Autopilot coming from the client side.
I thought that I had implemented this but must have accidentally removed it.
Adds a regression test to detect if this happens again.
Temporarily disables automatic landing of NPC at a target.  Will be fixed presently.
2011-09-21 23:56:11 +01:00
Justin Clark-Casey (justincc)
f9438e7147 Remove unused and never set SP.PreviousRotation 2011-09-21 22:01:57 +01:00
Justin Clark-Casey (justincc)
572b680cb0 get rid of an incredibly noisy logging message from the last commit 2011-09-21 20:15:06 +01:00
Justin Clark-Casey (justincc)
c9c40343af Merge branch 'master' of ssh://opensimulator.org/var/git/opensim 2011-09-21 20:05:11 +01:00
Justin Clark-Casey (justincc)
8159fd7110 When calling osNpcMoveTo(), rotate the avatar in the direction of travel.
This stops the npc walking backwards if the target is directly behind.
This means that the npc no longer returns to its original rotation once movement has finished.
If you want this behaviour, please store and reset the original rotation after movement.
This is somewhat to address http://opensimulator.org/mantis/view.php?id=5678
2011-09-21 19:28:41 +01:00
Dan Lake
7ec7a3cf33 Null simulation data must return a non-null region settings or other parts of the simulator expect 2011-09-20 15:35:36 -07:00
Dan Lake
7829b7a601 Merge branch 'master' of ssh://opensimulator.org/var/git/opensim 2011-09-20 14:07:41 -07:00
Dan Lake
fa9291512a Make debug statements in ScenePresence consistent and add a few more 2011-09-20 14:07:10 -07:00
Justin Clark-Casey (justincc)
aadf7dd91c Remove vestigal OpenSim.Data mono addins extension points that don't look like they've been active for at least 2 and a half years 2011-09-20 20:56:32 +01:00
Justin Clark-Casey (justincc)
1e798136c3 adjust some whitespace to trigger another build, to check the last failure was just a glitch 2011-09-17 01:33:55 +01:00
Justin Clark-Casey (justincc)
27af016381 Add BulletSim physics option details to OpenSim.ini.example. Marked as in development and experimental. 2011-09-17 01:13:07 +01:00
Justin Clark-Casey (justincc)
f950338124 Remove old bullet DotNET and X libraries in preparation for BulletS
These weren't working properly anyway.
You will need to rerun prebuild.sh/.bat after this commit, and maybe "nant clean" as well.
2011-09-17 01:09:25 +01:00
Justin Clark-Casey (justincc)
6f69ab3bcb Add back BulletSPlugin.dll.config that I somehow managed to delete today in a00327d 2011-09-17 00:49:26 +01:00
Justin Clark-Casey (justincc)
385c4a210d On setting a new avatar appearance, if height hasn't changed then don't set that same height in ScenePresence.
This prevents unnecessary work in the ODE module, though possibly that should be checking against same size sets itself
2011-09-17 00:26:53 +01:00
Justin Clark-Casey (justincc)
744602f6d1 Revert "uncomment Standalone config in OpenSim.ini.example."
This reverts commit 44a491f36b.

This makes packaging OpenSim slightly easier but then generates a FriendsConnector error if naively used after compilation.
So let's revert to stick with the "DataStore" error for now - at least that's a known error.
2011-09-17 00:10:19 +01:00
Justin Clark-Casey (justincc)
6f542f73d4 Stop the avatar stalling on its first boarder cross when using the ODE plugin
When upgrading the previously child agent to a root, the code was setting the Size parameter on the ODECharacter PhysicsActor.
This in turn reset Velocity, which cause the border stall.
I'm fixing this by commenting out the Velocity = Vector3.Zero lines since they don't appear to play a useful purpose
2011-09-16 23:57:16 +01:00
Justin Clark-Casey (justincc)
adfe713b43 minor: I was wrong about OffsetPosition - sometimes it genuinely does return offset position!
Add method doc to explain this.
2011-09-16 22:55:24 +01:00
Justin Clark-Casey (justincc)
b2356340d2 Remove setter from SP.OffsetPosition, since all sets should flow through SP.AbsolutePosition
OffsetPosition is also misnamed - it returns the absolute position and never contains an offset.
2011-09-16 22:51:36 +01:00
Justin Clark-Casey (justincc)
c38b25a1d2 Fix base_hair.dat to actually contain the base hair asset rather than base eyes by mistake.
I must have had it cached last night.
This now makes completely fresh avatar setups appear properly (remember to wipe viewer cache and server cache as well as database).
As a bonus, eyes now appear by default too!
2011-09-16 21:43:58 +01:00
Justin Clark-Casey (justincc)
c695e23dd9 Merge branch 'master' of ssh://opensimulator.org/var/git/opensim 2011-09-16 21:06:09 +01:00
Kevin Houlihan
903d5c02cb Updated some variables to be closer to the coding standards (and easier to understand).
There were a few variables in LocalConsole with single character names, and the class fields did not use the m_ prefix.
I also removed a redundant variable, h. It was being set to 1 in a couple  of places, and incremented in another, but never actually used.
2011-09-16 20:24:47 +01:00
justincc
30b6838837 Merge branch 'master' of ssh://opensimulator.org/var/git/opensim 2011-09-16 19:56:14 +01:00
justincc
a00327d0e5 Fix build errors on Windows by adding missing OpenSim.Services.Base reference 2011-09-16 19:54:23 +01:00
Kevin Houlihan
923f2459cf Passwords could be revealed in console by pressing backspace.
Pressing backspace causes hidden input (such as passwords) to be revealed on the console. The echo state was not being taken into account when handling a backspace key press.
2011-09-16 19:25:38 +01:00
Chris Hart
d4043c084a MSSQL Bug fix in user account retrieval, plus migrations for FriendsStore and InventoryStore 2011-09-16 19:09:46 +01:00
Kevin Houlihan
1458fab82c Reattaching a region was failing if the estate name had not changed (issue 5035).
Using the RemoteAdmin API to close then recreate a region would fail if the estate name had not changed. If the estate name /was/ changed then the existing estate would be renamed rather than a new one being created. The problem really arose from a lack of distinction in the data storage layer between creating new estates and loading existing ones.
2011-09-16 18:50:25 +01:00
Justin Clark-Casey (justincc)
9046651583 Pass any region scope through to the CreateUser() method 2011-09-16 00:36:43 +01:00
Justin Clark-Casey (justincc)
37370a8102 On standalone, by default create the necessary minimum body parts and clothes necessary to display a viewer 2 avatar, as implemented in c4efb97d
This is controlled by the CreateDefaultAvatarEntries switch in the [UserAccountService] section of config-include/Stnadalone.ini
This is left as false in grid mode
2011-09-16 00:30:37 +01:00
Justin Clark-Casey (justincc)
4ae4b14b5d refactor: move estate owner setup code into separate method 2011-09-16 00:24:23 +01:00
Justin Clark-Casey (justincc)
522d6261f1 Correctly create a freshly created estate owner's default items and avatar entries on standalone if applicable. 2011-09-16 00:12:12 +01:00
Justin Clark-Casey (justincc)
c4efb97d49 Write code to create minimum necessary body parts/clothing and avatar entries to make a newly created user appear as a non-cloud on viewer 2
Viewer 2 no longer contains the default avatar assets (i.e. "Ruth") that would appear if the user had insufficient body part/clothing entries.
Instead, avatars always appear as a cloud, which is a very bad experience for out-of-the-box OpenSim.
Default is currently off.  My intention is to switch it on for standalone shortly.
This is not particularly flexible as "Ruth" is hardcoded, but this can change in the future, in co-ordination with the existing RemoteAdmin capabilities.
Need to fix creation of suitable entries for users created as estate owners on standalone.
Avatars still appear with spooky empty eyes, need to see if we can address this.
This commit adds a "Default Iris" to the library (thanks to Eirynne Sieyes from http://opensimulator.org/mantis/view.php?id=1461) which can be used.
2011-09-15 22:59:29 +01:00
Justin Clark-Casey (justincc)
de19dc3024 refactor: rename SOG/SOP.GetProperties() to SendPropertiesToClient() to reflect what it actually does
This also makes it consistent with some other methods that send data to the client.
2011-09-15 18:58:58 +01:00
Justin Clark-Casey (justincc)
a4cc5f628f Only bother to create an inventory xfer file if there are any items in a prim inventory 2011-09-15 18:42:10 +01:00
Justin Clark-Casey (justincc)
8fb3e71b14 Shuffle order of code in invnetory connector GetFolderContent() calls to avoid a possible race condition 2011-09-15 18:36:22 +01:00
Justin Clark-Casey (justincc)
42f1b88eb2 If a prim inventory becomes empty through deletion, send an empty xfer file name rather than one that references a metadata file containing only the folder object.
If we do this, then viewer 3 crashes when we try and rez a script directly in an attachment's prim inventory.
Sending an empty file name was already being done if the prim's inventory had never been touched.
Now we always do that if there are no items in that inventory.
Hopefully addresses the remaining point in http://opensimulator.org/mantis/view.php?id=5644
2011-09-15 18:13:36 +01:00
Tom
e15917f465 Fixed a movement regression - Kitto's jump code is no longer needed (plus it's an eyesore) 2011-09-14 19:34:03 -07:00
Tom
1129b80629 Fix a rather stupid VS warning "The operation overflows at compile time in checked mode" - doesn't make much sense to me, but for some reason it doesn't like 256 - 6 when 256 is a constant... 2011-09-14 19:31:55 -07:00
Tom
5484c9b585 Bring us up to date. 2011-09-14 19:11:32 -07:00
Tom
cda4cd6b55 Merge fixes, and fix the build 2011-09-14 18:46:42 -07:00
Justin Clark-Casey (justincc)
bd991fc95f Don't try and delete attachments for child agent close 2011-09-13 22:54:50 +01:00
Justin Clark-Casey (justincc)
1084d8f6a2 Remove code from DetachSingleAttachmentToInv() that sets group changed on all parts, now that we're performing this check in UpdateKnownItem() for other purposes 2011-09-13 22:39:06 +01:00
Justin Clark-Casey (justincc)
61affee814 remove redunant itemID and agentID arguments from UpdateKnownItem().
itemID is always taken taken from the group's stored item id, and agentID is never used.
2011-09-13 22:33:15 +01:00
Justin Clark-Casey (justincc)
2d62484f11 Remove UpdateKnownItem() from IAttachmentsModule.
It's not appropriate for code outside the attachments module to call this.
2011-09-13 22:27:33 +01:00
Justin Clark-Casey (justincc)
62b3e74bc5 minor: remove redundant grp != null check from AM.UpdateKnownItem() 2011-09-13 22:24:33 +01:00
Justin Clark-Casey (justincc)
8880aea728 Stop attempts to rewear already worn items from removing and reattaching.
Viewer 2/3 will sometimes attempt to rewear attachments, even though they have already been attached during the main login process.
This change ignores those attempts.
This stops script failures during login, as the rewearing was racing with the script startup code.
It might also help with attachments being abnormally put into deleted state.
Hopefully resolves some more of http://opensimulator.org/mantis/view.php?id=5644
2011-09-13 22:13:58 +01:00
Justin Clark-Casey (justincc)
618277e797 Comment out attachments code in Scene.IncomingCreateObject(UUID userID, UUID itemID) for now
As far as I can see, this is only invoked by a PUT request to ObjectHandlers, which is not being used anyway.
Invoking attachments code at this point is probably inappropriate since it would still be invoked when the client entered the scene.
Being commented to simplify analysis of attachments issues.  Can be uncommented when in use.
Also, small tweak to lock and log removal of a SOG from the SceneObjectGroupsByLocalPartID collection in SceneGraph.GetGroupByPrim() if an inconsistency is found.
2011-09-13 20:25:32 +01:00
Justin Clark-Casey (justincc)
df73833a2c stop the duplicate remove of the root part ids from the full part and local part indexes in SG.DeleteSceneObject()
this is unnecessary because the parts array iterated through contains the root part as well as the non-root parts
2011-09-13 18:11:13 +01:00
Justin Clark-Casey (justincc)
f09a90d8a7 extend TestGetSceneObjectByPartLocalId() to test state after scene object deletion 2011-09-13 18:08:05 +01:00
Justin Clark-Casey (justincc)
07ba28f1de In SG.AddSceneObject(), stop unnecessarily adding the root part to object indexes sepearately from the other parts.
The SOG.Parts property contains the root part as well as the non-root parts
2011-09-13 17:56:02 +01:00
Justin Clark-Casey (justincc)
c14f0a22d4 Add new TestGetSceneObjectByPartLocalId() for retrieving a scene object via the local id of one of its parts 2011-09-13 17:52:10 +01:00
Justin Clark-Casey (justincc)
88bd71b978 improve TestAddSceneObject() to test a multi-part object rather than a single-part 2011-09-13 17:40:39 +01:00
Justin Clark-Casey (justincc)
306af9934a In an object return message, send a null-terminated empty string in binary bucket to prevent a viewer 3 crash.
This is the message sent to the client when the object is returned.
We were sending byte[0] in the binary bucket.  This didn't kill viewer 1 but did terminate viewer 3 (don't know about viewer 2).
So sending "\0" instead.
This is to address http://opensimulator.org/mantis/view.php?id=5683
2011-09-13 17:13:42 +01:00
Justin Clark-Casey (justincc)
dea0935361 eliminate redundant SP.m_regionInfo since it always has the scene.
We were already referencing through the scene in some places.
2011-09-12 23:00:15 +01:00
Justin Clark-Casey (justincc)
62b2450529 remove the unused SP.initializeScenePresence() 2011-09-12 22:54:54 +01:00
Justin Clark-Casey (justincc)
56cd7d9685 stop the redundant passing in of RegionInfo to SceneGraph, since the Scene is always passed in at the same time. 2011-09-12 22:51:56 +01:00
Justin Clark-Casey (justincc)
00f8946bd4 minor: if the script engine fails to find a prim for a script, also print out that prim's local id in the error message. 2011-09-12 22:44:14 +01:00
Justin Clark-Casey (justincc)
294120c9d3 comment out some recent terrain texture logging 2011-09-12 22:26:04 +01:00
Justin Clark-Casey (justincc)
ea0f78c971 Start locking entire add/remove operations on an IScenePresence.AttachmentsSyncLock object
Attach and detach packets are processed asynchronously when received from a viewer.
Bugs like http://opensimulator.org/mantis/view.php?id=5644 indicate that in some situations (such as attaching/detaching entire folders of objects at once), there are race conditions between these threads.
Since multiple data structures need to be updated on attach/detach, it's not enough to lock the individual collections.
Therefore, this commit introduces a new IScenePresence.AttachmentsSyncLock which add/remove operations lock on.
2011-09-12 21:57:22 +01:00
Justin Clark-Casey (justincc)
dab6387bba lock AvatarAppearance.m_attachments when we use it
This is partly to address http://opensimulator.org/mantis/view.php?id=5644, though something more thorough is needed.
2011-09-12 21:05:26 +01:00
Justin Clark-Casey (justincc)
44a491f36b uncomment Standalone config in OpenSim.ini.example.
This is to make my life easier when creating releases.
I think that it also gives a better story for anybody newly compiling from source.
2011-09-12 20:31:14 +01:00
Oren Hurvitz
7f318277f1 When creating an OAR, optionally exclude objects according to their permissions 2011-09-12 20:09:24 +01:00
Justin Clark-Casey (justincc)
517932722b minor: put <remarks> tags around some method doc 2011-09-12 20:06:09 +01:00
Justin Clark-Casey (justincc)
728fd0b1b8 lock attachments when enumerating through them in ScenePresence.CopyTo().
May have some effect on http://opensimulator.org/mantis/view.php?id=5644
2011-09-10 01:09:17 +01:00
Justin Clark-Casey (justincc)
9c32b131fd Add extra log information when attachments fail validation 2011-09-10 00:57:52 +01:00
Justin Clark-Casey (justincc)
7531851bec reinstate the validation logging on teleport. A 'fail' of validation still doesn't prevent the actual teleport. 2011-09-10 00:45:50 +01:00
Justin Clark-Casey (justincc)
de28c9cd24 Stop the UserManagementModule logging every user it adds for now 2011-09-10 00:23:52 +01:00
Oren Hurvitz
1dd904b78e Delay loading scripts until the scene has finished loading 2011-09-09 23:01:05 +01:00
Kevin Houlihan
7cafc2e46e Added a check to the CreateRegion method of the RemoteAdmin module that the specified user exists.
A meaningful exception message is returned if the user is not found. Previously it was returning "Object not set..."
2011-09-09 22:59:00 +01:00
Micheil Merlin
28961dd1cf llSetPrimitiveParams Prim type params precision errors 2011-09-09 22:53:45 +01:00
Justin Clark-Casey (justincc)
bea2e0f32b Comment out the part of the load oar code that zeroes out prim sit target orientations and positions.
The warning about these causing problems is very old and may no longer apply.
Hopes to fix http://opensimulator.org/mantis/view.php?id=5680
2011-09-09 22:50:54 +01:00
Justin Clark-Casey (justincc)
655935db49 Use a copy of the inventory items list to register users in the thread started by GetFolderContent(), to protect ourselves against callers modifying lists
Hopefully this addresses http://opensimulator.org/mantis/view.php?id=5681
2011-09-09 19:55:30 +01:00
Justin Clark-Casey (justincc)
42790f021f Fix unit tests from RegionSettings commit 2011-09-09 00:47:23 +01:00
Justin Clark-Casey (justincc)
086bf9f15d Save the default terrain texture UUIDs for a new region instead of leaving them as UUID.Zero.
Leaving them at UUID.Zero meant that when a viewer 2 logged into a region that had been freshly created, it received UUID.Zero for these textures, and hence display the land as plain white.
On a simulator restart, the problem would go away since when the database adapators loaded the new region settings, RegionSettings itself has code to use default textures instead of UUID.Zero.
This commit resolves the problem by saving the default texture UUIDs instead of Zero.
However, we currently have to do this in a roundabout way by resaving once the RegionSettings have been created by the database for the first time.  This needless complexity should be addressed.
This change will also have the effect of replacing any existing UUID.Zero terrain textures with the default ones.
However, this shouldn't have any effect since the UUID.Zeros were already being replaced in memory with those same UUIDs.
2011-09-09 00:38:04 +01:00
Justin Clark-Casey (justincc)
f5eace6781 Fix test failure. Oversight in setting up the tests themselves. 2011-09-08 21:54:40 +01:00
Justin Clark-Casey (justincc)
9615292133 Centralize module setup for NPC tests.
This is overkill for some tests since they dont' need all the modules, but I think the gain in code readability is worth it
2011-09-08 21:06:10 +01:00
Justin Clark-Casey (justincc)
96a3b68086 Remember to set and unset the fire and forget method at the top of the attachment and npc tests 2011-09-08 20:59:52 +01:00
Justin Clark-Casey (justincc)
bd5d2cb043 Use scene presence agent id for rezzed object ownership rather than item owner.
These should be identical.  However, the item isn't available when rezzing npc attachments.
2011-09-08 20:51:52 +01:00
Justin Clark-Casey (justincc)
3e7960d161 Increase information in logging for UserAgentServiceConnector.
Done for http://opensimulator.org/mantis/view.php?id=5669
2011-09-08 19:52:28 +01:00
Justin Clark-Casey (justincc)
08bd16285d When invoking any of the OSSL teleport functions, do it on a separate thread rather than the script thread.
This is to prevent the aborting of attachment script threads on teleport from aborting the one actually doing the teleport.
This allows OSSL teleport functions to work when invoked on scripts in attachments (and huds, I assume)
2011-09-07 23:55:41 +01:00
Justin Clark-Casey (justincc)
7cadb89a0f When a region is added to the HG Inventory Broker, also pass this through to the embedded local inventory connector to prevent an NRE when that connector tries to lookup the UserManager through the scene.
This is to address http://opensimulator.org/mantis/view.php?id=5669
However, if this failure was happening I'm kind of surprised that local HG inventory was working at all.....
We probably weren't seeing these exceptions previously because we weren't logging them when the reached the top of a FireAndForget thread.
2011-09-07 23:16:19 +01:00
Tom
03f6734f43 First set of merge fixes 2011-09-07 09:42:18 -07:00
Justin Clark-Casey (justincc)
d7a516d885 Add temporary debugging in HGInventoryBroker and RemoveXInventoryServiceConnector
This is for http://opensimulator.org/mantis/view.php?id=5669
If we can't retrieve an IUserManagement module we complain, and we also warn in the log when its manually set in XISC by HGInventoryBroker
2011-09-06 23:16:37 +01:00
Justin Clark-Casey (justincc)
e6cd4defdb Lock m_pendingObjects when calling GetPendingObjectsCount().
This is only called by a region console command.
We should also be locking m_partsUpdateQueue when dequeueing the next part, or locking m_pendingObjects in QueuePartForUpdate().
However, I won't do this now since I don't have time to analyze how this would affect liveness.
2011-09-06 22:48:05 +01:00
Justin Clark-Casey (justincc)
3d4d3427cd Comment out SceneViewer.Reset() and stop calling from Close() since this is useless work as a closed scene object is never reset.
Strictly speaking, we could also stop bothering to clear the m_updateTimes and m_partsUpdateQueue if we are sure that the whole SceneViewer is shortly to be garbage collected anyway, but we'll leave them around for now.
2011-09-06 22:44:34 +01:00
Justin Clark-Casey (justincc)
405a5b097b Comment out unused ISceneViewer.Reset() to reduce code complexity 2011-09-06 22:39:01 +01:00
Justin Clark-Casey (justincc)
4bf3adffb8 In SceneViewer, introduce an IsEnabled flag and perform Close() under an m_pendingObjects lock in order to avoid the race condition seen by danbanner in http://opensimulator.org/mantis/view.php?id=5669 2011-09-06 22:26:28 +01:00
Justin Clark-Casey (justincc)
1a8f5b97b9 refactor: Make logic in AM.AttachObject() clearer by not reusing existing variables in different contexts 2011-09-06 02:40:19 +01:00
Justin Clark-Casey (justincc)
5beee42809 rename AM.AddSceneObjectAsAttachment() to AddSceneObjectAsNewAttachmentInInv 2011-09-06 02:29:22 +01:00
Justin Clark-Casey (justincc)
b903d2ca96 In SetAttachment, if the existing attachment has no asset id then carry on rather than abort.
When a user logs in, the attachment item ids are pulled from persistence in the Avatars table.  However,
the asset ids are not saved.  When the avatar enters a simulator the attachments are set again.  If
we simply perform an item check then the asset ids (which are now present) are never set, and NPC attachments
later fail unless the attachment is detached and reattached.

Hopefully resolves part of http://opensimulator.org/mantis/view.php?id=5653
2011-09-06 01:59:21 +01:00
Justin Clark-Casey (justincc)
c6ec573d10 Get rid of the confusing version of IAttachmentsModule.RezSingleAttachmentFromInventory() with the updateInventoryStatus switch, since this is never called with false 2011-09-06 00:36:38 +01:00
Justin Clark-Casey (justincc)
05a4bedc30 get rid of the unused AttachmentsModule.ShowAttachInUserInventory() 2011-09-06 00:32:52 +01:00
Justin Clark-Casey (justincc)
0cb0140a1d Stop the pointless double setting of every attachment in AvatarAppearance.
The second was already being filtered out so this has no user level effect
2011-09-06 00:29:37 +01:00
Justin Clark-Casey (justincc)
cf73afec35 Try disabling the inconsistent attachment state check to see if this actually has an impact.
The code in question is over three years old and just be catching an inconsistency rather than being wholly necessary.
This commit still carries out the check and prints all the previous log warnings but a 'failure' no longer prevents avatar region crossing or teleport, and it doesn't give the client the error message.
This will have some kind of impact on http://opensimulator.org/mantis/view.php?id=5672
2011-09-05 23:42:37 +01:00
Justin Clark-Casey (justincc)
5e579b71fd Allow the HGInventoryBroker to set the UserManager when it instantiates a RemoteXInventoryServiceConnector for a visiting HG user.
Not doing this causes NREs whenever that user tries to access inventory when Hypergrid is turned on since the Remote connector does not have a scene (which is only used to fetch the UserManager)
Aims to address http://opensimulator.org/mantis/view.php?id=5669
2011-09-05 22:55:48 +01:00
Snoopy Pfeffer
9f75eaf50e Fixed BulletSim config files for Linux *.so libraries. 2011-09-04 21:42:33 +02:00
Tom
9cc2d0b60a Now merging the core changes. 2011-09-04 08:30:23 -07:00
Tom
af59352c4c Change of tactic. Reverting this to the careminster version, then i'll selectively merge the changes made to core. 2011-09-04 07:54:17 -07:00
Tom
9ab951a954 I fucked up the merge for SOG, so reverting back to OpenSim Core's version... 2011-09-04 07:38:25 -07:00
Tom
66dec3b874 Resolve merge commits, stage 1 2011-09-04 07:06:36 -07:00
Justin Clark-Casey (justincc)
5c1fa968ab Stop NPCs losing attachments when the source avatar takes them off.
This was happening because we were using the source avatar's item IDs in the clone appearance.
Switch to using the asset IDs of attachments instead for NPCs.
The InventoryAccessModule and AttachmentModule had to be changed to allow rezzing of an object without an associated inventory item.
Hopefully goes some way towards resolving http://opensimulator.org/mantis/view.php?id=5653
2011-09-03 01:11:16 +01:00
Justin Clark-Casey (justincc)
e6eb0d9a6f Comment out Scene.CleanDroppedAttachments() and calls.
This method wasn't actually doing anything since dropped attachments retain a PCode of 9.
Also, behaviour of dropped attachments in other places appears to be that they persist after avatar logout rather than get deleted.
2011-09-02 23:19:27 +01:00
Justin Clark-Casey (justincc)
dbcfb25a52 Remove redundant RootPart.CreatedSelected = true in IAM.RezObject() since this is done through parts iteration 2011-09-02 22:54:03 +01:00
Justin Clark-Casey (justincc)
26b471f25a Go back to resetting the State parameter for all parts of a SOG when SOG.ClearPartAttachmentData() is called.
Even though we don't use these on rez they are still present after an unlink, after which selecting them causes various viewers to crash
Hopefully really does address http://opensimulator.org/mantis/view.php?id=5664
2011-09-02 22:28:27 +01:00
Justin Clark-Casey (justincc)
af7c6c5f39 stop passing FromUserInventoryItemID right down into the deserializer.
the code becomes simpler if this is set from the outside - only one place needs to do this.
2011-09-02 00:50:16 +01:00
Justin Clark-Casey (justincc)
9c0a03731d Move more of IAM.RezObject() into DoPreRezWhenFromItem() 2011-09-02 00:41:21 +01:00
Justin Clark-Casey (justincc)
15ea82e925 move more of IAM.RezObject() into DoPreRezWhenFromItem() 2011-09-02 00:25:05 +01:00
Justin Clark-Casey (justincc)
01146bb3e3 factor out a section of IAM.RezObject() into DoPreRezWhenFromItem() 2011-09-02 00:04:22 +01:00
Justin Clark-Casey (justincc)
3e86064d6b refactor: factor out DoPostRezWhenFromItem() from IAM.RezObject() 2011-09-01 23:49:38 +01:00
Justin Clark-Casey (justincc)
cc8897127b remove the pointless m_Scene.GetNewRezLocation() call at the top of IAM.RezObject() since its always recalculated later on anyway 2011-09-01 23:37:03 +01:00
Justin Clark-Casey (justincc)
712d44635a refactor: Move sanity checks to the top of IAM.RezObject() to make the code more readable 2011-09-01 23:14:50 +01:00
Justin Clark-Casey (justincc)
e30651b931 use group.RootPart in IAM.RezObject() rather than group.GetChildPart(group.UUID); 2011-09-01 23:09:14 +01:00
Justin Clark-Casey (justincc)
8b83c4a433 Remove pointless NRE check in IAM.RezObject() since this can never occur 2011-09-01 23:06:57 +01:00
Justin Clark-Casey (justincc)
1bf29d60e1 Remove code which was automatically deleting non-root prims from scene objects that had previous been attachments.
Looks like this code was accidentally uncommented in e1b5c612 from feb 2010.
Appears to resolve the rest of http://opensimulator.org/mantis/view.php?id=5664
2011-09-01 22:05:05 +01:00
Justin Clark-Casey (justincc)
616e672fce If the user receiving an inventory folder has left the scene by the time the acceptence message arrives, then don't send them an inventory update.
Doing so causes a NullReferenceException
2011-09-01 02:43:17 +01:00
Justin Clark-Casey (justincc)
c491cdcb95 refactor: use SOG register target waypoints and rots directly instead of calling through the SOP, which doesn't make conceptual sense anyway. 2011-09-01 02:18:31 +01:00
Justin Clark-Casey (justincc)
7eca929686 Eliminate pointless checks of SOG.RootPart != null
It's never possible for SOG to have no RootPart, except in the first few picosends of the big bang when it's pulled from region persistence or deserialized
2011-09-01 02:11:00 +01:00
Justin Clark-Casey (justincc)
10d883dc88 refactor: use ParentGroup.UUID directly instead of SOP.GetRootPartUUID() 2011-09-01 01:41:53 +01:00
Justin Clark-Casey (justincc)
63bf710237 Fix issue with llGetTorque() where it would only ever return a zero vector. 2011-09-01 01:37:35 +01:00
Justin Clark-Casey (justincc)
095b3e5756 Remove pointless cluttering SOP.ParentGroup != null checks.
The only times when ParentGroup might be null is during regression tests (which might not be a valid thing) and when scene objects are being constructed from the database.
At all other times it's not possible for a SOP not to have a SOG parent.
2011-09-01 01:22:28 +01:00
Justin Clark-Casey (justincc)
083ba72b28 Fix a bug where the non-root parts of rezzed objects that had previously been attachments were sending their old attachment values to the client.
The root part state is the canonical value, so always send that instead.
Sending conflicting attachments states for non-root parts of a rezzed object is enough to crash the client.
Fixes http://opensimulator.org/mantis/view.php?id=5664.
Many thanks to mewtwo0641 for some fantastic qa work on this one.
2011-08-31 23:33:01 +01:00
Justin Clark-Casey (justincc)
ca9a054bba Don't set a GridUser entry for NPCs.
Resolves http://opensimulator.org/mantis/view.php?id=5665
2011-08-31 18:03:07 +01:00
Justin Clark-Casey (justincc)
7d58b5fa15 move common code into AttachmentsModule.DeleteAttachmentsFromScene() 2011-08-31 17:53:58 +01:00
Justin Clark-Casey (justincc)
3aa86d22d1 If a FireAndForget thread terminates with an exception, then catch and log rather than letting it terminate the simulator.
Exceptions don't appear to do this with the SmartThreadPool but they do with UnsafeQueueUserWorkItem (and maybe others)
2011-08-31 17:38:32 +01:00
Justin Clark-Casey (justincc)
e69f246b86 refactor: move multiple class to set avatar height into associated SP.AddToPhysicalScene() 2011-08-31 17:25:18 +01:00
Justin Clark-Casey (justincc)
899d109e82 get rid of appearance null checks - this is never null 2011-08-31 17:13:53 +01:00
Justin Clark-Casey (justincc)
8c703022c1 In WorldCommModule, replace the useless Attachments == null check with Attachments.Count == 0 instead 2011-08-31 16:50:18 +01:00
Justin Clark-Casey (justincc)
d3c03658aa minor: remove mono compiler warning 2011-08-31 16:48:21 +01:00
Justin Clark-Casey (justincc)
54839d28ad remove pointless m_attachments == null check since this field is never null 2011-08-31 16:46:43 +01:00
Justin Clark-Casey (justincc)
5a5206449f minor: seal up another instance of using the appearance list without locking 2011-08-31 16:41:58 +01:00
Justin Clark-Casey (justincc)
32444d98cb Make SP.Attachments available as sp.GetAttachments() instead.
The approach here, as in other parts of OpenSim, is to return a copy of the list rather than the attachments list itself
This prevents callers from forgetting to lock the list when they read it, as was happening in various parts of the codebase.
It also improves liveness.
This might improve attachment anomolies when performing region crossings.
2011-08-31 16:29:51 +01:00
Justin Clark-Casey (justincc)
2acfff9f6d remove pointless ToArray() call in AttachmentsModule.SaveChangedAttachments() 2011-08-30 23:39:26 +01:00
Justin Clark-Casey (justincc)
1809aaf74c minor: remove already processed avatar null check in Scene.RemoveClient()
remove some now duplicated method doc
2011-08-30 23:36:45 +01:00
Justin Clark-Casey (justincc)
ddc733cd3d refactor: move SP.SaveChangedAttachments() fully into AttachmentsModule 2011-08-30 23:32:30 +01:00
Justin Clark-Casey (justincc)
91f59f246f also get "nant clean" to remove old .mdb from .exe and .dll 2011-08-30 23:20:54 +01:00
Justin Clark-Casey (justincc)
9e4153f16b Hack our copy of Prebuild to just delete the dlls and mdbs in Physics, so as to leave the new config file 2011-08-30 23:17:02 +01:00
Justin Clark-Casey (justincc)
04bafd2122 refactor: Move ScenePresence.RezAttachments() into AttachmentsModule
This adds an incomplete IScenePresence to match ISceneEntity
2011-08-30 23:06:10 +01:00
Justin Clark-Casey (justincc)
a90e1cf3aa add Name property to ISceneEntity 2011-08-30 22:39:16 +01:00
Justin Clark-Casey (justincc)
1de68b34d9 refactor: migrate DropObject handling fully into AttachmentsModule from Scene 2011-08-30 22:25:38 +01:00
Justin Clark-Casey (justincc)
37a5cf5783 minor: comment out friends number logging from login for now 2011-08-30 22:08:43 +01:00
Justin Clark-Casey (justincc)
953611af53 Merge branch 'master' of ssh://opensimulator.org/var/git/opensim 2011-08-30 22:07:32 +01:00
Justin Clark-Casey (justincc)
e7a515bab0 Fix bug where attachments were remaining on the avatar after being dropped.
If the inventory service is configured not to allow deletion then these will not disappear from inventory
2011-08-30 22:06:24 +01:00
Robert Adams
b705ad477e BulletSim: update values in OpenSimDefaults.ini to the same as defaults in the source. 2011-08-30 13:49:50 -07:00
Robert Adams
b281163457 BulletSim: add .so for 64 bit Linux. Move .config file to where it will be read. 2011-08-30 13:19:53 -07:00
Mic Bowman
17dab7245f Merge branch 'master' into bulletsim 2011-08-30 08:44:28 -07:00
Justin Clark-Casey (justincc)
be357f8fee Fix bug in persisting saved appearances for npcs
Assets have to be marked non-local as well as non-temporary to persist.  This is now done.
Hopefully addresses http://opensimulator.org/mantis/view.php?id=5660
2011-08-30 01:58:32 +01:00
Robert Adams
96dce3e16c Use GetMeshKey from PrimitiveBaseShape. 2011-08-29 10:10:48 -07:00
Mic Bowman
648866b597 Merge branch 'master' into bulletsim 2011-08-29 09:55:34 -07:00
Robert Adams
18037d41c4 Move GetMeshKey from buried inside Meshmerizer to a public method on PrimitiveBaseShape
Signed-off-by: BlueWall <jamesh@bluewallgroup.com>
2011-08-28 16:50:54 -04:00
Robert Adams
80a2b81d52 Add level of detail specification to optionally reduce the number of vertices in generated prim meshes
Signed-off-by: BlueWall <jamesh@bluewallgroup.com>
2011-08-28 16:49:25 -04:00
Makopoppo
795b56e695 Related to #4689 - Adding missing null check for SceneObjectPart
Signed-off-by: BlueWall <jamesh@bluewallgroup.com>
2011-08-27 07:45:02 -04:00
Justin Clark-Casey (justincc)
d4d894c20f Stop avatars returning from neighbouring regions from stalling on the border crossing.
On making a root agent, we need to reset the ScenePresence.m_movement_flag so that it doesn't remember the
movement registered to the client when it exited the initial region.
If this is remember, then the client avatar movement isn't updated and it appears to stall in mid-air, though this is resolved with a prod/release of any other direction key.
This bug was probably introduced a few weeks ago.  Surprised that nobody brought it up.
2011-08-27 01:28:33 +01:00
Justin Clark-Casey (justincc)
1615e7d29f Eliminate duplicate AttachmentPoint properties by always using the one stored in the root part's state field. 2011-08-27 00:33:24 +01:00
Justin Clark-Casey (justincc)
b7700428ec refactor: camel case AttachmentPoint method arg as per code standards 2011-08-27 00:20:15 +01:00
Justin Clark-Casey (justincc)
33a894f3d2 refactor: move SOP.IsAttachment and AttachmentPoint up into SOG to avoid pointless duplication of identical values 2011-08-27 00:15:21 +01:00
Robert Adams
21708b832b BulletSim: add mesh representation. Use meshes for static objects and switch to hulls for physical objects. 2011-08-26 15:51:21 -07:00
Mic Bowman
23f10f1d22 Merge branch 'master' into bulletsim 2011-08-26 15:23:46 -07:00
Justin Clark-Casey (justincc)
15a514fcbc refactor: simplify SOP.AttachedAvatar into SOG.AttachedAvatar
This does a tiny bit to reduce code complexity, memory requirement and the cpu time of pointlessly setting this field to the same value in every SOP
2011-08-26 23:06:41 +01:00
Justin Clark-Casey (justincc)
5f3ffc195f refactor: move SOG.DetachToGround() to AttachmentsModule.DetachSceneObjectToGround() and remove redundant code 2011-08-26 22:49:11 +01:00
Justin Clark-Casey (justincc)
ae614c1264 refactor: simplify DetachSingleAttachmentToGround() by retrieving the scene object group direct 2011-08-26 22:37:53 +01:00
Justin Clark-Casey (justincc)
040ad11e61 refactor: remove common presence set up in attachments tests 2011-08-26 22:24:51 +01:00
Justin Clark-Casey (justincc)
dc61bf4b1f comment out verbose test logging from last commit 2011-08-26 22:17:27 +01:00
Justin Clark-Casey (justincc)
1dba047e4d add regression test for detaching an attachment to the scene 2011-08-26 22:17:05 +01:00
Justin Clark-Casey (justincc)
002313bf13 refactor: move sog.DetachToInventoryPrep() into AttachmentsModule.DetachSingleAttachmentToInv() 2011-08-26 22:02:23 +01:00
Justin Clark-Casey (justincc)
fcbed6479a Downgrade warning about not saving unchanged attachment to debug instead, and change text to better indicate what it's saying 2011-08-26 21:46:12 +01:00
Justin Clark-Casey (justincc)
6c692d2e21 Fix a very recent regression from llAttachToAvatar() fix where I accidentally stopped normal script state persistence on login/logout and attach/detach 2011-08-26 21:26:29 +01:00
BlueWall
04d42860fe Merge branch 'master' of /home/opensim/src/opensim 2011-08-25 07:01:57 -04:00
Micheil Merlin
cf42fcd978 llSetPrimitiveParams correct prim hollow for cases where limit should be 70%.
Signed-off-by: BlueWall <jamesh@bluewallgroup.com>
2011-08-25 06:50:55 -04:00
Justin Clark-Casey (justincc)
4b4c5e69e5 Remove forcing of phantom on ground attached objects - attachments can be both non-phantom and flagged as physical.
As per Melanie
2011-08-24 22:45:51 +01:00
Justin Clark-Casey (justincc)
d5dc8133fc remove pointless IsDeleted check on SP.RezAttachments()
IsDeleted is never set for an SP, even though it's on EntityBase.
It might be an idea to set it in the future
2011-08-24 22:37:08 +01:00
Justin Clark-Casey (justincc)
6d4432f440 refactor: simplify EntityBase.IsDeleted property 2011-08-24 22:34:26 +01:00
Justin Clark-Casey (justincc)
21f1b68fdf extend initial rez regression test to check that attachment is phantom 2011-08-24 22:25:23 +01:00
Justin Clark-Casey (justincc)
73d913dad2 Make objects attached from the ground phantom 2011-08-24 22:12:51 +01:00
Justin Clark-Casey (justincc)
9ba4511d3e add SOG helper properties IsPhantom, IsTemporary, etc. to improve code readability
use these in some sog methods
2011-08-24 21:53:12 +01:00
Justin Clark-Casey (justincc)
801b7f18a7 return InventoryItemBase from AddSceneObjectAsAttachment() 2011-08-24 21:40:36 +01:00
Justin Clark-Casey (justincc)
5eeee480d4 refactor: move Scene.Inventory.attachObjectAssetStore() into AttachmentsModule.AddSceneObjectAsAttachment() 2011-08-24 21:35:44 +01:00
Justin Clark-Casey (justincc)
274e354006 get rid of pointless grp null check in attachObjectAssetStore() 2011-08-24 21:23:10 +01:00
Justin Clark-Casey (justincc)
0e0d40c810 minor: remove hardcoded region numbers with the region size constant and a currently hardcoded offset 2011-08-24 21:18:11 +01:00
Justin Clark-Casey (justincc)
ccf07f6ae3 refactor: remove pointless AgentId argument from attachObjectAssetStore() 2011-08-24 21:14:57 +01:00
Justin Clark-Casey (justincc)
b9ec625dbf add TestAddAttachmentFromGround() regression test 2011-08-24 21:07:46 +01:00
Justin Clark-Casey (justincc)
cf3ffe5bb4 Fix llAttachToAvatar()
Apart from one obvious bug, this was failing because attempting to serialize the script from inside the script (as part of saving the attachment as an inventory asset) was triggering an extremely long delay.
So we now don't do this.  The state will be serialized anyway when the avatar normally logs out.
The worst that can happen is that if the client/server crashes, the attachment scripts start without previous state.
2011-08-24 20:49:23 +01:00
Justin Clark-Casey (justincc)
97b207240e rename AttachmentsModule.ShowDetachInUserInventory() to DetachSingleAttachmentToInv() for consistency and to reflect it's actual behaviour 2011-08-23 22:05:22 +01:00
Justin Clark-Casey (justincc)
014cd4f8bb remove mono compiler warnings 2011-08-23 21:41:16 +01:00
Justin Clark-Casey (justincc)
805ba268d5 replace TestRemoveAttachments() with a more thorough TestRemoveAttachment() 2011-08-23 21:37:36 +01:00
Justin Clark-Casey (justincc)
4a101080ee Merge branch 'master' of ssh://opensimulator.org/var/git/opensim 2011-08-23 21:21:02 +01:00
Justin Clark-Casey (justincc)
34aed96a2f replace old TestAddAttachments() with a more thorough TestAddAttachment() 2011-08-23 21:20:23 +01:00
Mic Bowman
ce011d7e44 Protect a check for default texture entry when setting alpha values. Apparently
if all faces have their own textures then the default texture is null
2011-08-23 10:52:12 -07:00
Justin Clark-Casey (justincc)
afd5469eec Remove pointless contains check in ScenePresence.RemoveAttachment() 2011-08-23 00:08:29 +01:00
Justin Clark-Casey (justincc)
1f3ce48be1 If an object failed to attach due to an exception, then try and detach it from the avatar's list of attachments as well as delete it from the scene.
This may help with the "Inconsistent attachment state" errors seen on teleport.
See http://opensimulator.org/mantis/view.php?id=5644 and linked reports
2011-08-23 00:04:38 +01:00
Justin Clark-Casey (justincc)
d328046efb If an attachment fails, then start logging the exception for now, in order to help with the inconsistent state bug.
This also refactors AttachmentsModules to stop pointlessly refetching the ScenePresence in various methods.  However, more of this is required.
2011-08-22 23:59:48 +01:00
Justin Clark-Casey (justincc)
2eaadf2dc0 Add warning log message to say which attachment fails validation in order to pin down problems with "Inconsistent Attachment State" 2011-08-22 23:28:37 +01:00
Justin Clark-Casey (justincc)
138a5e04b8 minor: remove mono compiler warning 2011-08-22 23:10:43 +01:00
Justin Clark-Casey (justincc)
940a248c3d minor: comment out simulator features log line 2011-08-22 22:44:49 +01:00
Justin Clark-Casey (justincc)
7cf4bb5256 Add ISimulatorFeaturesModule so that other modules can register features in addition to the hardcoded ones. 2011-08-22 22:13:07 +01:00
Snoopy Pfeffer
db91044593 Thanks Neil Canham for fixing bulk inventory updates, no sending BulkInventoryUpdate after accepting inventory items. 2011-08-22 14:51:43 +02:00
Justin Clark-Casey (justincc)
d74686fd51 read m_rpcHandlersKeepAlive under appropriate lock 2011-08-22 02:25:58 +01:00
Justin Clark-Casey (justincc)
c587b0a3a3 oops, fix build break from last commit 2011-08-22 02:10:45 +01:00
Justin Clark-Casey (justincc)
9469c62098 improve locking of m_agentHandlers in BaseHttpServer 2011-08-22 02:07:51 +01:00
Justin Clark-Casey (justincc)
f9a367e2f6 improve locking of m_HTTPHandlers in BaseHttpServer 2011-08-22 01:59:40 +01:00
Justin Clark-Casey (justincc)
5a11cffd23 improve locking of m_streamHandlers in BaseHttpServer 2011-08-22 01:58:50 +01:00
Justin Clark-Casey (justincc)
20a4367827 remove necessity to catch a KeyNotFoundException in BaseHttpServer.RemoveLLSDHandler() 2011-08-22 01:58:19 +01:00
Justin Clark-Casey (justincc)
8254116dc6 improve locking of m_llsdHandlers in BaseHttpServer 2011-08-22 01:52:08 +01:00
Justin Clark-Casey (justincc)
2f1ac1d144 minor: remove mono compiler warning 2011-08-22 01:45:46 +01:00
Justin Clark-Casey (justincc)
94a8ab80c8 improve locking of m_rpcHandlers in BaseHttpServer 2011-08-22 01:43:34 +01:00
Justin Clark-Casey (justincc)
2307d9a2f9 minor: Add explanative text for the new currency parameter. Convert some tabs to spaces 2011-08-22 00:58:11 +01:00
BlueWall
5e231acdce Add avatar and attachments to llRegionSay
llRegionSay will now message avatars on chan 0
  and will message attachments on the avatar that
  listen on channels other than 0.

  This behavior is consistant with the LL
  implementation as tested on regions in Agni
  with one exception: this implementation does
  not include issue:
    https://jira.secondlife.com/browse/SCR-66?
2011-08-20 12:36:35 -04:00
BlueWall
2787207aa2 Add llRegionSayTo
llRegionSayTo(key target, integer channel, string messasge)

	Allows messages to be sent region-wide
	to a particular prim.
2011-08-19 18:47:21 -04:00
Mic Bowman
384cb79a1a Merge branch 'master' into bulletsim
Conflicts:
	OpenSim/Region/Framework/Scenes/SceneManager.cs
2011-08-19 14:49:16 -07:00
Justin Clark-Casey (justincc)
a0a0c64cb1 Get rid of HttpServer.dll to avoid confusion since we use HttpServer_OpenSim.dll (patched version) instead 2011-08-19 03:02:17 +01:00
Robert Adams
bb5b396fc5 Fix exception when using BasicPhysics 2011-08-19 00:53:57 +01:00
Justin Clark-Casey (justincc)
c9e6b7bd10 Stop NPC's getting hypergrid like names in some circumstances.
This meant punching in another AddUser() method in IUserManagement to do a direct name to UUID associated without the account check (since NPCs don't have accounts).
May address http://opensimulator.org/mantis/view.php?id=5645
2011-08-19 00:45:22 +01:00
Justin Clark-Casey (justincc)
3146f4bae0 Don't need to try both AssetService.Get and GetCached in GetMesh since Get always calls GetCached and code paths were identical 2011-08-18 23:36:43 +01:00
Robert Adams
fef73a1a10 BulletSim: add runtime setting of physics parameters. Update default values. 2011-08-18 14:32:09 -07:00
Justin Clark-Casey (justincc)
49258350e8 refactor: fold CreateSceneViewer() back into ScenePresence constructor 2011-08-18 01:22:01 +01:00
Justin Clark-Casey (justincc)
8d29d490a1 minor: remove some mono compiler warnings 2011-08-18 01:16:58 +01:00
Justin Clark-Casey (justincc)
45c37ef494 refactor: Fold 3 ScenePresence() constructors into one since only one is called. 2011-08-18 01:11:23 +01:00
Justin Clark-Casey (justincc)
c1a34cd8da Don't try to save changed attachment states when an NPC with attachments is removed from the scene.
This is done by introducing a PresenceType enum into ScenePresence which currently has two values, User and Npc.
This seems better than a SaveAttachments flag in terms of code comprehension, though I'm still slightly uneasy about introducing these semantics to core objects
2011-08-18 00:53:05 +01:00
Justin Clark-Casey (justincc)
d8f886ccdb comment out noisy attachments logging 2011-08-17 23:41:20 +01:00
Justin Clark-Casey (justincc)
eb8b6b7d52 minor: remove mono compiler warning 2011-08-17 23:28:57 +01:00
Justin Clark-Casey (justincc)
6b51d8a10e In the asset service, check that an asset exists before attempting to store it. 2011-08-17 23:24:41 +01:00
Justin Clark-Casey (justincc)
4a9b8184f7 For now, supress 'OH NOES' warnings given by HGInventoryBroker.CacheInventoryServiceURL when it tries to cache it for an NPC
This concept is meaningless for NPCs.  However, it might be better to make NPCism an actual property on ScenePresence and check.
Addresses http://opensimulator.org/mantis/view.php?id=5643
2011-08-17 01:51:58 +01:00
Justin Clark-Casey (justincc)
acfdca34fd Fix issue where loading a new appearance onto an NPC would not remove the previous attachments from the scene.
Addresses http://opensimulator.org/mantis/view.php?id=5636
2011-08-17 01:35:33 +01:00
Justin Clark-Casey (justincc)
bd5d35ee32 extend test to check that there is one attachment and that it has the right name 2011-08-17 00:42:58 +01:00
Justin Clark-Casey (justincc)
696bd44833 Add new regression TestRezAttachmentsOnAvatarEntrance() to do simple attachments check 2011-08-17 00:37:33 +01:00
Justin Clark-Casey (justincc)
d73c424078 get rid of logged warnings about lack of some modules - afaik these never occur in real life and just clutter up tests 2011-08-16 23:12:58 +01:00
Justin Clark-Casey (justincc)
57e54d84d6 Add new FireAndForgetMethod.None.
This executes the callback on the same thread that made the request.  Designed for use only by regression tests that rely on a predicable event ordering.
2011-08-16 23:05:08 +01:00
Justin Clark-Casey (justincc)
d3c10e609e Move some previously common code back into separate tests. Remove unused region handle from test. 2011-08-16 22:27:52 +01:00
Justin Clark-Casey (justincc)
0bbf7c21d7 Isolate existing incomplete attachments tests rather than have them rely on each other.
Much easier to debug this way.
2011-08-16 22:13:32 +01:00
Justin Clark-Casey (justincc)
c58b32e7ba drop number of attachments in test from 3 to 2 to reduce text complexity 2011-08-16 22:09:13 +01:00
Justin Clark-Casey (justincc)
601257f8b6 remove setting up of second scene in attachments since it's not currently used 2011-08-16 21:58:52 +01:00
Justin Clark-Casey (justincc)
66eb537d0c relocate AttachmentTests.cs to AttachmentsModuleTests.cs 2011-08-16 21:56:56 +01:00
Justin Clark-Casey (justincc)
eb431f91c0 Add terminating quotes to http addresses in [SimulatorFeatures] section of OpenSim.ini.example.
As per http://opensimulator.org/mantis/view.php?id=5638.  Thanks DutchGlory.
2011-08-16 21:50:15 +01:00
Justin Clark-Casey (justincc)
8d866ae8c3 minor: remove some mono compiler warnings 2011-08-16 21:45:01 +01:00
Justin Clark-Casey (justincc)
96ee87e39b Change the default standalone asset cache to be the Flotsam asset cache (with memory caching not enabled).
This matches the GridCommon setting and is the best tested setting.  It appears to work fine on standalone.
Also, add information that the flotsam asset cache is the recommended cache, since it is most used and actively maintained.
2011-08-16 21:38:51 +01:00
Justin Clark-Casey (justincc)
e29e50798a minor: Add warning to OpenSim.ini.example about bullet plugins not working right now, pending the new plugin 2011-08-16 21:31:48 +01:00
Justin Clark-Casey (justincc)
fd3a7ab70c minor: change some comment text in flotsam asset cache 2011-08-16 21:31:17 +01:00
Justin Clark-Casey (justincc)
8c95c83562 On Flotsam asset cache, go back to moving the file from the temporary location rather than copying.
Copying doesn't prevent IOExceptions on Windows due to file locking. (e.g. Mantis 5642, 5630).
So instead go back to moving the file, swallowing IOExceptions that occur just for the move due to competing caching threads or even different opensimulator instances.
2011-08-16 21:03:43 +01:00
BlueWall
0784791a44 Add "shutdown" message to RegionReady
Add "shutdown" message when removing region.
	From a patch submitted by Michelle Argus.
	Thanks Michelle
2011-08-15 16:21:04 -04:00
BlueWall
dc772c608d Fix for monodevelop
External libraries need the "path=..." set so
	Prebuild.exe can properly build the projects
2011-08-15 16:17:32 -04:00
BlueWall
e8f09cd5f7 Merge branch 'master' of ssh://opensimulator.org/var/git/opensim 2011-08-15 13:04:02 -04:00
BlueWall
e870442e31 Remove un-needed ATTACH command in migration script.
This was causing issues when using specified
	paths to database files by using a hard-coded
	name.
2011-08-15 12:59:17 -04:00
Snoopy Pfeffer
9a6ad1535e Added console command "delete object outside" to delete all objects outside region boundaries. This is especiyll useful in cases where physical objects outside regions boundaries cause much physics engine lag. 2011-08-15 17:46:51 +02:00
Snoopy Pfeffer
70ea625447 Added optional Login Service parameter "Currency" to be able to change the currency name shown in the viewer. 2011-08-14 18:20:20 +02:00
Snoopy Pfeffer
e19843a0ee WorldMap: Added map item for Land-for-Sale. Implemented backlist item timeouts (default 10 minutes; see also new config file setting BlacklistTimeout) and removing backlisted neigboring regions that have been restarted from the blacklist. 2011-08-14 17:45:23 +02:00
Micheil Merlin
b80dfb6572 llGetPrimitiveParams fix prim hollow/hole shape value 2011-08-13 15:34:08 +01:00
Justin Clark-Casey (justincc)
dcb4b2de09 Fix a problem in the Flotsam asset cache where assets were being put into the memory cache even when it wasn't enabled.
This hopefully addresses http://opensimulator.org/mantis/view.php?id=5634
This is the most probable cause of the memory problems that people have been seeing in the past month.
This bug has been around since commit 5dc785b (4th July 2011).  Doh!  This is why regressions tests are such a good idea... :)
Many thanks to Nebadon for using git bisect to track down this bug, which made it a 5 minute fix.
2011-08-13 15:21:03 +01:00
Justin Clark-Casey (justincc)
77625dae36 Revert "llGetPrimitveParams fix prim hollow/hole shape return value"
This reverts commit d0bcaf1f16.

Accidentally applied only the prebuild.xml conflict fix.  But the full application seems to generate a regression test error anyway.
2011-08-13 01:13:17 +01:00
Micheil Merlin
d0bcaf1f16 llGetPrimitveParams fix prim hollow/hole shape return value 2011-08-13 01:02:07 +01:00
Aaron Duffy
90c6fa89be Fix a bug preventing region modules from creating trees at anything but the default scale. 2011-08-13 00:52:32 +01:00
Justin Clark-Casey (justincc)
78ff82bfe9 If a map request to a server fails, always close the outbound connection.
This probably doesn't help with the current memory leak.
2011-08-12 23:40:22 +01:00
Justin Clark-Casey (justincc)
ed142ead25 minor: change login enable/disable messages in last commit so that they occur after the setting has been made 2011-08-12 22:50:58 +01:00
Justin Clark-Casey (justincc)
4b88f04c0a minor: On "login disable/enable" always tell the user the final login status, rather than remaining silent if it was already on/off 2011-08-12 22:46:42 +01:00
Justin Clark-Casey (justincc)
76e0afe83f tidy up some OSSL NPC parameter names 2011-08-12 02:46:44 +01:00
Justin Clark-Casey (justincc)
16ac5413dd rename position parameter in osNpcMoveToTarget to target 2011-08-12 01:52:12 +01:00
Justin Clark-Casey (justincc)
aebd46a434 rename osNpcStopMoveTo() to osNpcStopMoveToTarget() 2011-08-12 01:32:49 +01:00
Justin Clark-Casey (justincc)
2169cf04f9 When saving appearance, only save the baked textures, not the other face textures (which are already stored permanently) 2011-08-12 01:24:15 +01:00
Justin Clark-Casey (justincc)
65c4b8d37b Fix kicking of NPCs via "kick user" console command.
Needed to hook up the Close() function in the NPCAvatar IClientAPI implementation, which [unfortunately] is still needed
2011-08-12 00:51:05 +01:00
Justin Clark-Casey (justincc)
0a1bbc27d2 Allow the osNpcCreate() function to accept a notecard name or asset for initial appearance 2011-08-12 00:14:06 +01:00
Justin Clark-Casey (justincc)
d23d37d2aa implement osNpcGetPos() 2011-08-11 23:36:22 +01:00
Justin Clark-Casey (justincc)
a21e98ae1a implement osNpcGetRot() and osNpcSetRot()
Rotation works if done around the z axis.  Anything else leads to random results.
2011-08-11 23:28:14 +01:00
Justin Clark-Casey (justincc)
b1ae930c6b Implement osAgentSaveAppearance() to save the appearance of an avatar in the region to a notecard
This is separate from osOwnerSaveAppearance() so that owner saves can be allowed without allowing arbitrary avatar saves
2011-08-11 22:26:47 +01:00
Justin Clark-Casey (justincc)
50945dd560 add regression test for osNpcCreate when cloning an in-region avatar 2011-08-11 21:43:26 +01:00
Justin Clark-Casey (justincc)
83ca5a101d Split out to-be-common setup stuff from TestOsOwnerSaveAppearance() 2011-08-11 20:56:18 +01:00
Justin Clark-Casey (justincc)
5d694a224f Add missing System.Xml reference which is required to build on Windows but not mono 2011-08-11 20:05:11 +01:00
Justin Clark-Casey (justincc)
b3a4b10531 eliminate redundant ground sitting checks since these are already done in enclosing control structures 2011-08-11 03:16:46 +01:00
Justin Clark-Casey (justincc)
3d4cc93a8e minor: a little bit of log message correction/commenting out 2011-08-11 03:07:41 +01:00
Justin Clark-Casey (justincc)
1aa1711893 eliminate the rotation parameter from SP.HandleMoveToTargetUpdate(). This can just use the currently set Rotation
looks like I spoke to soon about eliminating jerkiness on "go here"/autopilot.  It's still there.
2011-08-11 03:06:38 +01:00
Justin Clark-Casey (justincc)
36f7d36fa1 instead of setting avatar rotation twice in SP.HandleAgentUpdate(), eliminate the second setting in AddNewMovement() 2011-08-11 02:54:15 +01:00
Justin Clark-Casey (justincc)
29093df1a7 get rid of intermediate local store of body rotation in ScenePresence, this is not used. 2011-08-11 02:36:02 +01:00
Justin Clark-Casey (justincc)
ee22569c92 only accept npc UUIDs to osNpc* functions, not names (except for create) 2011-08-11 02:19:13 +01:00
Justin Clark-Casey (justincc)
cace6eaa8a comment out some of the currently less useful debug log messages 2011-08-11 02:06:32 +01:00
Justin Clark-Casey (justincc)
4402851b08 Get NPCs to revert to the correct 'resting' animation (e.g. stand or hover) after finishing their movement. This also fixes judder after an avatar has finished "go here"/autopilot movement in a viewer.
This meant reseting the SP.AgentControlFlags since the Animator uses these to determine the correct default animation.
2011-08-11 01:56:42 +01:00
Justin Clark-Casey (justincc)
951ffad81e If SP.MoveToTarget has been called with a force walk, begin by landing the avatar.
There is a bug here - once an avatar has landed it glides to its new position instead of performing a walk animation
2011-08-11 00:23:54 +01:00
Justin Clark-Casey (justincc)
7f499ff3f3 Add a OS_NPC_LAND_AT_TARGET option to osMoveToTarget()
Default for this function is now not to automatically land.
This allows better control by scripts when an avatar is going to be landing on a prim rather than the ground.
Stopping the avatar involves faking a collision, to avoid the pid controller making it overshoot.
A better approach would be to gradually slow the avatar as we near the target
2011-08-10 23:56:19 +01:00
Justin Clark-Casey (justincc)
fb92678b83 fly and no fly constants for osNpcMoveToTarget() 2011-08-10 22:34:42 +01:00
Justin Clark-Casey (justincc)
5d6c9644fa early code to allow scripts to force npcs not to fly when moving to target
this is to allow walking on prims.  it will be up to the script writer to be sure that there is a continuous path.
currently implemented in osNpcMoveToTarget(), but none of this is final.
2011-08-10 01:47:37 +01:00
Justin Clark-Casey (justincc)
4cb8d6379d Stop trying to deregister caps or close child agents when an NPC is removed 2011-08-10 00:59:31 +01:00
Justin Clark-Casey (justincc)
195c1dc9b8 implement osNpcStopMoveTo() to cancel any current move target 2011-08-10 00:26:38 +01:00
Justin Clark-Casey (justincc)
cba54090c7 When an NPC appearance is loaded, rez the attachments too 2011-08-09 23:25:52 +01:00
Justin Clark-Casey (justincc)
92e96d394a When an NPC is created, stop telling neighbouring regions to expect a child agent 2011-08-09 23:11:07 +01:00
Justin Clark-Casey (justincc)
795c8e6c22 Add osOwnerSaveAppearance() to help with setting up NPC appearances. Not yet ready for user use.
Adds regression test.
2011-08-09 22:05:47 +01:00
Melanie
6ab5ca2bda Guard another nullref 2011-08-09 22:11:27 +02:00
Melanie
0e9dda91cb Guard against a bad login leaving us with a null queue 2011-08-09 20:55:06 +02:00
Justin Clark-Casey (justincc)
57cc180fd5 Merge branch 'master' of ssh://opensimulator.org/var/git/opensim 2011-08-09 03:52:31 +01:00
Justin Clark-Casey (justincc)
e869eeb0bf Implement first draft functions for saving and loading NPC appearance from storage.
This works by serializing and deserializing NPC AvatarAppearance to a notecard in the prim inventory and making the required baked textures permanent.
By using notecards, we avoid lots of awkward, technical and user-unfriendly issues concerning retaining asset references and creating a new asset type.
Notecards also allow different appearances to be swapped and manipulated easily.
This also allows stored NPC appearances to work transparently with OARs/IARs since the UUID scan will pick up and store the necessary references from the notecard text.
This works in my basic test but is not at all ready for user use or bug reporting yet.
2011-08-09 03:51:34 +01:00
Snoopy Pfeffer
916d1b7511 Merge branch 'master' of ssh://snoopy@opensimulator.org/var/git/opensim 2011-08-09 01:14:53 +02:00
Justin Clark-Casey (justincc)
3e16a0fbdd factor out common notecard caching code from 3 methods. 2011-08-09 00:12:41 +01:00
Snoopy Pfeffer
1677587532 Let's see if I am really a core developer, now. ;) 2011-08-09 01:11:39 +02:00
Justin Clark-Casey (justincc)
78d8ce3816 refactor: split out generic parts of osMakeNotecard() into a separate. Add method doc. Other minor tidies. 2011-08-08 23:22:47 +01:00
Justin Clark-Casey (justincc)
6878049952 get rid of bogus log message 2011-08-06 03:06:05 +01:00
Justin Clark-Casey (justincc)
eec54adac5 remove some obsolete tests that are now done elsewhere 2011-08-06 02:38:38 +01:00
Justin Clark-Casey (justincc)
e37f8cf902 Add a test to check that ScenePresence and circuit go away when a root agent is closed down 2011-08-06 02:27:25 +01:00
Justin Clark-Casey (justincc)
85e07c78fb refactor: Change SceneHelpers.AddClient() to AddScenePresence().
This seems to make more sense as we can get SP.ControllingClient
2011-08-06 02:17:41 +01:00
Justin Clark-Casey (justincc)
83ba35a26b rip out sog generation methods in ScenePresenceAgentTests and use SceneHelpers instead
Not that it matters, since these tests are pretty bogus anyway.
Also, renames some test classes for consistency.
2011-08-06 02:01:25 +01:00
Justin Clark-Casey (justincc)
2b26d2f1a5 prevent "create region" console command from being able to create a region with the same id as one that already exists.
Addresses http://opensimulator.org/mantis/view.php?id=5617
2011-08-06 01:35:01 +01:00
Justin Clark-Casey (justincc)
76f46b2545 Do proper locking of m_localScenes list in SceneManager 2011-08-06 01:15:49 +01:00
Justin Clark-Casey (justincc)
dad1d6df18 rename TestHelper => TestHelpers for consistency 2011-08-06 00:31:03 +01:00
Justin Clark-Casey (justincc)
bda1a4be45 rename test SceneSetupHelpers -> SceneHelpers for consistency 2011-08-06 00:26:37 +01:00
Justin Clark-Casey (justincc)
cba40de109 extend phantom flag regression test to toggle back off 2011-08-06 00:22:14 +01:00
Justin Clark-Casey (justincc)
c6c91e6599 refactor: Fold most SOP.ScriptSet* methods back into script code. Simplify. 2011-08-06 00:13:08 +01:00
Justin Clark-Casey (justincc)
ba89fc3aa1 Add regression test for setting phantom status on a scene object. This is not yet complete. 2011-08-05 23:42:05 +01:00
Justin Clark-Casey (justincc)
f18780d0e3 Get "show region" command in GridService to show grid co-ordinates rather than meters co-ord.
This makes it consistent with "show regions"
Addresses http://opensimulator.org/mantis/view.php?id=5619
2011-08-05 22:56:53 +01:00
Mic Bowman
82f41fdcb5 BulletSim: fix problem with not convex hulling large objects by creating unit meshes and always scaling in Bullet 2011-08-05 14:53:39 -07:00
Justin Clark-Casey (justincc)
7d35bf8193 refactor: remove a sliver of unnecessary code 2011-08-05 22:45:42 +01:00
Justin Clark-Casey (justincc)
1a2518d19b Instead of moving the file to its final place when FlotsamCache writes to disk, copy it instead.
This is to eliminate IOException where two threads compete to cache the same file.
2011-08-05 19:57:47 +01:00
Mic Bowman
c3f579046c Merge branch 'master' into bulletsim 2011-08-05 11:13:02 -07:00
Robert Adams
7640b5abf6 BulletSim: Parameters settable from ini file. Linksets. Physical property value tuning 2011-08-05 11:01:27 -07:00
Justin Clark-Casey (justincc)
94d496cf2b remove the largely unused copy/pasted HandleAgentRequestSit() method 2011-08-05 00:57:43 +01:00
Justin Clark-Casey (justincc)
1918402cb1 if an NPC target is set to a ground location, then automatically land them when they get there.
This doesn't help where the target is a prim surface.  In these situations, it might be better to provide manual overrides so the script can control whethre an avatar flys there/lands, etc.
2011-08-04 03:08:35 +01:00
Justin Clark-Casey (justincc)
54ce029342 if an NPC move to target is above the terrain then make it fly to destination 2011-08-04 02:31:40 +01:00
Justin Clark-Casey (justincc)
f999acd095 minor: remove some mono compiler warnings 2011-08-04 01:46:34 +01:00
Justin Clark-Casey (justincc)
c678b75d65 if a move to target is set underground, constrain it to the terrain height 2011-08-04 01:45:56 +01:00
Justin Clark-Casey (justincc)
61a931490d move bAllowUpdateMoveToPosition switch outside of HandleMoveToTargetUpdate() 2011-08-04 01:30:37 +01:00
Justin Clark-Casey (justincc)
831f933ce6 only call move target code in SP.HandleAgentUpdate() if we're actually in the process of moving to a position 2011-08-04 01:22:01 +01:00
Justin Clark-Casey (justincc)
7b2b47530e move reset code out of HandleMoveToTargetUpdate() so that we only call it where needed instead of passing in a flag 2011-08-04 01:16:24 +01:00
Justin Clark-Casey (justincc)
fc64cc2439 Make SIGNIFICANT_MOVEMENT SP constant a top-level property so that other classes can use it. 2011-08-04 01:05:43 +01:00
Justin Clark-Casey (justincc)
7f6f100c5a When the NPC reaches within the SIGNIFICANT_CLIENT_MOVEMENT distance of the target, move it directly to the target.
This makes the movement exact.  Regression test changed to check avatar reaches exact target.
Also has the nice side effect of making NPC animations continue to work after the first movement (which wasn't working).  However, avatar still pauses in mid-stride
2011-08-04 01:00:33 +01:00
Justin Clark-Casey (justincc)
ba0c65e028 extend npc move test to check a second movement 2011-08-04 00:25:51 +01:00
Justin Clark-Casey (justincc)
6f913e8caf eliminate pre-existing unused SP.StopMovement() 2011-08-04 00:13:27 +01:00
Justin Clark-Casey (justincc)
a2f5b4ac9a Rename HandleMoveToPositionUpdate() to HandleMoveToTargetUpdate() for consistency. Improve method doc. 2011-08-04 00:10:53 +01:00
Justin Clark-Casey (justincc)
0299cb060e eliminate a reset position flag by using functionally equivalent DCFlagKeyPressed 2011-08-04 00:06:01 +01:00
Justin Clark-Casey (justincc)
6ab01b338f Stop calling the SP.ResetMoveToTarget() code if a target is not actually set 2011-08-03 23:59:13 +01:00
Justin Clark-Casey (justincc)
31fb6b2d72 remove move to duck walk compensation - no longer required.
extends npc move to regression test to check stop after sufficient sim updates
2011-08-03 23:40:05 +01:00
Justin Clark-Casey (justincc)
61d49d4f63 rename NPC.Autopilot to NPC.MoveToTarget internally. Add method doc to INPCModule 2011-08-03 23:20:36 +01:00
Justin Clark-Casey (justincc)
31cea17f8e extend move test to check avatar is moving in the right direction after setting a move target 2011-08-03 23:13:52 +01:00
Justin Clark-Casey (justincc)
21d8a6b0e8 extend move test to check one beat of the simulator without actually asking the npc to move. 2011-08-03 23:06:18 +01:00
Justin Clark-Casey (justincc)
d78fe44191 Add passing but incomplete NPC move regression test 2011-08-03 22:51:46 +01:00
Justin Clark-Casey (justincc)
e0503d397c stop avatar service being set up in NPC TestCreate() - it's no longer used 2011-08-03 22:45:43 +01:00
Justin Clark-Casey (justincc)
a333c60f28 refactor: rename the move to position methods to move to target to be consistent with terminology used by scene object part and elsewhere 2011-08-03 22:34:05 +01:00
Justin Clark-Casey (justincc)
2964467708 get rid of vestigal move to parameters 2011-08-03 22:11:05 +01:00
Justin Clark-Casey (justincc)
b7a3f36c65 enable the NPC module for its regression test 2011-08-03 04:48:47 +01:00
Justin Clark-Casey (justincc)
c1c0d780ee correct config comments mistakes 2011-08-03 04:36:25 +01:00
Justin Clark-Casey (justincc)
797def8aa4 Put config to enable disable [NPC] module.
Default is disabled.  You will need to explicitly enable to toy with this.
2011-08-03 04:33:45 +01:00
Justin Clark-Casey (justincc)
6e4ec29722 Do a partial fix/implementation of OSSL osNpcMoveTo()
Avatar moves and stops.  However, will stop in mid stride.
And if the move to position is in the air, avatar will continue to make vain and quite hilarious attempts to take off (but never doing so).
Clearly more work is needed.
2011-08-03 04:19:19 +01:00
Justin Clark-Casey (justincc)
68a5fe0431 Improve z axis move to/autopilot so the avatar does alternative crouch/huzzah when walking along the ground
Moving a flying avatar to a ground point doesn't yet land the avatar.  This may or may not be the best thing
2011-08-03 02:59:49 +01:00
Justin Clark-Casey (justincc)
30e816bfa2 Implement move to/autopilot for z axis movement as well.
This is jerky (an artifact of the way it's being done, I think), but it's better than on implementation.
2011-08-03 02:04:38 +01:00
Justin Clark-Casey (justincc)
0c23764ce2 get autopilot/go here to work immediately.
This works with viewer 1.23.5 and so in theory should work with libopenmetaverse.
2011-08-03 01:12:32 +01:00
Justin Clark-Casey (justincc)
1c126e6e22 refactor: Move update_movement_flag and the final check inside the m_allowMovement if in HandleAgentUpdate() since it's logically only ever used there 2011-08-03 00:55:52 +01:00
Justin Clark-Casey (justincc)
f9689f5cc9 refactor: move out code from HandleAgentUpdate() which processes updates to move to a set position
Also comment out the really spammy log message I accidentally left in on the last commit.
2011-08-03 00:46:46 +01:00
Robert Adams
74b23210a7 Fix Flotsam cache so it will use the disk cache if the memory cache is enabled 2011-08-02 23:44:40 +01:00
Justin Clark-Casey (justincc)
c122489e09 Partially fix autopilot/go here
This now works again except that it requires a click or avatar mvmt to get going
This is because the ScenePresence.HandleAgentUpdate() method doesn't trigger until the client does something significant, at which point autopilot takes over.
Even clicking is enough to trigger.
This will be improved presently.
2011-08-02 23:41:12 +01:00
Justin Clark-Casey (justincc)
b7f81d3492 If GetRegionByName can't match something in the local db, then search the hypergrid if that functionality has been enabled.
This should fix the problem today where old style HG addresses (e.g. "hg.osgrid.org:80:Vue-6400") stopped working since 8c3eb324c4
2011-08-02 01:06:32 +01:00
Justin Clark-Casey (justincc)
d2220da205 remove ancient late 2008 cruft that handles the situation where the GetRegionsByName used to not be implemented/returned null.
It's impossible that anybody is still running this since the infrastructure has changed massively since that time.
2011-08-02 00:58:08 +01:00
Justin Clark-Casey (justincc)
17e9d61f43 Change GridService.GetRegionByName() to only return info if there is an exact region name match, unlike GetRegionsByName()
This should fix the first part of http://opensimulator.org/mantis/view.php?id=5606, and maybe 5605.
Thanks to Melanie for helping with this.
2011-08-02 00:52:48 +01:00
Justin Clark-Casey (justincc)
e6fb9d74ef Revert "In GridService, have GetRegionByName() call GetRegionsByName() with a max return of 1 instead of duplicating code."
This reverts commit 8d33a2eaa1.

Better fix will be along in a minute
2011-08-02 00:40:23 +01:00
Justin Clark-Casey (justincc)
8d33a2eaa1 In GridService, have GetRegionByName() call GetRegionsByName() with a max return of 1 instead of duplicating code.
This also fixes the problem where this method would not return a hypergrid region, unlike GetRegionsByName()
2011-08-02 00:26:17 +01:00
Justin Clark-Casey (justincc)
b6ac1c46cd Get rid of AvatarAppearance.Owner to simplify the code.
This is not used for anything - appearances are always properties of objects with ids (ScenePresence, AgentCircuitData) and just has the potential to get out of sync when the appearance is cloned.
2011-08-02 00:13:04 +01:00
Justin Clark-Casey (justincc)
59f548cda8 Get osNpcCreate appearance working with avatars that are currently in the scene.
Had to stop using AvatarService for now since it doesn't store baked texture IDs (which is why this was failing).
Also failing because cloning appearance was also cloning the AvatarApperance.Owner field, which we weren't then changing.
Extended TestCreate() to check this.
2011-08-01 23:41:29 +01:00
Justin Clark-Casey (justincc)
05e94ff27e Move common gemo/agent map name code into CreateGeom()
Fix build break.
2011-08-01 07:04:13 +01:00
Justin Clark-Casey (justincc)
f9d6a91252 Instead of preserving old name in geom_name_map in change size or shape, use the Name property instead.
This is equivalent since the prim 'name' is never changed.  In fact, this propery is never used for prims
2011-08-01 06:52:52 +01:00
Justin Clark-Casey (justincc)
40a78db182 comment out unused code in OdeScene.TriCallback() 2011-08-01 06:47:45 +01:00
Justin Clark-Casey (justincc)
ccb4b76242 On geom removal, remove the name from the OdeScene.geom_name_map too 2011-08-01 06:40:29 +01:00
Justin Clark-Casey (justincc)
f79df6f43f remove the unused ODEPrim.prev_geom field 2011-08-01 06:35:59 +01:00
Justin Clark-Casey (justincc)
f32dbef647 When an ODE geom is removed (as when a non-phantom prim is deleted, resized or shape changed, also remove the OdeScene.actor_name_map entry pointing to the phys actor
This is to stop a small memory leak over time when prims are deleted or phantom-toggled
2011-08-01 06:32:30 +01:00
Justin Clark-Casey (justincc)
6618948ff9 refactor: centralize prim geom removal code from four places to one 2011-08-01 06:15:02 +01:00
Justin Clark-Casey (justincc)
509200d5cd minor: add note to RemovePrimThreadLocked() to the effect that it contrary to the summary, it is being called from within Simulate() lock (OdeLock) 2011-08-01 05:48:27 +01:00
Justin Clark-Casey (justincc)
dfa2f7d715 If a prim changes size or shape, add actor to _parent_scene.actor_name_map with new prim_geom key, as the old one becomes invalid.
This resolves http://opensimulator.org/mantis/view.php?id=5603 where changing size or shape would stop collision_start being fired in a running script.
In both this and existing code we are not removing old actors from actor_name_map when the existing prim_geom is removed, which leads to a small memory leak over time.
This needs to be fixed.
2011-08-01 05:43:04 +01:00
Justin Clark-Casey (justincc)
2102964826 minor: indentation correction 2011-08-01 05:14:16 +01:00
Melanie
434091d3f4 Allow removing users from search and avatar picker 2011-07-31 17:04:22 +02:00
Justin Clark-Casey (justincc)
b757583662 Comment out SOP logging message I accidentally left in 2011-07-31 03:41:35 +01:00
Justin Clark-Casey (justincc)
aea7007533 refactor: split out ninja joint part of SOP.DoPhysicsPropertyUpdate() so that we don't have to look at it if it's not relevant 2011-07-31 02:50:50 +01:00
Justin Clark-Casey (justincc)
450bdb3657 In the packetpool, if we encounter a data block that somehow wasn't retrieved via GetDataBlock() then create a new stack instead of throwing an exception 2011-07-31 02:30:40 +01:00
Justin Clark-Casey (justincc)
d041276517 Remove _mesh field since the mesh data no longer needs to be stored after it's initially used.
This may improve memory usage for regions using mesh and sculpts, though I suspect that it doesn't address the current memory leak.
2011-07-31 01:03:52 +01:00
Justin Clark-Casey (justincc)
bd8f538f80 refactor: Remove argument to pass in an initial mesh to OdePrim since this is no longer required and it prevents removal of the _mesh field (which is only used temporarily)
If passing in a mesh becomes important again in the future then this can be reinstated.
2011-07-31 00:49:49 +01:00
Justin Clark-Casey (justincc)
196a774b24 minor: correct method doc for last commit 2011-07-31 00:45:20 +01:00
Justin Clark-Casey (justincc)
454312f5bc refactor: rename CreateGeom _mesh argument to mesh, so as to not confuse this with the pre-existing _mesh field 2011-07-31 00:44:23 +01:00
Justin Clark-Casey (justincc)
f1ce17071d minor: method doc 2011-07-31 00:43:02 +01:00
Justin Clark-Casey (justincc)
e08be91c84 Refactor: Replace instances of m_isphysical with IsPhysical rather than have some code reference the private var and other the public var without any functionality difference.
Add some method doc to IsPhysical
2011-07-30 23:44:47 +01:00
Justin Clark-Casey (justincc)
4f4d080461 refactor: Rename ODEPrim.ParentPrim() to AddChildPrim() for code readability 2011-07-30 23:20:43 +01:00
Justin Clark-Casey (justincc)
49a3740ee9 minor: remove mono compiler warnings, some code spacing adjustments 2011-07-30 03:56:29 +01:00
Justin Clark-Casey (justincc)
9fc59e2bf2 minor: remove some mono compiler warnings 2011-07-30 03:19:00 +01:00
Justin Clark-Casey (justincc)
d917010433 minor: Add method doc to collision subscription methods. Change method case to reflect OpenSim standards. 2011-07-30 03:11:36 +01:00
Justin Clark-Casey (justincc)
310a685220 refactor: extract method that generates a physics mesh from prim shape data 2011-07-30 02:34:50 +01:00
Justin Clark-Casey (justincc)
4197f66052 refactor: extract code which generate points and faces from sculpt data into it's own method.
fix build break.
2011-07-30 02:22:05 +01:00
Justin Clark-Casey (justincc)
b0eacadeb4 fix bug in previous commit 2011-07-30 02:09:17 +01:00
Justin Clark-Casey (justincc)
122e01949d refactor: move the code that generates physics meshs from prim mesh data into a separate method, in order to make the code more readable. 2011-07-30 02:08:32 +01:00
Justin Clark-Casey (justincc)
7791c1fd1e Replace the generic exception logging in flotsam asset cache with more specific stuff to return more information. 2011-07-30 01:35:22 +01:00
Justin Clark-Casey (justincc)
c4c6b457c3 correct misleading "fcache status" text - deep scans are not performed when this command is invoked. 2011-07-30 01:16:10 +01:00
Justin Clark-Casey (justincc)
835352aee9 Make it clearer what the save_crashes setting in [Startup] actually does. 2011-07-30 01:05:30 +01:00
Justin Clark-Casey (justincc)
2f5995f5c0 Temporary code to change bad AvatarHeight values in the AvatarService to the default Ruth height.
I was persuaded to do this because simulators on osgrid will persist in inserting bad values for an unknown length of time, even after the original simulator bug which was inserting bad values is out in an osgrid distro
This code can be removed at some point in the future, though I think there is an argument for having services police these values in open grids.
2011-07-30 00:58:17 +01:00
Justin Clark-Casey (justincc)
6d866ba6d5 Temporarily put in a log line which shows which locale the user is running in. 2011-07-29 23:43:35 +01:00
Justin Clark-Casey (justincc)
9a5e0ede7c For all Util.FireAndForget invocations, set thread to en_US before continuing wtih the invocation.
This is to avoid bugs where the locale is not manually set on the thread and bad data values get sent to the database or over the wire.
Lots of code does this manually but as we've seen, a subtle change can hit code which has forgotton to do this.
Since en_US show be used throughout the server at present, setting it at FireAndForget seems reasonable.
Arguably, it would be better to do this where data is sent, but doing it here is much easier.
All the manual BeginInvokes() remaining in the code should probably call FireAndForget instead.
2011-07-29 23:21:57 +01:00
Justin Clark-Casey (justincc)
84c68c61bd When we start the appearance saving thread, make sure we set the culture to En_US so that a different culture doesn't save values with commas as decimal points, etc.
This will hopefully stop giants stalking the grid.
See http://opensimulator.org/mantis/view.php?id=5614
2011-07-29 22:27:04 +01:00
Justin Clark-Casey (justincc)
5043be13fb Return null from CreateMeshFromPrimMesher if OpenJPEG decoding of the sculpt data fails.
This is to address http://opensimulator.org/mantis/view.php?id=5612
2011-07-29 21:49:23 +01:00
Justin Clark-Casey (justincc)
f3c5a5b745 fix extremely minor Ode bug where the _taintedPrimL list would always be cleared on every OdeScene.Simulate() even if it was already empty. 2011-07-29 01:18:42 +01:00
Justin Clark-Casey (justincc)
2a39d0cdb0 refactor: Move another chunk of ninja code out of the OdeScene.Simulate() loop for consistency and readability. 2011-07-29 00:51:07 +01:00
Justin Clark-Casey (justincc)
3f0d8f3cbf refactor: Simplify reading OdeScene.Simulate() loop by shunting all the NINJA joints stuff into its own method.
Now if ninja joints isn't active (which is the default) don't have to wade through a lot of massively indented irrelevant code.
2011-07-29 00:39:02 +01:00
Justin Clark-Casey (justincc)
9c6227da66 refactor: unindent the OdeScene.Simulate() loop to ignore the long commented out ifs and locks
This is to make it more readable.
2011-07-29 00:23:42 +01:00
Justin Clark-Casey (justincc)
8c3eb324c4 When using osTeleportAgent() and osTeleportAvatar(), only teleport if the region name exactly matches (not near matches)
This is to prevent situations where the first name returned by GridService.GetRegionsByName is not one that exactly matches the given region name, even when there is an exact match later on in the list.
Only the above two functions call this teleport method (the map uses a different routine) so this seems safe to change.
Addresses http://opensimulator.org/mantis/view.php?id=5606
2011-07-29 00:00:35 +01:00
Melanie
c4ffcd4b7d Ensure that packet headers get parsed correctly 2011-07-27 09:12:00 +01:00
Melanie
04eaca2af8 Ensure that packet headers get parsed correctly 2011-07-27 08:35:19 +02:00
Robert Adams
a95f2fe4b3 BulletSim: Update dlls 2011-07-25 10:11:55 -07:00
Melanie
5c012cac54 Add a timer to monitor the heartbeat. Restart it if it's been dead for
5 seconds.
2011-07-25 04:16:53 +02:00
Melanie
2e83b48873 Merge branch 'careminster-presence-refactor' of ssh://3dhosting.de/var/git/careminster into careminster-presence-refactor 2011-07-23 18:34:46 +02:00
Melanie
c2de0c930c Fix failure to find avatars due to trainling spaces being sent by viewers. 2011-07-23 18:29:43 +02:00
Melanie
4cdc8806fb Fix LLTextBox to work with the updated libOMV 2011-07-23 11:40:38 +01:00
Melanie
96174595da Fix LLTextBox to work with the updated libOMV 2011-07-23 11:39:32 +01:00
Justin Clark-Casey (justincc)
504de8bc47 Pass the first name and last name from the agent circuit data to the authorization service rather than from the account.
This is to accomodate situations where the authorization service is being used by the hypergrid, where visitors have no user account.
See http://opensimulator.org/mantis/view.php?id=5517, this code is somewhat adapted/cleaned up from Michelle's patch
I'm a little ambivalent about this since visitors could put anything in firstname/lastname so it's not much of an auth measure.
It's up to the auth service to decide which data it actually uses.
Possibly we should be passing through other info such as agent circuit ip
2011-07-23 03:48:53 +01:00
Justin Clark-Casey (justincc)
ea58aee338 Change default AllowScriptCrossings config setting to true.
When this setting is false and other defaults haven't been changed, scripts entering the simulator from another sim are automatically restarted but their state is not preserved.
When this setting is true, state that accompanies the script is reloaded (e.g. if a script had a variable i = 1 when leaving the source region, it will still have i = 1 on the destination region).
This setting does not affect crossings when regions are run in the same simulator.  In this case, state is already preserved.
2011-07-23 02:31:00 +01:00
Makopoppo
4eaca4884e Fixed serverside_object_permission default value confliction 2011-07-23 02:26:13 +01:00
Justin Clark-Casey (justincc)
be9b4ad23a For default everyone permissions on library items, make notecards and scripts non-modifiable (but still copyable, etc).
Users should not be given the impression that they can modify these items.
This still does not solve the issue where library items cannot be dragged into prims or user inventory any time after they are initially seen.
Curiously, manually copying and pasting still appears to work.
On the surface, this seems to have something to do with library item caching on the client, since deleting the cache allows drag to work again once
Not sure what the exact problem is.
2011-07-23 02:18:23 +01:00
Justin Clark-Casey (justincc)
f0895028e9 Remove manually permissions settings on all current library items so that they use the defaults instead.
Some items had completely wrong permissions - this is easier than correcting them all.
The ability to set permissions in xml is retained since there are use cases for this (e.g. to create no-mod library scripts)
2011-07-23 02:13:11 +01:00
Justin Clark-Casey (justincc)
fcaa4f6012 Revert "Don't load current/next/everyone/base permissions from the library item xml files - always use PermissionMask.All instead (which was the existing default)."
There actually are uses for this.  I will correct the perms instead since some entries appear to be wrong.

This reverts commit 667b54f5a2.
2011-07-23 02:05:51 +01:00
Justin Clark-Casey (justincc)
667b54f5a2 Don't load current/next/everyone/base permissions from the library item xml files - always use PermissionMask.All instead (which was the existing default).
Library items always need the same permissions, so it doesn't make sense to load them from the xml files.  This just opens the door to permissions mistakes.
2011-07-23 01:59:14 +01:00
Robert Adams
869883f2dc BulletSim: fix buoyancy for prims. Start of configurable physics parameters. 2011-07-22 15:23:57 -07:00
Justin Clark-Casey (justincc)
aadc4eb3b8 Fix problem where sculpts were not getting physical proxies
Fixed this by inspecting Shape.SculptEntry at various places instead of Shape.SculptType.  Sculpties actually have a SculptType of Cylinder - only true mesh is SculptType.Mesh
This addresses http://opensimulator.org/mantis/view.php?id=5595
2011-07-22 19:23:38 +01:00
Dan Lake
3c09f918ad Merge branch 'bulletsim' of ssh://opensimulator.org/var/git/opensim into bulletsim 2011-07-22 10:24:26 -07:00
Robert.Adams
5ffec1cd64 Pass collisions and updates in pinned memory (saves marshaling).
Fix folding feet by using collision normals.
Add constraint specification.
2011-07-22 10:23:40 -07:00
Dan Lake
fa696c2eb2 Pass collisions and updates in pinned memory (saves marshaling).
Fix folding feet by using collision normals.
Add constraint specification.
2011-07-22 10:22:21 -07:00
Mic Bowman
4cbc912375 Merge branch 'master' into bulletsim 2011-07-22 09:02:32 -07:00
Melanie
705f70064e Fix merge artefact 2011-07-22 12:38:08 +01:00
Melanie
0e52010c0e Thank you, Michelle Argus, for a patch that adds reading the agent limit
from XML properly.
2011-07-22 12:36:49 +01:00
Melanie
6ac0bc7259 Thank you, Michelle Argus, for a patch that adds reading the agent limit
from XML properly.
2011-07-22 12:36:05 +01:00
Oren Hurvitz
02e54c57c4 Generate the initial maptile asynchronously
Signed-off-by: Melanie <melanie@t-data.com>
2011-07-22 09:52:21 +01:00
root
d8228f4374 Merge branch 'master' of melanie@opensimulator.org:/var/git/opensim 2011-07-21 21:12:50 +01:00
Oren Hurvitz
71ef4a8fb3 When an uncached asset is requested multiple times concurrently, only load it once
Signed-off-by: root <root@grid00001.t-data.com>
2011-07-21 20:52:56 +01:00
Oren Hurvitz
56830bfe07 When handling SetAppearance packet, always save the appearance; not only if the texture was changed 2011-07-21 20:18:36 +01:00
Oren Hurvitz
f97278610c Fixed updating avatar appearance
Signed-off-by: root <root@grid00001.t-data.com>
2011-07-21 20:13:32 +01:00
Justin Clark-Casey (justincc)
6426492da0 remove the windows debugging symbols for the long protobuf-net 2011-07-21 03:24:20 +01:00
Justin Clark-Casey (justincc)
630e11cbe1 remove dead MXP default symbols. The MXP code is long, long gone. 2011-07-21 03:22:27 +01:00
Justin Clark-Casey (justincc)
e1ce106790 make [SMTP] default comment option match actual default 2011-07-21 03:21:19 +01:00
Justin Clark-Casey (justincc)
0a09c45726 minor: group all the map tile options together 2011-07-21 03:18:10 +01:00
Justin Clark-Casey (justincc)
d2d67a1abf remove pointless quotes from GenerateMaptiles option in OpenSimDefaults.ini 2011-07-21 03:14:43 +01:00
Justin Clark-Casey (justincc)
69c2d3434a minor: remove the pointless quotes from the GenerateMaptiles option 2011-07-21 03:13:54 +01:00
Justin Clark-Casey (justincc)
703d130e96 Merge branch 'master' of ssh://opensimulator.org/var/git/opensim 2011-07-21 03:10:28 +01:00
Justin Clark-Casey (justincc)
1c758ae01c make default TextureOnMapTile true for the older map imager
Don't know of a good reason not to do this, seems to work fine.
2011-07-21 03:08:58 +01:00
Dan Lake
81fe1cfad6 Merge branch 'bulletsim' of ssh://opensimulator.org/var/git/opensim into bulletsim 2011-07-20 15:04:23 -07:00
Dan Lake
2c11f7fc38 Merge branch 'master' into bulletsim 2011-07-20 15:01:32 -07:00
Dan Lake
3270bd560e Removed unused AddPrimShape methods in PhysicsScene caused by merge conflicts 2011-07-20 14:34:02 -07:00
Careminster Team
9fc7d65df7 Apply the localID to the Physics actor to prevent null calls later 2011-07-19 18:26:36 +01:00
Careminster Team
51c47677a1 Tidy up a superfluous AddPrimShape override in PhysicsScene 2011-07-19 18:17:19 +01:00
Careminster Team
cbaa4aa88f Tidy up a superfluous AddPrimShape override in PhysicsScene 2011-07-19 18:16:44 +01:00
root
c768d18c92 Revert "Tidy up a superfluous AddPrimShape override in PhysicsScene"
This reverts commit f5623b5c39.
2011-07-19 18:16:36 +01:00
Tom
f5623b5c39 Tidy up a superfluous AddPrimShape override in PhysicsScene 2011-07-19 10:15:34 -07:00
Justin Clark-Casey (justincc)
ee829a71c2 On all undo/redo operations, consistently lock the undo object for everything, in order to avoid any deadlock issues. 2011-07-19 06:13:05 +01:00
Justin Clark-Casey (justincc)
c50533659a If we store an undo, wipe anything already present on the redo stack
This stops problems when we undo a few steps and start off down another path.
Surprisingly, apart from this now fixed problem, redo appears to be working too.
2011-07-19 06:11:16 +01:00
Justin Clark-Casey (justincc)
ec1ecd3633 stop redo throwing an exception if there is nothing to redo 2011-07-19 06:05:23 +01:00
Justin Clark-Casey (justincc)
25c532f2ec refator: simplify UndoState.Compare() code 2011-07-19 05:58:52 +01:00
Justin Clark-Casey (justincc)
9dd5a24495 rip out pointless null checks in UndoState where part can never be null 2011-07-19 05:51:19 +01:00
Justin Clark-Casey (justincc)
bc3679b67d Fix undo when changing just the root prim's position in a linkset.
I think (ha ha) this largely fixes undo, except for the fact that rotation a set of prims with 'edit linked parts' selected doesn't quite work properly (though this works fine if the checkbox isn't selected).
Also, the double undo bug for resize is still present.
Redo might be incredibly buggy, haven't even looked at that yet.
2011-07-19 05:46:17 +01:00
Justin Clark-Casey (justincc)
0ef29da9b2 refactor: rename UpdatePrimPosition() to UpdatePrimGroupPosition() for consistency 2011-07-19 05:20:04 +01:00
Justin Clark-Casey (justincc)
62325829ec comment out all kinds of debugging guff 2011-07-19 05:14:58 +01:00
Justin Clark-Casey (justincc)
1fdb16f1cd Fix undo for rotation of the root prim in a linkset on its own.
The only obviously broken things right now are the undo of the position of just a root prim (stays in place) and the fact that resizes need two undoes.
2011-07-19 05:05:50 +01:00
Justin Clark-Casey (justincc)
b2722e984a Fix undo of rotation of single prims in a linkset 2011-07-19 04:40:02 +01:00
Justin Clark-Casey (justincc)
97f1edfd95 Fix undo of prim group rotation.
This isn't that great since I think I broke it a few commits earlier.
Undo of rotation of individual prims in a linkset is still broken
2011-07-19 04:15:27 +01:00
Justin Clark-Casey (justincc)
4b9ef4f39c Rename UpdatePrimRotation() to UpdatePrimGroupRotation() since this is what it actually does and is more consistent with other method names. 2011-07-19 03:44:49 +01:00
Justin Clark-Casey (justincc)
7c468cda36 Stop undo of just the root prim position in the linkset from shifting the whole linkset.
However, what happens now is that undo just doesn't do anything when the root prim is selected on its own.  This requires more code than just fiddling with undo states.
2011-07-19 03:38:22 +01:00
Justin Clark-Casey (justincc)
c94dc95844 fix undo when resizing of non-root individual prims in a linkset
undo resize, rotation and position still needs fixing when only editing root prim of a linkset
2011-07-19 03:27:16 +01:00
Justin Clark-Casey (justincc)
430a4aeba8 Fix undo for resizing linksets
This involves implementing a boolean in UndoState to signal whether the undo needs to be done for an entire group/linkset or just a single prim
Resizing individual components of linksets is still dodgy.
Resizing still has to be down twice, since for some reason the client is sending two multiobjectupdate packets on every resize except the very first.  This applies to single prims and linksets.  Need to look into this.
2011-07-19 03:01:54 +01:00
Justin Clark-Casey (justincc)
86f45f6fe7 remove undo state storage in a few places where it's pointless
no functional effect - existing bugs still remain
2011-07-19 01:24:43 +01:00
Justin Clark-Casey (justincc)
6fc74b36d1 Make various tweaks to undo code in an effort to get things working better.
Undo rotation and position appear to be working.
Resizing a single prim appears to be working, though the undo has to be done twice.
Resizing a group of prims still does not work properly - possibly because in the UndoState we don't store a knowledge of when we're resizing a whole group rather than individual prims.
This needs to be addressed.
2011-07-18 04:54:21 +01:00
Justin Clark-Casey (justincc)
aec3b58a57 use standard sdk stack in terrain model rather than OpenSim.Framework.UndoStack.
remove OpenSim.Framework.UndoStack
2011-07-18 02:06:06 +01:00
Justin Clark-Casey (justincc)
3f8e571b78 Use a standard generic system stack for the undo/redo stacks instead of our own homebrew.
system stack also uses an array, so no performance penalty.
Also exposes undo count and adds a test assertion for correct undo count after resize
2011-07-18 02:01:12 +01:00
Justin Clark-Casey (justincc)
bdd340b9fc Merge branch 'master' of ssh://opensimulator.org/var/git/opensim 2011-07-18 01:35:00 +01:00
Justin Clark-Casey (justincc)
e9a739f45f refactor: group all the undo/redo code in SOP into one place for easier code reading 2011-07-18 01:33:57 +01:00
Marck
dd2564d7ec refactor: Pull up Assembly of the SQLite classes as a protected property, so that it can be overwritten in subclasses. That way extensions can decide in which assembly migration resources should be looked up. This is a refactor similar to commit 9923a2ff10 for MySQL -- no functional changes. 2011-07-16 09:49:38 +02:00
Justin Clark-Casey (justincc)
f5ddf37112 Replace ifs in SOG.GroupResize() with Math.Min()
Also fiddle a bit with undo.  This is not currently working properly, though to be fair it also didn't appear to work in 0.7.1.1 either (at least for resize).
Will get some more attention soon.
2011-07-16 05:23:21 +01:00
Justin Clark-Casey (justincc)
9a80adf33a remove now unncessary parts of SceneObjectGroup.Resize() 2011-07-16 04:49:21 +01:00
Justin Clark-Casey (justincc)
122745fe1c refactor: replace scale limiting code with more elegant Math.Min calls 2011-07-16 04:28:49 +01:00
Justin Clark-Casey (justincc)
2b68ac4ba3 refactor: Push all part resize code down into SceneObjectPart.Resize() 2011-07-16 04:22:57 +01:00
Justin Clark-Casey (justincc)
4b5a6b655b add test for resizing one part in a group 2011-07-16 03:52:30 +01:00
Justin Clark-Casey (justincc)
df2a59d31b refactor: make SceneObjectGroup.GroupScale() a property rather than a mehod 2011-07-16 03:30:14 +01:00
Justin Clark-Casey (justincc)
0f9882db5b minor: add a log warning if a sculpt/mesh async asset request returns no data 2011-07-16 03:24:36 +01:00
Justin Clark-Casey (justincc)
6f9b855719 refactor: remove pointless sender != null tests, etc, in AssetReceived, since the method called always belongs to the object that generated the request 2011-07-16 03:16:24 +01:00
Justin Clark-Casey (justincc)
982e71b6b8 eliminate unused and redundant SceneObjectGroup.AssetReceived() 2011-07-16 03:08:28 +01:00
Justin Clark-Casey (justincc)
c82f19e41c fix build break from last commit 2011-07-16 03:06:30 +01:00
Justin Clark-Casey (justincc)
3fc12e7224 Eliminate the pointless textured id argument to SculptTextureCallback 2011-07-16 03:02:28 +01:00
Justin Clark-Casey (justincc)
2b339b7d2b minor: remove mono compiler warnings 2011-07-16 02:56:54 +01:00
Justin Clark-Casey (justincc)
27fae36a21 remove the need to supply SceneObjectGroup.GroupResize() with a localId.
This is utterly pointless scene we already know which sog we're dealing with.
2011-07-16 02:53:36 +01:00
Justin Clark-Casey (justincc)
50bd48542c Add very basic test for resizing a scene object with one prim 2011-07-16 02:44:00 +01:00
Justin Clark-Casey (justincc)
6179879308 minor: remove mono compiler warnings 2011-07-16 01:53:25 +01:00
Justin Clark-Casey (justincc)
da7340b9fb If resized shape is a mesh/sculpt, leave it to the mesh asset callback to trigger the physics actor taint.
In the last commit, the fix was made by updating all the child prim physics actors with the new size rather than just the root part.
2011-07-16 01:42:56 +01:00
Justin Clark-Casey (justincc)
18652eb87e Fix physics proxy regeneration when a mesh with more than one submesh is resized
Addresses http://opensimulator.org/mantis/view.php?id=5584
2011-07-16 01:36:27 +01:00
Justin Clark-Casey (justincc)
7247ca1644 use constants in llGetObjectDetails() rather than magic numbers 2011-07-16 00:08:11 +01:00
Justin Clark-Casey (justincc)
a9ba9d4a9e change async parameter name in AddLocalPacketHandler since it becomes a reserved keyword in .net 5
Also adds some method doc.
2011-07-15 23:51:55 +01:00
Justin Clark-Casey (justincc)
0ee7a5ee81 If object is an attachment, make llGetVel() return the avatar's speed rather than the object's own zero speed.
As per http://opensimulator.org/mantis/view.php?id=5575
2011-07-15 23:36:32 +01:00
Justin Clark-Casey (justincc)
3e5b2d52ff minor: method doc for baked texture uploading 2011-07-15 22:58:29 +01:00
root
b5fcd2caba Fix some local id issues in physics glue 2011-07-15 20:11:12 +01:00
root
e9dbe54ab1 Fix some local id issues in physics glue 2011-07-15 20:07:59 +01:00
Robert Adams
b55076990c fix duplication of physical objects for physics engines that care about the initial value of localID 2011-07-15 11:37:34 -07:00
Melanie
c7dbd7cbd0 Fox some local id issues in physics glue 2011-07-15 19:36:00 +02:00
Melanie
8dff9d564d Revert "Add localid support to ch0de properly"
This reverts commit bb402d0d95.
2011-07-15 19:35:49 +02:00
Melanie
8925fb5537 Merge branch 'careminster-presence-refactor' of ssh://3dhosting.de/var/git/careminster into careminster-presence-refactor 2011-07-15 19:30:23 +02:00
Tom
bb402d0d95 Add localid support to ch0de properly 2011-07-15 12:08:40 -07:00
Tom
cc69d12d54 Fix a raycast issue 2011-07-15 11:12:10 -07:00
Melanie
7fac07d9ab Merge branch 'careminster-presence-refactor' of ssh://3dhosting.de/var/git/careminster into careminster-presence-refactor 2011-07-15 18:48:43 +02:00
Justin Clark-Casey (justincc)
c7e8529122 minor: remove whitespace 2011-07-13 01:25:17 +01:00
Justin Clark-Casey (justincc)
0d64155bb5 Remove an unused 404 checker since on a 404, GetResponse() throws a WebException rather than proceeding. 2011-07-13 01:24:22 +01:00
Justin Clark-Casey (justincc)
938b4f8bf8 if a SynchronousRestObjectRequester request fails, then unless it's due to a 404, log the exception for diagnostic purposes
This is instead of logging "Invalid XML" for all failures, even if they weren't a result of invalid xml.
A default TReponse is returned in the event of a 404, which is the same behaviour as previously.
2011-07-13 01:19:12 +01:00
Justin Clark-Casey (justincc)
e434ba5e8e Remove the obsoleted SynchronousRestObjectPoster 2011-07-13 00:52:32 +01:00
Justin Clark-Casey (justincc)
08dc07dc76 refactor: Move all callers of the obsoleted SychronousRestObjectPoster.BeginPostObject() to the identical SynchronousRestObjectRequester.MakeRequest() 2011-07-13 00:48:36 +01:00
Justin Clark-Casey (justincc)
5158ec0913 Add experimental module to check status of services that the simulator is connected to.
Currently disabled.
2011-07-13 00:24:55 +01:00
Justin Clark-Casey (justincc)
bf1b8397bb Add a warning to URI config in GridCommon.ini.example not to add a slash to the end.
Tidy up GridCommon.ini.example
2011-07-12 23:35:06 +01:00
Justin Clark-Casey (justincc)
3e456163dd Port implementation of llCastRay() from Aurora.
I haven't been able to test this since the viewer won't parse the llCastRay() function.  Maybe some activation cap is missing.  Could wait until it is activated by default in the viewer.
2011-07-12 22:13:15 +01:00
Mic Bowman
1f3e42adf3 reorder bulletsim and convex decomposition projects in prebuild.xml. seems
to fix the build on mono/linux.
2011-07-12 11:14:48 -07:00
Justin Clark-Casey (justincc)
d31e0a67f7 temporarily fix the build break with building the OdePlugin tests assembly.
This needs to be fixed properly.
2011-07-12 03:26:22 +01:00
Justin Clark-Casey (justincc)
f75f906e35 minor: remove whitespace to trigger another build 2011-07-12 03:13:05 +01:00
Justin Clark-Casey (justincc)
7442f064f5 Make OdePlugin tests build from their own directory rather than from the main OdePlugin directory
I suspect the former arrangement was confusing nant since file changes didn't appear to be rebuilding properly
Ode tests don't currently execute because Ode.NET can't pick up the native libode dll
However, this appears to also have been the case before, and these tests weren't being included in the "nant test" suite anyway.
Will need to fix some time.
2011-07-12 02:58:14 +01:00
Justin Clark-Casey (justincc)
df0e5cc9fe When a mesh object is added to a scene, delay adding the physics actor until the sculpt data has been added to the shape (possibly via an async asset service request)
This prevents spurious 'no asset data' for meshes added on startup.
2011-07-12 02:33:09 +01:00
Dan Lake
3dcc15ede3 Moved ConvexDecompositionDotNet.dll to bin directory to fix picky references on Linux 2011-07-11 15:28:05 -07:00
Dan Lake
38f0cf4bf4 Moved ConvexDecompositionDotNet.dll to bin directory to fix picky references on Linux 2011-07-11 15:26:50 -07:00
Mic Bowman
616f3844b6 Moved ConvexDecompositionDotNet.dll to bin directory to fix picky references on Linux 2011-07-11 15:24:23 -07:00
Justin Clark-Casey (justincc)
dbd954d701 Fix permissions problem where newly uploaded meshes rezzed from inventory could not be copied by owner. 2011-07-11 22:56:14 +01:00
Dan Lake
b9cbe92f30 Merge branch 'master' into bulletsim 2011-07-11 12:23:20 -07:00
Robert Adams
51d6c58d10 Checkin 32 bit bulletsim shared library for Linux. 2011-07-11 12:23:00 -07:00
Justin Clark-Casey (justincc)
24efb021ff minor Tack the prim name on the end of the "experimental mesh proxy generation" message.
Can probably comment out this message soon, once a few other issues are tidied up.
2011-07-11 04:23:30 +01:00
Justin Clark-Casey (justincc)
8e44a8e2b9 Properly regenerate physics proxy when a mesh is resized.
This is done in SOP.Resize().  More common code from callers needs to be refactored into this method to reduce confusing copy/pasting
2011-07-11 03:47:49 +01:00
Justin Clark-Casey (justincc)
0badf3718d refactor: push the part of SceneObjectGroup.CheckSculptAndLoad() that actually deals with the part into a SceneObjectPart.CheckSculptAndLoad() method 2011-07-11 03:35:29 +01:00
Justin Clark-Casey (justincc)
2f3d0e209f When a sculpt/mesh texture is received by a part on a callback request, don't do the unnecessary work of copying the base shape.
Just setting the new base shape is enough to reinsert the sculpt data and set the taint.
Also cleans up a few more left-in debugging messages.
2011-07-11 03:13:59 +01:00
Justin Clark-Casey (justincc)
ce85675e70 comment out accidential ProcessTaints physics debug line left in code 2011-07-11 02:29:51 +01:00
Justin Clark-Casey (justincc)
6a15464b0a refactor: Make arguments to SceneGraph.UpdatePrimFlags() more readable 2011-07-11 02:29:19 +01:00
Justin Clark-Casey (justincc)
01b98c2e62 refactor: Make arguments for SceneObjectGroup.UpdatePrimFlags() more readable 2011-07-11 02:18:19 +01:00
Justin Clark-Casey (justincc)
e68ae44b6b minor: remove mono compiler warning 2011-07-11 02:11:37 +01:00
Justin Clark-Casey (justincc)
c6d4304a04 refactor: very minor space insertion 2011-07-11 02:11:16 +01:00
Justin Clark-Casey (justincc)
c964114f7e refactor: make argument to SOP.UpdatePrimFlags() more readable 2011-07-11 02:09:11 +01:00
Melanie
b59b1ff3d9 Merge branch 'careminster-presence-refactor' of ssh://3dhosting.de/var/git/careminster into careminster-presence-refactor 2011-07-10 18:16:09 +02:00
Melanie
9c9b3e3976 Dammit, loggin the type of an exception without providing the FULL DUMP is NOT
going to help squash bugs!
2011-07-10 17:27:20 +02:00
Justin Clark-Casey (justincc)
457ba9d1a2 refactor: slightly simplify test 2011-07-09 02:27:47 +01:00
Justin Clark-Casey (justincc)
59aedbc94b Rename SceneSetupHelpers.AddRootAgent to AddClient() to better represent its effects and return object 2011-07-09 02:25:40 +01:00
Justin Clark-Casey (justincc)
f99b89990c Add scratch AvatarFactoryModuleTests with one test to do a partial check on AvatarFactoryModule.SetAppearance()
Baked texture set not yet checked, nor persistence of data in avatar service
This is a foundation for later npc related tests.
2011-07-09 02:21:56 +01:00
Justin Clark-Casey (justincc)
6963b8b046 refactor: Get LSLString(LSLInteger i) constructor to now call LSLString(int i) structure to remove code duplication. 2011-07-09 01:28:27 +01:00
Makopoppo
df586c9d25 Raw int numbers (ex.LSL Constants) are displayed like "1.000000" when type cast to string 2011-07-09 01:27:12 +01:00
Justin Clark-Casey (justincc)
f680c13495 Fix osMatchString() so that it reports all instance of pattern matches, not just the first one.
This is a slight adaptation of the patch in http://opensimulator.org/mantis/view.php?id=4568 which doesn't apply directly since the underlying code was changed by earlier makopoppo patches.
Thanks makopoppo!
2011-07-09 01:24:30 +01:00
Justin Clark-Casey (justincc)
52c3671aa0 fix formatting issues from last patch 2011-07-09 01:17:35 +01:00
Makopoppo
b983f38e2a lsGetWindlightScene() returns raw int value, which makes unable to compare to another value with llListFindList() 2011-07-09 01:08:26 +01:00
Makopoppo
04f8d0e45d Made some LSL_Constant or LS_Constant raw int values 2011-07-09 01:08:13 +01:00
root
c920ff9d1d Merge branch 'master' into careminster-presence-refactor 2011-07-09 01:06:46 +01:00
Makopoppo
e7abf834d1 Instance-types-in-list fix for LSL/OSSL functions. This will fix llListFindList() which always returns -1 when you compare with the list from those functions.
*llCSV2List
*llGetAnimationList
*llGetLinkPrimitiveParams
*llGetObjectDetails
*llGetParcelDetails
*llGetParcelPrimOwners
*llGetPrimitiveParams
*GetLinkPrimitiveParamsEx
*osGetAgents
*osMatchString
*osGetLinkPrimitiveParams
*osGetPrimitiveParams
*osGetAvatarList
2011-07-09 00:49:53 +01:00
Justin Clark-Casey (justincc)
d79c6c8820 Rename SetSculptData() to SetSculptProperties(), since this is what it does (setting SculptData is done through the property) 2011-07-09 00:42:48 +01:00
Justin Clark-Casey (justincc)
5e8900dfd0 minor: code tidy and inserted log lines for future use.
Unable to get to the bottom of why resizing a mesh fails to properly reset the physics proxy, when toggling phantom does
After a mesh is generated, the existing sculptdata is set to zero in PrimitiveBaseShape to save memory
When phantom is toggled, the sculptdata is regenerated before remeshing.
But on resize, the sculptdata is not regenerated.
So clearly, resetting sculptdata is possible, but haven't quite been able to pin down how this is being done when phantom is toggled.
2011-07-09 00:35:30 +01:00
Justin Clark-Casey (justincc)
c3d82bdcb1 When loading library asset set, only store an asset if it's different from an existing one with the same id.
We compare existing and loaded asset by doing an SHA1 on both, so that a changed library asset will still update the store.
This cuts asset library load time from 10 seconds to <1 sec.
Note, a fix on the previous commit revealed a bug where a library script cannot be copied except on the first login after a cache clear.
This is unrelated to this commit and needs to be fixed at some subsequent time.
2011-07-08 22:53:19 +01:00
Justin Clark-Casey (justincc)
a048ec3f95 stop the local inventory services connector from logging an error when an item id isn't found.
making this query is legitimate and so the log line can cause false positivies.  It is up to callers to log an error if appropriate.
2011-07-08 22:34:03 +01:00
Justin Clark-Casey (justincc)
192bd1057e fix bug where opening a library script would fail 2011-07-08 22:32:19 +01:00
Justin Clark-Casey (justincc)
5700c582ba refactor: rename bool returning GetAgentInventoryItem() to CanGetAgentInventoryItem() to improve code readability 2011-07-08 22:28:17 +01:00
Justin Clark-Casey (justincc)
e8ad8593b6 refactor: eliminate redundant return statement 2011-07-08 20:58:44 +01:00
Justin Clark-Casey (justincc)
40300c886c refactor: Factor out AddSubMesh() method from long CraeteMeshFromPrimMesher() method
Also remove some of the logging spam left in from the last commit.
2011-07-08 20:36:01 +01:00
Justin Clark-Casey (justincc)
b18ef976ff Fix interpretation of physics mesh proxies from mesh data
As per http://wiki.secondlife.com/wiki/Mesh/Mesh_Asset_Format, some submesh blocks may just have the flag "NoGeometry" to signal that they provide no mesh data.
If a block contains this, ignore it for meshing purposes rather than suffer a ClassCastException
This fixes physics proxy meshing, so you can now walk through mesh doorways, properly stand on the trailer of mesh trucks, etc.
To get mesh physics proxy, the UseMeshiesPhysicsMesh must be true in a [Mesh] config section in OpenSim.ini (example in OpenSimDefaults.ini).
Convex hull physics not currently supported.
2011-07-08 19:43:22 +01:00
Justin Clark-Casey (justincc)
29034bc0e0 minor: code tidy up - remove a couple of Console.WriteLine() accidentally added in the last commit 2011-07-08 18:34:44 +01:00
Justin Clark-Casey (justincc)
36df9ae79a refactor: Separate the OdeScene class into its own file from OdePlugin.cs, to improve code readability 2011-07-08 18:16:48 +01:00
Justin Clark-Casey (justincc)
1dcad4ac66 minor: commented out log lines for future use and very small code tidy 2011-07-08 17:58:01 +01:00
Justin Clark-Casey (justincc)
3bda7711b3 Switch the MeshUploadFlag CAP module on and off with the existing config AllowMeshUpload flag in [Mesh] (in OpenSimDefaults.ini)
Default is on.
2011-07-07 23:49:19 +01:00
Justin Clark-Casey (justincc)
2fbc98fa5c Make MeshUploadFlagModule non-shared rather than shared (since each scene needs its own cap) 2011-07-07 23:37:23 +01:00
Mic Bowman
e91861fff2 Ensure that the max transfer distance is initialized correctly. 2011-07-07 09:12:57 -07:00
Michael Cerquoni aka Nebadon Izumi
4e30361f63 add myself to contributors.txt 2011-07-07 03:30:40 -07:00
Michael Cerquoni aka Nebadon Izumi
281e80ccf3 add MeshUploadFlag capability fixed mesh upload with latest mesh viewer thank you dahlia and lkalif for helping to make this happen! 2011-07-07 03:30:37 -07:00
Melanie
fedfa02b64 Remove another core SNAFU. AbsolutePosition is NOT equal to group position
in attachments! Breaks resizers!!!
2011-07-06 21:20:11 +02:00
Melanie
06d5989f4d Fix parcel prim count and max reporting. Viewer already multiplies. 2011-07-06 09:59:05 +02:00
root
f45746613d Revert "If a user has the rights to edit a parcel's properties, then also allow them always to enter that parcel."
This reverts commit b8e7258051.

Letting this go in would prevent land owners from banning someone who would
have incidental editing rights through a group. The land owner should be the
only unbannable person.
2011-07-05 04:02:16 +01:00
root
47cf9c8fe0 Merge branch 'master' into careminster-presence-refactor 2011-07-05 04:01:59 +01:00
Melanie
719e0702be Merge branch 'careminster-presence-refactor' of ssh://3dhosting.de/var/git/careminster into careminster-presence-refactor 2011-07-05 03:13:39 +02:00
Melanie
30482e7ae5 Don't store the default WL profile. This will prevent "valid" from being
set on the default profile and hopefully finally fix day and night
2011-07-05 03:11:56 +02:00
Melanie
d2fc23c034 Stop displaying "Sending windowslig profile to client" when WL is disabled
or there is no valid WL for that region.
2011-07-05 03:08:36 +02:00
Justin Clark-Casey (justincc)
af8773d6d0 Add TestClearCache() 2011-07-04 23:05:31 +01:00
Justin Clark-Casey (justincc)
cb02fc44f5 add TestExpireAsset() 2011-07-04 23:03:05 +01:00
Justin Clark-Casey (justincc)
f58de55c84 refactor: Move test setup code into setup method 2011-07-04 22:59:36 +01:00
Justin Clark-Casey (justincc)
bebc51a6e0 Make it possible to disable the file part of the flotsam asset cache
This matches the ability to disable the memory part
This is controlled through the FileCacheEnabled parameter in FlotsamCache.ini
Default is true, so existing installations are not affected.
Improved fcache command feedback when various caches are disabled.
Re-enabled test for flotsam cache with file caching disabled.
2011-07-04 22:51:47 +01:00
Justin Clark-Casey (justincc)
5dc785bbf2 refactor: Split file cache manipulation code into separate methods, as has already been done for the memory cache 2011-07-04 22:30:18 +01:00
Justin Clark-Casey (justincc)
46f5893d55 Add basic flotsam asset cache test for retrieved cached asset.
Disabled temporarily since file system caching disrupts subsequent test runs
2011-07-04 21:35:15 +01:00
Justin Clark-Casey (justincc)
b8e7258051 If a user has the rights to edit a parcel's properties, then also allow them always to enter that parcel.
This is patch http://opensimulator.org/mantis/view.php?id=5567
Thanks Snoopy!
2011-07-02 01:14:29 +01:00
Justin Clark-Casey (justincc)
bb4cb16512 Add profile, merge, noassets and skip-assets options for loading/saving oars via RemoteAdmin
This is http://opensimulator.org/mantis/view.php?id=5453
Thanks Michelle Argus!
2011-07-02 01:05:03 +01:00
Justin Clark-Casey (justincc)
513d63455e Create a very basic initial test which just creates an 'npc' and tests that the scene presence exists 2011-07-02 01:01:40 +01:00
Justin Clark-Casey (justincc)
ed12e38480 refactor: simplify existing npc code by creating them directly rather than indirectly via a timer
no obvious reason for doing this asynchonously, especially as the caller was sleeping in order to pick up the response anyway!
2011-07-02 00:18:15 +01:00
Justin Clark-Casey (justincc)
fba961c63f Make default serverside_object_permissions = true since this better matches user expectations.
It also matches the default setting in the OpenSim.ini.example file
2011-07-01 23:06:46 +01:00
Justin Clark-Casey (justincc)
e765759f50 If OpenSim has been built from a git tree, then include version information automatically by dereferencing .git/HEAD
A blank bin/.version file will stop this being displayed.
2011-07-01 22:48:00 +01:00
Justin Clark-Casey (justincc)
759e855566 refactor: rename gitCommitFileName to manualVersionFileName since bin/.version doesn't necessary have to be a git hash 2011-07-01 21:47:30 +01:00
Justin Clark-Casey (justincc)
e41093635a fix build break I just introduced 2011-07-01 21:37:03 +01:00
Justin Clark-Casey (justincc)
9f72fbcb75 Add an async inventory details sender to respond to FetchInventory packets.
If a user with a very large inventory right-clicks on their "My Inventory" folder, viewer 1 code will send a massive number of Fetchinventory requests.
Even though each is handled asynchronously via a pool thread, the sheer frequency of requests overwhelms the pool and freezes inbound packet handling.
This change makes the first Fetchinventory thread also handle subsequent requests, freeing up the other threads.
Further efficiencies could be made by handling all the items in a particular FetchInventory request together, rather than separately.
2011-07-01 21:25:40 +01:00
Justin Clark-Casey (justincc)
2d2c29ef3e Merge branch 'master' of ssh://opensimulator.org/var/git/opensim 2011-06-30 22:41:21 +01:00
Justin Clark-Casey (justincc)
a9b7487fcb improve and tidy up some config file comments 2011-06-30 22:36:41 +01:00
Justin Clark-Casey (justincc)
03feb50a72 minor: adjust some indentation and spacing in OpenSim.ini.example for consistency 2011-06-30 20:26:17 +01:00
dahlia
5c18ebf424 Allow physics proxy generation for meshes using new asset format.
Fix an invalid cast exception while decoding new mesh asset format.
2011-06-29 17:36:41 -07:00
root
5f927dc104 Merge branch 'master' into careminster-presence-refactor 2011-06-30 00:26:03 +01:00
Justin Clark-Casey (justincc)
c84a1bd99f Don't follow inventory links of links.
This is to avoid problems with corrupt inventories where an inventory link target points back at the source's folder
No viewer has been observed to set these up as of yet.  If this ever happens, we will need a more sophisticated solution to track sent folders within the recursion
2011-06-29 01:33:41 +01:00
Justin Clark-Casey (justincc)
1b4c08730e refactor: simplify redundant double containing folder check 2011-06-29 00:56:35 +01:00
Justin Clark-Casey (justincc)
3f0b8db0c1 If an inventory link target is in the same folder as the source, then don't recursively request that folder.
Currently, this should never actually happen but certainly best to handle this case
2011-06-29 00:54:53 +01:00
Justin Clark-Casey (justincc)
22f25fae38 Hack around with the NPC module to get osNpcCreate() partially working again.
This now creates an avatar but appearance is always cloudy.
Move doesn't work.
Really, creating an NPC should only involve a ScenePresence rather than doing anything with IClientAPI, since an NPC has no viewer to communicate with!
2011-06-29 00:28:22 +01:00
Makopoppo
ee92f22f2a [PATCH 2/2] [FIX] osGetPrimitiveParams() and osSetPrimitiveParams()
crashes throwing System.NullReferenceException

Signed-off-by: BlueWall <jamesh@bluewallgroup.com>
2011-06-28 11:48:29 -04:00
Makopoppo
80010f8908 [PATCH] osSetSpeed() will accept float number
Signed-off-by: BlueWall <jamesh@bluewallgroup.com>
2011-06-28 11:48:28 -04:00
Makopoppo
ffa790d69d [PATCH] Get osGetWindParam() and osSetWindParam() accessible
Signed-off-by: BlueWall <jamesh@bluewallgroup.com>
2011-06-28 11:48:28 -04:00
Makopoppo
882d5c82b3 [PATCH 1/2] Fixed the function names of some OSSL functions shown as
threat-level check error message

Signed-off-by: BlueWall <jamesh@bluewallgroup.com>
2011-06-28 11:48:28 -04:00
Makopoppo
e11c959400 [PATCH] Changed Wind parameters default value in OpenSim.ini.example
according to implementation

Signed-off-by: BlueWall <jamesh@bluewallgroup.com>
2011-06-28 11:48:28 -04:00
Justin Clark-Casey (justincc)
36e2054760 minor: temporarily comment out the local status notify friends messages seen on login/logout, since it's a bit noisy on the console.
Please uncomment if/when this is still needed.
2011-06-27 23:12:54 +01:00
Justin Clark-Casey (justincc)
23bf773dea For an initial test, add 64 bit shared object bullet libraries built under Linux. These are not yet hooked up.
I'm not sure which one you actually need, Robert, so please prune as appropriate.  I haven't tested or hooked these up in any way yet.
2011-06-27 00:29:01 +01:00
Justin Clark-Casey (justincc)
698cd0b3c2 Remove the now unused [cms] section from OpenSimDefaults.ini 2011-06-25 01:33:09 +01:00
Justin Clark-Casey (justincc)
5daac0584a Fix bug in reset user password where entering an invalid name would cause an exception. Also, convert this commands log output to console output.
Console output is more appropriate for console commands.  The log only gets one side of the conversation anyway (since it doesn't necessarily record command inputs).
2011-06-25 00:08:14 +01:00
Justin Clark-Casey (justincc)
296774495b Implement "set user level" console command to set the user level (which determines whether a user has a god account)
Adapted from Makopoppo's patch in http://opensimulator.org/mantis/view.php?id=5552.  Thanks!
2011-06-25 00:03:34 +01:00
Justin Clark-Casey (justincc)
56dcc51094 Add a command "show account <first-name> <last-Name>" to the user account service that will show the given user details 2011-06-24 23:54:37 +01:00
Makopoppo
7545692f32 Changed actual default values of 'ServiceConnectorModule' and 'MessagingModule' in [Groups] section in accordance with OpenSim.ini.example descriptions 2011-06-24 22:40:21 +01:00
Oren Hurvitz
0dd3281caf Optionally, don't delete previously compiled scripts on startup 2011-06-24 22:07:20 +01:00
Justin Clark-Casey (justincc)
afb1248e39 Merge branch 'master' of ssh://opensimulator.org/var/git/opensim 2011-06-24 21:57:16 +01:00
Justin Clark-Casey (justincc)
1a0a9d2290 Implement the latest mesh mechanism so that rezzing the uploaded mesh now works again.
Many thanks to the aurora project for pioneering this.
This code is almost certainly not bug free, but it does at least appear to handle simple meshes (except when the viewer crashes - but it is beta!).
2011-06-24 21:54:01 +01:00
BlueWall
1cad116b1d Merge branch 'master' of /home/opensim/src/opensim 2011-06-24 16:33:40 -04:00
BlueWall
75199a0d2c RegionReady Module:
Add notification to neighbors when logins are enabled.
2011-06-24 16:20:13 -04:00
Justin Clark-Casey (justincc)
37a7c16734 minor: method documentation 2011-06-24 21:01:48 +01:00
Justin Clark-Casey (justincc)
de20f0603f Tell hypergridders when their teleports fail because of the 4096 limit rather than just saying "destination not found"
Instead of performing the 4096 check when the region is linked (and subsequently removing the link), leave the link in place and perform the check in the entity transfer module
This allows us to explicitly tell the hypergridder why the teleport failed (region out of range).
It also allows people on regions that are within range (on a large source grid) to teleport.
The Check4096 config parameter in the [GridService] section is replaced by a max_distance paramter in a new [EntityTransfer] section in OpenSimDefaults.ini
Since the parameter is in OpenSimDefaults.ini no action needs to be taken unless you want to increase this limit.  It could also be decreased.
The check is being made in the base entity transfer module, since I believe the viewer problem occurs both on extremely large grids and while hypergridding.
2011-06-24 19:49:05 +01:00
Robert Adams
7974349262 Initial BulletSim.dll commit 2011-06-20 17:28:53 -07:00
Robert Adams
302d72701d BulletSim initial checkin 2011-06-20 17:24:42 -07:00
Melanie
1b7fec0842 Remove friends debug spam 2011-06-20 03:20:32 +02:00
Melanie
f4f55c4d6b Merge branch 'careminster-presence-refactor' of ssh://3dhosting.de/var/git/careminster into careminster-presence-refactor 2011-06-20 03:08:56 +02:00
Melanie
6ae73aea49 Merge branch 'master' into careminster-presence-refactor 2011-06-20 03:11:34 +01:00
Melanie
163ee82168 Add some flags to control content in search better 2011-06-20 02:29:09 +02:00
Diva Canto
7819b4a794 Merge branch 'master' of ssh://opensimulator.org/var/git/opensim 2011-06-16 17:15:12 -07:00
Diva Canto
409738726d Added a couple of guards and warnings to the MapImage/MapImageServiceModule. 2011-06-16 17:14:41 -07:00
Mic Bowman
ad84728aba Add localID to physical object creation functions. 2011-06-15 11:31:32 -07:00
Mic Bowman
29da57e380 Add the PhysActor to the correct SOP when duplicating a physical
prim. Thanks, MisterBlue
2011-06-15 11:26:45 -07:00
Mic Bowman
289c8fe1bc Merge branch 'master' of ssh://opensimulator.org/var/git/opensim 2011-06-15 11:24:29 -07:00
Mic Bowman
7a4fbdac7c Added an expiring cache for region information to the
RemoteGridService connector. Timeout is currently set at five
minutes. Negative results are not cached.

The result is that operations like send an instant message do
not have to go through the grid service every time.
2011-06-15 11:22:51 -07:00
Diva Canto
5b7ab50319 Merge branch 'master' of ssh://opensimulator.org/var/git/opensim 2011-06-15 11:11:54 -07:00
Diva Canto
bbe489e64a Added missing config var for map image service. 2011-06-15 11:11:14 -07:00
Justin Clark-Casey (justincc)
603dbea190 tweak messages. Make verbose inventory item save message give the item name as well as item id and asset id 2011-06-14 00:51:18 +01:00
Diva Canto
822b9e085f Added SimulatorFeatures capability. Thanks Aurora devs for the bootstrap on the contents of the response.
Changed the experimental capability introduced a couple of commits ago: now sending that extra information as part of the response in the SimulatorFeatures cap.
2011-06-13 10:21:29 -07:00
Diva Canto
c62ccc75a1 Merge branch 'master' of ssh://opensimulator.org/var/git/opensim 2011-06-13 09:14:17 -07:00
Diva Canto
ecb28ae130 V2 map now working in grids too. WARNING: A few visible configuration variables added in order for this to work. See .ini.example changes 2011-06-13 09:13:44 -07:00
Diva Canto
ab11835aeb Same processing of the "/" in the MapImageService Cap as the one in the login service. 2011-06-13 07:59:28 -07:00
Diva Canto
0e4db3ca39 Added experimental new capability URL called MapImageService meant to work with Kokua viewer if devs are willing to do it. 2011-06-13 07:56:52 -07:00
Melanie
9b1d3f0c38 Merge branch 'master' into careminster-presence-refactor 2011-06-13 12:38:17 +01:00
Michael Cerquoni aka Nebadon Izumi
dc978d02a7 match water color for warp3d map tiler and adjust lighting 2011-06-13 12:37:43 +01:00
Diva Canto
4b9de140ab Add credit and link to SimianGrid project. Thanks, guys! 2011-06-12 22:25:30 -07:00
Diva Canto
95e050130c People are bound to forget the '/' at the end of MapTileURL, so let's correct that from the inside. 2011-06-12 22:10:16 -07:00
Diva Canto
2e77518c6d bit depth: 24!!! begeez! -- zoom levels work now. 2011-06-12 21:51:26 -07:00
Diva Canto
07d7c1cd2d Trailing / in MapTileURL must be there! 2011-06-12 18:29:44 -07:00
Diva Canto
78c16da544 A few bug fixes on map V2. Zoom level weirdness still there. 2011-06-12 17:05:45 -07:00
Diva Canto
fd57c91b4a First pass at making the V2 map work. Standalones only for now. There are some issues with the zoom level -- TBD. 2011-06-12 15:37:42 -07:00
Diva Canto
06e254c392 A few more cleanups on the way to close http://opensimulator.org/mantis/view.php?id=5516 once and for all. Moral of the story: don't send AgentOnline/Offline to viewers with a zero-length array. 2011-06-11 17:48:19 -07:00
Diva Canto
e1ca77a0db Only send AgentOnline to the client if the friendsOnline list has elements. Also, increased the timeout on UserAgentServiceConnector, StatusNotification again. 2011-06-11 17:22:35 -07:00
Diva Canto
d992779397 Switched order of SQL statements in Friends migration -- resulted in the wrong key 2011-06-11 09:36:57 -07:00
Melanie
a1c16a4200 Merge branch 'master' into careminster-presence-refactor 2011-06-11 12:08:02 +01:00
Diva Canto
e07d71d298 Added a Sleep in between each site call, to slow the xml-rpc requests down. 2011-06-10 21:17:34 -07:00
Diva Canto
5f311c91c7 More tweaking on the UserAgentServiceConnector: add constructor that does not do DNS lookup, and use that for friends notification. 2011-06-10 21:07:50 -07:00
Diva Canto
0ae022d688 Decreased timeout of HG StatusNotification to 4secs. http://opensimulator.org/mantis/view.php?id=5516 2011-06-10 20:59:57 -07:00
Diva Canto
487cb51f69 3rd way of reseting the HG Map. This time, don't use the grid service; instead keep track of which map blocks each client has seen in the region, and reset exactly those when the client closes. 2011-06-10 17:22:17 -07:00
Justin Clark-Casey (justincc)
9a62bfab0e If the flotsam asset cache console command "fcache clear" is specified on its own, clear both memory and file caches 2011-06-11 00:50:20 +01:00
Justin Clark-Casey (justincc)
39e878eb8f Align CenomeCache.ini.example values with CenomeCache defaults. 2011-06-11 00:35:31 +01:00
Justin Clark-Casey (justincc)
c7cef650db Make it clear that WaitOnInprogressTimeout is currently a dead setting in FlotsamCache.ini.example 2011-06-11 00:10:40 +01:00
Justin Clark-Casey (justincc)
b13b54c526 Make the internal flotsam asset cache defaults match config-include/FlotsamCache.ini.example. Enable the flotsam console commands even if FlotsamCache.ini isn't present.
For the most part, defaults are made to match those already in FlotsamCache.ini.example.
The one exception is that the 48 hour file timeout from the code is used instead of the 0 hours that was in the example file.  This can be tweaked if necessary.
Most importantly, the default cache directory is now ./assetcache (as in FlotsamCache.ini.example) rather than ./FlotsamAssetCache (as was the internal code default).
Therefore, if you were using flotasm without using the config file, then please rename your cache directory or start using the ini file and change the default there if you want to keep using your existing cache.
2011-06-11 00:04:21 +01:00
Justin Clark-Casey (justincc)
fc7e17baf7 When serializing objects, stop accidentally using the green text colour value for alpha
This addresses http://opensimulator.org/mantis/view.php?id=5111
2011-06-10 21:49:25 +01:00
Makopoppo
c7bdb66a1f Added missing "Old Guids=true" to ConnectionString 2011-06-10 21:10:37 +01:00
Oren Hurvitz
804fe2d9b0 Save the sun's position in OARs 2011-06-10 20:55:58 +01:00
Justin Clark-Casey (justincc)
08db3c5a8e Merge branch 'master' of ssh://opensimulator.org/var/git/opensim 2011-06-10 20:42:15 +01:00
Justin Clark-Casey (justincc)
b5518dc906 minor: Add some commented out destructor logging messages for potential future use.
At the moment, client and scene objects are being garbage collected as expected, at least in simple scenarios.
2011-06-10 20:40:14 +01:00
Diva Canto
eeac2275c9 Merge branch 'master' of ssh://opensimulator.org/var/git/opensim 2011-06-10 09:17:06 -07:00
Diva Canto
98d1e7768a New method for resetting the map on HG: do it only once upon changing grids, and reset only exactly the map blocks that had regions in them. WARNING: this fetches all the regions from the Grid service, so there is a chance that this is a really bad idea in large grids. Pushing it for testing. 2011-06-10 09:16:43 -07:00
dahlia
387b228d68 partial update for new mesh asset format - handle both old and new formats for physics mesh 2011-06-10 00:38:38 -07:00
Justin Clark-Casey (justincc)
9149ef6c89 For MySQL, migrate region tables to the MyISAM storage engine rather than InnoDB
Using MyISAM proves vastly faster for persisting scene objects.
For instance, a scene object that took 9 seconds to persist before now takes 1.  This also improves the experience of loading large OARs.
We don't use any of the transactional features of InnoDB.
The only thing that may have an impact is that InnoDB does row locking on inserts while MyISAM does table locking.
However, field reports say there is no noticeable difference.
2011-06-10 02:33:50 +01:00
Justin Clark-Casey (justincc)
d780500c58 Merge branch 'master' of ssh://opensimulator.org/var/git/opensim 2011-06-10 02:29:30 +01:00
Justin Clark-Casey (justincc)
2bc8dcfdbd minor: add method doc to make it clear that click action is fired when the click action is changed, not when a prim is clicked 2011-06-10 02:27:45 +01:00
Diva Canto
8d3a8a0a81 The map breakage is actually at 2048! 2011-06-09 16:51:47 -07:00
Diva Canto
e3e1f6308d Change the name of the newest command to "show names" so that it doesn't conflict with the existing "show users" 2011-06-09 16:11:47 -07:00
Diva Canto
4cf60c5d9d Removing special casing on failures. This may also fix reports of this issue:
22:07:53 - [USER AGENT CONNECTOR]: remote call to http://hg.osgrid.org:80/ returned an error: Requested method [locate_user] from 127.0.0.1 threw exception: Object reference not set to an instance of an object   at OpenSim.Services.HypergridService.UserAgentService.LocateUser (UUID userID) [0x00000] in <filename unknown>:0
2011-06-08 19:51:48 -07:00
Melanie
326c46ba70 Merge branch 'master' into careminster-presence-refactor 2011-06-09 02:05:04 +01:00
Diva Canto
49e4e53928 Consistency fix on the last commit. 2011-06-08 16:41:58 -07:00
Diva Canto
2a46f756d6 Fixed a compilation problem. Also added a lengthy comment on the Map hack, so that it never goes unnoticed again. 2011-06-08 16:38:25 -07:00
Diva Canto
1bd712c541 Reverting the [HG]MapModule to its buggy behavior above 4096. Ppl seem to prefer the color blue, and I have given up trying to make things work above 4096.
Revert "Improved reuse on the WorldMap/WorldMapModule.cs"

This reverts commit d473d9975e.
2011-06-08 16:12:47 -07:00
Diva Canto
80fc607d75 Fixed "Unknown User" listed as creator/owner on prims created with the Build button by foreign visitors. Added command to the UserManagementModule to list all the known bindings between user UUIDs and their names: show user-names. 2011-06-08 16:01:33 -07:00
Diva Canto
9759b2a4bb Added EventManager.OnPrimsLoaded, an event that modules can hook up onto so that they know when the scene's objects have been loaded from the DB. 2011-06-08 15:18:14 -07:00
Diva Canto
90f657d77d Deleted wrong debug message. 2011-06-08 13:45:38 -07:00
Oren Hurvitz
61f1c2b2c5 Write estate errors on startup to the log 2011-06-07 20:20:04 -07:00
Oren Hurvitz
39323055bd When a plugin fails to load because a DLL is missing, log which DLL it is 2011-06-07 20:17:49 -07:00
Diva Canto
eabfc9ca15 Added error message to help understand http://opensimulator.org/mantis/view.php?id=5527 2011-06-07 20:05:24 -07:00
Diva Canto
3307db5d4a This hopefully fixes all issues with online/offline notifications across grids. http://opensimulator.org/mantis/view.php?id=5528 2011-06-07 19:36:04 -07:00
Diva Canto
02b40670be This makes the display names work better for foreigners 2011-06-07 12:10:57 -07:00
Diva Canto
41627bdf8a Remove scary error message 2011-06-07 12:09:32 -07:00
Diva Canto
f5d82350bb This fixes the crash reported in http://opensimulator.org/mantis/view.php?id=5529 related to sending IMs to foreign friends who are offline. Hopefully. 2011-06-07 10:51:12 -07:00
Diva Canto
1a23d322ac More on the hunt for the slow down on HGFriendsModule. - Don't requests the online friends on foreign grids. If this works, there's another way of getting that info. 2011-06-06 19:52:50 -07:00
Diva Canto
dce0e46eaa Moved the Mono Addins declaration of the HGFriendsModule to where the one for FriendModule is -- CoreModulePlugin.addin.xml (trying to hunt down the slowness reported by Nebadon related to HGFriends) 2011-06-06 18:20:02 -07:00
Diva Canto
e77ca65e57 This should make offline IMs work again. It should work for incoming foreign IMs where the local recipient is offline. I can't test any of this, because I don't run an offline IM server. 2011-06-06 17:46:34 -07:00
Diva Canto
6861606b6d Narrow down the exception catching to exactly the exception of interest. This may decrease the time of processing prims with broken user data. 2011-06-05 19:46:29 -07:00
Diva Canto
78e76bba38 Removed unused dependency (that happened to have the wrong path) 2011-06-05 18:50:21 -07:00
Melanie
a41051f1dd Make the last otem in a list created with llCSV2List findable 2011-06-05 17:08:21 +02:00
Justin Clark-Casey (justincc)
205b2f7ea4 Remove the unmaintained 'CMS' framework, which was really a 'source-control' experiment from 2008.
This hasn't been touched for about 2 years and I haven't being using it.  If this is wrong then please let me know.
2011-06-04 03:01:52 +01:00
Justin Clark-Casey (justincc)
fe471b6424 Extend TestGiveInventoryFolder() to test giving back the freshly received folder 2011-06-04 02:44:53 +01:00
Justin Clark-Casey (justincc)
12b1cbf8bf Fix give inventory tests to use different users rather than (accidentally) the same user. Extend TestGiveInventoryItem() to test giving back the same item. 2011-06-04 02:39:26 +01:00
Justin Clark-Casey (justincc)
fe890554fb insert an InventoryArchiveUtils.FindItemsByPath() to return multiple items rather than just the first one 2011-06-04 01:37:01 +01:00
Justin Clark-Casey (justincc)
896f039513 create TestGetInventoryItem() 2011-06-04 00:51:49 +01:00
Justin Clark-Casey (justincc)
1543fd7fff extend TestGiveInventoryFolder() to check for the receipt by user 2 2011-06-04 00:20:54 +01:00
Justin Clark-Casey (justincc)
66004a9375 If an llSensor() is in an attachment, make the detection cone face in the direction of the avatar, not the relative rotation of the attachment towards the avatar.
This is effectively a copy/paste from 459323a, which should be refactored sometime.
This seems the obvious problem from field reports but I have not tested the fix myself.  Feedback welcome.
2011-06-03 23:43:09 +01:00
Justin Clark-Casey (justincc)
d09210da86 minor: add in method print out to new test 2011-06-03 23:15:31 +01:00
Justin Clark-Casey (justincc)
527e10a04e add stub UserInventoryTests.GiveInventoryFolder(). Not yet complete 2011-06-03 23:13:05 +01:00
Diva Canto
cf86ba5559 Added prefix HG to the name of the landmark item in inventory, as a soft reminder that the landmark belongs to a place in another grid. People can change the name, but that's their decision. 2011-06-03 11:48:24 -07:00
Diva Canto
623706d988 HG Landmarks bug fix: pull landmark asset data from user's asset server when user is traveling. 2011-06-03 11:33:44 -07:00
Diva Canto
fde3e704d3 oops 2011-06-03 10:50:55 -07:00
Diva Canto
4ea89f39f2 Merge branch 'master' of ssh://opensimulator.org/var/git/opensim 2011-06-03 10:32:21 -07:00
Diva Canto
7772640ae8 .ini.example's updated for HG Landmarks 2011-06-03 10:29:59 -07:00
Diva Canto
e33cedfd42 HG Landmarks now working. 2011-06-03 10:26:58 -07:00
Diva Canto
995b893e4c HG Landmarks being created. WARNING: new config var under [HGInventoryAccessModule], Gatekeeper. 2011-06-03 09:04:34 -07:00
Diva Canto
76c60f1f99 Moved CreateNewInventoryItem to the InventoryAccessModule in preparation for supporting HG landmarks. 2011-06-03 08:27:01 -07:00
Justin Clark-Casey (justincc)
dfa4442319 Move the "!!!Standalone Only!!!" [FreeswitchService] section from OpenSim.ini.example to config/StandaloneCommon.ini.example where it belongs. 2011-06-02 22:43:44 +01:00
Justin Clark-Casey (justincc)
b8e2ee6978 Merge branch 'master' of ssh://opensimulator.org/var/git/opensim 2011-06-02 21:48:50 +01:00
Justin Clark-Casey (justincc)
b000d4f67f minor: add ini.example doc to hint that the server address in [FreeswitchService] must be reachable by viewers 2011-06-02 21:37:17 +01:00
Diva Canto
2a12d143c2 HG IM: increase the timeout value 2011-06-02 10:44:10 -07:00
Diva Canto
6312eea459 HG IM bug fix: grid_instant_message was being placed in the default port instead of the specified one. 2011-06-02 10:14:26 -07:00
Melanie
458a8c6d0b Persist Buoyancy in inventory 2011-06-02 18:44:51 +02:00
Diva Canto
65c71050cc Extra debug message 2011-06-02 09:39:29 -07:00
Diva Canto
3c15c0b264 Added test IM client. 2011-06-02 09:39:09 -07:00
Melanie
61bf2bf2dd Make Buoyancy a prim property 2011-06-02 18:32:25 +02:00
Diva Canto
4696a9c95e Bug fix on HG IM. 2011-06-02 08:13:54 -07:00
Diva Canto
f2f30a7890 HG Friends bug fix: connector was shrinking principalID to UUID. 2011-06-02 07:26:40 -07:00
Diva Canto
c13acdf5a1 This is the better solution: make the combined key be only on the first 36 characters of each field -- that's the UUIDs. Thanks coyled. WARNING: Again, people who have gone through this migration and failed need to run it manually. 2011-06-01 20:19:22 -07:00
Diva Canto
43ecc46a22 It looks like there's a better solution for that problem.
Revert "Changed Friends table to have 165-sized varchars on PrincipalID and FriendID. The reason for this number is the following: there is a combined key of these 2 fields; apparently MySql can't handle keys larger than 1000 bytes; when the table is created with utf8 encoding, this combined key is bigger than 1000 bytes, and the migration fails. WARNING: this is not a new migration! People who have gone through this migration and failed should update the sizes of these fields manually."

This reverts commit 3fa54a156a.
2011-06-01 20:09:59 -07:00
Diva Canto
3fa54a156a Changed Friends table to have 165-sized varchars on PrincipalID and FriendID. The reason for this number is the following: there is a combined key of these 2 fields; apparently MySql can't handle keys larger than 1000 bytes; when the table is created with utf8 encoding, this combined key is bigger than 1000 bytes, and the migration fails. WARNING: this is not a new migration! People who have gone through this migration and failed should update the sizes of these fields manually. 2011-06-01 20:02:26 -07:00
Diva Canto
46cdd442a8 [Profiles] --> [Profile] 2011-06-01 18:18:31 -07:00
BlueWall
777f57d946 Re-Apply Use current TravelingAgent if the the login failure reason is "Logins Disabled" to fix NullReferenceException, allowing agent to login to fallback region when logins are disabled by "StartDisabled = true" or when logins are disabled by RegionReady""
This reverts commit 0a430bbffb.
2011-06-01 18:47:06 -04:00
BlueWall
0a430bbffb Revert "Use current TravelingAgent if the login failure reason is "Logins Disabled" to fix NullReferenceException, allowing agent to login to fallback region when logins are disabled by "StartDisabled = true" or when logins are disabled by RegionReady"
This reverts commit 4b9e446c62.
2011-06-01 18:10:56 -04:00
BlueWall
ac4d080aaf Merge branch 'master' of ssh://opensimulator.org/var/git/opensim 2011-06-01 17:01:40 -04:00
BlueWall
984b801dd9 Merge branch 'master' of /home/opensim/src/opensim 2011-06-01 17:01:08 -04:00
BlueWall
4b9e446c62 Use current TravelingAgent if the login failure reason is "Logins Disabled" to fix NullReferenceException, allowing agent to login to fallback region when logins are disabled by "StartDisabled = true" or when logins are disabled by RegionReady 2011-06-01 16:57:01 -04:00
Makopoppo
b0ed0e63dc Adding boolean alias for commandline switches like -save_crashes=yes 2011-06-01 21:14:16 +01:00
Makopoppo
54096db30b Fix: The command line switches 'save_crashes' and 'crash_dir' haven't actually worked 2011-06-01 21:06:43 +01:00
Chris Hart
5fb0455e92 Updates to MSSQL to most recent compatibility, also included Windlight support. Needs plenty of testing but clean install and migration from 0.6.9 have been tested and work, a few indexes still need to be added for performance. 2011-06-01 21:01:04 +01:00
Justin Clark-Casey (justincc)
a3e0895f12 a few minor formatting tweaks 2011-06-01 20:55:03 +01:00
James Stallings aka Hiro Protagonist
c43ad8a0e7 A final couple of tweaks to GroupsModule.cs. Remove unneeded delegate, and prettify codeing style/formatting 2011-06-01 20:51:52 +01:00
Justin Clark-Casey (justincc)
8bacf56e46 revert the prematurely included groups patch, yet again 2011-06-01 20:51:38 +01:00
BlueWall
929bdba346 Merge branch 'master' of /home/opensim/src/opensim 2011-06-01 13:47:38 -04:00
BlueWall
aed6e74080 Add alternate region handling for url based logins as found in login to "home" or "last" 2011-06-01 13:44:20 -04:00
Justin Clark-Casey (justincc)
5711ada5c9 Fix dumb sql mistake in MSSQLGenericTableHandler.Delete() 2011-05-31 22:42:18 +01:00
Justin Clark-Casey (justincc)
c67fa72d56 When sending an LLUDP MoneyBalanceReply message, fill out the transaction item description even though there is none.
This is to deal with a problem in libomv where calling ToBytes() without this crashes because of an ItemDescription.Lnegth dereference.
2011-05-31 19:57:08 +01:00
Justin Clark-Casey (justincc)
8129e64e2a Fill in the new OwnerData field in the LLUDP ScriptDialog message.
If we don't do this then viewer 2.8 crashes.
Resolves http://opensimulator.org/mantis/view.php?id=5510
2011-05-31 19:25:01 +01:00
Justin Clark-Casey (justincc)
392d270264 revert the patch that accidentally got added in the last commit 2011-05-31 18:49:38 +01:00
Justin Clark-Casey (justincc)
c4b265aeae update libomv libraries to 0.9.0
this is a prerequisite to fixing llDialog issues for the latest Linden viewers, since they are now making use of a new OwnerData field in the ScriptDialog message
2011-05-31 18:47:13 +01:00
Diva Canto
44371118a2 Made GetMapImage public in the Hyperlinker 2011-05-30 20:23:45 -07:00
Diva Canto
b81a304baa Made the GatekeeperConnector a public property. 2011-05-30 20:12:05 -07:00
Diva Canto
e14b7ec9e1 HGWorldMap: don't send map blocks of hyperlinks that are farther than 4096 cells from the current region. 2011-05-30 17:19:46 -07:00
Diva Canto
d473d9975e Improved reuse on the WorldMap/WorldMapModule.cs 2011-05-30 17:15:55 -07:00
Makopoppo
7ea6dfecd9 Adding MSSQL connectionString example 2011-05-30 23:22:52 +01:00
Makopoppo
d671dbb7c7 Removing mssql_connection.ini.example - mssql_connection.ini is no longer used 2011-05-30 23:22:49 +01:00
Diva Canto
5cb7d8bc71 Merge branch 'master' of ssh://opensimulator.org/var/git/opensim 2011-05-28 13:52:27 -07:00
Diva Canto
d5326197ac Fixed an issue with the response of CreateAgent over the SimulationConnector. 2011-05-28 13:52:06 -07:00
BlueWall
16fae059bb Comment the alert_uri so it remains disabled until set 2011-05-28 16:40:05 -04:00
BlueWall
3326e417b4 Merge branch 'master' of /home/opensim/src/opensim 2011-05-28 16:21:30 -04:00
BlueWall
c7e18f9017 Adding an event to signal that logins are enabled
Added an event to signal the eabling of logins and added an alert to send to a configured service.
2011-05-28 16:20:10 -04:00
BlueWall
d2c2a4301b Merge branch 'master' of /home/opensim/src/opensim 2011-05-28 00:39:21 -04:00
BlueWall
99f42c0a6e Add option to disable logins
This just covers script loading for now. More to come.
2011-05-28 00:35:06 -04:00
Justin Clark-Casey (justincc)
6f4a2685cf minor: remove mono compiler warning 2011-05-27 23:43:31 +01:00
Justin Clark-Casey (justincc)
28cd03cda5 fix bug where generic sqlite table delete wasn't working.
this would have caused dupe links bugs when using the sqlite adaptor
2011-05-27 22:54:59 +01:00
Diva Canto
44d5821c4e Fixed one comment in a config file. 2011-05-27 13:35:22 -07:00
Justin Clark-Casey (justincc)
b0c9696de0 Merge branch 'master' of ssh://opensimulator.org/var/git/opensim 2011-05-27 21:21:01 +01:00
Justin Clark-Casey (justincc)
e9988a3728 Make sure culture is en-US when saving archive related xml.
This might resolve http://opensimulator.org/mantis/view.php?id=5475
2011-05-27 21:19:20 +01:00
Diva Canto
fcef4688a8 Merge branch 'master' of ssh://opensimulator.org/var/git/opensim 2011-05-27 13:07:39 -07:00
Diva Canto
76525be7b2 HG lures working! Friends can offer friends HG teleports via the profile. WARNING: additional configuration for HG inis -- see *Common.ini.example 2011-05-27 13:07:18 -07:00
Justin Clark-Casey (justincc)
4e4db749eb If parsing fails in the primitive base shape (which prints out a debug log message), also print out the name and uuid of the part containing this shape.
This is to help in diagnosing parsing failures.
2011-05-27 20:59:35 +01:00
Justin Clark-Casey (justincc)
0af5bb239f When saving an iar, don't chase down link asset IDs (since these points to other items rather than real assets)
This bug had no practical effect other than to make "save iar" misreport the number of missing assets
2011-05-27 19:39:03 +01:00
Diva Canto
4087a453dc Avoid a scary warning message about null replies from the user agent service. 2011-05-27 08:53:26 -07:00
Diva Canto
d60f525baa HG inventory transfers over the profile working. 2011-05-27 08:19:40 -07:00
Diva Canto
36f9d55c36 Added a BasicProfilemodule so that the profile-based actions (like give inventory, etc) work. This is just a mock profile, the same for all users, and with no DB backend behind it -- meaning that nothing will be saved. For serious profiles, use 3rd party implementations. 2011-05-27 07:00:36 -07:00
Diva Canto
31d07859f9 Added missing config vars to StandaloneCommon.ini.example and fixed the ones in Robust.HG.ini.example 2011-05-26 19:43:24 -07:00
Diva Canto
abae859e7a Added missing configuration variables to Robust.HG.ini.example 2011-05-26 19:20:29 -07:00
Diva Canto
07acb4d321 Last commit before pushing. WARNING: (a) DB migration on the friends table; and (b) several config additions related to HG. See Robust.HG.ini.example, GridCommon.ini.example and/or StandaloneCommon.ini.example. 2011-05-26 19:15:39 -07:00
Diva Canto
0d29f73916 Commented a few extra debug messages. 2011-05-26 19:13:03 -07:00
Melanie
f02fbdbc68 Merge branch 'master' into careminster-presence-refactor 2011-05-27 01:10:02 +01:00
Melanie
5cbb203efb Merge branch 'careminster-presence-refactor' of ssh://melanie@3dhosting.de/var/git/careminster into careminster-presence-refactor 2011-05-27 01:05:02 +01:00
Diva Canto
b17afe43c4 Merge branch 'master' of ssh://opensimulator.org/var/git/opensim 2011-05-26 15:52:34 -07:00
Diva Canto
0c58a9e680 HG IM in grid mode working fairly well. Unknown target user references looked back in source user's User Agent service. 2011-05-26 10:04:48 -07:00
Melanie
3e54aad76c Merge branch 'careminster-presence-refactor' of ssh://3dhosting.de/var/git/careminster into careminster-presence-refactor 2011-05-26 16:29:45 +02:00
Melanie
4d324f1b74 Change setter on changed flags to public so modules can reset it 2011-05-26 16:29:00 +02:00
Tom
03525959c9 Merge branch 'careminster-presence-refactor' of ssh://3dhosting.de/var/git/careminster into careminster-presence-refactor 2011-05-26 03:42:45 -07:00
Tom
b000d9ba72 Some additional protection, it seems that responsedata needs to be locked, but I can't immediately see where it's being accessed from another thread. For now, this will protect the server 2011-05-26 03:42:01 -07:00
Justin Clark-Casey (justincc)
91ec1a572a improve help information for "appearance show"
at the moment, this just performs a baked avatar check for everybody in the region.  If the check returns 'corrupt' then a baked texture is missing and other avatars will continue to see the gas ball.
2011-05-26 02:48:47 +01:00
Justin Clark-Casey (justincc)
3270f4353e Add --noassets option for "save iar"
Like "save oar", this saves an iar without assets
This can be useful for backup when you know the required assets will still be present (e.g. you're backing up the assets db separately).
This also bumps the iar format version to 0.3 and 1.2 respectively.
0.3 is backward compatible with previous opensim versions
1.2 is used if the --profile switch is specified.  It is only compatible with 0.7.1 presently.
2011-05-26 02:22:52 +01:00
Justin Clark-Casey (justincc)
c7e46e8a51 Bump OAR file format version up to 0.7 for this development cycle.
This adds a <assets_included>true|false</assets_included> element to the oar control file, though this is not used on reloading at this time.
This addition is backward compatible with previous opensim releases
2011-05-26 01:37:15 +01:00
Justin Clark-Casey (justincc)
ab855e6f8d fix bug where outfit folder links could not be deleted 2011-05-26 01:32:36 +01:00
Justin Clark-Casey (justincc)
d9889ae2e7 Merge branch 'master' of ssh://opensimulator.org/var/git/opensim 2011-05-26 01:28:48 +01:00
Justin Clark-Casey (justincc)
6f4d079fc5 Add a --noassets option to "save oar".
This switch stops any assets being saved in the oar.
This can be useful if you're using OAR to backup regions and you know you'll always have the original asset database available.
2011-05-26 01:27:01 +01:00
Diva Canto
587b17e23b HG: Renamed, shuffled some interfaces around. Move them all to IHypergridServices. 2011-05-25 12:37:37 -07:00
Diva Canto
5c2168cae7 HG: Instant Message working. Tested on HG standalones only. Needs a lot more testing. 2011-05-25 12:32:21 -07:00
Melanie
38ef8ba430 Merge branch 'master' into careminster-presence-refactor 2011-05-25 12:17:59 +01:00
Melanie
e398c33648 Add PayPrice to serialization format Xml2 2011-05-25 12:17:46 +01:00
Melanie
932db1c374 Add PayPrice to serialization format Xml2 2011-05-25 11:30:21 +02:00
BlueWall
ef3f6b4e63 Revert "Make client event handlers for money only work on root agents"
This reverts commit a8913141c0.

	Pulling this back until some testing under various money
	modules can be done. Need to be able to make purchases as
	a child agent.
2011-05-24 16:33:51 -04:00
BlueWall
a8913141c0 Make client event handlers for money only work on root agents 2011-05-24 16:07:48 -04:00
Diva Canto
e19031849e Added necessary code to drop inventory on hg friends using the profile window, but can't test because this mechanism doesn't seem to work without a profile service. 2011-05-24 09:38:03 -07:00
Melanie
1b106c3928 Merge branch 'master' into careminster-presence-refactor 2011-05-24 04:04:16 +01:00
Melanie
28c25d8477 Allow disabling the legacy backup mechanism to avoid the object clone if
backup is not used.
2011-05-24 04:03:51 +01:00
Diva Canto
24f28d3534 HG friends: Status notifications working. Also initial logins get the online friends in other grids. 2011-05-23 19:45:39 -07:00
Diva Canto
336665e035 More on HG Friends. Added Delete(string, string) across the board. Added security to friendship identifiers so that they can safely be deleted across worlds. Had to change Get(string) to use LIKE because the secret in the identifier is not always known -- affects only HG visitors. BOTTOM LINE SO FAR: HG friendships established and deleted safely across grids, local rights working but not (yet?) being transmitted back. 2011-05-22 16:51:03 -07:00
Diva Canto
fed3cc630e File to be removed 2011-05-22 15:35:40 -07:00
Diva Canto
58c53c41de Fixed permissions bug related to friends in PermissionsModule. Added FriendsData[] GetFriends(string principalID) to IFriendsData and FriendInfo[] GetFriends(string PrincipalID) to IFriendsService. Refactored some more in the FriendsModule. Made client get notification of local friends permissions upon HGLogin. HG Friends object permissions work. 2011-05-21 16:48:00 -07:00
Diva Canto
80457111e0 Merge branch 'master' of ssh://opensimulator.org/var/git/opensim 2011-05-21 14:07:30 -07:00
Diva Canto
d21e9c755f HG Friends working to some extent: friendships offered and accepted correctly handled. Friends list showing correct foreign names. TODO: GrantRights. 2011-05-19 16:54:46 -07:00
541 changed files with 42354 additions and 29951 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

@@ -8,6 +8,7 @@
<target name="distbin">
<copy file="bin/OpenSim.ini.example" tofile="bin/OpenSim.ini"/>
<copy file="bin/config-include/StandaloneCommon.ini.example" tofile="bin/config-include/StandaloneCommon.ini"/>
<copy file="bin/config-include/FlotsamCache.ini.example" tofile="bin/config-include/FlotsamCache.ini"/>
<delete dir="${distbindir}"/>
<copy todir="${distbindir}">
<fileset>
@@ -111,6 +112,11 @@
</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" />
@@ -297,12 +303,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" />

View File

@@ -5,7 +5,7 @@ for your effort!)
These folks represent the current core team for OpenSim, and are the
people that make the day to day of OpenSim happen.
* justincc
* justincc (OSVW Consulting, justincc.org)
* chi11ken (Genkii)
* dahlia
* Melanie Thielker
@@ -14,6 +14,9 @@ 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)
= Core Developers Following the White Rabbit =
Core developers who have temporarily (we hope) gone chasing the white rabbit.
@@ -100,6 +103,7 @@ what it is today.
* lulurun
* M.Igarashi
* maimedleech
* Mana Janus
* Mic Bowman
* Michelle Argus
* Michael Cortez (The Flotsam Project, http://osflotsam.org/)
@@ -111,10 +115,14 @@ what it is today.
* Mircea Kitsune
* mpallari
* MrMonkE
* Nebadon Izumi (Michael Cerquoni - http://OSgrid.org)
* Neil Canham
* nornalbion
* Omar Vera Ustariz (IBM)
* openlifegrid.com
* Oren Hurvitz (Kitely)
* otakup0pe
* Pixel Tomsen
* ralphos
* RemedyTomm
* Revolution
@@ -127,7 +135,7 @@ what it is today.
* Salahzar Stenvaag
* sempuki
* SignpostMarv
* Snoopy
* 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++)
@@ -186,35 +198,5 @@ namespace OpenSim.ApplicationPlugins.LoadRegions
return true;
}
public void LoadRegionFromConfig(OpenSimBase openSim, ulong regionhandle)
{
m_log.Info("[LOADREGIONS]: Load Regions addin being initialised");
IRegionLoader regionLoader;
if (openSim.ConfigSource.Source.Configs["Startup"].GetString("region_info_source", "filesystem") == "filesystem")
{
m_log.Info("[LOADREGIONS]: Loading Region Info from filesystem");
regionLoader = new RegionLoaderFileSystem();
}
else
{
m_log.Info("[LOADREGIONS]: Loading Region Info from web");
regionLoader = new RegionLoaderWebServer();
}
regionLoader.SetIniConfigSource(openSim.ConfigSource.Source);
RegionInfo[] regionsToLoad = regionLoader.LoadRegions();
for (int i = 0; i < regionsToLoad.Length; i++)
{
if (regionhandle == regionsToLoad[i].RegionHandle)
{
IScene scene;
m_log.Debug("[LOADREGIONS]: Creating Region: " + regionsToLoad[i].RegionName + " (ThreadID: " +
Thread.CurrentThread.ManagedThreadId.ToString() + ")");
openSim.CreateRegion(regionsToLoad[i], true, out scene);
}
}
}
}
}

View File

@@ -41,7 +41,6 @@ using OpenMetaverse;
using OpenSim;
using OpenSim.Framework;
using OpenSim.Framework.Communications;
using OpenSim.Framework.Console;
using OpenSim.Framework.Servers;
using OpenSim.Framework.Servers.HttpServer;
@@ -67,21 +66,11 @@ namespace OpenSim.ApplicationPlugins.RemoteController
private IConfig m_config;
private IConfigSource m_configSource;
private string m_requiredPassword = String.Empty;
private HashSet<string> m_accessIP;
private string m_name = "RemoteAdminPlugin";
private string m_version = "0.0";
//guard for XmlRpc-related methods
private void FailIfRemoteAdminDisabled(string requestName)
{
if (m_config == null)
{
string errorMessage = String.Format("[RADMIN] {0}: Remote admin request denied! Please set [RemoteAdmin]enabled=true in OpenSim.ini in order to enable remote admin functionality", requestName);
m_log.Error(errorMessage);
throw new ApplicationException(errorMessage);
}
}
public string Version
{
get { return m_version; }
@@ -115,6 +104,20 @@ namespace OpenSim.ApplicationPlugins.RemoteController
m_requiredPassword = m_config.GetString("access_password", String.Empty);
int port = m_config.GetInt("port", 0);
string accessIP = m_config.GetString("access_ip_addresses", String.Empty);
m_accessIP = new HashSet<string>();
if (accessIP != String.Empty)
{
string[] ips = accessIP.Split(new char[] { ',' });
foreach (string ip in ips)
{
string current = ip.Trim();
if (current != String.Empty)
m_accessIP.Add(current);
}
}
m_application = openSim;
string bind_ip_address = m_config.GetString("bind_ip_address", "0.0.0.0");
IPAddress ipaddr = IPAddress.Parse(bind_ip_address);
@@ -171,7 +174,7 @@ namespace OpenSim.ApplicationPlugins.RemoteController
{
foreach (string enabledMethod in enabledMethods.Split('|'))
{
m_httpServer.AddXmlRPCHandler(enabledMethod, availableMethods[enabledMethod]);
m_httpServer.AddXmlRPCHandler(enabledMethod, availableMethods[enabledMethod], false);
}
}
}
@@ -190,6 +193,21 @@ namespace OpenSim.ApplicationPlugins.RemoteController
}
}
private void FailIfRemoteAdminNotAllowed(string password, string check_ip_address)
{
if (m_accessIP.Count > 0 && !m_accessIP.Contains(check_ip_address))
{
m_log.WarnFormat("[RADMIN]: Unauthorized acess blocked from IP {0}", check_ip_address);
throw new Exception("not authorized");
}
if (m_requiredPassword != String.Empty && password != m_requiredPassword)
{
m_log.WarnFormat("[RADMIN]: Wrong password, blocked access from IP {0}", check_ip_address);
throw new Exception("wrong password");
}
}
public XmlRpcResponse XmlRpcRestartMethod(XmlRpcRequest request, IPEndPoint remoteClient)
{
XmlRpcResponse response = new XmlRpcResponse();
@@ -202,11 +220,7 @@ namespace OpenSim.ApplicationPlugins.RemoteController
m_log.Info("[RADMIN]: Request to restart Region.");
CheckStringParameters(request, new string[] {"password", "regionID"});
if (m_requiredPassword != String.Empty &&
(!requestData.Contains("password") || (string) requestData["password"] != m_requiredPassword))
{
throw new Exception("wrong password");
}
FailIfRemoteAdminNotAllowed((string)requestData["password"], remoteClient.Address.ToString());
UUID regionID = new UUID((string) requestData["regionID"]);
@@ -263,6 +277,7 @@ namespace OpenSim.ApplicationPlugins.RemoteController
restartModule.ScheduleRestart(UUID.Zero, message, times.ToArray(), notice);
responseData["success"] = true;
}
response.Value = responseData;
}
catch (Exception e)
@@ -292,9 +307,7 @@ namespace OpenSim.ApplicationPlugins.RemoteController
CheckStringParameters(request, new string[] {"password", "message"});
if (m_requiredPassword != String.Empty &&
(!requestData.Contains("password") || (string) requestData["password"] != m_requiredPassword))
throw new Exception("wrong password");
FailIfRemoteAdminNotAllowed((string)requestData["password"], remoteClient.Address.ToString());
string message = (string) requestData["message"];
m_log.InfoFormat("[RADMIN]: Broadcasting: {0}", message);
@@ -392,9 +405,7 @@ namespace OpenSim.ApplicationPlugins.RemoteController
CheckStringParameters(request, new string[] {"password", "filename", "regionid"});
if (m_requiredPassword != String.Empty &&
(!requestData.Contains("password") || (string) requestData["password"] != m_requiredPassword))
throw new Exception("wrong password");
FailIfRemoteAdminNotAllowed((string)requestData["password"], remoteClient.Address.ToString());
string file = (string) requestData["filename"];
UUID regionID = (UUID) (string) requestData["regionid"];
@@ -402,28 +413,8 @@ namespace OpenSim.ApplicationPlugins.RemoteController
responseData["accepted"] = true;
Scene region = null;
LoadHeightmap(file, regionID);
if (!m_application.SceneManager.TryGetScene(regionID, out region))
throw new Exception("1: unable to get a scene with that name");
ITerrainModule terrainModule = region.RequestModuleInterface<ITerrainModule>();
if (null == terrainModule) throw new Exception("terrain module not available");
if (Uri.IsWellFormedUriString(file, UriKind.Absolute))
{
m_log.Info("[RADMIN]: Terrain path is URL");
Uri result;
if (Uri.TryCreate(file, UriKind.RelativeOrAbsolute, out result))
{
// the url is valid
string fileType = file.Substring(file.LastIndexOf('/') + 1);
terrainModule.LoadFromStream(fileType, result);
}
}
else
{
terrainModule.LoadFromFile(file);
}
responseData["success"] = false;
response.Value = responseData;
@@ -442,7 +433,6 @@ namespace OpenSim.ApplicationPlugins.RemoteController
}
public XmlRpcResponse XmlRpcSaveHeightmapMethod(XmlRpcRequest request, IPEndPoint remoteClient)
{
XmlRpcResponse response = new XmlRpcResponse();
Hashtable responseData = new Hashtable();
@@ -457,9 +447,7 @@ namespace OpenSim.ApplicationPlugins.RemoteController
CheckStringParameters(request, new string[] { "password", "filename", "regionid" });
if (m_requiredPassword != String.Empty &&
(!requestData.Contains("password") || (string)requestData["password"] != m_requiredPassword))
throw new Exception("wrong password");
FailIfRemoteAdminNotAllowed((string)requestData["password"], remoteClient.Address.ToString());
string file = (string)requestData["filename"];
UUID regionID = (UUID)(string)requestData["regionid"];
@@ -507,9 +495,7 @@ namespace OpenSim.ApplicationPlugins.RemoteController
{
Hashtable requestData = (Hashtable) request.Params[0];
if (m_requiredPassword != String.Empty &&
(!requestData.Contains("password") || (string) requestData["password"] != m_requiredPassword))
throw new Exception("wrong password");
FailIfRemoteAdminNotAllowed((string)requestData["password"], remoteClient.Address.ToString());
responseData["accepted"] = true;
response.Value = responseData;
@@ -657,8 +643,6 @@ namespace OpenSim.ApplicationPlugins.RemoteController
{
m_log.Info("[RADMIN]: CreateRegion: new request");
FailIfRemoteAdminDisabled("CreateRegion");
XmlRpcResponse response = new XmlRpcResponse();
Hashtable responseData = new Hashtable();
@@ -681,9 +665,7 @@ namespace OpenSim.ApplicationPlugins.RemoteController
});
CheckIntegerParams(request, new string[] {"region_x", "region_y", "listen_port"});
// check password
if (!String.IsNullOrEmpty(m_requiredPassword) &&
(string) requestData["password"] != m_requiredPassword) throw new Exception("wrong password");
FailIfRemoteAdminNotAllowed((string)requestData["password"], remoteClient.Address.ToString());
// check whether we still have space left (iff we are using limits)
if (m_regionLimit != 0 && m_application.SceneManager.Scenes.Count >= m_regionLimit)
@@ -812,6 +794,14 @@ namespace OpenSim.ApplicationPlugins.RemoteController
// ok, client wants us to use an explicit UUID
// regardless of what the avatar name provided
userID = new UUID((string) requestData["estate_owner_uuid"]);
// Check that the specified user exists
Scene currentOrFirst = m_application.SceneManager.CurrentOrFirstScene;
IUserAccountService accountService = currentOrFirst.UserAccountService;
UserAccount user = accountService.GetUserAccount(currentOrFirst.RegionInfo.ScopeID, userID);
if (user == null)
throw new Exception("Specified user was not found.");
}
else if (requestData.ContainsKey("estate_owner_first") & requestData.ContainsKey("estate_owner_last"))
{
@@ -823,6 +813,11 @@ namespace OpenSim.ApplicationPlugins.RemoteController
IUserAccountService accountService = currentOrFirst.UserAccountService;
UserAccount user = accountService.GetUserAccount(currentOrFirst.RegionInfo.ScopeID,
ownerFirst, ownerLast);
// Check that the specified user exists
if (user == null)
throw new Exception("Specified user was not found.");
userID = user.PrincipalID;
}
else
@@ -831,21 +826,30 @@ namespace OpenSim.ApplicationPlugins.RemoteController
}
// Create a new estate with the name provided
region.EstateSettings = m_application.EstateDataService.LoadEstateSettings(region.RegionID, true);
region.EstateSettings = m_application.EstateDataService.CreateNewEstate();
region.EstateSettings.EstateName = (string) requestData["estate_name"];
region.EstateSettings.EstateOwner = userID;
// Persistence does not seem to effect the need to save a new estate
region.EstateSettings.Save();
if (!m_application.EstateDataService.LinkRegion(region.RegionID, (int) region.EstateSettings.EstateID))
throw new Exception("Failed to join estate.");
}
else
{
int estateID = estateIDs[0];
region.EstateSettings = m_application.EstateDataService.LoadEstateSettings(estateID);
region.EstateSettings = m_application.EstateDataService.LoadEstateSettings(region.RegionID, false);
if (!m_application.EstateDataService.LinkRegion(region.RegionID, estateID))
throw new Exception("Failed to join estate.");
if (region.EstateSettings.EstateID != estateID)
{
// The region is already part of an estate, but not the one we want.
region.EstateSettings = m_application.EstateDataService.LoadEstateSettings(estateID);
if (!m_application.EstateDataService.LinkRegion(region.RegionID, estateID))
throw new Exception("Failed to join estate.");
}
}
// Create the region and perform any initial initialization
@@ -873,6 +877,12 @@ namespace OpenSim.ApplicationPlugins.RemoteController
}
}
//Load Heightmap if specified to new region
if (requestData.Contains("heightmap_file"))
{
LoadHeightmap((string)requestData["heightmap_file"], region.RegionID);
}
responseData["success"] = true;
responseData["region_name"] = region.RegionName;
responseData["region_uuid"] = region.RegionID.ToString();
@@ -923,6 +933,7 @@ namespace OpenSim.ApplicationPlugins.RemoteController
public XmlRpcResponse XmlRpcDeleteRegionMethod(XmlRpcRequest request, IPEndPoint remoteClient)
{
m_log.Info("[RADMIN]: DeleteRegion: new request");
XmlRpcResponse response = new XmlRpcResponse();
Hashtable responseData = new Hashtable();
@@ -933,6 +944,8 @@ namespace OpenSim.ApplicationPlugins.RemoteController
Hashtable requestData = (Hashtable) request.Params[0];
CheckStringParameters(request, new string[] {"password", "region_name"});
FailIfRemoteAdminNotAllowed((string)requestData["password"], remoteClient.Address.ToString());
Scene scene = null;
string regionName = (string) requestData["region_name"];
if (!m_application.SceneManager.TryGetScene(regionName, out scene))
@@ -991,6 +1004,7 @@ namespace OpenSim.ApplicationPlugins.RemoteController
public XmlRpcResponse XmlRpcCloseRegionMethod(XmlRpcRequest request, IPEndPoint remoteClient)
{
m_log.Info("[RADMIN]: CloseRegion: new request");
XmlRpcResponse response = new XmlRpcResponse();
Hashtable responseData = new Hashtable();
Scene scene = null;
@@ -1002,6 +1016,8 @@ namespace OpenSim.ApplicationPlugins.RemoteController
Hashtable requestData = (Hashtable) request.Params[0];
CheckStringParameters(request, new string[] {"password"});
FailIfRemoteAdminNotAllowed((string)requestData["password"], remoteClient.Address.ToString());
if (requestData.ContainsKey("region_id") &&
!String.IsNullOrEmpty((string) requestData["region_id"]))
{
@@ -1096,6 +1112,8 @@ namespace OpenSim.ApplicationPlugins.RemoteController
Hashtable requestData = (Hashtable) request.Params[0];
CheckStringParameters(request, new string[] {"password", "region_name"});
FailIfRemoteAdminNotAllowed((string)requestData["password"], remoteClient.Address.ToString());
Scene scene = null;
string regionName = (string) requestData["region_name"];
if (!m_application.SceneManager.TryGetScene(regionName, out scene))
@@ -1190,8 +1208,6 @@ namespace OpenSim.ApplicationPlugins.RemoteController
{
m_log.Info("[RADMIN]: CreateUser: new request");
FailIfRemoteAdminDisabled("CreateUser");
XmlRpcResponse response = new XmlRpcResponse();
Hashtable responseData = new Hashtable();
@@ -1209,9 +1225,7 @@ namespace OpenSim.ApplicationPlugins.RemoteController
});
CheckIntegerParams(request, new string[] {"start_region_x", "start_region_y"});
// check password
if (!String.IsNullOrEmpty(m_requiredPassword) &&
(string) requestData["password"] != m_requiredPassword) throw new Exception("wrong password");
FailIfRemoteAdminNotAllowed((string)requestData["password"], remoteClient.Address.ToString());
// do the job
string firstName = (string) requestData["user_firstname"];
@@ -1307,8 +1321,6 @@ namespace OpenSim.ApplicationPlugins.RemoteController
{
m_log.Info("[RADMIN]: UserExists: new request");
FailIfRemoteAdminDisabled("UserExists");
XmlRpcResponse response = new XmlRpcResponse();
Hashtable responseData = new Hashtable();
@@ -1319,6 +1331,8 @@ namespace OpenSim.ApplicationPlugins.RemoteController
// check completeness
CheckStringParameters(request, new string[] {"password", "user_firstname", "user_lastname"});
FailIfRemoteAdminNotAllowed((string)requestData["password"], remoteClient.Address.ToString());
string firstName = (string) requestData["user_firstname"];
string lastName = (string) requestData["user_lastname"];
@@ -1403,14 +1417,11 @@ namespace OpenSim.ApplicationPlugins.RemoteController
/// </description></item>
/// </list>
/// </remarks>
public XmlRpcResponse XmlRpcUpdateUserAccountMethod(XmlRpcRequest request, IPEndPoint remoteClient)
{
m_log.Info("[RADMIN]: UpdateUserAccount: new request");
m_log.Warn("[RADMIN]: This method needs update for 0.7");
FailIfRemoteAdminDisabled("UpdateUserAccount");
XmlRpcResponse response = new XmlRpcResponse();
Hashtable responseData = new Hashtable();
@@ -1425,9 +1436,7 @@ namespace OpenSim.ApplicationPlugins.RemoteController
"password", "user_firstname",
"user_lastname"});
// check password
if (!String.IsNullOrEmpty(m_requiredPassword) &&
(string) requestData["password"] != m_requiredPassword) throw new Exception("wrong password");
FailIfRemoteAdminNotAllowed((string)requestData["password"], remoteClient.Address.ToString());
// do the job
string firstName = (string) requestData["user_firstname"];
@@ -1543,7 +1552,6 @@ namespace OpenSim.ApplicationPlugins.RemoteController
/// file, or pre-existing in the user database.
/// This should probably get moved into somewhere more core eventually.
/// </summary>
private void UpdateUserAppearance(Hashtable responseData, Hashtable requestData, UUID userid)
{
m_log.DebugFormat("[RADMIN]: updateUserAppearance");
@@ -1625,7 +1633,6 @@ namespace OpenSim.ApplicationPlugins.RemoteController
/// ratified, or an appropriate default value has been adopted. The intended prototype
/// is known to exist, as is the target avatar.
/// </summary>
private void EstablishAppearance(UUID destination, UUID source)
{
m_log.DebugFormat("[RADMIN]: Initializing inventory for {0} from {1}", destination, source);
@@ -1693,7 +1700,6 @@ namespace OpenSim.ApplicationPlugins.RemoteController
/// worn or attached to the Clothing inventory folder of the receiving avatar.
/// In parallel the avatar wearables and attachments are updated.
/// </summary>
private void CopyWearablesAndAttachments(UUID destination, UUID source, AvatarAppearance avatarAppearance)
{
IInventoryService inventoryService = m_application.SceneManager.CurrentOrFirstScene.InventoryService;
@@ -1723,7 +1729,7 @@ namespace OpenSim.ApplicationPlugins.RemoteController
AvatarWearable[] wearables = avatarAppearance.Wearables;
AvatarWearable wearable;
for (int i=0; i<wearables.Length; i++)
for (int i = 0; i<wearables.Length; i++)
{
wearable = wearables[i];
if (wearable[0].ItemID != UUID.Zero)
@@ -1826,15 +1832,12 @@ namespace OpenSim.ApplicationPlugins.RemoteController
}
}
}
}
/// <summary>
/// This method is called by establishAppearance to copy inventory folders to make
/// copies of Clothing and Bodyparts inventory folders and attaches worn attachments
/// </summary>
private void CopyInventoryFolders(UUID destination, UUID source, AssetType assetType, Dictionary<UUID,UUID> inventoryMap,
AvatarAppearance avatarAppearance)
{
@@ -1869,9 +1872,12 @@ namespace OpenSim.ApplicationPlugins.RemoteController
{
destinationFolder = new InventoryFolderBase();
destinationFolder.ID = UUID.Random();
if (assetType == AssetType.Clothing) {
if (assetType == AssetType.Clothing)
{
destinationFolder.Name = "Clothing";
} else {
}
else
{
destinationFolder.Name = "Body Parts";
}
destinationFolder.Owner = destination;
@@ -1887,7 +1893,6 @@ namespace OpenSim.ApplicationPlugins.RemoteController
foreach (InventoryFolderBase folder in folders)
{
extraFolder = new InventoryFolderBase();
extraFolder.ID = UUID.Random();
extraFolder.Name = folder.Name;
@@ -1945,7 +1950,6 @@ namespace OpenSim.ApplicationPlugins.RemoteController
/// <summary>
/// Apply next owner permissions.
/// </summary>
private void ApplyNextOwnerPermissions(InventoryItemBase item)
{
if (item.InvType == (int)InventoryType.Object && (item.CurrentPermissions & 7) != 0)
@@ -2304,6 +2308,10 @@ namespace OpenSim.ApplicationPlugins.RemoteController
/// <description>UUID of the region</description></item>
/// <item><term>region_name</term>
/// <description>region name</description></item>
/// <item><term>merge</term>
/// <description>true if oar should be merged</description></item>
/// <item><term>skip-assets</term>
/// <description>true if assets should be skiped</description></item>
/// </list>
///
/// <code>region_uuid</code> takes precedence over
@@ -2323,8 +2331,6 @@ namespace OpenSim.ApplicationPlugins.RemoteController
{
m_log.Info("[RADMIN]: Received Load OAR Administrator Request");
FailIfRemoteAdminDisabled("Load OAR");
XmlRpcResponse response = new XmlRpcResponse();
Hashtable responseData = new Hashtable();
@@ -2334,18 +2340,10 @@ namespace OpenSim.ApplicationPlugins.RemoteController
{
Hashtable requestData = (Hashtable) request.Params[0];
// check completeness
foreach (string parameter in new string[] {"password", "filename"})
{
if (!requestData.Contains(parameter))
throw new Exception(String.Format("missing parameter {0}", parameter));
if (String.IsNullOrEmpty((string) requestData[parameter]))
throw new Exception(String.Format("parameter {0} is empty", parameter));
}
CheckStringParameters(request, new string[] {
"password", "filename"});
// check password
if (!String.IsNullOrEmpty(m_requiredPassword) &&
(string) requestData["password"] != m_requiredPassword) throw new Exception("wrong password");
FailIfRemoteAdminNotAllowed((string)requestData["password"], remoteClient.Address.ToString());
string filename = (string) requestData["filename"];
Scene scene = null;
@@ -2362,10 +2360,22 @@ namespace OpenSim.ApplicationPlugins.RemoteController
throw new Exception(String.Format("failed to switch to region {0}", region_name));
}
else throw new Exception("neither region_name nor region_uuid given");
bool mergeOar = false;
bool skipAssets = false;
if ((string)requestData["merge"] == "true")
{
mergeOar = true;
}
if ((string)requestData["skip-assets"] == "true")
{
skipAssets = true;
}
IRegionArchiverModule archiver = scene.RequestModuleInterface<IRegionArchiverModule>();
if (archiver != null)
archiver.DearchiveRegion(filename);
archiver.DearchiveRegion(filename, mergeOar, skipAssets, Guid.Empty);
else
throw new Exception("Archiver module not present for scene");
@@ -2405,6 +2415,12 @@ namespace OpenSim.ApplicationPlugins.RemoteController
/// <description>UUID of the region</description></item>
/// <item><term>region_name</term>
/// <description>region name</description></item>
/// <item><term>profile</term>
/// <description>profile url</description></item>
/// <item><term>noassets</term>
/// <description>true if no assets should be saved</description></item>
/// <item><term>perm</term>
/// <description>C and/or T</description></item>
/// </list>
///
/// <code>region_uuid</code> takes precedence over
@@ -2424,8 +2440,6 @@ namespace OpenSim.ApplicationPlugins.RemoteController
{
m_log.Info("[RADMIN]: Received Save OAR Administrator Request");
FailIfRemoteAdminDisabled("Save OAR");
XmlRpcResponse response = new XmlRpcResponse();
Hashtable responseData = new Hashtable();
@@ -2433,18 +2447,10 @@ namespace OpenSim.ApplicationPlugins.RemoteController
{
Hashtable requestData = (Hashtable) request.Params[0];
// check completeness
foreach (string p in new string[] {"password", "filename"})
{
if (!requestData.Contains(p))
throw new Exception(String.Format("missing parameter {0}", p));
if (String.IsNullOrEmpty((string) requestData[p]))
throw new Exception(String.Format("parameter {0} is empty"));
}
CheckStringParameters(request, new string[] {
"password", "filename"});
// check password
if (!String.IsNullOrEmpty(m_requiredPassword) &&
(string) requestData["password"] != m_requiredPassword) throw new Exception("wrong password");
FailIfRemoteAdminNotAllowed((string)requestData["password"], remoteClient.Address.ToString());
string filename = (string) requestData["filename"];
Scene scene = null;
@@ -2462,17 +2468,44 @@ namespace OpenSim.ApplicationPlugins.RemoteController
}
else throw new Exception("neither region_name nor region_uuid given");
Dictionary<string, object> options = new Dictionary<string, object>();
//if (requestData.Contains("version"))
//{
// options["version"] = (string)requestData["version"];
//}
if (requestData.Contains("profile"))
{
options["profile"] = (string)requestData["profile"];
}
if (requestData["noassets"] == "true")
{
options["noassets"] = (string)requestData["noassets"] ;
}
if (requestData.Contains("perm"))
{
options["checkPermissions"] = (string)requestData["perm"];
}
IRegionArchiverModule archiver = scene.RequestModuleInterface<IRegionArchiverModule>();
if (archiver != null)
{
scene.EventManager.OnOarFileSaved += RemoteAdminOarSaveCompleted;
archiver.ArchiveRegion(filename, new Dictionary<string, object>());
lock (m_saveOarLock) Monitor.Wait(m_saveOarLock,5000);
archiver.ArchiveRegion(filename, options);
lock (m_saveOarLock)
Monitor.Wait(m_saveOarLock,5000);
scene.EventManager.OnOarFileSaved -= RemoteAdminOarSaveCompleted;
}
else
{
throw new Exception("Archiver module not present for scene");
}
responseData["saved"] = true;
@@ -2502,8 +2535,6 @@ namespace OpenSim.ApplicationPlugins.RemoteController
{
m_log.Info("[RADMIN]: Received Load XML Administrator Request");
FailIfRemoteAdminDisabled("Load XML");
XmlRpcResponse response = new XmlRpcResponse();
Hashtable responseData = new Hashtable();
@@ -2513,18 +2544,10 @@ namespace OpenSim.ApplicationPlugins.RemoteController
{
Hashtable requestData = (Hashtable) request.Params[0];
// check completeness
foreach (string p in new string[] {"password", "filename"})
{
if (!requestData.Contains(p))
throw new Exception(String.Format("missing parameter {0}", p));
if (String.IsNullOrEmpty((string) requestData[p]))
throw new Exception(String.Format("parameter {0} is empty"));
}
CheckStringParameters(request, new string[] {
"password", "filename"});
// check password
if (!String.IsNullOrEmpty(m_requiredPassword) &&
(string) requestData["password"] != m_requiredPassword) throw new Exception("wrong password");
FailIfRemoteAdminNotAllowed((string)requestData["password"], remoteClient.Address.ToString());
string filename = (string) requestData["filename"];
if (requestData.Contains("region_uuid"))
@@ -2532,6 +2555,7 @@ namespace OpenSim.ApplicationPlugins.RemoteController
UUID region_uuid = (UUID) (string) requestData["region_uuid"];
if (!m_application.SceneManager.TrySetCurrentScene(region_uuid))
throw new Exception(String.Format("failed to switch to region {0}", region_uuid.ToString()));
m_log.InfoFormat("[RADMIN]: Switched to region {0}", region_uuid.ToString());
}
else if (requestData.Contains("region_name"))
@@ -2539,6 +2563,7 @@ namespace OpenSim.ApplicationPlugins.RemoteController
string region_name = (string) requestData["region_name"];
if (!m_application.SceneManager.TrySetCurrentScene(region_name))
throw new Exception(String.Format("failed to switch to region {0}", region_name));
m_log.InfoFormat("[RADMIN]: Switched to region {0}", region_name);
}
else throw new Exception("neither region_name nor region_uuid given");
@@ -2588,8 +2613,6 @@ namespace OpenSim.ApplicationPlugins.RemoteController
{
m_log.Info("[RADMIN]: Received Save XML Administrator Request");
FailIfRemoteAdminDisabled("Save XML");
XmlRpcResponse response = new XmlRpcResponse();
Hashtable responseData = new Hashtable();
@@ -2597,18 +2620,10 @@ namespace OpenSim.ApplicationPlugins.RemoteController
{
Hashtable requestData = (Hashtable) request.Params[0];
// check completeness
foreach (string p in new string[] {"password", "filename"})
{
if (!requestData.Contains(p))
throw new Exception(String.Format("missing parameter {0}", p));
if (String.IsNullOrEmpty((string) requestData[p]))
throw new Exception(String.Format("parameter {0} is empty"));
}
CheckStringParameters(request, new string[] {
"password", "filename"});
// check password
if (!String.IsNullOrEmpty(m_requiredPassword) &&
(string) requestData["password"] != m_requiredPassword) throw new Exception("wrong password");
FailIfRemoteAdminNotAllowed((string)requestData["password"], remoteClient.Address.ToString());
string filename = (string) requestData["filename"];
if (requestData.Contains("region_uuid"))
@@ -2672,8 +2687,6 @@ namespace OpenSim.ApplicationPlugins.RemoteController
{
m_log.Info("[RADMIN]: Received Query XML Administrator Request");
FailIfRemoteAdminDisabled("Query XML");
XmlRpcResponse response = new XmlRpcResponse();
Hashtable responseData = new Hashtable();
@@ -2683,17 +2696,17 @@ namespace OpenSim.ApplicationPlugins.RemoteController
Hashtable requestData = (Hashtable) request.Params[0];
// check completeness
if (!requestData.Contains("password"))
throw new Exception(String.Format("missing required parameter"));
if (!String.IsNullOrEmpty(m_requiredPassword) &&
(string) requestData["password"] != m_requiredPassword) throw new Exception("wrong password");
CheckStringParameters(request, new string[] {
"password"});
FailIfRemoteAdminNotAllowed((string)requestData["password"], remoteClient.Address.ToString());
if (requestData.Contains("region_uuid"))
{
UUID region_uuid = (UUID) (string) requestData["region_uuid"];
if (!m_application.SceneManager.TrySetCurrentScene(region_uuid))
throw new Exception(String.Format("failed to switch to region {0}", region_uuid.ToString()));
m_log.InfoFormat("[RADMIN]: Switched to region {0}", region_uuid.ToString());
}
else if (requestData.Contains("region_name"))
@@ -2701,6 +2714,7 @@ namespace OpenSim.ApplicationPlugins.RemoteController
string region_name = (string) requestData["region_name"];
if (!m_application.SceneManager.TrySetCurrentScene(region_name))
throw new Exception(String.Format("failed to switch to region {0}", region_name));
m_log.InfoFormat("[RADMIN]: Switched to region {0}", region_name);
}
else throw new Exception("neither region_name nor region_uuid given");
@@ -2726,6 +2740,7 @@ namespace OpenSim.ApplicationPlugins.RemoteController
}
m_log.Info("[RADMIN]: Query XML Administrator Request complete");
return response;
}
@@ -2733,8 +2748,6 @@ namespace OpenSim.ApplicationPlugins.RemoteController
{
m_log.Info("[RADMIN]: Received Command XML Administrator Request");
FailIfRemoteAdminDisabled("Command XML");
XmlRpcResponse response = new XmlRpcResponse();
Hashtable responseData = new Hashtable();
@@ -2744,14 +2757,11 @@ namespace OpenSim.ApplicationPlugins.RemoteController
Hashtable requestData = (Hashtable) request.Params[0];
// check completeness
if (!requestData.Contains("password"))
throw new Exception(String.Format("missing required parameter"));
if (!String.IsNullOrEmpty(m_requiredPassword) &&
(string) requestData["password"] != m_requiredPassword) throw new Exception("wrong password");
CheckStringParameters(request, new string[] {
"password", "command"});
FailIfRemoteAdminNotAllowed((string)requestData["password"], remoteClient.Address.ToString());
if (!requestData.Contains("command"))
throw new Exception(String.Format("missing required parameter"));
MainConsole.Instance.RunCommand(requestData["command"].ToString());
response.Value = responseData;
@@ -2774,8 +2784,6 @@ namespace OpenSim.ApplicationPlugins.RemoteController
{
m_log.Info("[RADMIN]: Received Access List Clear Request");
FailIfRemoteAdminDisabled("Access List Clear");
XmlRpcResponse response = new XmlRpcResponse();
Hashtable responseData = new Hashtable();
@@ -2785,10 +2793,10 @@ namespace OpenSim.ApplicationPlugins.RemoteController
Hashtable requestData = (Hashtable) request.Params[0];
if (!requestData.Contains("password"))
throw new Exception(String.Format("missing required parameter"));
if (!String.IsNullOrEmpty(m_requiredPassword) &&
(string) requestData["password"] != m_requiredPassword) throw new Exception("wrong password");
CheckStringParameters(request, new string[] {
"password"});
FailIfRemoteAdminNotAllowed((string)requestData["password"], remoteClient.Address.ToString());
if (requestData.Contains("region_uuid"))
{
@@ -2802,12 +2810,14 @@ namespace OpenSim.ApplicationPlugins.RemoteController
string region_name = (string) requestData["region_name"];
if (!m_application.SceneManager.TrySetCurrentScene(region_name))
throw new Exception(String.Format("failed to switch to region {0}", region_name));
m_log.InfoFormat("[RADMIN]: Switched to region {0}", region_name);
}
else throw new Exception("neither region_name nor region_uuid given");
Scene scene = m_application.SceneManager.CurrentScene;
scene.RegionInfo.EstateSettings.EstateAccess = new UUID[]{};
if (scene.RegionInfo.Persistent)
scene.RegionInfo.EstateSettings.Save();
}
@@ -2831,8 +2841,6 @@ namespace OpenSim.ApplicationPlugins.RemoteController
{
m_log.Info("[RADMIN]: Received Access List Add Request");
FailIfRemoteAdminDisabled("Access List Add");
XmlRpcResponse response = new XmlRpcResponse();
Hashtable responseData = new Hashtable();
@@ -2842,10 +2850,10 @@ namespace OpenSim.ApplicationPlugins.RemoteController
Hashtable requestData = (Hashtable) request.Params[0];
if (!requestData.Contains("password"))
throw new Exception(String.Format("missing required parameter"));
if (!String.IsNullOrEmpty(m_requiredPassword) &&
(string) requestData["password"] != m_requiredPassword) throw new Exception("wrong password");
CheckStringParameters(request, new string[] {
"password"});
FailIfRemoteAdminNotAllowed((string)requestData["password"], remoteClient.Address.ToString());
if (requestData.Contains("region_uuid"))
{
@@ -2918,8 +2926,6 @@ namespace OpenSim.ApplicationPlugins.RemoteController
{
m_log.Info("[RADMIN]: Received Access List Remove Request");
FailIfRemoteAdminDisabled("Access List Remove");
XmlRpcResponse response = new XmlRpcResponse();
Hashtable responseData = new Hashtable();
@@ -2929,10 +2935,10 @@ namespace OpenSim.ApplicationPlugins.RemoteController
Hashtable requestData = (Hashtable) request.Params[0];
if (!requestData.Contains("password"))
throw new Exception(String.Format("missing required parameter"));
if (!String.IsNullOrEmpty(m_requiredPassword) &&
(string) requestData["password"] != m_requiredPassword) throw new Exception("wrong password");
CheckStringParameters(request, new string[] {
"password"});
FailIfRemoteAdminNotAllowed((string)requestData["password"], remoteClient.Address.ToString());
if (requestData.Contains("region_uuid"))
{
@@ -3005,8 +3011,6 @@ namespace OpenSim.ApplicationPlugins.RemoteController
{
m_log.Info("[RADMIN]: Received Access List List Request");
FailIfRemoteAdminDisabled("Access List List");
XmlRpcResponse response = new XmlRpcResponse();
Hashtable responseData = new Hashtable();
@@ -3016,10 +3020,10 @@ namespace OpenSim.ApplicationPlugins.RemoteController
Hashtable requestData = (Hashtable) request.Params[0];
if (!requestData.Contains("password"))
throw new Exception(String.Format("missing required parameter"));
if (!String.IsNullOrEmpty(m_requiredPassword) &&
(string) requestData["password"] != m_requiredPassword) throw new Exception("wrong password");
CheckStringParameters(request, new string[] {
"password"});
FailIfRemoteAdminNotAllowed((string)requestData["password"], remoteClient.Address.ToString());
if (requestData.Contains("region_uuid"))
{
@@ -3156,7 +3160,7 @@ namespace OpenSim.ApplicationPlugins.RemoteController
UserAccount account = userAccountService.GetUserAccount(scopeID, firstName, lastName);
if (null == account)
{
account = new UserAccount(scopeID, firstName, lastName, email);
account = new UserAccount(scopeID, UUID.Random(), firstName, lastName, email);
if (account.ServiceURLs == null || (account.ServiceURLs != null && account.ServiceURLs.Count == 0))
{
account.ServiceURLs = new Dictionary<string, object>();
@@ -3233,7 +3237,9 @@ namespace OpenSim.ApplicationPlugins.RemoteController
bool success = false;
if (authenticationService != null)
success = authenticationService.SetPassword(account.PrincipalID, password);
if (!success) {
if (!success)
{
m_log.WarnFormat("[RADMIN]: Unable to set password for account {0} {1}.",
firstName, lastName);
return false;
@@ -3246,5 +3252,39 @@ namespace OpenSim.ApplicationPlugins.RemoteController
return false;
}
}
private bool LoadHeightmap(string file, UUID regionID)
{
m_log.InfoFormat("[RADMIN]: Terrain Loading: {0}", file);
Scene region = null;
if (!m_application.SceneManager.TryGetScene(regionID, out region))
{
m_log.InfoFormat("[RADMIN]: unable to get a scene with that name: {0}", regionID.ToString());
return false;
}
ITerrainModule terrainModule = region.RequestModuleInterface<ITerrainModule>();
if (null == terrainModule) throw new Exception("terrain module not available");
if (Uri.IsWellFormedUriString(file, UriKind.Absolute))
{
m_log.Info("[RADMIN]: Terrain path is URL");
Uri result;
if (Uri.TryCreate(file, UriKind.RelativeOrAbsolute, out result))
{
// the url is valid
string fileType = file.Substring(file.LastIndexOf('/') + 1);
terrainModule.LoadFromStream(fileType, result);
}
}
else
{
terrainModule.LoadFromFile(file);
}
m_log.Info("[RADMIN]: Load height maps request complete");
return true;
}
}
}

View File

@@ -488,11 +488,11 @@ namespace OpenSim.ApplicationPlugins.Rest.Inventory
rdata.userAppearance.AvatarHeight = (float) Convert.ToDouble(xml.Value);
indata = true;
}
if (xml.MoveToAttribute("Owner"))
{
rdata.userAppearance.Owner = (UUID)xml.Value;
indata = true;
}
// if (xml.MoveToAttribute("Owner"))
// {
// rdata.userAppearance.Owner = (UUID)xml.Value;
// indata = true;
// }
if (xml.MoveToAttribute("Serial"))
{
rdata.userAppearance.Serial = Convert.ToInt32(xml.Value);
@@ -747,8 +747,8 @@ namespace OpenSim.ApplicationPlugins.Rest.Inventory
rdata.writer.WriteStartElement("Appearance");
rdata.writer.WriteAttributeString("Height", rdata.userAppearance.AvatarHeight.ToString());
if (rdata.userAppearance.Owner != UUID.Zero)
rdata.writer.WriteAttributeString("Owner", rdata.userAppearance.Owner.ToString());
// if (rdata.userAppearance.Owner != UUID.Zero)
// rdata.writer.WriteAttributeString("Owner", rdata.userAppearance.Owner.ToString());
rdata.writer.WriteAttributeString("Serial", rdata.userAppearance.Serial.ToString());
/*

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])
{
@@ -168,8 +168,8 @@ namespace OpenSim.ApplicationPlugins.Rest.Inventory.Tests
float x = Convert.ToSingle(rdata.Parameters[PARM_MOVE_X]);
float y = Convert.ToSingle(rdata.Parameters[PARM_MOVE_Y]);
float z = Convert.ToSingle(rdata.Parameters[PARM_MOVE_Z]);
Vector3 vector = new Vector3(x,y,z);
presence.DoAutoPilot(0,vector,presence.ControllingClient);
Vector3 vector = new Vector3(x, y, z);
presence.MoveToTarget(vector, false, false);
}
catch (Exception e)
{

View File

@@ -57,7 +57,6 @@ namespace OpenSim.Capabilities.Handlers
public Hashtable ProcessGetMesh(Hashtable request, UUID AgentId, Caps cap)
{
Hashtable responsedata = new Hashtable();
responsedata["int_response_code"] = 400; //501; //410; //404;
responsedata["content_type"] = "text/plain";
@@ -69,7 +68,6 @@ namespace OpenSim.Capabilities.Handlers
if (request.ContainsKey("mesh_id"))
meshStr = request["mesh_id"].ToString();
UUID meshID = UUID.Zero;
if (!String.IsNullOrEmpty(meshStr) && UUID.TryParse(meshStr, out meshID))
{
@@ -82,12 +80,11 @@ namespace OpenSim.Capabilities.Handlers
return responsedata;
}
AssetBase mesh;
// Only try to fetch locally cached textures. Misses are redirected
mesh = m_assetService.GetCached(meshID.ToString());
AssetBase mesh = m_assetService.Get(meshID.ToString());
if (mesh != null)
{
if (mesh.Type == (SByte)AssetType.Mesh)
if (mesh.Type == (SByte)AssetType.Mesh)
{
responsedata["str_response_string"] = Convert.ToBase64String(mesh.Data);
responsedata["content_type"] = "application/vnd.ll.mesh";
@@ -105,39 +102,15 @@ namespace OpenSim.Capabilities.Handlers
}
else
{
mesh = m_assetService.Get(meshID.ToString());
if (mesh != null)
{
if (mesh.Type == (SByte)AssetType.Mesh)
{
responsedata["str_response_string"] = Convert.ToBase64String(mesh.Data);
responsedata["content_type"] = "application/vnd.ll.mesh";
responsedata["int_response_code"] = 200;
}
// Optionally add additional mesh types here
else
{
responsedata["int_response_code"] = 404; //501; //410; //404;
responsedata["content_type"] = "text/plain";
responsedata["keepalive"] = false;
responsedata["str_response_string"] = "Unfortunately, this asset isn't a mesh.";
return responsedata;
}
}
else
{
responsedata["int_response_code"] = 404; //501; //410; //404;
responsedata["content_type"] = "text/plain";
responsedata["keepalive"] = false;
responsedata["str_response_string"] = "Your Mesh wasn't found. Sorry!";
return responsedata;
}
responsedata["int_response_code"] = 404; //501; //410; //404;
responsedata["content_type"] = "text/plain";
responsedata["keepalive"] = false;
responsedata["str_response_string"] = "Your Mesh wasn't found. Sorry!";
return responsedata;
}
}
return responsedata;
}
}
}
}

View File

@@ -47,7 +47,6 @@ using Caps = OpenSim.Framework.Capabilities.Caps;
namespace OpenSim.Capabilities.Handlers
{
public class GetTextureHandler : BaseStreamHandler
{
private static readonly ILog m_log =
@@ -67,7 +66,6 @@ namespace OpenSim.Capabilities.Handlers
public override byte[] Handle(string path, Stream request, OSHttpRequest httpRequest, OSHttpResponse httpResponse)
{
// Try to parse the texture ID from the request URL
NameValueCollection query = HttpUtility.ParseQueryString(httpRequest.Url.Query);
string textureStr = query.GetOne("texture_id");
@@ -85,6 +83,8 @@ namespace OpenSim.Capabilities.Handlers
UUID textureID;
if (!String.IsNullOrEmpty(textureStr) && UUID.TryParse(textureStr, out textureID))
{
// m_log.DebugFormat("[GETTEXTURE]: Received request for texture id {0}", textureID);
string[] formats;
if (format != null && format != string.Empty)
{
@@ -105,7 +105,6 @@ namespace OpenSim.Capabilities.Handlers
if (FetchTexture(httpRequest, httpResponse, textureID, f))
break;
}
}
else
{

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

@@ -34,7 +34,7 @@ namespace OpenSim.Data
{
public class FriendsData
{
public UUID PrincipalID;
public string PrincipalID;
public string Friend;
public Dictionary<string, string> Data;
}
@@ -46,6 +46,8 @@ namespace OpenSim.Data
{
bool Store(FriendsData data);
bool Delete(UUID ownerID, string friend);
bool Delete(string ownerID, string friend);
FriendsData[] GetFriends(UUID principalID);
FriendsData[] GetFriends(string principalID);
}
}

View File

@@ -41,7 +41,7 @@ namespace OpenSim.Data.MSSQL
{
private const string _migrationStore = "EstateStore";
private static readonly ILog _Log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType);
private static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType);
private MSSQLManager _Database;
private string m_connectionString;
@@ -72,7 +72,12 @@ namespace OpenSim.Data.MSSQL
}
//Migration settings
_Database.CheckMigration(_migrationStore);
using (SqlConnection conn = new SqlConnection(m_connectionString))
{
conn.Open();
Migration m = new Migration(conn, GetType().Assembly, "EstateStore");
m.Update();
}
//Interesting way to get parameters! Maybe implement that also with other types
Type t = typeof(EstateSettings);
@@ -112,19 +117,19 @@ namespace OpenSim.Data.MSSQL
{
FieldInfo f = _FieldMap[name];
object v = reader[name];
if (f.FieldType == typeof(bool) )
if (f.FieldType == typeof(bool))
{
f.SetValue(es, Convert.ToInt32(v) != 0);
}
else if (f.FieldType == typeof(UUID) )
else if (f.FieldType == typeof(UUID))
{
f.SetValue(es, new UUID((Guid)v)); // uuid);
}
else if (f.FieldType == typeof(string))
else if (f.FieldType == typeof(string))
{
f.SetValue(es, v.ToString());
}
else if (f.FieldType == typeof(UInt32))
else if (f.FieldType == typeof(UInt32))
{
f.SetValue(es, Convert.ToUInt32(v));
}
@@ -143,55 +148,10 @@ namespace OpenSim.Data.MSSQL
}
}
if (insertEstate && create)
{
List<string> names = new List<string>(FieldList);
names.Remove("EstateID");
sql = string.Format("insert into estate_settings ({0}) values ( @{1})", String.Join(",", names.ToArray()), String.Join(", @", names.ToArray()));
//_Log.Debug("[DB ESTATE]: SQL: " + sql);
using (SqlConnection conn = new SqlConnection(m_connectionString))
using (SqlCommand insertCommand = new SqlCommand(sql, conn))
{
insertCommand.CommandText = sql + " SET @ID = SCOPE_IDENTITY()";
foreach (string name in names)
{
insertCommand.Parameters.Add(_Database.CreateParameter("@" + name, _FieldMap[name].GetValue(es)));
}
SqlParameter idParameter = new SqlParameter("@ID", SqlDbType.Int);
idParameter.Direction = ParameterDirection.Output;
insertCommand.Parameters.Add(idParameter);
conn.Open();
insertCommand.ExecuteNonQuery();
es.EstateID = Convert.ToUInt32(idParameter.Value);
}
sql = "INSERT INTO [estate_map] ([RegionID] ,[EstateID]) VALUES (@RegionID, @EstateID)";
using (SqlConnection conn = new SqlConnection(m_connectionString))
using (SqlCommand cmd = new SqlCommand(sql, conn))
{
cmd.Parameters.Add(_Database.CreateParameter("@RegionID", regionID));
cmd.Parameters.Add(_Database.CreateParameter("@EstateID", es.EstateID));
// This will throw on dupe key
try
{
conn.Open();
cmd.ExecuteNonQuery();
}
catch (Exception e)
{
_Log.DebugFormat("[ESTATE DB]: Error inserting regionID and EstateID in estate_map: {0}", e);
}
}
//TODO check if this is needed??
es.Save();
DoCreate(es);
LinkRegion(regionID, (int)es.EstateID);
}
LoadBanList(es);
@@ -205,6 +165,53 @@ namespace OpenSim.Data.MSSQL
return es;
}
public EstateSettings CreateNewEstate()
{
EstateSettings es = new EstateSettings();
es.OnSave += StoreEstateSettings;
DoCreate(es);
LoadBanList(es);
es.EstateManagers = LoadUUIDList(es.EstateID, "estate_managers");
es.EstateAccess = LoadUUIDList(es.EstateID, "estate_users");
es.EstateGroups = LoadUUIDList(es.EstateID, "estate_groups");
return es;
}
private void DoCreate(EstateSettings es)
{
List<string> names = new List<string>(FieldList);
names.Remove("EstateID");
string sql = string.Format("insert into estate_settings ({0}) values ( @{1})", String.Join(",", names.ToArray()), String.Join(", @", names.ToArray()));
//_Log.Debug("[DB ESTATE]: SQL: " + sql);
using (SqlConnection conn = new SqlConnection(m_connectionString))
using (SqlCommand insertCommand = new SqlCommand(sql, conn))
{
insertCommand.CommandText = sql + " SET @ID = SCOPE_IDENTITY()";
foreach (string name in names)
{
insertCommand.Parameters.Add(_Database.CreateParameter("@" + name, _FieldMap[name].GetValue(es)));
}
SqlParameter idParameter = new SqlParameter("@ID", SqlDbType.Int);
idParameter.Direction = ParameterDirection.Output;
insertCommand.Parameters.Add(idParameter);
conn.Open();
insertCommand.ExecuteNonQuery();
es.EstateID = Convert.ToUInt32(idParameter.Value);
}
//TODO check if this is needed??
es.Save();
}
/// <summary>
/// Stores the estate settings.
/// </summary>
@@ -310,12 +317,12 @@ namespace OpenSim.Data.MSSQL
conn.Open();
using (SqlCommand cmd = conn.CreateCommand())
{
cmd.CommandText = "delete from estateban where EstateID = @EstateID";
cmd.CommandText = "delete from estateban where EstateID = @EstateID";
cmd.Parameters.AddWithValue("@EstateID", (int)es.EstateID);
cmd.ExecuteNonQuery();
//Insert after
cmd.CommandText = "insert into estateban (EstateID, bannedUUID) values ( @EstateID, @bannedUUID )";
cmd.CommandText = "insert into estateban (EstateID, bannedUUID,bannedIp, bannedIpHostMask, bannedNameMask) values ( @EstateID, @bannedUUID, '','','' )";
cmd.Parameters.AddWithValue("@bannedUUID", Guid.Empty);
foreach (EstateBan b in es.EstateBans)
{
@@ -350,43 +357,214 @@ namespace OpenSim.Data.MSSQL
public EstateSettings LoadEstateSettings(int estateID)
{
// TODO: Implementation!
return new EstateSettings();
EstateSettings es = new EstateSettings();
string sql = "select estate_settings." + String.Join(",estate_settings.", FieldList) + " from estate_settings where EstateID = @EstateID";
using (SqlConnection conn = new SqlConnection(m_connectionString))
{
conn.Open();
using (SqlCommand cmd = new SqlCommand(sql, conn))
{
cmd.Parameters.AddWithValue("@EstateID", (int)estateID);
using (SqlDataReader reader = cmd.ExecuteReader())
{
if (reader.Read())
{
foreach (string name in FieldList)
{
FieldInfo f = _FieldMap[name];
object v = reader[name];
if (f.FieldType == typeof(bool))
{
f.SetValue(es, Convert.ToInt32(v) != 0);
}
else if (f.FieldType == typeof(UUID))
{
f.SetValue(es, new UUID((Guid)v)); // uuid);
}
else if (f.FieldType == typeof(string))
{
f.SetValue(es, v.ToString());
}
else if (f.FieldType == typeof(UInt32))
{
f.SetValue(es, Convert.ToUInt32(v));
}
else if (f.FieldType == typeof(Single))
{
f.SetValue(es, Convert.ToSingle(v));
}
else
f.SetValue(es, v);
}
}
}
}
}
LoadBanList(es);
es.EstateManagers = LoadUUIDList(es.EstateID, "estate_managers");
es.EstateAccess = LoadUUIDList(es.EstateID, "estate_users");
es.EstateGroups = LoadUUIDList(es.EstateID, "estate_groups");
//Set event
es.OnSave += StoreEstateSettings;
return es;
}
public List<EstateSettings> LoadEstateSettingsAll()
{
// TODO: Implementation!
return new List<EstateSettings>();
List<EstateSettings> allEstateSettings = new List<EstateSettings>();
List<int> allEstateIds = GetEstatesAll();
foreach (int estateId in allEstateIds)
allEstateSettings.Add(LoadEstateSettings(estateId));
return allEstateSettings;
}
public List<int> GetEstates(string search)
{
// TODO: Implementation!
return new List<int>();
List<int> result = new List<int>();
string sql = "select estateID from estate_settings where EstateName = @EstateName";
using (SqlConnection conn = new SqlConnection(m_connectionString))
{
conn.Open();
using (SqlCommand cmd = new SqlCommand(sql, conn))
{
cmd.Parameters.AddWithValue("@EstateName", search);
using (IDataReader reader = cmd.ExecuteReader())
{
while (reader.Read())
{
result.Add(Convert.ToInt32(reader["EstateID"]));
}
reader.Close();
}
}
}
return result;
}
public List<int> GetEstatesAll()
{
// TODO: Implementation!
return new List<int>();
List<int> result = new List<int>();
string sql = "select estateID from estate_settings";
using (SqlConnection conn = new SqlConnection(m_connectionString))
{
conn.Open();
using (SqlCommand cmd = new SqlCommand(sql, conn))
{
using (IDataReader reader = cmd.ExecuteReader())
{
while (reader.Read())
{
result.Add(Convert.ToInt32(reader["EstateID"]));
}
reader.Close();
}
}
}
return result;
}
public List<int> GetEstatesByOwner(UUID ownerID)
{
return new List<int>();
List<int> result = new List<int>();
string sql = "select estateID from estate_settings where EstateOwner = @EstateOwner";
using (SqlConnection conn = new SqlConnection(m_connectionString))
{
conn.Open();
using (SqlCommand cmd = new SqlCommand(sql, conn))
{
cmd.Parameters.AddWithValue("@EstateOwner", ownerID);
using (IDataReader reader = cmd.ExecuteReader())
{
while (reader.Read())
{
result.Add(Convert.ToInt32(reader["EstateID"]));
}
reader.Close();
}
}
}
return result;
}
public bool LinkRegion(UUID regionID, int estateID)
{
// TODO: Implementation!
string deleteSQL = "delete from estate_map where RegionID = @RegionID";
string insertSQL = "insert into estate_map values (@RegionID, @EstateID)";
using (SqlConnection conn = new SqlConnection(m_connectionString))
{
conn.Open();
SqlTransaction transaction = conn.BeginTransaction();
try
{
using (SqlCommand cmd = new SqlCommand(deleteSQL, conn))
{
cmd.Transaction = transaction;
cmd.Parameters.AddWithValue("@RegionID", regionID.Guid);
cmd.ExecuteNonQuery();
}
using (SqlCommand cmd = new SqlCommand(insertSQL, conn))
{
cmd.Transaction = transaction;
cmd.Parameters.AddWithValue("@RegionID", regionID.Guid);
cmd.Parameters.AddWithValue("@EstateID", estateID);
int ret = cmd.ExecuteNonQuery();
if (ret != 0)
transaction.Commit();
else
transaction.Rollback();
return (ret != 0);
}
}
catch (Exception ex)
{
m_log.Error("[REGION DB]: LinkRegion failed: " + ex.Message);
transaction.Rollback();
}
}
return false;
}
public List<UUID> GetRegions(int estateID)
{
// TODO: Implementation!
return new List<UUID>();
List<UUID> result = new List<UUID>();
string sql = "select RegionID from estate_map where EstateID = @EstateID";
using (SqlConnection conn = new SqlConnection(m_connectionString))
{
conn.Open();
using (SqlCommand cmd = new SqlCommand(sql, conn))
{
cmd.Parameters.AddWithValue("@EstateID", estateID);
using (IDataReader reader = cmd.ExecuteReader())
{
while (reader.Read())
{
result.Add(DBGuid.FromDB(reader["RegionID"]));
}
reader.Close();
}
}
}
return result;
}
public bool DeleteEstate(int estateID)

View File

@@ -51,6 +51,11 @@ namespace OpenSim.Data.MSSQL
}
public bool Delete(UUID principalID, string friend)
{
return Delete(principalID.ToString(), friend);
}
public bool Delete(string principalID, string friend)
{
using (SqlConnection conn = new SqlConnection(m_ConnectionString))
using (SqlCommand cmd = new SqlCommand())
@@ -67,6 +72,11 @@ namespace OpenSim.Data.MSSQL
}
public FriendsData[] GetFriends(UUID principalID)
{
return GetFriends(principalID.ToString());
}
public FriendsData[] GetFriends(string principalID)
{
using (SqlConnection conn = new SqlConnection(m_ConnectionString))
using (SqlCommand cmd = new SqlCommand())

View File

@@ -168,14 +168,13 @@ namespace OpenSim.Data.MSSQL
protected T[] DoQuery(SqlCommand cmd)
{
List<T> result = new List<T>();
using (SqlDataReader reader = cmd.ExecuteReader())
{
if (reader == null)
return new T[0];
CheckColumnNames(reader);
List<T> result = new List<T>();
CheckColumnNames(reader);
while (reader.Read())
{
@@ -262,6 +261,15 @@ namespace OpenSim.Data.MSSQL
{
names.Add(fi.Name);
values.Add("@" + fi.Name);
// Temporarily return more information about what field is unexpectedly null for
// http://opensimulator.org/mantis/view.php?id=5403. This might be due to a bug in the
// InventoryTransferModule or we may be required to substitute a DBNull here.
if (fi.GetValue(row) == null)
throw new NullReferenceException(
string.Format(
"[MSSQL GENERIC TABLE HANDLER]: Trying to store field {0} for {1} which is unexpectedly null",
fi.Name, row));
if (constraintFields.Count > 0 && constraintFields.Contains(fi.Name))
{
constraints.Add(new KeyValuePair<string, string>(fi.Name, fi.GetValue(row).ToString()));
@@ -358,12 +366,18 @@ namespace OpenSim.Data.MSSQL
string where = String.Join(" AND ", terms.ToArray());
string query = String.Format("DELETE * FROM {0} WHERE {1}", m_Realm, where);
string query = String.Format("DELETE FROM {0} WHERE {1}", m_Realm, where);
cmd.Connection = conn;
cmd.CommandText = query;
conn.Open();
return cmd.ExecuteNonQuery() > 0;
if (cmd.ExecuteNonQuery() > 0)
{
//m_log.Warn("[MSSQLGenericTable]: " + deleteCommand);
return true;
}
return false;
}
}
}

View File

@@ -29,16 +29,19 @@ using System;
using System.Data;
using System.Data.Common;
using System.Reflection;
using System.Data.SqlClient;
namespace OpenSim.Data.MSSQL
{
public class MSSQLMigration : Migration
{
public MSSQLMigration(DbConnection conn, Assembly assem, string type) : base(conn, assem, type)
public MSSQLMigration(DbConnection conn, Assembly assem, string type)
: base(conn, assem, type)
{
}
public MSSQLMigration(DbConnection conn, Assembly assem, string subtype, string type) : base(conn, assem, subtype, type)
public MSSQLMigration(DbConnection conn, Assembly assem, string subtype, string type)
: base(conn, assem, subtype, type)
{
}
@@ -67,5 +70,30 @@ namespace OpenSim.Data.MSSQL
}
return version;
}
protected override void ExecuteScript(DbConnection conn, string[] script)
{
if (!(conn is SqlConnection))
{
base.ExecuteScript(conn, script);
return;
}
foreach (string sql in script)
{
try
{
using (SqlCommand cmd = new SqlCommand(sql, (SqlConnection)conn))
{
cmd.ExecuteNonQuery();
}
}
catch (Exception)
{
throw new Exception(sql);
}
}
}
}
}

View File

@@ -70,6 +70,7 @@ namespace OpenSim.Data.MSSQL
string sql = "select * from ["+m_Realm+"] where regionName like @regionName";
if (scopeID != UUID.Zero)
sql += " and ScopeID = @scopeID";
sql += " order by regionName";
using (SqlConnection conn = new SqlConnection(m_ConnectionString))
using (SqlCommand cmd = new SqlCommand(sql, conn))
{

View File

@@ -55,6 +55,10 @@ namespace OpenSim.Data.MSSQL
/// </summary>
private MSSQLManager _Database;
private string m_connectionString;
protected virtual Assembly Assembly
{
get { return GetType().Assembly; }
}
public MSSQLSimulationData()
{
@@ -74,9 +78,13 @@ namespace OpenSim.Data.MSSQL
m_connectionString = connectionString;
_Database = new MSSQLManager(connectionString);
//Migration settings
_Database.CheckMigration(_migrationStore);
using (SqlConnection conn = new SqlConnection(connectionString))
{
conn.Open();
//New Migration settings
Migration m = new Migration(conn, Assembly, "RegionStore");
m.Update();
}
}
/// <summary>
@@ -214,7 +222,7 @@ namespace OpenSim.Data.MSSQL
{
command.Parameters.Clear();
command.Parameters.Add(_Database.CreateParameter("@PrimID", objectPart.UUID));
List<TaskInventoryItem> inventory = new List<TaskInventoryItem>();
using (SqlDataReader reader = command.ExecuteReader())
@@ -241,6 +249,14 @@ namespace OpenSim.Data.MSSQL
/// <param name="regionUUID"></param>
public void StoreObject(SceneObjectGroup obj, UUID regionUUID)
{
uint flags = obj.RootPart.GetEffectiveObjectFlags();
// Eligibility check
//
if ((flags & (uint)PrimFlags.Temporary) != 0)
return;
if ((flags & (uint)PrimFlags.TemporaryOnRez) != 0)
return;
_Log.DebugFormat("[MSSQL]: Adding/Changing SceneObjectGroup: {0} to region: {1}, object has {2} prims.", obj.UUID, regionUUID, obj.Parts.Length);
using (SqlConnection conn = new SqlConnection(m_connectionString))
@@ -700,16 +716,470 @@ VALUES
}
public RegionLightShareData LoadRegionWindlightSettings(UUID regionUUID)
{
//This connector doesn't support the windlight module yet
//Return default LL windlight settings
return new RegionLightShareData();
RegionLightShareData nWP = new RegionLightShareData();
nWP.OnSave += StoreRegionWindlightSettings;
string sql = "select * from [regionwindlight] where region_id = @regionID";
using (SqlConnection conn = new SqlConnection(m_connectionString))
using (SqlCommand cmd = new SqlCommand(sql, conn))
{
cmd.Parameters.Add(_Database.CreateParameter("@regionID", regionUUID));
conn.Open();
using (SqlDataReader result = cmd.ExecuteReader())
{
if (!result.Read())
{
//No result, so store our default windlight profile and return it
nWP.regionID = regionUUID;
StoreRegionWindlightSettings(nWP);
return nWP;
}
else
{
nWP.regionID = DBGuid.FromDB(result["region_id"]);
nWP.waterColor.X = Convert.ToSingle(result["water_color_r"]);
nWP.waterColor.Y = Convert.ToSingle(result["water_color_g"]);
nWP.waterColor.Z = Convert.ToSingle(result["water_color_b"]);
nWP.waterFogDensityExponent = Convert.ToSingle(result["water_fog_density_exponent"]);
nWP.underwaterFogModifier = Convert.ToSingle(result["underwater_fog_modifier"]);
nWP.reflectionWaveletScale.X = Convert.ToSingle(result["reflection_wavelet_scale_1"]);
nWP.reflectionWaveletScale.Y = Convert.ToSingle(result["reflection_wavelet_scale_2"]);
nWP.reflectionWaveletScale.Z = Convert.ToSingle(result["reflection_wavelet_scale_3"]);
nWP.fresnelScale = Convert.ToSingle(result["fresnel_scale"]);
nWP.fresnelOffset = Convert.ToSingle(result["fresnel_offset"]);
nWP.refractScaleAbove = Convert.ToSingle(result["refract_scale_above"]);
nWP.refractScaleBelow = Convert.ToSingle(result["refract_scale_below"]);
nWP.blurMultiplier = Convert.ToSingle(result["blur_multiplier"]);
nWP.bigWaveDirection.X = Convert.ToSingle(result["big_wave_direction_x"]);
nWP.bigWaveDirection.Y = Convert.ToSingle(result["big_wave_direction_y"]);
nWP.littleWaveDirection.X = Convert.ToSingle(result["little_wave_direction_x"]);
nWP.littleWaveDirection.Y = Convert.ToSingle(result["little_wave_direction_y"]);
UUID.TryParse(result["normal_map_texture"].ToString(), out nWP.normalMapTexture);
nWP.horizon.X = Convert.ToSingle(result["horizon_r"]);
nWP.horizon.Y = Convert.ToSingle(result["horizon_g"]);
nWP.horizon.Z = Convert.ToSingle(result["horizon_b"]);
nWP.horizon.W = Convert.ToSingle(result["horizon_i"]);
nWP.hazeHorizon = Convert.ToSingle(result["haze_horizon"]);
nWP.blueDensity.X = Convert.ToSingle(result["blue_density_r"]);
nWP.blueDensity.Y = Convert.ToSingle(result["blue_density_g"]);
nWP.blueDensity.Z = Convert.ToSingle(result["blue_density_b"]);
nWP.blueDensity.W = Convert.ToSingle(result["blue_density_i"]);
nWP.hazeDensity = Convert.ToSingle(result["haze_density"]);
nWP.densityMultiplier = Convert.ToSingle(result["density_multiplier"]);
nWP.distanceMultiplier = Convert.ToSingle(result["distance_multiplier"]);
nWP.maxAltitude = Convert.ToUInt16(result["max_altitude"]);
nWP.sunMoonColor.X = Convert.ToSingle(result["sun_moon_color_r"]);
nWP.sunMoonColor.Y = Convert.ToSingle(result["sun_moon_color_g"]);
nWP.sunMoonColor.Z = Convert.ToSingle(result["sun_moon_color_b"]);
nWP.sunMoonColor.W = Convert.ToSingle(result["sun_moon_color_i"]);
nWP.sunMoonPosition = Convert.ToSingle(result["sun_moon_position"]);
nWP.ambient.X = Convert.ToSingle(result["ambient_r"]);
nWP.ambient.Y = Convert.ToSingle(result["ambient_g"]);
nWP.ambient.Z = Convert.ToSingle(result["ambient_b"]);
nWP.ambient.W = Convert.ToSingle(result["ambient_i"]);
nWP.eastAngle = Convert.ToSingle(result["east_angle"]);
nWP.sunGlowFocus = Convert.ToSingle(result["sun_glow_focus"]);
nWP.sunGlowSize = Convert.ToSingle(result["sun_glow_size"]);
nWP.sceneGamma = Convert.ToSingle(result["scene_gamma"]);
nWP.starBrightness = Convert.ToSingle(result["star_brightness"]);
nWP.cloudColor.X = Convert.ToSingle(result["cloud_color_r"]);
nWP.cloudColor.Y = Convert.ToSingle(result["cloud_color_g"]);
nWP.cloudColor.Z = Convert.ToSingle(result["cloud_color_b"]);
nWP.cloudColor.W = Convert.ToSingle(result["cloud_color_i"]);
nWP.cloudXYDensity.X = Convert.ToSingle(result["cloud_x"]);
nWP.cloudXYDensity.Y = Convert.ToSingle(result["cloud_y"]);
nWP.cloudXYDensity.Z = Convert.ToSingle(result["cloud_density"]);
nWP.cloudCoverage = Convert.ToSingle(result["cloud_coverage"]);
nWP.cloudScale = Convert.ToSingle(result["cloud_scale"]);
nWP.cloudDetailXYDensity.X = Convert.ToSingle(result["cloud_detail_x"]);
nWP.cloudDetailXYDensity.Y = Convert.ToSingle(result["cloud_detail_y"]);
nWP.cloudDetailXYDensity.Z = Convert.ToSingle(result["cloud_detail_density"]);
nWP.cloudScrollX = Convert.ToSingle(result["cloud_scroll_x"]);
nWP.cloudScrollXLock = Convert.ToBoolean(result["cloud_scroll_x_lock"]);
nWP.cloudScrollY = Convert.ToSingle(result["cloud_scroll_y"]);
nWP.cloudScrollYLock = Convert.ToBoolean(result["cloud_scroll_y_lock"]);
nWP.drawClassicClouds = Convert.ToBoolean(result["draw_classic_clouds"]);
nWP.valid = true;
}
}
}
return nWP;
}
public void RemoveRegionWindlightSettings(UUID regionID)
{
string sql = "delete from [regionwindlight] where region_id = @region_id";
using (SqlConnection conn = new SqlConnection(m_connectionString))
using (SqlCommand cmd = new SqlCommand(sql, conn))
{
conn.Open();
cmd.Parameters.Add(_Database.CreateParameter("@region_id", regionID));
cmd.ExecuteNonQuery();
}
}
public void StoreRegionWindlightSettings(RegionLightShareData wl)
{
//This connector doesn't support the windlight module yet
string sql = "select count (region_id) from regionwindlight where region_id = @region_id";
bool exists = false;
using (SqlConnection conn = new SqlConnection(m_connectionString))
{
conn.Open();
using (SqlCommand cmd = new SqlCommand(sql, conn))
{
cmd.Parameters.Add(_Database.CreateParameter("@region_id", wl.regionID));
exists = (int)cmd.ExecuteScalar() > 0;
}
}
if (exists)
{
RemoveRegionWindlightSettings(wl.regionID);
}
// sql insert
sql = @"INSERT INTO [regionwindlight]
([region_id]
,[water_color_r]
,[water_color_g]
,[water_color_b]
,[water_fog_density_exponent]
,[underwater_fog_modifier]
,[reflection_wavelet_scale_1]
,[reflection_wavelet_scale_2]
,[reflection_wavelet_scale_3]
,[fresnel_scale]
,[fresnel_offset]
,[refract_scale_above]
,[refract_scale_below]
,[blur_multiplier]
,[big_wave_direction_x]
,[big_wave_direction_y]
,[little_wave_direction_x]
,[little_wave_direction_y]
,[normal_map_texture]
,[horizon_r]
,[horizon_g]
,[horizon_b]
,[horizon_i]
,[haze_horizon]
,[blue_density_r]
,[blue_density_g]
,[blue_density_b]
,[blue_density_i]
,[haze_density]
,[density_multiplier]
,[distance_multiplier]
,[max_altitude]
,[sun_moon_color_r]
,[sun_moon_color_g]
,[sun_moon_color_b]
,[sun_moon_color_i]
,[sun_moon_position]
,[ambient_r]
,[ambient_g]
,[ambient_b]
,[ambient_i]
,[east_angle]
,[sun_glow_focus]
,[sun_glow_size]
,[scene_gamma]
,[star_brightness]
,[cloud_color_r]
,[cloud_color_g]
,[cloud_color_b]
,[cloud_color_i]
,[cloud_x]
,[cloud_y]
,[cloud_density]
,[cloud_coverage]
,[cloud_scale]
,[cloud_detail_x]
,[cloud_detail_y]
,[cloud_detail_density]
,[cloud_scroll_x]
,[cloud_scroll_x_lock]
,[cloud_scroll_y]
,[cloud_scroll_y_lock]
,[draw_classic_clouds])
VALUES
(@region_id
,@water_color_r
,@water_color_g
,@water_color_b
,@water_fog_density_exponent
,@underwater_fog_modifier
,@reflection_wavelet_scale_1
,@reflection_wavelet_scale_2
,@reflection_wavelet_scale_3
,@fresnel_scale
,@fresnel_offset
,@refract_scale_above
,@refract_scale_below
,@blur_multiplier
,@big_wave_direction_x
,@big_wave_direction_y
,@little_wave_direction_x
,@little_wave_direction_y
,@normal_map_texture
,@horizon_r
,@horizon_g
,@horizon_b
,@horizon_i
,@haze_horizon
,@blue_density_r
,@blue_density_g
,@blue_density_b
,@blue_density_i
,@haze_density
,@density_multiplier
,@distance_multiplier
,@max_altitude
,@sun_moon_color_r
,@sun_moon_color_g
,@sun_moon_color_b
,@sun_moon_color_i
,@sun_moon_position
,@ambient_r
,@ambient_g
,@ambient_b
,@ambient_i
,@east_angle
,@sun_glow_focus
,@sun_glow_size
,@scene_gamma
,@star_brightness
,@cloud_color_r
,@cloud_color_g
,@cloud_color_b
,@cloud_color_i
,@cloud_x
,@cloud_y
,@cloud_density
,@cloud_coverage
,@cloud_scale
,@cloud_detail_x
,@cloud_detail_y
,@cloud_detail_density
,@cloud_scroll_x
,@cloud_scroll_x_lock
,@cloud_scroll_y
,@cloud_scroll_y_lock
,@draw_classic_clouds)";
using (SqlConnection conn = new SqlConnection(m_connectionString))
{
conn.Open();
using (SqlCommand cmd = new SqlCommand(sql, conn))
{
cmd.Parameters.Add(_Database.CreateParameter("region_id", wl.regionID));
cmd.Parameters.Add(_Database.CreateParameter("water_color_r", wl.waterColor.X));
cmd.Parameters.Add(_Database.CreateParameter("water_color_g", wl.waterColor.Y));
cmd.Parameters.Add(_Database.CreateParameter("water_color_b", wl.waterColor.Z));
cmd.Parameters.Add(_Database.CreateParameter("water_fog_density_exponent", wl.waterFogDensityExponent));
cmd.Parameters.Add(_Database.CreateParameter("underwater_fog_modifier", wl.underwaterFogModifier));
cmd.Parameters.Add(_Database.CreateParameter("reflection_wavelet_scale_1", wl.reflectionWaveletScale.X));
cmd.Parameters.Add(_Database.CreateParameter("reflection_wavelet_scale_2", wl.reflectionWaveletScale.Y));
cmd.Parameters.Add(_Database.CreateParameter("reflection_wavelet_scale_3", wl.reflectionWaveletScale.Z));
cmd.Parameters.Add(_Database.CreateParameter("fresnel_scale", wl.fresnelScale));
cmd.Parameters.Add(_Database.CreateParameter("fresnel_offset", wl.fresnelOffset));
cmd.Parameters.Add(_Database.CreateParameter("refract_scale_above", wl.refractScaleAbove));
cmd.Parameters.Add(_Database.CreateParameter("refract_scale_below", wl.refractScaleBelow));
cmd.Parameters.Add(_Database.CreateParameter("blur_multiplier", wl.blurMultiplier));
cmd.Parameters.Add(_Database.CreateParameter("big_wave_direction_x", wl.bigWaveDirection.X));
cmd.Parameters.Add(_Database.CreateParameter("big_wave_direction_y", wl.bigWaveDirection.Y));
cmd.Parameters.Add(_Database.CreateParameter("little_wave_direction_x", wl.littleWaveDirection.X));
cmd.Parameters.Add(_Database.CreateParameter("little_wave_direction_y", wl.littleWaveDirection.Y));
cmd.Parameters.Add(_Database.CreateParameter("normal_map_texture", wl.normalMapTexture));
cmd.Parameters.Add(_Database.CreateParameter("horizon_r", wl.horizon.X));
cmd.Parameters.Add(_Database.CreateParameter("horizon_g", wl.horizon.Y));
cmd.Parameters.Add(_Database.CreateParameter("horizon_b", wl.horizon.Z));
cmd.Parameters.Add(_Database.CreateParameter("horizon_i", wl.horizon.W));
cmd.Parameters.Add(_Database.CreateParameter("haze_horizon", wl.hazeHorizon));
cmd.Parameters.Add(_Database.CreateParameter("blue_density_r", wl.blueDensity.X));
cmd.Parameters.Add(_Database.CreateParameter("blue_density_g", wl.blueDensity.Y));
cmd.Parameters.Add(_Database.CreateParameter("blue_density_b", wl.blueDensity.Z));
cmd.Parameters.Add(_Database.CreateParameter("blue_density_i", wl.blueDensity.W));
cmd.Parameters.Add(_Database.CreateParameter("haze_density", wl.hazeDensity));
cmd.Parameters.Add(_Database.CreateParameter("density_multiplier", wl.densityMultiplier));
cmd.Parameters.Add(_Database.CreateParameter("distance_multiplier", wl.distanceMultiplier));
cmd.Parameters.Add(_Database.CreateParameter("max_altitude", wl.maxAltitude));
cmd.Parameters.Add(_Database.CreateParameter("sun_moon_color_r", wl.sunMoonColor.X));
cmd.Parameters.Add(_Database.CreateParameter("sun_moon_color_g", wl.sunMoonColor.Y));
cmd.Parameters.Add(_Database.CreateParameter("sun_moon_color_b", wl.sunMoonColor.Z));
cmd.Parameters.Add(_Database.CreateParameter("sun_moon_color_i", wl.sunMoonColor.W));
cmd.Parameters.Add(_Database.CreateParameter("sun_moon_position", wl.sunMoonPosition));
cmd.Parameters.Add(_Database.CreateParameter("ambient_r", wl.ambient.X));
cmd.Parameters.Add(_Database.CreateParameter("ambient_g", wl.ambient.Y));
cmd.Parameters.Add(_Database.CreateParameter("ambient_b", wl.ambient.Z));
cmd.Parameters.Add(_Database.CreateParameter("ambient_i", wl.ambient.W));
cmd.Parameters.Add(_Database.CreateParameter("east_angle", wl.eastAngle));
cmd.Parameters.Add(_Database.CreateParameter("sun_glow_focus", wl.sunGlowFocus));
cmd.Parameters.Add(_Database.CreateParameter("sun_glow_size", wl.sunGlowSize));
cmd.Parameters.Add(_Database.CreateParameter("scene_gamma", wl.sceneGamma));
cmd.Parameters.Add(_Database.CreateParameter("star_brightness", wl.starBrightness));
cmd.Parameters.Add(_Database.CreateParameter("cloud_color_r", wl.cloudColor.X));
cmd.Parameters.Add(_Database.CreateParameter("cloud_color_g", wl.cloudColor.Y));
cmd.Parameters.Add(_Database.CreateParameter("cloud_color_b", wl.cloudColor.Z));
cmd.Parameters.Add(_Database.CreateParameter("cloud_color_i", wl.cloudColor.W));
cmd.Parameters.Add(_Database.CreateParameter("cloud_x", wl.cloudXYDensity.X));
cmd.Parameters.Add(_Database.CreateParameter("cloud_y", wl.cloudXYDensity.Y));
cmd.Parameters.Add(_Database.CreateParameter("cloud_density", wl.cloudXYDensity.Z));
cmd.Parameters.Add(_Database.CreateParameter("cloud_coverage", wl.cloudCoverage));
cmd.Parameters.Add(_Database.CreateParameter("cloud_scale", wl.cloudScale));
cmd.Parameters.Add(_Database.CreateParameter("cloud_detail_x", wl.cloudDetailXYDensity.X));
cmd.Parameters.Add(_Database.CreateParameter("cloud_detail_y", wl.cloudDetailXYDensity.Y));
cmd.Parameters.Add(_Database.CreateParameter("cloud_detail_density", wl.cloudDetailXYDensity.Z));
cmd.Parameters.Add(_Database.CreateParameter("cloud_scroll_x", wl.cloudScrollX));
cmd.Parameters.Add(_Database.CreateParameter("cloud_scroll_x_lock", wl.cloudScrollXLock));
cmd.Parameters.Add(_Database.CreateParameter("cloud_scroll_y", wl.cloudScrollY));
cmd.Parameters.Add(_Database.CreateParameter("cloud_scroll_y_lock", wl.cloudScrollYLock));
cmd.Parameters.Add(_Database.CreateParameter("draw_classic_clouds", wl.drawClassicClouds));
cmd.ExecuteNonQuery();
}
}
#region update
// }
// else
// {
// // sql update
// sql = @"UPDATE [OpenSim].[dbo].[regionwindlight]
// SET [region_id] = @region_id
// ,[water_color_r] = @water_color_r
// ,[water_color_g] = @water_color_g
// ,[water_color_b] = @water_color_b
// ,[water_fog_density_exponent] = @water_fog_density_exponent
// ,[underwater_fog_modifier] = @underwater_fog_modifier
// ,[reflection_wavelet_scale_1] = @reflection_wavelet_scale_1
// ,[reflection_wavelet_scale_2] = @reflection_wavelet_scale_2
// ,[reflection_wavelet_scale_3] = @reflection_wavelet_scale_3
// ,[fresnel_scale] = @fresnel_scale
// ,[fresnel_offset] = @fresnel_offset
// ,[refract_scale_above] = @refract_scale_above
// ,[refract_scale_below] = @refract_scale_below
// ,[blur_multiplier] = @blur_multiplier
// ,[big_wave_direction_x] = @big_wave_direction_x
// ,[big_wave_direction_y] = @big_wave_direction_y
// ,[little_wave_direction_x] = @little_wave_direction_x
// ,[little_wave_direction_y] = @little_wave_direction_y
// ,[normal_map_texture] = @normal_map_texture
// ,[horizon_r] = @horizon_r
// ,[horizon_g] = @horizon_g
// ,[horizon_b] = @horizon_b
// ,[horizon_i] = @horizon_i
// ,[haze_horizon] = @haze_horizon
// ,[blue_density_r] = @blue_density_r
// ,[blue_density_g] = @blue_density_g
// ,[blue_density_b] = @blue_density_b
// ,[blue_density_i] = @blue_density_i
// ,[haze_density] = @haze_density
// ,[density_multiplier] = @density_multiplier
// ,[distance_multiplier] = @distance_multiplier
// ,[max_altitude] = @max_altitude
// ,[sun_moon_color_r] = @sun_moon_color_r
// ,[sun_moon_color_g] = @sun_moon_color_g
// ,[sun_moon_color_b] = @sun_moon_color_b
// ,[sun_moon_color_i] = @sun_moon_color_i
// ,[sun_moon_position] = @sun_moon_position
// ,[ambient_r] = @ambient_r
// ,[ambient_g] = @ambient_g
// ,[ambient_b] = @ambient_b
// ,[ambient_i] = @ambient_i
// ,[east_angle] = @east_angle
// ,[sun_glow_focus] = @sun_glow_focus
// ,[sun_glow_size] = @sun_glow_size
// ,[scene_gamma] = @scene_gamma
// ,[star_brightness] = @star_brightness
// ,[cloud_color_r] = @cloud_color_r
// ,[cloud_color_g] = @cloud_color_g
// ,[cloud_color_b] = @cloud_color_b
// ,[cloud_color_i] = @cloud_color_i
// ,[cloud_x] = @cloud_x
// ,[cloud_y] = @cloud_y
// ,[cloud_density] = @cloud_density
// ,[cloud_coverage] = @cloud_coverage
// ,[cloud_scale] = @cloud_scale
// ,[cloud_detail_x] = @cloud_detail_x
// ,[cloud_detail_y] = @cloud_detail_y
// ,[cloud_detail_density] = @cloud_detail_density
// ,[cloud_scroll_x] = @cloud_scroll_x
// ,[cloud_scroll_x_lock] = @cloud_scroll_x_lock
// ,[cloud_scroll_y] = @cloud_scroll_y
// ,[cloud_scroll_y_lock] = @cloud_scroll_y_lock
// ,[draw_classic_clouds] = @draw_classic_clouds
// WHERE region_id = @region_id";
// using (SqlConnection conn = new SqlConnection(m_connectionString))
// {
// conn.Open();
// using (SqlCommand cmd = new SqlCommand(sql, conn))
// {
// cmd.Parameters.AddWithValue("region_id", wl.regionID);
// cmd.Parameters.AddWithValue("water_color_r", wl.waterColor.X);
// cmd.Parameters.AddWithValue("water_color_g", wl.waterColor.Y);
// cmd.Parameters.AddWithValue("water_color_b", wl.waterColor.Z);
// cmd.Parameters.AddWithValue("water_fog_density_exponent", wl.waterFogDensityExponent);
// cmd.Parameters.AddWithValue("underwater_fog_modifier", wl.underwaterFogModifier);
// cmd.Parameters.AddWithValue("reflection_wavelet_scale_1", wl.reflectionWaveletScale.X);
// cmd.Parameters.AddWithValue("reflection_wavelet_scale_2", wl.reflectionWaveletScale.Y);
// cmd.Parameters.AddWithValue("reflection_wavelet_scale_3", wl.reflectionWaveletScale.Z);
// cmd.Parameters.AddWithValue("fresnel_scale", wl.fresnelScale);
// cmd.Parameters.AddWithValue("fresnel_offset", wl.fresnelOffset);
// cmd.Parameters.AddWithValue("refract_scale_above", wl.refractScaleAbove);
// cmd.Parameters.AddWithValue("refract_scale_below", wl.refractScaleBelow);
// cmd.Parameters.AddWithValue("blur_multiplier", wl.blurMultiplier);
// cmd.Parameters.AddWithValue("big_wave_direction_x", wl.bigWaveDirection.X);
// cmd.Parameters.AddWithValue("big_wave_direction_y", wl.bigWaveDirection.Y);
// cmd.Parameters.AddWithValue("little_wave_direction_x", wl.littleWaveDirection.X);
// cmd.Parameters.AddWithValue("little_wave_direction_y", wl.littleWaveDirection.Y);
// cmd.Parameters.AddWithValue("normal_map_texture", wl.normalMapTexture);
// cmd.Parameters.AddWithValue("horizon_r", wl.horizon.X);
// cmd.Parameters.AddWithValue("horizon_g", wl.horizon.Y);
// cmd.Parameters.AddWithValue("horizon_b", wl.horizon.Z);
// cmd.Parameters.AddWithValue("horizon_i", wl.horizon.W);
// cmd.Parameters.AddWithValue("haze_horizon", wl.hazeHorizon);
// cmd.Parameters.AddWithValue("blue_density_r", wl.blueDensity.X);
// cmd.Parameters.AddWithValue("blue_density_g", wl.blueDensity.Y);
// cmd.Parameters.AddWithValue("blue_density_b", wl.blueDensity.Z);
// cmd.Parameters.AddWithValue("blue_density_i", wl.blueDensity.W);
// cmd.Parameters.AddWithValue("haze_density", wl.hazeDensity);
// cmd.Parameters.AddWithValue("density_multiplier", wl.densityMultiplier);
// cmd.Parameters.AddWithValue("distance_multiplier", wl.distanceMultiplier);
// cmd.Parameters.AddWithValue("max_altitude", wl.maxAltitude);
// cmd.Parameters.AddWithValue("sun_moon_color_r", wl.sunMoonColor.X);
// cmd.Parameters.AddWithValue("sun_moon_color_g", wl.sunMoonColor.Y);
// cmd.Parameters.AddWithValue("sun_moon_color_b", wl.sunMoonColor.Z);
// cmd.Parameters.AddWithValue("sun_moon_color_i", wl.sunMoonColor.W);
// cmd.Parameters.AddWithValue("sun_moon_position", wl.sunMoonPosition);
// cmd.Parameters.AddWithValue("ambient_r", wl.ambient.X);
// cmd.Parameters.AddWithValue("ambient_g", wl.ambient.Y);
// cmd.Parameters.AddWithValue("ambient_b", wl.ambient.Z);
// cmd.Parameters.AddWithValue("ambient_i", wl.ambient.W);
// cmd.Parameters.AddWithValue("east_angle", wl.eastAngle);
// cmd.Parameters.AddWithValue("sun_glow_focus", wl.sunGlowFocus);
// cmd.Parameters.AddWithValue("sun_glow_size", wl.sunGlowSize);
// cmd.Parameters.AddWithValue("scene_gamma", wl.sceneGamma);
// cmd.Parameters.AddWithValue("star_brightness", wl.starBrightness);
// cmd.Parameters.AddWithValue("cloud_color_r", wl.cloudColor.X);
// cmd.Parameters.AddWithValue("cloud_color_g", wl.cloudColor.Y);
// cmd.Parameters.AddWithValue("cloud_color_b", wl.cloudColor.Z);
// cmd.Parameters.AddWithValue("cloud_color_i", wl.cloudColor.W);
// cmd.Parameters.AddWithValue("cloud_x", wl.cloudXYDensity.X);
// cmd.Parameters.AddWithValue("cloud_y", wl.cloudXYDensity.Y);
// cmd.Parameters.AddWithValue("cloud_density", wl.cloudXYDensity.Z);
// cmd.Parameters.AddWithValue("cloud_coverage", wl.cloudCoverage);
// cmd.Parameters.AddWithValue("cloud_scale", wl.cloudScale);
// cmd.Parameters.AddWithValue("cloud_detail_x", wl.cloudDetailXYDensity.X);
// cmd.Parameters.AddWithValue("cloud_detail_y", wl.cloudDetailXYDensity.Y);
// cmd.Parameters.AddWithValue("cloud_detail_density", wl.cloudDetailXYDensity.Z);
// cmd.Parameters.AddWithValue("cloud_scroll_x", wl.cloudScrollX);
// cmd.Parameters.AddWithValue("cloud_scroll_x_lock", wl.cloudScrollXLock);
// cmd.Parameters.AddWithValue("cloud_scroll_y", wl.cloudScrollY);
// cmd.Parameters.AddWithValue("cloud_scroll_y_lock", wl.cloudScrollYLock);
// cmd.Parameters.AddWithValue("draw_classic_clouds", wl.drawClassicClouds);
// cmd.ExecuteNonQuery();
// }
// }
// }
#endregion
}
/// <summary>
/// Loads the settings of a region.
@@ -1136,7 +1606,7 @@ VALUES
if (Convert.ToInt16(primRow["PassTouches"]) != 0)
prim.PassTouches = true;
prim.LinkNum = Convert.ToInt32(primRow["LinkNumber"]);
if (!(primRow["MediaURL"] is System.DBNull))
prim.MediaUrl = (string)primRow["MediaURL"];
@@ -1192,11 +1662,11 @@ VALUES
{
}
if (!(shapeRow["Media"] is System.DBNull) )
if (!(shapeRow["Media"] is System.DBNull))
{
baseShape.Media = PrimitiveBaseShape.MediaList.FromXml((string)shapeRow["Media"]);
}
return baseShape;
}
@@ -1576,15 +2046,15 @@ VALUES
parameters.Add(_Database.CreateParameter("ExtraParams", s.ExtraParams));
parameters.Add(_Database.CreateParameter("State", s.State));
if(null == s.Media )
if (null == s.Media)
{
parameters.Add(_Database.CreateParameter("Media", DBNull.Value));
parameters.Add(_Database.CreateParameter("Media", DBNull.Value));
}
else
{
parameters.Add(_Database.CreateParameter("Media", s.Media.ToXml()));
parameters.Add(_Database.CreateParameter("Media", s.Media.ToXml()));
}
return parameters.ToArray();
}

View File

@@ -218,23 +218,27 @@ namespace OpenSim.Data.MSSQL
if (words.Length > 2)
return new UserAccountData[0];
string sql = "";
using (SqlConnection conn = new SqlConnection(m_ConnectionString))
using (SqlCommand cmd = new SqlCommand())
{
if (words.Length == 1)
{
cmd.CommandText = String.Format("select * from {0} where ([ScopeID]=@ScopeID or [ScopeID]='00000000-0000-0000-0000-000000000000') and ([FirstName] like @search or [LastName] like @search)", m_Realm);
sql = String.Format("select * from {0} where ([ScopeID]=@ScopeID or [ScopeID]='00000000-0000-0000-0000-000000000000') and ([FirstName] like @search or [LastName] like @search)", m_Realm);
cmd.Parameters.Add(m_database.CreateParameter("@scopeID", scopeID));
cmd.Parameters.Add(m_database.CreateParameter("@search", "%" + words[0] + "%"));
cmd.Parameters.Add(m_database.CreateParameter("@search", "%" + words[0] + "%"));
}
else
{
cmd.CommandText = String.Format("select * from {0} where ([ScopeID]=@ScopeID or [ScopeID]='00000000-0000-0000-0000-000000000000') and ([FirstName] like @searchFirst or [LastName] like @searchLast)", m_Realm);
cmd.Parameters.Add(m_database.CreateParameter("@searchFirst", "%" + words[0] + "%"));
cmd.Parameters.Add(m_database.CreateParameter("@searchLast", "%" + words[1] + "%"));
cmd.Parameters.Add(m_database.CreateParameter("@ScopeID", scopeID.ToString()));
sql = String.Format("select * from {0} where ([ScopeID]=@ScopeID or [ScopeID]='00000000-0000-0000-0000-000000000000') and ([FirstName] like @searchFirst or [LastName] like @searchLast)", m_Realm);
cmd.Parameters.Add(m_database.CreateParameter("@searchFirst", "%" + words[0] + "%"));
cmd.Parameters.Add(m_database.CreateParameter("@searchLast", "%" + words[1] + "%"));
cmd.Parameters.Add(m_database.CreateParameter("@ScopeID", scopeID.ToString()));
}
cmd.Connection = conn;
cmd.CommandText = sql;
conn.Open();
return DoQuery(cmd);
}
}

View File

@@ -66,11 +66,18 @@ namespace OpenSim.Data.MSSQL
public bool StoreFolder(XInventoryFolder folder)
{
if (folder.folderName.Length > 64)
folder.folderName = folder.folderName.Substring(0, 64);
return m_Folders.Store(folder);
}
public bool StoreItem(XInventoryItem item)
{
if (item.inventoryName.Length > 64)
item.inventoryName = item.inventoryName.Substring(0, 64);
if (item.inventoryDescription.Length > 128)
item.inventoryDescription = item.inventoryDescription.Substring(0, 128);
return m_Items.Store(item);
}
@@ -78,7 +85,6 @@ namespace OpenSim.Data.MSSQL
{
return m_Folders.Delete(field, val);
}
public bool DeleteFolders(string[] fields, string[] vals)
{
return m_Folders.Delete(fields, vals);
@@ -88,12 +94,10 @@ namespace OpenSim.Data.MSSQL
{
return m_Items.Delete(field, val);
}
public bool DeleteItems(string[] fields, string[] vals)
{
return m_Items.Delete(fields, vals);
}
public bool MoveItem(string id, string newParent)
{
return m_Items.MoveItem(id, newParent);
@@ -172,5 +176,27 @@ namespace OpenSim.Data.MSSQL
}
}
public override bool Store(XInventoryItem item)
{
if (!base.Store(item))
return false;
string sql = "update inventoryfolders set version=version+1 where folderID = @folderID";
using (SqlConnection conn = new SqlConnection(m_ConnectionString))
using (SqlCommand cmd = new SqlCommand(sql, conn))
{
conn.Open();
cmd.Parameters.AddWithValue("@folderID", item.parentFolderID.ToString());
try
{
cmd.ExecuteNonQuery();
}
catch (Exception)
{
return false;
}
}
return true;
}
}
}

View File

@@ -37,4 +37,28 @@ EXECUTE sp_rename N'dbo.Tmp_Avatars', N'Avatars', 'OBJECT'
COMMIT
:VERSION 3
BEGIN TRANSACTION
CREATE TABLE dbo.Tmp_Avatars
(
PrincipalID uniqueidentifier NOT NULL,
[Name] varchar(32) NOT NULL,
Value text NOT NULL DEFAULT '',
PRIMARY KEY CLUSTERED
(
[PrincipalID] ASC, [Name] ASC
)WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON) ON [PRIMARY]
) ON [PRIMARY]
TEXTIMAGE_ON [PRIMARY]
IF EXISTS(SELECT * FROM dbo.Avatars)
EXEC('INSERT INTO dbo.Tmp_Avatars (PrincipalID, Name, Value)
SELECT PrincipalID, CONVERT(text, Name), Value FROM dbo.Avatars WITH (HOLDLOCK TABLOCKX)')
DROP TABLE dbo.Avatars
EXECUTE sp_rename N'dbo.Tmp_Avatars', N'Avatars', 'OBJECT'
COMMIT

View File

@@ -19,4 +19,32 @@ IF EXISTS (SELECT * FROM sys.objects WHERE object_id = OBJECT_ID(N'[dbo].[userf
INSERT INTO Friends (PrincipalID, Friend, Flags, Offered)
SELECT [ownerID], [friendID], [friendPerms], 0 FROM userfriends;
COMMIT
:VERSION 3
BEGIN TRANSACTION
CREATE TABLE [Tmp_Friends]
([PrincipalID] varchar(255) NOT NULL DEFAULT '00000000-0000-0000-0000-000000000000',
[Friend] varchar(255) NOT NULL,
[Flags] char(16) NOT NULL DEFAULT '0',
[Offered] varchar(32) NOT NULL DEFAULT 0)
ON [PRIMARY]
IF EXISTS(SELECT * FROM dbo.Friends)
EXEC('INSERT INTO dbo.Tmp_Friends (PrincipalID, Friend, Flags, Offered)
SELECT CONVERT(varchar(255),PrincipalID), Friend, Flags, Offered FROM dbo.Friends WITH (HOLDLOCK TABLOCKX)')
DROP TABLE dbo.Friends
EXECUTE sp_rename N'dbo.Tmp_Friends', N'Friends', 'OBJECT'
ALTER TABLE dbo.Friends ADD
PRIMARY KEY CLUSTERED
(
[PrincipalID] ASC, [Friend] ASC
)WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON) ON [PRIMARY]
COMMIT

View File

@@ -17,3 +17,49 @@ CREATE TABLE "GridUser" (
)
COMMIT
:VERSION 2 # --------------------------
BEGIN TRANSACTION
CREATE TABLE [GridUser_tmp] (
[UserID] VARCHAR(255) NOT NULL,
[HomeRegionID] uniqueidentifier NOT NULL DEFAULT '00000000-0000-0000-0000-000000000000',
[HomePosition] CHAR(64) NOT NULL DEFAULT '<0,0,0>',
[HomeLookAt] CHAR(64) NOT NULL DEFAULT '<0,0,0>',
[LastRegionID] uniqueidentifier NOT NULL DEFAULT '00000000-0000-0000-0000-000000000000',
[LastPosition] CHAR(64) NOT NULL DEFAULT '<0,0,0>',
[LastLookAt] CHAR(64) NOT NULL DEFAULT '<0,0,0>',
[Online] CHAR(5) NOT NULL DEFAULT 'false',
[Login] CHAR(16) NOT NULL DEFAULT '0',
[Logout] CHAR(16) NOT NULL DEFAULT '0',
PRIMARY KEY CLUSTERED
(
[UserID] ASC
)WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON) ON [PRIMARY]
) ON [PRIMARY]
COMMIT
IF EXISTS(SELECT * FROM dbo.GridUser)
EXEC('INSERT INTO dbo.GridUser_tmp ([UserID]
,[HomeRegionID]
,[HomePosition]
,[HomeLookAt]
,[LastRegionID]
,[LastPosition]
,[LastLookAt]
,[Online]
,[Login]
,[Logout])
SELECT CONVERT(varchar(36), [HomeRegionID]), [HomePosition] ,[HomeLookAt] , CONVERT(varchar(36),[LastRegionID])
,[LastPosition]
,[LastLookAt]
,[Online]
,[Login]
,[Logout] FROM dbo.GridUser WITH (HOLDLOCK TABLOCKX)')
DROP TABLE dbo.GridUser
EXECUTE sp_rename N'dbo.GridUser_tmp', N'GridUser', 'OBJECT'

View File

@@ -244,4 +244,36 @@ ALTER TABLE inventoryitems
ADD CONSTRAINT DF_inventoryitems_creatorID
DEFAULT '00000000-0000-0000-0000-000000000000' FOR creatorID
:GO
:VERSION 9
BEGIN TRANSACTION
# CreatorID goes up to VARCHAR(255)
exec sp_rename 'inventoryitems.CreatorID', 'cr_old', 'COLUMN'
:GO
alter table inventoryitems
add creatorID varchar(255) NULL
:GO
update inventoryitems set creatorID = cr_old
alter table inventoryitems
drop CONSTRAINT DF_inventoryitems_creatorID
:GO
alter table inventoryitems
drop column cr_old
:GO
COMMIT
ALTER TABLE inventoryitems
ADD CONSTRAINT DF_inventoryitems_creatorID
DEFAULT '00000000-0000-0000-0000-000000000000' FOR creatorID
:GO

View File

@@ -1,23 +0,0 @@
<Addin id="OpenSim.Data.MSSQL" version="0.1">
<Runtime>
<Import assembly="OpenSim.Data.MSSQL.dll"/>
</Runtime>
<Dependencies>
<Addin id="OpenSim.Data" version="0.5" />
</Dependencies>
<Extension path = "/OpenSim/GridData">
<Plugin id="MSSQLGridData" provider="OpenSim.Data.MSSQL.dll" type="OpenSim.Data.MSSQL.MSSQLGridData" />
</Extension>
<Extension path = "/OpenSim/LogData">
<Plugin id="MSSQLLogData" provider="OpenSim.Data.MSSQL.dll" type="OpenSim.Data.MSSQL.MSSQLLogData" />
</Extension>
<Extension path = "/OpenSim/AssetData">
<Plugin id="MSSQLAssetData" provider="OpenSim.Data.MSSQL.dll" type="OpenSim.Data.MSSQL.MSSQLAssetData" />
</Extension>
<Extension path = "/OpenSim/InventoryData">
<Plugin id="MSSQLInventoryData" provider="OpenSim.Data.MSSQL.dll" type="OpenSim.Data.MSSQL.MSSQLInventoryData" />
</Extension>
<Extension path = "/OpenSim/UserData">
<Plugin id="MSSQLUserData" provider="OpenSim.Data.MSSQL.dll" type="OpenSim.Data.MSSQL.MSSQLUserData" />
</Extension>
</Addin>

View File

@@ -1003,7 +1003,7 @@ CREATE TABLE "regionwindlight" (
PRIMARY KEY ("region_id")
)
COMMIT TRANSACTION
COMMIT
:VERSION 26

View File

@@ -253,12 +253,14 @@ namespace OpenSim.Data.MySQL
}
/// <summary>
/// check if the asset UUID exist in database
/// Check if the asset exists in the database
/// </summary>
/// <param name="uuid">The asset UUID</param>
/// <returns>true if exist.</returns>
/// <returns>true if it exists, false otherwise.</returns>
override public bool ExistsAsset(UUID uuid)
{
// m_log.DebugFormat("[ASSETS DB]: Checking for asset {0}", uuid);
bool assetExists = false;
lock (m_dbLock)
@@ -275,7 +277,10 @@ namespace OpenSim.Data.MySQL
using (MySqlDataReader dbReader = cmd.ExecuteReader(CommandBehavior.SingleRow))
{
if (dbReader.Read())
{
// m_log.DebugFormat("[ASSETS DB]: Found asset {0}", uuid);
assetExists = true;
}
}
}
catch (Exception e)

View File

@@ -149,6 +149,22 @@ namespace OpenSim.Data.MySQL
}
}
public EstateSettings CreateNewEstate()
{
EstateSettings es = new EstateSettings();
es.OnSave += StoreEstateSettings;
DoCreate(es);
LoadBanList(es);
es.EstateManagers = LoadUUIDList(es.EstateID, "estate_managers");
es.EstateAccess = LoadUUIDList(es.EstateID, "estate_users");
es.EstateGroups = LoadUUIDList(es.EstateID, "estate_groups");
return es;
}
private EstateSettings DoLoad(MySqlCommand cmd, UUID regionID, bool create)
{
EstateSettings es = new EstateSettings();
@@ -188,54 +204,8 @@ namespace OpenSim.Data.MySQL
if (!found && create)
{
// Migration case
List<string> names = new List<string>(FieldList);
names.Remove("EstateID");
string sql = "insert into estate_settings (" + String.Join(",", names.ToArray()) + ") values ( ?" + String.Join(", ?", names.ToArray()) + ")";
using (MySqlCommand cmd2 = dbcon.CreateCommand())
{
cmd2.CommandText = sql;
cmd2.Parameters.Clear();
foreach (string name in FieldList)
{
if (m_FieldMap[name].GetValue(es) is bool)
{
if ((bool)m_FieldMap[name].GetValue(es))
cmd2.Parameters.AddWithValue("?" + name, "1");
else
cmd2.Parameters.AddWithValue("?" + name, "0");
}
else
{
cmd2.Parameters.AddWithValue("?" + name, m_FieldMap[name].GetValue(es).ToString());
}
}
cmd2.ExecuteNonQuery();
cmd2.CommandText = "select LAST_INSERT_ID() as id";
cmd2.Parameters.Clear();
using (IDataReader r = cmd2.ExecuteReader())
{
r.Read();
es.EstateID = Convert.ToUInt32(r["id"]);
}
cmd2.CommandText = "insert into estate_map values (?RegionID, ?EstateID)";
cmd2.Parameters.AddWithValue("?RegionID", regionID.ToString());
cmd2.Parameters.AddWithValue("?EstateID", es.EstateID.ToString());
// This will throw on dupe key
try { cmd2.ExecuteNonQuery(); }
catch (Exception) { }
es.Save();
}
DoCreate(es);
LinkRegion(regionID, (int)es.EstateID);
}
}
@@ -247,6 +217,54 @@ namespace OpenSim.Data.MySQL
return es;
}
private void DoCreate(EstateSettings es)
{
// Migration case
List<string> names = new List<string>(FieldList);
names.Remove("EstateID");
string sql = "insert into estate_settings (" + String.Join(",", names.ToArray()) + ") values ( ?" + String.Join(", ?", names.ToArray()) + ")";
using (MySqlConnection dbcon = new MySqlConnection(m_connectionString))
{
dbcon.Open();
using (MySqlCommand cmd2 = dbcon.CreateCommand())
{
cmd2.CommandText = sql;
cmd2.Parameters.Clear();
foreach (string name in FieldList)
{
if (m_FieldMap[name].GetValue(es) is bool)
{
if ((bool)m_FieldMap[name].GetValue(es))
cmd2.Parameters.AddWithValue("?" + name, "1");
else
cmd2.Parameters.AddWithValue("?" + name, "0");
}
else
{
cmd2.Parameters.AddWithValue("?" + name, m_FieldMap[name].GetValue(es).ToString());
}
}
cmd2.ExecuteNonQuery();
cmd2.CommandText = "select LAST_INSERT_ID() as id";
cmd2.Parameters.Clear();
using (IDataReader r = cmd2.ExecuteReader())
{
r.Read();
es.EstateID = Convert.ToUInt32(r["id"]);
}
es.Save();
}
}
}
public void StoreEstateSettings(EstateSettings es)
{
string sql = "replace into estate_settings (" + String.Join(",", FieldList) + ") values ( ?" + String.Join(", ?", FieldList) + ")";
@@ -477,7 +495,6 @@ namespace OpenSim.Data.MySQL
}
}
dbcon.Close();
}
@@ -507,7 +524,6 @@ namespace OpenSim.Data.MySQL
}
}
dbcon.Close();
}
@@ -519,16 +535,34 @@ namespace OpenSim.Data.MySQL
using (MySqlConnection dbcon = new MySqlConnection(m_connectionString))
{
dbcon.Open();
MySqlTransaction transaction = dbcon.BeginTransaction();
try
{
// Delete any existing association of this region with an estate.
using (MySqlCommand cmd = dbcon.CreateCommand())
{
cmd.Transaction = transaction;
cmd.CommandText = "delete from estate_map where RegionID = ?RegionID";
cmd.Parameters.AddWithValue("?RegionID", regionID);
cmd.ExecuteNonQuery();
}
using (MySqlCommand cmd = dbcon.CreateCommand())
{
cmd.Transaction = transaction;
cmd.CommandText = "insert into estate_map values (?RegionID, ?EstateID)";
cmd.Parameters.AddWithValue("?RegionID", regionID);
cmd.Parameters.AddWithValue("?EstateID", estateID);
int ret = cmd.ExecuteNonQuery();
if (ret != 0)
transaction.Commit();
else
transaction.Rollback();
dbcon.Close();
return (ret != 0);
@@ -537,6 +571,7 @@ namespace OpenSim.Data.MySQL
catch (MySqlException ex)
{
m_log.Error("[REGION DB]: LinkRegion failed: " + ex.Message);
transaction.Rollback();
}
dbcon.Close();

View File

@@ -43,6 +43,11 @@ namespace OpenSim.Data.MySQL
}
public bool Delete(UUID principalID, string friend)
{
return Delete(principalID.ToString(), friend);
}
public bool Delete(string principalID, string friend)
{
MySqlCommand cmd = new MySqlCommand();
@@ -64,5 +69,14 @@ namespace OpenSim.Data.MySQL
return DoQuery(cmd);
}
public FriendsData[] GetFriends(string principalID)
{
MySqlCommand cmd = new MySqlCommand();
cmd.CommandText = String.Format("select a.*,case when b.Flags is null then -1 else b.Flags end as TheirFlags from {0} as a left join {0} as b on a.PrincipalID = b.Friend and a.Friend = b.PrincipalID where a.PrincipalID LIKE ?PrincipalID", m_Realm);
cmd.Parameters.AddWithValue("?PrincipalID", principalID.ToString() + '%');
return DoQuery(cmd);
}
}
}

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

@@ -78,23 +78,6 @@ namespace OpenSim.Data.MySQL
//
Migration m = new Migration(dbcon, Assembly, "RegionStore");
m.Update();
// Clean dropped attachments
//
try
{
using (MySqlCommand cmd = dbcon.CreateCommand())
{
cmd.CommandText = "delete from prims, primshapes using prims " +
"left join primshapes on prims.uuid = primshapes.uuid " +
"where PCode = 9 and State <> 0";
ExecuteNonQuery(cmd);
}
}
catch (MySqlException ex)
{
m_log.Error("[REGION DB]: Error cleaning up dropped attachments: " + ex.Message);
}
}
}
@@ -753,7 +736,7 @@ namespace OpenSim.Data.MySQL
{
//No result, so store our default windlight profile and return it
nWP.regionID = regionUUID;
StoreRegionWindlightSettings(nWP);
// StoreRegionWindlightSettings(nWP);
return nWP;
}
else
@@ -1011,7 +994,7 @@ namespace OpenSim.Data.MySQL
"use_estate_sun, fixed_sun, sun_position, " +
"covenant, Sandbox, sunvectorx, sunvectory, " +
"sunvectorz, loaded_creation_datetime, " +
"loaded_creation_id, map_tile_ID) values (?RegionUUID, ?BlockTerraform, " +
"loaded_creation_id, map_tile_ID, block_search, casino) values (?RegionUUID, ?BlockTerraform, " +
"?BlockFly, ?AllowDamage, ?RestrictPushing, " +
"?AllowLandResell, ?AllowLandJoinDivide, " +
"?BlockShowInSearch, ?AgentLimit, ?ObjectBonus, " +
@@ -1026,7 +1009,7 @@ namespace OpenSim.Data.MySQL
"?SunPosition, ?Covenant, ?Sandbox, " +
"?SunVectorX, ?SunVectorY, ?SunVectorZ, " +
"?LoadedCreationDateTime, ?LoadedCreationID, " +
"?TerrainImageID)";
"?TerrainImageID, ?block_search, ?casino)";
FillRegionSettingsCommand(cmd, rs);
@@ -1226,7 +1209,6 @@ namespace OpenSim.Data.MySQL
return prim;
}
/// <summary>
/// Build a prim inventory item from the persisted data.
/// </summary>
@@ -1315,6 +1297,9 @@ namespace OpenSim.Data.MySQL
newSettings.TerrainImageID = DBGuid.FromDB(row["map_tile_ID"]);
newSettings.GodBlockSearch = Convert.ToBoolean(row["block_search"]);
newSettings.Casino = Convert.ToBoolean(row["casino"]);
return newSettings;
}
@@ -1644,6 +1629,8 @@ namespace OpenSim.Data.MySQL
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);
}

View File

@@ -70,13 +70,13 @@ namespace OpenSim.Data.MySQL
if (words.Length == 1)
{
cmd.CommandText = String.Format("select * from {0} where (ScopeID=?ScopeID or ScopeID='00000000-0000-0000-0000-000000000000') and (FirstName like ?search or LastName like ?search)", m_Realm);
cmd.CommandText = String.Format("select * from {0} where (ScopeID=?ScopeID or ScopeID='00000000-0000-0000-0000-000000000000') and (FirstName like ?search or LastName like ?search) and active=1", m_Realm);
cmd.Parameters.AddWithValue("?search", words[0] + "%");
cmd.Parameters.AddWithValue("?ScopeID", scopeID.ToString());
}
else
{
cmd.CommandText = String.Format("select * from {0} where (ScopeID=?ScopeID or ScopeID='00000000-0000-0000-0000-000000000000') and (FirstName like ?searchFirst and LastName like ?searchLast)", m_Realm);
cmd.CommandText = String.Format("select * from {0} where (ScopeID=?ScopeID or ScopeID='00000000-0000-0000-0000-000000000000') and (FirstName like ?searchFirst and LastName like ?searchLast) and active=1", m_Realm);
cmd.Parameters.AddWithValue("?searchFirst", words[0] + "%");
cmd.Parameters.AddWithValue("?searchLast", words[1] + "%");
cmd.Parameters.AddWithValue("?ScopeID", scopeID.ToString());

View File

@@ -21,5 +21,12 @@ INSERT INTO `Friends` SELECT `ownerID`, `friendID`, `friendPerms`, 0 FROM `userf
COMMIT;
:VERSION 3 # -------------------------
BEGIN;
ALTER TABLE `Friends` MODIFY COLUMN PrincipalID varchar(255) NOT NULL DEFAULT '00000000-0000-0000-0000-000000000000';
ALTER TABLE `Friends` DROP PRIMARY KEY;
ALTER TABLE `Friends` ADD PRIMARY KEY(PrincipalID(36), Friend(36));
COMMIT;

View File

@@ -1,23 +0,0 @@
<Addin id="OpenSim.Data.MySQL" version="0.1">
<Runtime>
<Import assembly="OpenSim.Data.MySQL.dll"/>
</Runtime>
<Dependencies>
<Addin id="OpenSim.Data" version="0.5" />
</Dependencies>
<Extension path = "/OpenSim/GridData">
<Plugin id="MySQLGridData" provider="OpenSim.Data.MySQL.dll" type="OpenSim.Data.MySQL.MySQLGridData" />
</Extension>
<Extension path = "/OpenSim/LogData">
<Plugin id="MySQLLogData" provider="OpenSim.Data.MySQL.dll" type="OpenSim.Data.MySQL.MySQLLogData" />
</Extension>
<Extension path = "/OpenSim/AssetData">
<Plugin id="MySQLAssetData" provider="OpenSim.Data.MySQL.dll" type="OpenSim.Data.MySQL.MySQLAssetData" />
</Extension>
<Extension path = "/OpenSim/InventoryData">
<Plugin id="MySQLInventoryData" provider="OpenSim.Data.MySQL.dll" type="OpenSim.Data.MySQL.MySQLInventoryData" />
</Extension>
<Extension path = "/OpenSim/UserData">
<Plugin id="MySQLUserData" provider="OpenSim.Data.MySQL.dll" type="OpenSim.Data.MySQL.MySQLUserData" />
</Extension>
</Addin>

View File

@@ -826,3 +826,19 @@ ALTER TABLE `prims` MODIFY COLUMN `CreatorID` VARCHAR(255) NOT NULL DEFAULT '';
ALTER TABLE `primitems` MODIFY COLUMN `CreatorID` VARCHAR(255) NOT NULL DEFAULT '';
COMMIT;
:VERSION 38 #---------------------
BEGIN;
alter table land ENGINE = MyISAM;
alter table landaccesslist ENGINE = MyISAM;
alter table migrations ENGINE = MyISAM;
alter table primitems ENGINE = MyISAM;
alter table prims ENGINE = MyISAM;
alter table primshapes ENGINE = MyISAM;
alter table regionban ENGINE = MyISAM;
alter table regionsettings ENGINE = MyISAM;
alter table terrain ENGINE = MyISAM;
COMMIT;

View File

@@ -84,6 +84,11 @@ namespace OpenSim.Data.Null
{
return new EstateSettings();
}
public EstateSettings CreateNewEstate()
{
return new EstateSettings();
}
public List<EstateSettings> LoadEstateSettingsAll()
{

View File

@@ -42,6 +42,11 @@ namespace OpenSim.Data.Null
{
}
public FriendsData[] GetFriends(UUID principalID)
{
return GetFriends(principalID.ToString());
}
/// <summary>
/// Tries to implement the Get [] semantics, but it cuts corners.
/// Specifically, it gets all friendships even if they weren't accepted yet.
@@ -49,11 +54,11 @@ namespace OpenSim.Data.Null
/// <param name="fields"></param>
/// <param name="values"></param>
/// <returns></returns>
public FriendsData[] GetFriends(UUID userID)
public FriendsData[] GetFriends(string userID)
{
List<FriendsData> lst = m_Data.FindAll(delegate (FriendsData fdata)
{
return fdata.PrincipalID == userID;
return fdata.PrincipalID == userID.ToString();
});
if (lst != null)
@@ -72,9 +77,14 @@ namespace OpenSim.Data.Null
return true;
}
public bool Delete(UUID userID, string friendID)
public bool Delete(UUID principalID, string friend)
{
List<FriendsData> lst = m_Data.FindAll(delegate(FriendsData fdata) { return fdata.PrincipalID == userID; });
return Delete(principalID.ToString(), friend);
}
public bool Delete(string userID, string friendID)
{
List<FriendsData> lst = m_Data.FindAll(delegate(FriendsData fdata) { return fdata.PrincipalID == userID.ToString(); });
if (lst != null)
{
FriendsData friend = lst.Find(delegate(FriendsData fdata) { return fdata.Friend == friendID; });

View File

@@ -40,7 +40,7 @@ namespace OpenSim.Data.Null
{
private static NullRegionData Instance = null;
private static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType);
// private static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType);
Dictionary<UUID, RegionData> m_regionData = new Dictionary<UUID, RegionData>();
@@ -97,7 +97,7 @@ namespace OpenSim.Data.Null
foreach (RegionData r in m_regionData.Values)
{
m_log.DebugFormat("[NULL REGION DATA]: comparing {0} to {1}", cleanName, r.RegionName.ToLower());
// m_log.DebugFormat("[NULL REGION DATA]: comparing {0} to {1}", cleanName, r.RegionName.ToLower());
if (queryMatch(r.RegionName.ToLower()))
ret.Add(r);
}

View File

@@ -59,22 +59,28 @@ namespace OpenSim.Data.Null
public void StoreRegionSettings(RegionSettings rs)
{
}
public RegionLightShareData LoadRegionWindlightSettings(UUID regionUUID)
{
//This connector doesn't support the windlight module yet
//Return default LL windlight settings
return new RegionLightShareData();
}
public void RemoveRegionWindlightSettings(UUID regionID)
{
}
public void StoreRegionWindlightSettings(RegionLightShareData wl)
{
//This connector doesn't support the windlight module yet
}
public RegionSettings LoadRegionSettings(UUID regionUUID)
{
return null;
{
RegionSettings rs = new RegionSettings();
rs.RegionUUID = regionUUID;
return rs;
}
public void StoreObject(SceneObjectGroup obj, UUID regionUUID)

View File

@@ -1,20 +0,0 @@
<Addin id="OpenSim.Data.SQLite" version="0.1">
<Runtime>
<Import assembly="OpenSim.Data.SQLite.dll"/>
</Runtime>
<Dependencies>
<Addin id="OpenSim.Data" version="0.5" />
</Dependencies>
<Extension path = "/OpenSim/GridData">
<Plugin id="SQLiteGridData" provider="OpenSim.Data.SQLite.dll" type="OpenSim.Data.SQLite.SQLiteGridData" />
</Extension>
<Extension path = "/OpenSim/AssetData">
<Plugin id="SQLiteAssetData" provider="OpenSim.Data.SQLite.dll" type="OpenSim.Data.SQLite.SQLiteAssetData" />
</Extension>
<Extension path = "/OpenSim/InventoryData">
<Plugin id="SQLiteInventoryData" provider="OpenSim.Data.SQLite.dll" type="OpenSim.Data.SQLite.SQLiteInventoryStore" />
</Extension>
<Extension path = "/OpenSim/UserData">
<Plugin id="SQLiteUserData" provider="OpenSim.Data.SQLite.dll" type="OpenSim.Data.SQLite.SQLiteUserData" />
</Extension>
</Addin>

View File

@@ -41,11 +41,9 @@ COMMIT;
:VERSION 2
ATTACH 'inventoryStore.db' AS old;
BEGIN TRANSACTION;
INSERT INTO inventoryfolders (folderName, type, version, folderID, agentID, parentFolderID) SELECT `name` AS folderName, `type` AS type, `version` AS version, `UUID` AS folderID, `agentID` AS agentID, `parentID` AS parentFolderID from old.inventoryfolders;
INSERT INTO inventoryitems (assetID, assetType, inventoryName, inventoryDescription, inventoryNextPermissions, inventoryCurrentPermissions, invType, creatorID, inventoryBasePermissions, inventoryEveryOnePermissions, salePrice, saleType, creationDate, groupID, groupOwned, flags, inventoryID, parentFolderID, avatarID, inventoryGroupPermissions) SELECT `assetID`, `assetType` AS assetType, `inventoryName` AS inventoryName, `inventoryDescription` AS inventoryDescription, `inventoryNextPermissions` AS inventoryNextPermissions, `inventoryCurrentPermissions` AS inventoryCurrentPermissions, `invType` AS invType, `creatorsID` AS creatorID, `inventoryBasePermissions` AS inventoryBasePermissions, `inventoryEveryOnePermissions` AS inventoryEveryOnePermissions, `salePrice` AS salePrice, `saleType` AS saleType, `creationDate` AS creationDate, `groupID` AS groupID, `groupOwned` AS groupOwned, `flags` AS flags, `UUID` AS inventoryID, `parentFolderID` AS parentFolderID, `avatarID` AS avatarID, `inventoryGroupPermissions` AS inventoryGroupPermissions FROM old.inventoryitems;
COMMIT;
COMMIT;

View File

@@ -57,6 +57,11 @@ namespace OpenSim.Data.SQLite
private SqliteConnection m_conn;
protected virtual Assembly Assembly
{
get { return GetType().Assembly; }
}
override public void Dispose()
{
if (m_conn != null)
@@ -83,8 +88,7 @@ namespace OpenSim.Data.SQLite
m_conn = new SqliteConnection(dbconnect);
m_conn.Open();
Assembly assem = GetType().Assembly;
Migration m = new Migration(m_conn, assem, "AssetStore");
Migration m = new Migration(m_conn, Assembly, "AssetStore");
m.Update();
return;

View File

@@ -53,6 +53,11 @@ namespace OpenSim.Data.SQLite
protected static SqliteConnection m_Connection;
private static bool m_initialized = false;
protected virtual Assembly Assembly
{
get { return GetType().Assembly; }
}
public SQLiteAuthenticationData(string connectionString, string realm)
: base(connectionString)
{
@@ -63,7 +68,7 @@ namespace OpenSim.Data.SQLite
m_Connection = new SqliteConnection(connectionString);
m_Connection.Open();
Migration m = new Migration(m_Connection, GetType().Assembly, "AuthStore");
Migration m = new Migration(m_Connection, Assembly, "AuthStore");
m.Update();
m_initialized = true;

View File

@@ -53,6 +53,11 @@ namespace OpenSim.Data.SQLite
private Dictionary<string, FieldInfo> m_FieldMap =
new Dictionary<string, FieldInfo>();
protected virtual Assembly Assembly
{
get { return GetType().Assembly; }
}
public SQLiteEstateStore()
{
}
@@ -71,8 +76,7 @@ namespace OpenSim.Data.SQLite
m_connection = new SqliteConnection(m_connectionString);
m_connection.Open();
Assembly assem = GetType().Assembly;
Migration m = new Migration(m_connection, assem, "EstateStore");
Migration m = new Migration(m_connection, Assembly, "EstateStore");
m.Update();
//m_connection.Close();
@@ -147,59 +151,8 @@ namespace OpenSim.Data.SQLite
}
else if (create)
{
r.Close();
List<string> names = new List<string>(FieldList);
names.Remove("EstateID");
string sql = "insert into estate_settings ("+String.Join(",", names.ToArray())+") values ( :"+String.Join(", :", names.ToArray())+")";
cmd.CommandText = sql;
cmd.Parameters.Clear();
foreach (string name in FieldList)
{
if (m_FieldMap[name].GetValue(es) is bool)
{
if ((bool)m_FieldMap[name].GetValue(es))
cmd.Parameters.AddWithValue(":"+name, "1");
else
cmd.Parameters.AddWithValue(":"+name, "0");
}
else
{
cmd.Parameters.AddWithValue(":"+name, m_FieldMap[name].GetValue(es).ToString());
}
}
cmd.ExecuteNonQuery();
cmd.CommandText = "select LAST_INSERT_ROWID() as id";
cmd.Parameters.Clear();
r = cmd.ExecuteReader();
r.Read();
es.EstateID = Convert.ToUInt32(r["id"]);
r.Close();
cmd.CommandText = "insert into estate_map values (:RegionID, :EstateID)";
cmd.Parameters.AddWithValue(":RegionID", regionID.ToString());
cmd.Parameters.AddWithValue(":EstateID", es.EstateID.ToString());
// This will throw on dupe key
try
{
cmd.ExecuteNonQuery();
}
catch (Exception)
{
}
es.Save();
DoCreate(es);
LinkRegion(regionID, (int)es.EstateID);
}
LoadBanList(es);
@@ -210,6 +163,67 @@ namespace OpenSim.Data.SQLite
return es;
}
public EstateSettings CreateNewEstate()
{
EstateSettings es = new EstateSettings();
es.OnSave += StoreEstateSettings;
DoCreate(es);
LoadBanList(es);
es.EstateManagers = LoadUUIDList(es.EstateID, "estate_managers");
es.EstateAccess = LoadUUIDList(es.EstateID, "estate_users");
es.EstateGroups = LoadUUIDList(es.EstateID, "estate_groups");
return es;
}
private void DoCreate(EstateSettings es)
{
List<string> names = new List<string>(FieldList);
SqliteCommand cmd = (SqliteCommand)m_connection.CreateCommand();
IDataReader r = null;
names.Remove("EstateID");
string sql = "insert into estate_settings ("+String.Join(",", names.ToArray())+") values ( :"+String.Join(", :", names.ToArray())+")";
cmd.CommandText = sql;
cmd.Parameters.Clear();
foreach (string name in FieldList)
{
if (m_FieldMap[name].GetValue(es) is bool)
{
if ((bool)m_FieldMap[name].GetValue(es))
cmd.Parameters.AddWithValue(":"+name, "1");
else
cmd.Parameters.AddWithValue(":"+name, "0");
}
else
{
cmd.Parameters.AddWithValue(":"+name, m_FieldMap[name].GetValue(es).ToString());
}
}
cmd.ExecuteNonQuery();
cmd.CommandText = "select LAST_INSERT_ROWID() as id";
cmd.Parameters.Clear();
r = cmd.ExecuteReader();
r.Read();
es.EstateID = Convert.ToUInt32(r["id"]);
r.Close();
es.Save();
}
public void StoreEstateSettings(EstateSettings es)
{
List<string> fields = new List<string>(FieldList);
@@ -436,16 +450,36 @@ namespace OpenSim.Data.SQLite
public bool LinkRegion(UUID regionID, int estateID)
{
SqliteCommand cmd = (SqliteCommand)m_connection.CreateCommand();
SqliteTransaction transaction = m_connection.BeginTransaction();
cmd.CommandText = "insert into estate_map values (:RegionID, :EstateID)";
cmd.Parameters.AddWithValue(":RegionID", regionID.ToString());
cmd.Parameters.AddWithValue(":EstateID", estateID.ToString());
// Delete any existing estate mapping for this region.
using(SqliteCommand cmd = (SqliteCommand)m_connection.CreateCommand())
{
cmd.CommandText = "delete from estate_map where RegionID = :RegionID";
cmd.Transaction = transaction;
cmd.Parameters.AddWithValue(":RegionID", regionID.ToString());
if (cmd.ExecuteNonQuery() == 0)
return false;
cmd.ExecuteNonQuery();
}
return true;
using(SqliteCommand cmd = (SqliteCommand)m_connection.CreateCommand())
{
cmd.CommandText = "insert into estate_map values (:RegionID, :EstateID)";
cmd.Transaction = transaction;
cmd.Parameters.AddWithValue(":RegionID", regionID.ToString());
cmd.Parameters.AddWithValue(":EstateID", estateID.ToString());
if (cmd.ExecuteNonQuery() == 0)
{
transaction.Rollback();
return false;
}
else
{
transaction.Commit();
return true;
}
}
}
public List<UUID> GetRegions(int estateID)

View File

@@ -46,7 +46,12 @@ namespace OpenSim.Data.SQLite
{
}
public FriendsData[] GetFriends(UUID userID)
public FriendsData[] GetFriends(UUID principalID)
{
return GetFriends(principalID.ToString());
}
public FriendsData[] GetFriends(string userID)
{
SqliteCommand cmd = new SqliteCommand();
@@ -58,6 +63,11 @@ namespace OpenSim.Data.SQLite
}
public bool Delete(UUID principalID, string friend)
{
return Delete(principalID.ToString(), friend);
}
public bool Delete(string principalID, string friend)
{
SqliteCommand cmd = new SqliteCommand();

View File

@@ -55,6 +55,11 @@ namespace OpenSim.Data.SQLite
protected static SqliteConnection m_Connection;
private static bool m_initialized;
protected virtual Assembly Assembly
{
get { return GetType().Assembly; }
}
public SQLiteGenericTableHandler(string connectionString,
string realm, string storeName) : base(connectionString)
{
@@ -68,13 +73,12 @@ namespace OpenSim.Data.SQLite
if (storeName != String.Empty)
{
Assembly assem = GetType().Assembly;
//SqliteConnection newConnection =
// (SqliteConnection)((ICloneable)m_Connection).Clone();
//newConnection.Open();
//Migration m = new Migration(newConnection, assem, storeName);
Migration m = new Migration(m_Connection, assem, storeName);
//Migration m = new Migration(newConnection, Assembly, storeName);
Migration m = new Migration(m_Connection, Assembly, storeName);
m.Update();
//newConnection.Close();
//newConnection.Dispose();
@@ -280,7 +284,7 @@ namespace OpenSim.Data.SQLite
string where = String.Join(" and ", terms.ToArray());
string query = String.Format("delete * from {0} where {1}", m_Realm, where);
string query = String.Format("delete from {0} where {1}", m_Realm, where);
cmd.CommandText = query;

View File

@@ -74,6 +74,11 @@ namespace OpenSim.Data.SQLite
private String m_connectionString;
protected virtual Assembly Assembly
{
get { return GetType().Assembly; }
}
public SQLiteSimulationData()
{
}
@@ -132,8 +137,7 @@ namespace OpenSim.Data.SQLite
SqliteCommand regionSettingsSelectCmd = new SqliteCommand(regionSettingsSelect, m_conn);
regionSettingsDa = new SqliteDataAdapter(regionSettingsSelectCmd);
// This actually does the roll forward assembly stuff
Assembly assem = GetType().Assembly;
Migration m = new Migration(m_conn, assem, "RegionStore");
Migration m = new Migration(m_conn, Assembly, "RegionStore");
m.Update();
lock (ds)

View File

@@ -41,7 +41,7 @@ using OpenSim.Framework;
namespace OpenSim.Data.SQLite
{
/// <summary>
/// A MySQL Interface for the Asset Server
/// A SQLite Interface for the Asset Server
/// </summary>
public class SQLiteXInventoryData : IXInventoryData
{

View File

@@ -106,7 +106,7 @@ namespace OpenSim.Data.Tests
[Test]
public void T001_LoadEmpty()
{
TestHelper.InMethod();
TestHelpers.InMethod();
Assert.That(m_db.ExistsAsset(uuid1), Is.False);
Assert.That(m_db.ExistsAsset(uuid2), Is.False);
@@ -116,7 +116,7 @@ namespace OpenSim.Data.Tests
[Test]
public void T010_StoreReadVerifyAssets()
{
TestHelper.InMethod();
TestHelpers.InMethod();
AssetBase a1 = new AssetBase(uuid1, "asset one", (sbyte)AssetType.Texture, critter1.ToString());
AssetBase a2 = new AssetBase(uuid2, "asset two", (sbyte)AssetType.Texture, critter2.ToString());
@@ -183,7 +183,7 @@ namespace OpenSim.Data.Tests
[Test]
public void T020_CheckForWeirdCreatorID()
{
TestHelper.InMethod();
TestHelpers.InMethod();
// It is expected that eventually the CreatorID might be an arbitrary string (an URI)
// rather than a valid UUID (?). This test is to make sure that the database layer does not

View File

@@ -107,7 +107,7 @@ namespace OpenSim.Data.Tests
[Test]
public void T010_EstateSettingsSimpleStorage_MinimumParameterSet()
{
TestHelper.InMethod();
TestHelpers.InMethod();
EstateSettingsSimpleStorage(
REGION_ID,
@@ -140,7 +140,7 @@ namespace OpenSim.Data.Tests
[Test]
public void T011_EstateSettingsSimpleStorage_MaximumParameterSet()
{
TestHelper.InMethod();
TestHelpers.InMethod();
EstateSettingsSimpleStorage(
REGION_ID,
@@ -173,7 +173,7 @@ namespace OpenSim.Data.Tests
[Test]
public void T012_EstateSettingsSimpleStorage_AccurateParameterSet()
{
TestHelper.InMethod();
TestHelpers.InMethod();
EstateSettingsSimpleStorage(
REGION_ID,
@@ -206,7 +206,7 @@ namespace OpenSim.Data.Tests
[Test]
public void T012_EstateSettingsRandomStorage()
{
TestHelper.InMethod();
TestHelpers.InMethod();
// Letting estate store generate rows to database for us
EstateSettings originalSettings = db.LoadEstateSettings(REGION_ID, true);
@@ -227,7 +227,7 @@ namespace OpenSim.Data.Tests
[Test]
public void T020_EstateSettingsManagerList()
{
TestHelper.InMethod();
TestHelpers.InMethod();
// Letting estate store generate rows to database for us
EstateSettings originalSettings = db.LoadEstateSettings(REGION_ID, true);
@@ -248,7 +248,7 @@ namespace OpenSim.Data.Tests
[Test]
public void T021_EstateSettingsUserList()
{
TestHelper.InMethod();
TestHelpers.InMethod();
// Letting estate store generate rows to database for us
EstateSettings originalSettings = db.LoadEstateSettings(REGION_ID, true);
@@ -269,7 +269,7 @@ namespace OpenSim.Data.Tests
[Test]
public void T022_EstateSettingsGroupList()
{
TestHelper.InMethod();
TestHelpers.InMethod();
// Letting estate store generate rows to database for us
EstateSettings originalSettings = db.LoadEstateSettings(REGION_ID, true);
@@ -290,7 +290,7 @@ namespace OpenSim.Data.Tests
[Test]
public void T022_EstateSettingsBanList()
{
TestHelper.InMethod();
TestHelpers.InMethod();
// Letting estate store generate rows to database for us
EstateSettings originalSettings = db.LoadEstateSettings(REGION_ID, true);

View File

@@ -114,7 +114,7 @@ namespace OpenSim.Data.Tests
[Test]
public void T001_LoadEmpty()
{
TestHelper.InMethod();
TestHelpers.InMethod();
Assert.That(db.getInventoryFolder(zero), Is.Null);
Assert.That(db.getInventoryFolder(folder1), Is.Null);
@@ -134,7 +134,7 @@ namespace OpenSim.Data.Tests
[Test]
public void T010_FolderNonParent()
{
TestHelper.InMethod();
TestHelpers.InMethod();
InventoryFolderBase f1 = NewFolder(folder2, folder1, owner1, name2);
// the folder will go in
@@ -146,7 +146,7 @@ namespace OpenSim.Data.Tests
[Test]
public void T011_FolderCreate()
{
TestHelper.InMethod();
TestHelpers.InMethod();
InventoryFolderBase f1 = NewFolder(folder1, zero, owner1, name1);
// TODO: this is probably wrong behavior, but is what we have
@@ -171,7 +171,7 @@ namespace OpenSim.Data.Tests
[Test]
public void T012_FolderList()
{
TestHelper.InMethod();
TestHelpers.InMethod();
InventoryFolderBase f2 = NewFolder(folder3, folder1, owner1, name3);
db.addInventoryFolder(f2);
@@ -187,7 +187,7 @@ namespace OpenSim.Data.Tests
[Test]
public void T013_FolderHierarchy()
{
TestHelper.InMethod();
TestHelpers.InMethod();
int n = db.getFolderHierarchy(zero).Count; // (for dbg - easier to see what's returned)
Assert.That(n, Is.EqualTo(0), "Assert.That(db.getFolderHierarchy(zero).Count, Is.EqualTo(0))");
@@ -202,7 +202,7 @@ namespace OpenSim.Data.Tests
[Test]
public void T014_MoveFolder()
{
TestHelper.InMethod();
TestHelpers.InMethod();
InventoryFolderBase f2 = db.getInventoryFolder(folder2);
f2.ParentID = folder3;
@@ -218,7 +218,7 @@ namespace OpenSim.Data.Tests
[Test]
public void T015_FolderHierarchy()
{
TestHelper.InMethod();
TestHelpers.InMethod();
Assert.That(db.getFolderHierarchy(zero).Count, Is.EqualTo(0), "Assert.That(db.getFolderHierarchy(zero).Count, Is.EqualTo(0))");
Assert.That(db.getFolderHierarchy(folder1).Count, Is.EqualTo(2), "Assert.That(db.getFolderHierarchy(folder1).Count, Is.EqualTo(2))");
@@ -231,7 +231,7 @@ namespace OpenSim.Data.Tests
[Test]
public void T100_NoItems()
{
TestHelper.InMethod();
TestHelpers.InMethod();
Assert.That(db.getInventoryInFolder(zero).Count, Is.EqualTo(0), "Assert.That(db.getInventoryInFolder(zero).Count, Is.EqualTo(0))");
Assert.That(db.getInventoryInFolder(folder1).Count, Is.EqualTo(0), "Assert.That(db.getInventoryInFolder(folder1).Count, Is.EqualTo(0))");
@@ -245,7 +245,7 @@ namespace OpenSim.Data.Tests
[Test]
public void T101_CreatItems()
{
TestHelper.InMethod();
TestHelpers.InMethod();
db.addInventoryItem(NewItem(item1, folder3, owner1, iname1, asset1));
db.addInventoryItem(NewItem(item2, folder3, owner1, iname2, asset2));
@@ -256,7 +256,7 @@ namespace OpenSim.Data.Tests
[Test]
public void T102_CompareItems()
{
TestHelper.InMethod();
TestHelpers.InMethod();
InventoryItemBase i1 = db.getInventoryItem(item1);
InventoryItemBase i2 = db.getInventoryItem(item2);
@@ -275,7 +275,7 @@ namespace OpenSim.Data.Tests
[Test]
public void T103_UpdateItem()
{
TestHelper.InMethod();
TestHelpers.InMethod();
// TODO: probably shouldn't have the ability to have an
// owner of an item in a folder not owned by the user
@@ -295,7 +295,7 @@ namespace OpenSim.Data.Tests
[Test]
public void T104_RandomUpdateItem()
{
TestHelper.InMethod();
TestHelpers.InMethod();
PropertyScrambler<InventoryFolderBase> folderScrambler =
new PropertyScrambler<InventoryFolderBase>()
@@ -354,7 +354,7 @@ namespace OpenSim.Data.Tests
[Test]
public void T999_StillNull()
{
TestHelper.InMethod();
TestHelpers.InMethod();
// After all tests are run, these should still return no results
Assert.That(db.getInventoryFolder(zero), Is.Null);

View File

@@ -151,7 +151,7 @@ namespace OpenSim.Data.Tests
[Test]
public void T001_LoadEmpty()
{
TestHelper.InMethod();
TestHelpers.InMethod();
List<SceneObjectGroup> objs = db.LoadObjects(region1);
List<SceneObjectGroup> objs3 = db.LoadObjects(region3);
@@ -169,7 +169,7 @@ namespace OpenSim.Data.Tests
[Test]
public void T010_StoreSimpleObject()
{
TestHelper.InMethod();
TestHelpers.InMethod();
SceneObjectGroup sog = NewSOG("object1", prim1, region1);
SceneObjectGroup sog2 = NewSOG("object2", prim2, region1);
@@ -204,7 +204,7 @@ namespace OpenSim.Data.Tests
[Test]
public void T011_ObjectNames()
{
TestHelper.InMethod();
TestHelpers.InMethod();
List<SceneObjectGroup> objs = db.LoadObjects(region1);
foreach (SceneObjectGroup sog in objs)
@@ -218,7 +218,7 @@ namespace OpenSim.Data.Tests
[Test]
public void T012_SceneParts()
{
TestHelper.InMethod();
TestHelpers.InMethod();
UUID tmp0 = UUID.Random();
UUID tmp1 = UUID.Random();
@@ -253,7 +253,7 @@ namespace OpenSim.Data.Tests
[Test]
public void T013_DatabasePersistency()
{
TestHelper.InMethod();
TestHelpers.InMethod();
// Sets all ScenePart parameters, stores and retrieves them, then check for consistency with initial data
// The commented Asserts are the ones that are unchangeable (when storing on the database, their "Set" values are ignored
@@ -297,16 +297,15 @@ 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;
regionInfo.RegionLocX = 0;
regionInfo.RegionLocY = 0;
// Scene scene = new Scene(regionInfo);
SceneObjectPart sop = new SceneObjectPart();
SceneObjectGroup sog = new SceneObjectGroup(sop);
sop.RegionHandle = regionh;
sop.UUID = uuid;
sop.LocalId = localid;
@@ -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,12 +367,9 @@ 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;
SceneObjectGroup sog = new SceneObjectGroup(sop);
// Inserts group in DB
db.StoreObject(sog,region3);
@@ -430,7 +425,7 @@ namespace OpenSim.Data.Tests
[Test]
public void T014_UpdateObject()
{
TestHelper.InMethod();
TestHelpers.InMethod();
string text1 = "object1 text";
SceneObjectGroup sog = FindSOG("object1", region1);
@@ -471,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);
@@ -501,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);
@@ -540,7 +533,7 @@ namespace OpenSim.Data.Tests
[Test]
public void T015_LargeSceneObjects()
{
TestHelper.InMethod();
TestHelpers.InMethod();
UUID id = UUID.Random();
Dictionary<UUID, SceneObjectPart> mydic = new Dictionary<UUID, SceneObjectPart>();
@@ -587,7 +580,7 @@ namespace OpenSim.Data.Tests
//[Test]
public void T016_RandomSogWithSceneParts()
{
TestHelper.InMethod();
TestHelpers.InMethod();
PropertyScrambler<SceneObjectPart> scrambler =
new PropertyScrambler<SceneObjectPart>()
@@ -663,7 +656,7 @@ namespace OpenSim.Data.Tests
[Test]
public void T020_PrimInventoryEmpty()
{
TestHelper.InMethod();
TestHelpers.InMethod();
SceneObjectGroup sog = GetMySOG("object1");
TaskInventoryItem t = sog.GetInventoryItem(sog.RootPart.LocalId, item1);
@@ -687,7 +680,7 @@ namespace OpenSim.Data.Tests
[Test]
public void T021_PrimInventoryBasic()
{
TestHelper.InMethod();
TestHelpers.InMethod();
SceneObjectGroup sog = GetMySOG("object1");
InventoryItemBase i = NewItem(item1, zero, zero, itemname1, zero);
@@ -727,7 +720,7 @@ namespace OpenSim.Data.Tests
[Test]
public void T025_PrimInventoryPersistency()
{
TestHelper.InMethod();
TestHelpers.InMethod();
InventoryItemBase i = new InventoryItemBase();
UUID id = UUID.Random();
@@ -800,7 +793,7 @@ namespace OpenSim.Data.Tests
[ExpectedException(typeof(ArgumentException))]
public void T026_PrimInventoryMany()
{
TestHelper.InMethod();
TestHelpers.InMethod();
UUID i1,i2,i3,i4;
i1 = UUID.Random();
@@ -832,7 +825,7 @@ namespace OpenSim.Data.Tests
[Test]
public void T052_RemoveObject()
{
TestHelper.InMethod();
TestHelpers.InMethod();
db.RemoveObject(prim1, region1);
SceneObjectGroup sog = FindSOG("object1", region1);
@@ -842,7 +835,7 @@ namespace OpenSim.Data.Tests
[Test]
public void T100_DefaultRegionInfo()
{
TestHelper.InMethod();
TestHelpers.InMethod();
RegionSettings r1 = db.LoadRegionSettings(region1);
Assert.That(r1.RegionUUID, Is.EqualTo(region1), "Assert.That(r1.RegionUUID, Is.EqualTo(region1))");
@@ -854,7 +847,7 @@ namespace OpenSim.Data.Tests
[Test]
public void T101_UpdateRegionInfo()
{
TestHelper.InMethod();
TestHelpers.InMethod();
int agentlimit = random.Next();
double objectbonus = random.Next();
@@ -960,7 +953,7 @@ namespace OpenSim.Data.Tests
[Test]
public void T300_NoTerrain()
{
TestHelper.InMethod();
TestHelpers.InMethod();
Assert.That(db.LoadTerrain(zero), Is.Null);
Assert.That(db.LoadTerrain(region1), Is.Null);
@@ -971,7 +964,7 @@ namespace OpenSim.Data.Tests
[Test]
public void T301_CreateTerrain()
{
TestHelper.InMethod();
TestHelpers.InMethod();
double[,] t1 = GenTerrain(height1);
db.StoreTerrain(t1, region1);
@@ -985,7 +978,7 @@ namespace OpenSim.Data.Tests
[Test]
public void T302_FetchTerrain()
{
TestHelper.InMethod();
TestHelpers.InMethod();
double[,] baseterrain1 = GenTerrain(height1);
double[,] baseterrain2 = GenTerrain(height2);
@@ -997,7 +990,7 @@ namespace OpenSim.Data.Tests
[Test]
public void T303_UpdateTerrain()
{
TestHelper.InMethod();
TestHelpers.InMethod();
double[,] baseterrain1 = GenTerrain(height1);
double[,] baseterrain2 = GenTerrain(height2);
@@ -1011,7 +1004,7 @@ namespace OpenSim.Data.Tests
[Test]
public void T400_EmptyLand()
{
TestHelper.InMethod();
TestHelpers.InMethod();
Assert.That(db.LoadLandObjects(zero).Count, Is.EqualTo(0), "Assert.That(db.LoadLandObjects(zero).Count, Is.EqualTo(0))");
Assert.That(db.LoadLandObjects(region1).Count, Is.EqualTo(0), "Assert.That(db.LoadLandObjects(region1).Count, Is.EqualTo(0))");

View File

@@ -296,11 +296,12 @@ 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.ToString());
m_log.InfoFormat("[AGENTCIRCUITDATA]: agentid={0}, child={1}, startpos={2}", AgentID, child, startpos);
try {
try
{
// Unpack various appearance elements
Appearance = new AvatarAppearance(AgentID);
Appearance = new AvatarAppearance();
// Eventually this code should be deprecated, use full appearance
// packing in packed_appearance
@@ -313,7 +314,9 @@ namespace OpenSim.Framework
m_log.InfoFormat("[AGENTCIRCUITDATA] unpacked appearance");
}
else
m_log.Warn("[AGENTCIRCUITDATA] failed to find a valid packed_appearance");
{
m_log.Warn("[AGENTCIRCUITDATA]: failed to find a valid packed_appearance");
}
}
catch (Exception e)
{
@@ -345,6 +348,7 @@ namespace OpenSim.Framework
}
}
}
}

View File

@@ -169,6 +169,7 @@ namespace OpenSim.Framework
get { return m_metadata.FullID; }
set { m_metadata.FullID = value; }
}
/// <summary>
/// Asset MetaData ID (transferring from UUID to string ID)
/// </summary>
@@ -223,6 +224,12 @@ namespace OpenSim.Framework
set { m_metadata.Temporary = value; }
}
public string CreatorID
{
get { return m_metadata.CreatorID; }
set { m_metadata.CreatorID = value; }
}
public AssetFlags Flags
{
get { return m_metadata.Flags; }
@@ -275,6 +282,7 @@ namespace OpenSim.Framework
return m_id;
}
set
{
UUID uuid = UUID.Zero;

View File

@@ -35,6 +35,7 @@ namespace OpenSim.Framework
public Vector3 Position;
public ulong RegionHandle;
public UUID RegionID;
public string Gatekeeper = string.Empty;
public int Version;
public AssetLandmark(AssetBase a)
@@ -51,6 +52,8 @@ namespace OpenSim.Framework
string[] parts = temp.Split('\n');
int.TryParse(parts[0].Substring(17, 1), out Version);
UUID.TryParse(parts[1].Substring(10, 36), out RegionID);
if (parts.Length >= 5)
Gatekeeper = parts[4].Replace("gatekeeper ", "");
// The position is a vector with spaces as separators ("10.3 32.5 43").
// Parse each scalar separately to take into account the system's culture setting.
string[] scalars = parts[2].Substring(10, parts[2].Length - 10).Split(' ');

View File

@@ -47,20 +47,12 @@ namespace OpenSim.Framework
public readonly static int TEXTURE_COUNT = 21;
public readonly static byte[] BAKE_INDICES = new byte[] { 8, 9, 10, 11, 19, 20 };
protected UUID m_owner;
protected int m_serial = 0;
protected byte[] m_visualparams;
protected Primitive.TextureEntry m_texture;
protected AvatarWearable[] m_wearables;
protected Dictionary<int, List<AvatarAttachment>> m_attachments;
protected float m_avatarHeight = 0;
protected float m_hipOffset = 0;
public virtual UUID Owner
{
get { return m_owner; }
set { m_owner = value; }
}
public virtual int Serial
{
@@ -77,7 +69,11 @@ namespace OpenSim.Framework
public virtual Primitive.TextureEntry Texture
{
get { return m_texture; }
set { m_texture = value; }
set
{
// m_log.DebugFormat("[AVATAR APPEARANCE]: Set TextureEntry to {0}", value);
m_texture = value;
}
}
public virtual AvatarWearable[] Wearables
@@ -92,43 +88,31 @@ namespace OpenSim.Framework
set { m_avatarHeight = value; }
}
public virtual float HipOffset
public AvatarAppearance()
{
get { return m_hipOffset; }
}
public AvatarAppearance() : this(UUID.Zero) {}
public AvatarAppearance(UUID owner)
{
// m_log.WarnFormat("[AVATAR APPEARANCE]: create empty appearance for {0}",owner);
// m_log.WarnFormat("[AVATAR APPEARANCE]: create empty appearance");
m_serial = 0;
m_owner = owner;
SetDefaultWearables();
SetDefaultTexture();
SetDefaultParams();
SetHeight();
m_attachments = new Dictionary<int, List<AvatarAttachment>>();
}
public AvatarAppearance(UUID avatarID, OSDMap map)
public AvatarAppearance(OSDMap map)
{
// m_log.WarnFormat("[AVATAR APPEARANCE]: create appearance for {0} from OSDMap",avatarID);
// m_log.WarnFormat("[AVATAR APPEARANCE]: create appearance from OSDMap");
m_owner = avatarID;
Unpack(map);
SetHeight();
}
public AvatarAppearance(UUID avatarID, AvatarWearable[] wearables, Primitive.TextureEntry textureEntry, byte[] visualParams)
public AvatarAppearance(AvatarWearable[] wearables, Primitive.TextureEntry textureEntry, byte[] visualParams)
{
// m_log.WarnFormat("[AVATAR APPEARANCE] create initialized appearance for {0}",avatarID);
// m_log.WarnFormat("[AVATAR APPEARANCE] create initialized appearance");
m_serial = 0;
m_owner = avatarID;
if (wearables != null)
m_wearables = wearables;
@@ -161,24 +145,21 @@ namespace OpenSim.Framework
if (appearance == null)
{
m_serial = 0;
m_owner = UUID.Zero;
SetDefaultWearables();
SetDefaultTexture();
SetDefaultParams();
SetHeight();
m_attachments = new Dictionary<int, List<AvatarAttachment>>();
return;
}
m_serial = appearance.Serial;
m_owner = appearance.Owner;
m_wearables = new AvatarWearable[AvatarWearable.MAX_WEARABLES];
for (int i = 0; i < AvatarWearable.MAX_WEARABLES; i++)
m_wearables[i] = new AvatarWearable();
if (copyWearables && (appearance.Wearables != null))
{
for (int i = 0; i < AvatarWearable.MAX_WEARABLES; i++)
@@ -196,6 +177,8 @@ namespace OpenSim.Framework
if (appearance.VisualParams != null)
m_visualparams = (byte[])appearance.VisualParams.Clone();
m_avatarHeight = appearance.m_avatarHeight;
// Copy the attachment, force append mode since that ensures consistency
m_attachments = new Dictionary<int, List<AvatarAttachment>>();
foreach (AvatarAttachment attachment in appearance.GetAttachments())
@@ -235,9 +218,10 @@ namespace OpenSim.Framework
/// </summary>
public virtual void ResetAppearance()
{
// m_log.WarnFormat("[AVATAR APPEARANCE]: Reset appearance");
m_serial = 0;
SetDefaultParams();
SetDefaultTexture();
//for (int i = 0; i < BAKE_INDICES.Length; i++)
@@ -356,20 +340,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)
@@ -409,36 +391,47 @@ namespace OpenSim.Framework
// DEBUG OFF
/// <summary>
/// Get a list of the attachments, note that there may be
/// duplicate attachpoints
/// Get a list of the attachments.
/// </summary>
/// <remarks>
/// There may be duplicate attachpoints
/// </remarks>
public List<AvatarAttachment> GetAttachments()
{
lock (m_attachments)
{
List<AvatarAttachment> alist = new List<AvatarAttachment>();
List<AvatarAttachment> alist = new List<AvatarAttachment>();
foreach (KeyValuePair<int, List<AvatarAttachment>> kvp in m_attachments)
{
foreach (AvatarAttachment attach in kvp.Value)
alist.Add(new AvatarAttachment(attach));
}
return alist;
}
}
return alist;
} }
internal void AppendAttachment(AvatarAttachment attach)
{
// m_log.DebugFormat(
// "[AVATAR APPEARNCE]: Appending itemID={0}, assetID={1} at {2}",
// attach.ItemID, attach.AssetID, attach.AttachPoint);
lock (m_attachments)
{
if (!m_attachments.ContainsKey(attach.AttachPoint))
m_attachments[attach.AttachPoint] = new List<AvatarAttachment>();
m_attachments[attach.AttachPoint].Add(attach);
}
}
internal void ReplaceAttachment(AvatarAttachment attach)
{
// m_log.DebugFormat(
// "[AVATAR APPEARANCE]: Replacing itemID={0}, assetID={1} at {2}",
// attach.ItemID, attach.AssetID, attach.AttachPoint);
lock (m_attachments)
{
m_attachments[attach.AttachPoint] = new List<AvatarAttachment>();
@@ -447,14 +440,26 @@ namespace OpenSim.Framework
}
/// <summary>
/// Add an attachment, if the attachpoint has the
/// Set an attachment
/// </summary>
/// <remarks>
/// If the attachpoint has the
/// 0x80 bit set then we assume this is an append
/// operation otherwise we replace whatever is
/// currently attached at the attachpoint
/// </remarks>
/// <param name="attachpoint"></param>
/// <param name="item">If UUID.Zero, then an any attachment at the attachpoint is removed.</param>
/// <param name="asset"></param>
/// <returns>
/// return true if something actually changed
/// </summary>
/// </returns>
public bool SetAttachment(int attachpoint, UUID item, UUID asset)
{
// m_log.DebugFormat(
// "[AVATAR APPEARANCE]: Setting attachment at {0} with item ID {1}, asset ID {2}",
// attachpoint, item, asset);
if (attachpoint == 0)
return false;
@@ -467,12 +472,21 @@ namespace OpenSim.Framework
m_attachments.Remove(attachpoint);
return true;
}
return false;
}
return false;
}
// check if the item is already attached at this point
if (GetAttachpoint(item) == (attachpoint & 0x7F))
// When a user logs in, the attachment item ids are pulled from persistence in the Avatars table. However,
// the asset ids are not saved. When the avatar enters a simulator the attachments are set again. If
// we simply perform an item check here then the asset ids (which are now present) are never set, and NPC attachments
// later fail unless the attachment is detached and reattached.
//
// Therefore, we will carry on with the set if the existing attachment has no asset id.
AvatarAttachment existingAttachment = GetAttachmentForItem(item);
if (existingAttachment != null
&& existingAttachment.AssetID != UUID.Zero
&& existingAttachment.AttachPoint == (attachpoint & 0x7F))
{
// m_log.DebugFormat("[AVATAR APPEARANCE] attempt to attach an already attached item {0}",item);
return false;
@@ -487,11 +501,32 @@ namespace OpenSim.Framework
}
else
{
ReplaceAttachment(new AvatarAttachment(attachpoint,item,asset));
ReplaceAttachment(new AvatarAttachment(attachpoint,item, asset));
}
return true;
}
/// <summary>
/// If the item is already attached, return it.
/// </summary>
/// <param name="itemID"></param>
/// <returns>Returns null if this item is not attached.</returns>
public AvatarAttachment GetAttachmentForItem(UUID itemID)
{
lock (m_attachments)
{
foreach (KeyValuePair<int, List<AvatarAttachment>> kvp in m_attachments)
{
int index = kvp.Value.FindIndex(delegate(AvatarAttachment a) { return a.ItemID == itemID; });
if (index >= 0)
return kvp.Value[index];
}
}
return null;
}
public int GetAttachpoint(UUID itemID)
{
lock (m_attachments)
@@ -502,9 +537,8 @@ namespace OpenSim.Framework
if (index >= 0)
return kvp.Key;
}
return 0;
}
return 0;
}
public bool DetachAttachment(UUID itemID)
@@ -518,23 +552,23 @@ namespace OpenSim.Framework
{
// Remove it from the list of attachments at that attach point
m_attachments[kvp.Key].RemoveAt(index);
// And remove the list if there are no more attachments here
if (m_attachments[kvp.Key].Count == 0)
m_attachments.Remove(kvp.Key);
return true;
}
}
}
return false;
}
public void ClearAttachments()
{
lock (m_attachments)
{
m_attachments.Clear();
}
}
#region Packing Functions
@@ -548,7 +582,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);
@@ -589,12 +622,10 @@ namespace OpenSim.Framework
/// </summary>
public void Unpack(OSDMap data)
{
if ((data != null) && (data["serial"] != null))
if ((data != null) && (data["serial"] != null))
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
{
@@ -647,7 +678,14 @@ namespace OpenSim.Framework
{
OSDArray attachs = (OSDArray)(data["attachments"]);
for (int i = 0; i < attachs.Count; i++)
AppendAttachment(new AvatarAttachment((OSDMap)attachs[i]));
{
AvatarAttachment att = new AvatarAttachment((OSDMap)attachs[i]);
AppendAttachment(att);
// m_log.DebugFormat(
// "[AVATAR APPEARANCE]: Unpacked attachment itemID {0}, assetID {1}, point {2}",
// att.ItemID, att.AssetID, att.AttachPoint);
}
}
}
catch (Exception e)

View File

@@ -66,11 +66,11 @@ namespace OpenSim.Framework
return attachdata;
}
public void Unpack(OSDMap args)
{
if (args["point"] != null)
AttachPoint = args["point"].AsInteger();
ItemID = (args["item"] != null) ? args["item"].AsUUID() : UUID.Zero;
AssetID = (args["asset"] != null) ? args["asset"].AsUUID() : UUID.Zero;
}

View File

@@ -441,7 +441,6 @@ namespace OpenSim.Framework
args["controllers"] = controls;
}
if ((CallbackURI != null) && (!CallbackURI.Equals("")))
args["callback_uri"] = OSD.FromString(CallbackURI);
@@ -593,7 +592,7 @@ namespace OpenSim.Framework
// AgentTextures[i++] = o.AsUUID();
//}
Appearance = new AvatarAppearance(AgentID);
Appearance = new AvatarAppearance();
// The code to unpack textures, visuals, wearables and attachments
// should be removed; packed appearance contains the full appearance
@@ -628,6 +627,7 @@ namespace OpenSim.Framework
// We know all of these must end up as attachments so we
// append rather than replace to ensure multiple attachments
// per point continues to work
// m_log.DebugFormat("[CHILDAGENTDATAUPDATE]: Appending attachments for {0}", AgentID);
Appearance.AppendAttachment(new AvatarAttachment((OSDMap)o));
}
}
@@ -635,7 +635,7 @@ namespace OpenSim.Framework
// end of code to remove
if (args.ContainsKey("packed_appearance") && (args["packed_appearance"]).Type == OSDType.Map)
Appearance = new AvatarAppearance(AgentID,(OSDMap)args["packed_appearance"]);
Appearance = new AvatarAppearance((OSDMap)args["packed_appearance"]);
else
m_log.WarnFormat("[CHILDAGENTDATAUPDATE] No packed appearance");

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

@@ -33,12 +33,11 @@ using System.Reflection;
using System.Text;
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
@@ -564,14 +563,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);
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

@@ -46,12 +46,11 @@ namespace OpenSim.Framework.Console
// private readonly object m_syncRoot = new object();
private const string LOGLEVEL_NONE = "(none)";
private int y = -1;
private int cp = 0;
private int h = 1;
private StringBuilder cmdline = new StringBuilder();
private bool echo = true;
private List<string> history = new List<string>();
private int m_cursorYPosition = -1;
private int m_cursorXPosition = 0;
private StringBuilder m_commandLine = new StringBuilder();
private bool m_echo = true;
private List<string> m_history = new List<string>();
private static readonly ConsoleColor[] Colors = {
// the dark colors don't seem to be visible on some black background terminals like putty :(
@@ -81,10 +80,10 @@ namespace OpenSim.Framework.Console
private void AddToHistory(string text)
{
while (history.Count >= 100)
history.RemoveAt(0);
while (m_history.Count >= 100)
m_history.RemoveAt(0);
history.Add(text);
m_history.Add(text);
}
/// <summary>
@@ -111,11 +110,11 @@ namespace OpenSim.Framework.Console
}
else
{
int bw = System.Console.BufferWidth;
int bufferWidth = System.Console.BufferWidth;
// On Mono 2.4.2.3 (and possibly above), the buffer value is sometimes erroneously zero (Mantis 4657)
if (bw > 0 && left >= bw)
System.Console.CursorLeft = bw - 1;
if (bufferWidth > 0 && left >= bufferWidth)
System.Console.CursorLeft = bufferWidth - 1;
}
if (top < 0)
@@ -124,11 +123,11 @@ namespace OpenSim.Framework.Console
}
else
{
int bh = System.Console.BufferHeight;
int bufferHeight = System.Console.BufferHeight;
// On Mono 2.4.2.3 (and possibly above), the buffer value is sometimes erroneously zero (Mantis 4657)
if (bh > 0 && top >= bh)
top = bh - 1;
if (bufferHeight > 0 && top >= bufferHeight)
top = bufferHeight - 1;
}
System.Console.CursorTop = top;
@@ -160,10 +159,10 @@ namespace OpenSim.Framework.Console
}
else
{
int bh = System.Console.BufferHeight;
int bufferHeight = System.Console.BufferHeight;
// On Mono 2.4.2.3 (and possibly above), the buffer value is sometimes erroneously zero (Mantis 4657)
if (bh > 0 && top >= bh)
System.Console.CursorTop = bh - 1;
if (bufferHeight > 0 && top >= bufferHeight)
System.Console.CursorTop = bufferHeight - 1;
}
if (left < 0)
@@ -172,11 +171,11 @@ namespace OpenSim.Framework.Console
}
else
{
int bw = System.Console.BufferWidth;
int bufferWidth = System.Console.BufferWidth;
// On Mono 2.4.2.3 (and possibly above), the buffer value is sometimes erroneously zero (Mantis 4657)
if (bw > 0 && left >= bw)
left = bw - 1;
if (bufferWidth > 0 && left >= bufferWidth)
left = bufferWidth - 1;
}
System.Console.CursorLeft = left;
@@ -186,31 +185,30 @@ namespace OpenSim.Framework.Console
private void Show()
{
lock (cmdline)
lock (m_commandLine)
{
if (y == -1 || System.Console.BufferWidth == 0)
if (m_cursorYPosition == -1 || System.Console.BufferWidth == 0)
return;
int xc = prompt.Length + cp;
int xc = prompt.Length + m_cursorXPosition;
int new_x = xc % System.Console.BufferWidth;
int new_y = y + xc / System.Console.BufferWidth;
int end_y = y + (cmdline.Length + prompt.Length) / System.Console.BufferWidth;
if (end_y / System.Console.BufferWidth >= h)
h++;
int new_y = m_cursorYPosition + xc / System.Console.BufferWidth;
int end_y = m_cursorYPosition + (m_commandLine.Length + prompt.Length) / System.Console.BufferWidth;
if (end_y >= System.Console.BufferHeight) // wrap
{
y--;
m_cursorYPosition--;
new_y--;
SetCursorLeft(0);
SetCursorTop(System.Console.BufferHeight - 1);
System.Console.WriteLine(" ");
}
y = SetCursorTop(y);
m_cursorYPosition = SetCursorTop(m_cursorYPosition);
SetCursorLeft(0);
if (echo)
System.Console.Write("{0}{1}", prompt, cmdline);
if (m_echo)
System.Console.Write("{0}{1}", prompt, m_commandLine);
else
System.Console.Write("{0}", prompt);
@@ -221,20 +219,20 @@ namespace OpenSim.Framework.Console
public override void LockOutput()
{
Monitor.Enter(cmdline);
Monitor.Enter(m_commandLine);
try
{
if (y != -1)
if (m_cursorYPosition != -1)
{
y = SetCursorTop(y);
m_cursorYPosition = SetCursorTop(m_cursorYPosition);
System.Console.CursorLeft = 0;
int count = cmdline.Length + prompt.Length;
int count = m_commandLine.Length + prompt.Length;
while (count-- > 0)
System.Console.Write(" ");
y = SetCursorTop(y);
m_cursorYPosition = SetCursorTop(m_cursorYPosition);
SetCursorLeft(0);
}
}
@@ -245,12 +243,12 @@ namespace OpenSim.Framework.Console
public override void UnlockOutput()
{
if (y != -1)
if (m_cursorYPosition != -1)
{
y = System.Console.CursorTop;
m_cursorYPosition = System.Console.CursorTop;
Show();
}
Monitor.Exit(cmdline);
Monitor.Exit(m_commandLine);
}
private void WriteColorText(ConsoleColor color, string sender)
@@ -317,29 +315,29 @@ namespace OpenSim.Framework.Console
public override void Output(string text, string level)
{
lock (cmdline)
lock (m_commandLine)
{
if (y == -1)
if (m_cursorYPosition == -1)
{
WriteLocalText(text, level);
return;
}
y = SetCursorTop(y);
m_cursorYPosition = SetCursorTop(m_cursorYPosition);
SetCursorLeft(0);
int count = cmdline.Length + prompt.Length;
int count = m_commandLine.Length + prompt.Length;
while (count-- > 0)
System.Console.Write(" ");
y = SetCursorTop(y);
m_cursorYPosition = SetCursorTop(m_cursorYPosition);
SetCursorLeft(0);
WriteLocalText(text, level);
y = System.Console.CursorTop;
m_cursorYPosition = System.Console.CursorTop;
Show();
}
@@ -347,9 +345,9 @@ namespace OpenSim.Framework.Console
private bool ContextHelp()
{
string[] words = Parser.Parse(cmdline.ToString());
string[] words = Parser.Parse(m_commandLine.ToString());
bool trailingSpace = cmdline.ToString().EndsWith(" ");
bool trailingSpace = m_commandLine.ToString().EndsWith(" ");
// Allow ? through while typing a URI
//
@@ -368,19 +366,18 @@ namespace OpenSim.Framework.Console
public override string ReadLine(string p, bool isCommand, bool e)
{
h = 1;
cp = 0;
m_cursorXPosition = 0;
prompt = p;
echo = e;
int historyLine = history.Count;
m_echo = e;
int historyLine = m_history.Count;
SetCursorLeft(0); // Needed for mono
System.Console.Write(" "); // Needed for mono
lock (cmdline)
lock (m_commandLine)
{
y = System.Console.CursorTop;
cmdline.Remove(0, cmdline.Length);
m_cursorYPosition = System.Console.CursorTop;
m_commandLine.Remove(0, m_commandLine.Length);
}
while (true)
@@ -388,92 +385,95 @@ namespace OpenSim.Framework.Console
Show();
ConsoleKeyInfo key = System.Console.ReadKey(true);
char c = key.KeyChar;
char enteredChar = key.KeyChar;
if (!Char.IsControl(c))
if (!Char.IsControl(enteredChar))
{
if (cp >= 318)
if (m_cursorXPosition >= 318)
continue;
if (c == '?' && isCommand)
if (enteredChar == '?' && isCommand)
{
if (ContextHelp())
continue;
}
cmdline.Insert(cp, c);
cp++;
m_commandLine.Insert(m_cursorXPosition, enteredChar);
m_cursorXPosition++;
}
else
{
switch (key.Key)
{
case ConsoleKey.Backspace:
if (cp == 0)
if (m_cursorXPosition == 0)
break;
cmdline.Remove(cp-1, 1);
cp--;
m_commandLine.Remove(m_cursorXPosition-1, 1);
m_cursorXPosition--;
SetCursorLeft(0);
y = SetCursorTop(y);
m_cursorYPosition = SetCursorTop(m_cursorYPosition);
System.Console.Write("{0}{1} ", prompt, cmdline);
if (m_echo)
System.Console.Write("{0}{1} ", prompt, m_commandLine);
else
System.Console.Write("{0}", prompt);
break;
case ConsoleKey.End:
cp = cmdline.Length;
m_cursorXPosition = m_commandLine.Length;
break;
case ConsoleKey.Home:
cp = 0;
m_cursorXPosition = 0;
break;
case ConsoleKey.UpArrow:
if (historyLine < 1)
break;
historyLine--;
LockOutput();
cmdline.Remove(0, cmdline.Length);
cmdline.Append(history[historyLine]);
cp = cmdline.Length;
m_commandLine.Remove(0, m_commandLine.Length);
m_commandLine.Append(m_history[historyLine]);
m_cursorXPosition = m_commandLine.Length;
UnlockOutput();
break;
case ConsoleKey.DownArrow:
if (historyLine >= history.Count)
if (historyLine >= m_history.Count)
break;
historyLine++;
LockOutput();
if (historyLine == history.Count)
if (historyLine == m_history.Count)
{
cmdline.Remove(0, cmdline.Length);
m_commandLine.Remove(0, m_commandLine.Length);
}
else
{
cmdline.Remove(0, cmdline.Length);
cmdline.Append(history[historyLine]);
m_commandLine.Remove(0, m_commandLine.Length);
m_commandLine.Append(m_history[historyLine]);
}
cp = cmdline.Length;
m_cursorXPosition = m_commandLine.Length;
UnlockOutput();
break;
case ConsoleKey.LeftArrow:
if (cp > 0)
cp--;
if (m_cursorXPosition > 0)
m_cursorXPosition--;
break;
case ConsoleKey.RightArrow:
if (cp < cmdline.Length)
cp++;
if (m_cursorXPosition < m_commandLine.Length)
m_cursorXPosition++;
break;
case ConsoleKey.Enter:
SetCursorLeft(0);
y = SetCursorTop(y);
m_cursorYPosition = SetCursorTop(m_cursorYPosition);
System.Console.WriteLine();
//Show();
lock (cmdline)
lock (m_commandLine)
{
y = -1;
m_cursorYPosition = -1;
}
string commandLine = cmdline.ToString();
string commandLine = m_commandLine.ToString();
if (isCommand)
{
@@ -481,12 +481,12 @@ namespace OpenSim.Framework.Console
if (cmd.Length != 0)
{
int i;
int index;
for (i=0 ; i < cmd.Length ; i++)
for (index=0 ; index < cmd.Length ; index++)
{
if (cmd[i].Contains(" "))
cmd[i] = "\"" + cmd[i] + "\"";
if (cmd[index].Contains(" "))
cmd[index] = "\"" + cmd[index] + "\"";
}
AddToHistory(String.Join(" ", cmd));
return String.Empty;
@@ -494,7 +494,7 @@ namespace OpenSim.Framework.Console
}
// If we're not echoing to screen (e.g. a password) then we probably don't want it in history
if (echo && commandLine != "")
if (m_echo && commandLine != "")
AddToHistory(commandLine);
return commandLine;

View File

@@ -51,10 +51,9 @@ namespace OpenSim.Framework
UUID RayTargetID, byte BypassRayCast, bool RayEndIsIntersection,
bool RezSelected, bool RemoveItem, UUID fromTaskID);
public delegate UUID RezSingleAttachmentFromInv(IClientAPI remoteClient, UUID itemID, uint AttachmentPt);
public delegate ISceneEntity RezSingleAttachmentFromInv(IClientAPI remoteClient, UUID itemID, uint AttachmentPt);
public delegate void RezMultipleAttachmentsFromInv(IClientAPI remoteClient, RezMultipleAttachmentsFromInvPacket.HeaderDataBlock header,
RezMultipleAttachmentsFromInvPacket.ObjectDataBlock[] objects);
public delegate void RezMultipleAttachmentsFromInv(IClientAPI remoteClient, List<KeyValuePair<UUID, uint>> rezlist );
public delegate void ObjectAttach(
IClientAPI remoteClient, uint objectLocalID, uint AttachmentPt, bool silent);
@@ -83,7 +82,7 @@ namespace OpenSim.Framework
IClientAPI remoteClient, ulong regionHandle, Vector3 position, Vector3 lookAt, uint flags);
public delegate void TeleportLandmarkRequest(
IClientAPI remoteClient, UUID regionID, Vector3 position);
IClientAPI remoteClient, AssetLandmark lm);
public delegate void DisconnectUser();
@@ -741,7 +740,7 @@ namespace OpenSim.Framework
bool IsActive { get; set; }
/// <value>
/// Determines whether the client is logging out or not.
/// Determines whether the client is or has been removed from a given scene
/// </value>
bool IsLoggingOut { get; set; }
@@ -790,7 +789,7 @@ namespace OpenSim.Framework
event DeRezObject OnDeRezObject;
event Action<IClientAPI> OnRegionHandShakeReply;
event GenericCall1 OnRequestWearables;
event GenericCall1 OnCompleteMovementToRegion;
event Action<IClientAPI, bool> OnCompleteMovementToRegion;
event UpdateAgent OnPreAgentUpdate;
event UpdateAgent OnAgentUpdate;
event AgentRequestSit OnAgentRequestSit;
@@ -940,7 +939,7 @@ namespace OpenSim.Framework
event ScriptReset OnScriptReset;
event GetScriptRunning OnGetScriptRunning;
event SetScriptRunning OnSetScriptRunning;
event UpdateVector OnAutoPilotGo;
event Action<Vector3, bool, bool> OnAutoPilotGo;
event TerrainUnacked OnUnackedTerrain;
event ActivateGesture OnActivateGesture;
@@ -1012,11 +1011,11 @@ namespace OpenSim.Framework
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);
@@ -1102,7 +1101,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();
@@ -1165,7 +1171,19 @@ namespace OpenSim.Framework
void SendAgentAlertMessage(string message, bool modal);
void SendLoadURL(string objectname, UUID objectID, UUID ownerID, bool groupOwned, string message, string url);
void SendDialog(string objectname, UUID objectID, string ownerFirstName, string ownerLastName, string msg, UUID textureID, int ch,
/// <summary>
/// Open a dialog box on the client.
/// </summary>
/// <param name="objectname"></param>
/// <param name="objectID"></param>
/// <param name="ownerID">/param>
/// <param name="ownerFirstName"></param>
/// <param name="ownerLastName"></param>
/// <param name="msg"></param>
/// <param name="textureID"></param>
/// <param name="ch"></param>
/// <param name="buttonlabels"></param>
void SendDialog(string objectname, UUID objectID, UUID ownerID, string ownerFirstName, string ownerLastName, string msg, UUID textureID, int ch,
string[] buttonlabels);
bool AddMoney(int debit);
@@ -1389,7 +1407,7 @@ namespace OpenSim.Framework
void SendGroupTransactionsSummaryDetails(IClientAPI sender,UUID groupID, UUID transactionID, UUID sessionID,int amt);
void SendChangeUserRights(UUID agentID, UUID friendID, int rights);
void SendTextBoxRequest(string message, int chatChannel, string objectname, string ownerFirstName, string ownerLastName, UUID objectId);
void SendTextBoxRequest(string message, int chatChannel, string objectname, UUID ownerID, string ownerFirstName, string ownerLastName, UUID objectId);
void StopFlying(ISceneEntity presence);

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

@@ -26,35 +26,28 @@
*/
using System;
using System.Collections.Generic;
public enum StatusIndicators : int
namespace OpenSim.Framework
{
Generic = 0,
Start = 1,
End = 2
}
public interface IConsole
{
object ConsoleScene { get; }
public struct sCollisionData
{
public uint ColliderLocalId;
public uint CollidedWithLocalId;
public int NumberOfCollisions;
public int CollisionType;
public int StatusIndicator;
public int lastframe;
}
void Output(string text, string level);
void Output(string text);
void OutputFormat(string format, params object[] components);
[Flags]
public enum CollisionCategories : int
{
Disabled = 0,
Geom = 0x00000001,
Body = 0x00000002,
Space = 0x00000004,
Character = 0x00000008,
Land = 0x00000010,
Water = 0x00000020,
Wind = 0x00000040,
Sensor = 0x00000080,
Selected = 0x00000100
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

@@ -26,22 +26,19 @@
*/
using OpenMetaverse;
using OpenSim.Framework.Console;
//using OpenSim.Framework.Console;
using Nini.Config;
namespace OpenSim.Framework
{
public delegate void restart(RegionInfo thisRegion);
//public delegate void regionup (RegionInfo thisRegion);
public enum RegionStatus : int
{
Down = 0,
Up = 1,
Crashed = 2,
Starting = 3,
SlaveScene = 4
};
/// <value>
@@ -70,8 +67,20 @@ namespace OpenSim.Framework
event restart OnRestart;
void AddNewClient(IClientAPI client);
void RemoveClient(UUID agentID);
/// <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.
/// </summary>
/// <param name="client"></param>
/// <param name="type">The type of agent to add.</param>
void AddNewClient(IClientAPI client, PresenceType type);
/// <summary>
/// Remove the given client from the scene.
/// </summary>
/// <param name="agentID"></param>
/// <param name="closeChildAgents">Close the neighbour child agents associated with this client.</param>
void RemoveClient(UUID agentID, bool closeChildAgents);
void Restart();
//RegionInfo OtherRegionUp(RegionInfo thisRegion);
@@ -99,7 +108,7 @@ namespace OpenSim.Framework
void RegisterModuleInterface<M>(M mod);
void StackModuleInterface<M>(M mod);
void AddCommand(object module, string command, string shorthelp, string longhelp, CommandDelegate callback);
// void AddCommand(object module, string command, string shorthelp, string longhelp, CommandDelegate callback);
ISceneObject DeserializeObject(string representation);

View File

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

View File

@@ -27,13 +27,15 @@
using System;
using System.Collections.Generic;
using System.Reflection;
using log4net;
using OpenMetaverse;
namespace OpenSim.Framework
{
public class InventoryFolderImpl : InventoryFolderBase
{
//private static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType);
// private static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType);
public static readonly string PATH_DELIMITER = "/";
@@ -402,6 +404,10 @@ namespace OpenSim.Framework
{
foreach (InventoryItemBase item in Items.Values)
{
// m_log.DebugFormat(
// "[INVENTORY FOLDER IMPL]: Returning item {0} {1}, OwnerPermissions {2:X}",
// item.Name, item.ID, item.CurrentPermissions);
itemList.Add(item);
}
}

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

@@ -144,6 +144,7 @@ namespace OpenSim.Framework
m_log.WarnFormat("[PACKETPOOL]: Failed to get packet of type {0}", type);
else
packet.FromBytes(bytes, ref i, ref packetEnd, zeroBuffer);
return packet;
}
@@ -160,19 +161,18 @@ namespace OpenSim.Framework
case PacketType.ObjectUpdate:
ObjectUpdatePacket oup = (ObjectUpdatePacket)packet;
foreach (ObjectUpdatePacket.ObjectDataBlock oupod in
oup.ObjectData)
foreach (ObjectUpdatePacket.ObjectDataBlock oupod in oup.ObjectData)
ReturnDataBlock<ObjectUpdatePacket.ObjectDataBlock>(oupod);
oup.ObjectData = null;
break;
case PacketType.ImprovedTerseObjectUpdate:
ImprovedTerseObjectUpdatePacket itoup =
(ImprovedTerseObjectUpdatePacket)packet;
ImprovedTerseObjectUpdatePacket itoup = (ImprovedTerseObjectUpdatePacket)packet;
foreach (ImprovedTerseObjectUpdatePacket.ObjectDataBlock
itoupod in itoup.ObjectData)
foreach (ImprovedTerseObjectUpdatePacket.ObjectDataBlock itoupod in itoup.ObjectData)
ReturnDataBlock<ImprovedTerseObjectUpdatePacket.ObjectDataBlock>(itoupod);
itoup.ObjectData = null;
break;
}
@@ -194,6 +194,7 @@ namespace OpenSim.Framework
{
pool[type] = new Stack<Packet>();
}
if ((pool[type]).Count < 50)
{
(pool[type]).Push(packet);
@@ -223,6 +224,7 @@ namespace OpenSim.Framework
{
DataBlocks[typeof(T)] = new Stack<Object>();
}
return new T();
}
}
@@ -234,6 +236,9 @@ namespace OpenSim.Framework
lock (DataBlocks)
{
if (!DataBlocks.ContainsKey(typeof(T)))
DataBlocks[typeof(T)] = new Stack<Object>();
if (DataBlocks[typeof(T)].Count < 50)
DataBlocks[typeof(T)].Push(block);
}

View File

@@ -24,16 +24,16 @@
* (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 OpenMetaverse;
using OpenSim.Framework;
namespace OpenSim.Region.Framework.Interfaces
namespace OpenSim.Framework
{
public interface IAvatarFactory
/// <summary>
/// Indicate the type of ScenePresence.
/// </summary>
public enum PresenceType
{
bool ValidateBakedTextureCache(IClientAPI client);
void QueueAppearanceSend(UUID agentid);
void QueueAppearanceSave(UUID agentid);
User,
Npc
}
}
}

View File

@@ -213,6 +213,8 @@ namespace OpenSim.Framework
/// <param name="prim"></param>
public PrimitiveBaseShape(Primitive prim)
{
// m_log.DebugFormat("[PRIMITIVE BASE SHAPE]: Creating from {0}", prim.ID);
PCode = (byte)prim.PrimData.PCode;
ExtraParams = new byte[1];
@@ -376,7 +378,7 @@ namespace OpenSim.Framework
_pathEnd = Primitive.PackEndCut(end);
}
public void SetSculptData(byte sculptType, UUID SculptTextureUUID)
public void SetSculptProperties(byte sculptType, UUID SculptTextureUUID)
{
_sculptType = sculptType;
_sculptTexture = SculptTextureUUID;
@@ -613,29 +615,39 @@ namespace OpenSim.Framework
}
}
public byte SculptType {
get {
public byte SculptType
{
get
{
return _sculptType;
}
set {
set
{
_sculptType = value;
}
}
public byte[] SculptData {
get {
public byte[] SculptData
{
get
{
return _sculptData;
}
set {
set
{
// m_log.DebugFormat("[PRIMITIVE BASE SHAPE]: Setting SculptData to data with length {0}", value.Length);
_sculptData = value;
}
}
public int FlexiSoftness {
get {
public int FlexiSoftness
{
get
{
return _flexiSoftness;
}
set {
set
{
_flexiSoftness = value;
}
}
@@ -867,8 +879,71 @@ namespace OpenSim.Framework
}
}
public ulong GetMeshKey(Vector3 size, float lod)
{
ulong hash = 5381;
hash = djb2(hash, this.PathCurve);
hash = djb2(hash, (byte)((byte)this.HollowShape | (byte)this.ProfileShape));
hash = djb2(hash, this.PathBegin);
hash = djb2(hash, this.PathEnd);
hash = djb2(hash, this.PathScaleX);
hash = djb2(hash, this.PathScaleY);
hash = djb2(hash, this.PathShearX);
hash = djb2(hash, this.PathShearY);
hash = djb2(hash, (byte)this.PathTwist);
hash = djb2(hash, (byte)this.PathTwistBegin);
hash = djb2(hash, (byte)this.PathRadiusOffset);
hash = djb2(hash, (byte)this.PathTaperX);
hash = djb2(hash, (byte)this.PathTaperY);
hash = djb2(hash, this.PathRevolutions);
hash = djb2(hash, (byte)this.PathSkew);
hash = djb2(hash, this.ProfileBegin);
hash = djb2(hash, this.ProfileEnd);
hash = djb2(hash, this.ProfileHollow);
// TODO: Separate scale out from the primitive shape data (after
// scaling is supported at the physics engine level)
byte[] scaleBytes = size.GetBytes();
for (int i = 0; i < scaleBytes.Length; i++)
hash = djb2(hash, scaleBytes[i]);
// Include LOD in hash, accounting for endianness
byte[] lodBytes = new byte[4];
Buffer.BlockCopy(BitConverter.GetBytes(lod), 0, lodBytes, 0, 4);
if (!BitConverter.IsLittleEndian)
{
Array.Reverse(lodBytes, 0, 4);
}
for (int i = 0; i < lodBytes.Length; i++)
hash = djb2(hash, lodBytes[i]);
// include sculpt UUID
if (this.SculptEntry)
{
scaleBytes = this.SculptTexture.GetBytes();
for (int i = 0; i < scaleBytes.Length; i++)
hash = djb2(hash, scaleBytes[i]);
}
return hash;
}
private ulong djb2(ulong hash, byte c)
{
return ((hash << 5) + hash) + (ulong)c;
}
private ulong djb2(ulong hash, ushort c)
{
hash = ((hash << 5) + hash) + (ulong)((byte)c);
return ((hash << 5) + hash) + (ulong)(c >> 8);
}
public byte[] ExtraParamsToBytes()
{
// m_log.DebugFormat("[EXTRAPARAMS]: Called ExtraParamsToBytes()");
ushort FlexiEP = 0x10;
ushort LightEP = 0x20;
ushort SculptEP = 0x30;
@@ -884,18 +959,21 @@ namespace OpenSim.Framework
TotalBytesLength += 16;// data
TotalBytesLength += 2 + 4; // type
}
if (_lightEntry)
{
ExtraParamsNum++;
TotalBytesLength += 16;// data
TotalBytesLength += 2 + 4; // type
}
if (_sculptEntry)
{
ExtraParamsNum++;
TotalBytesLength += 17;// data
TotalBytesLength += 2 + 4; // type
}
if (_projectionEntry)
{
ExtraParamsNum++;
@@ -905,7 +983,6 @@ namespace OpenSim.Framework
byte[] returnbytes = new byte[TotalBytesLength];
// uint paramlength = ExtraParamsNum;
// Stick in the number of parameters
@@ -925,6 +1002,7 @@ namespace OpenSim.Framework
Array.Copy(FlexiData, 0, returnbytes, i, FlexiData.Length);
i += FlexiData.Length;
}
if (_lightEntry)
{
byte[] LightData = GetLightBytes();
@@ -939,6 +1017,7 @@ namespace OpenSim.Framework
Array.Copy(LightData, 0, returnbytes, i, LightData.Length);
i += LightData.Length;
}
if (_sculptEntry)
{
byte[] SculptData = GetSculptBytes();
@@ -953,6 +1032,7 @@ namespace OpenSim.Framework
Array.Copy(SculptData, 0, returnbytes, i, SculptData.Length);
i += SculptData.Length;
}
if (_projectionEntry)
{
byte[] ProjectionData = GetProjectionBytes();
@@ -966,6 +1046,7 @@ namespace OpenSim.Framework
Array.Copy(ProjectionData, 0, returnbytes, i, ProjectionData.Length);
i += ProjectionData.Length;
}
if (!_flexiEntry && !_lightEntry && !_sculptEntry && !_projectionEntry)
{
byte[] returnbyte = new byte[1];
@@ -973,10 +1054,7 @@ namespace OpenSim.Framework
return returnbyte;
}
return returnbytes;
//m_log.Info("[EXTRAPARAMS]: Length = " + m_shape.ExtraParams.Length.ToString());
}
public void ReadInUpdateExtraParam(ushort type, bool inUse, byte[] data)
@@ -1047,7 +1125,6 @@ namespace OpenSim.Framework
extraParamCount = data[i++];
}
for (int k = 0; k < extraParamCount; k++)
{
ushort epType = Utils.BytesToUInt16(data, i);
@@ -1091,7 +1168,6 @@ namespace OpenSim.Framework
_sculptEntry = false;
if (!lGotFilter)
_projectionEntry = false;
}
public void ReadSculptData(byte[] data, int pos)
@@ -1120,6 +1196,7 @@ namespace OpenSim.Framework
if (_sculptType != (byte)1 && _sculptType != (byte)2 && _sculptType != (byte)3 && _sculptType != (byte)4)
_sculptType = 4;
}
_sculptTexture = SculptUUID;
_sculptType = SculptTypel;
//m_log.Info("[SCULPT]:" + SculptUUID.ToString());

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
{
@@ -769,10 +769,10 @@ namespace OpenSim.Framework
"Clamp prims to max size", "false", true);
configMember.addConfigurationOption("object_capacity", ConfigurationOption.ConfigurationTypes.TYPE_INT32,
"Max objects this sim will hold", "0", true);
"Max objects this sim will hold", "15000", true);
configMember.addConfigurationOption("agent_capacity", ConfigurationOption.ConfigurationTypes.TYPE_INT32,
"Max agents this sim will hold", "0", true);
"Max avatars this sim will hold", "100", true);
configMember.addConfigurationOption("scope_id", ConfigurationOption.ConfigurationTypes.TYPE_UUID,
"Scope ID for this region", UUID.Zero.ToString(), true);

View File

@@ -48,11 +48,13 @@ namespace OpenSim.Framework.RegionLoader.Filesystem
public RegionInfo[] LoadRegions()
{
string regionConfigPath = Path.Combine(Util.configDir(), "Regions");
bool allowRegionless = false;
try
{
IConfig startupConfig = (IConfig)m_configSource.Configs["Startup"];
regionConfigPath = startupConfig.GetString("regionload_regionsdir", regionConfigPath).Trim();
allowRegionless = startupConfig.GetBoolean("allow_regionless", false);
}
catch (Exception)
{
@@ -68,7 +70,7 @@ namespace OpenSim.Framework.RegionLoader.Filesystem
string[] iniFiles = Directory.GetFiles(regionConfigPath, "*.ini");
// Create an empty Regions.ini if there are no existing config files.
if (configFiles.Length == 0 && iniFiles.Length == 0)
if (!allowRegionless && configFiles.Length == 0 && iniFiles.Length == 0)
{
new RegionInfo("DEFAULT REGION CONFIG", Path.Combine(regionConfigPath, "Regions.ini"), false, m_configSource);
iniFiles = Directory.GetFiles(regionConfigPath, "*.ini");

View File

@@ -60,6 +60,8 @@ namespace OpenSim.Framework.RegionLoader.Web
{
IConfig startupConfig = (IConfig) m_configSource.Configs["Startup"];
string url = startupConfig.GetString("regionload_webserver_url", String.Empty).Trim();
bool allowRegionless = startupConfig.GetBoolean("allow_regionless", false);
if (url == String.Empty)
{
m_log.Error("[WEBLOADER]: Unable to load webserver URL - URL was empty.");
@@ -67,39 +69,60 @@ namespace OpenSim.Framework.RegionLoader.Web
}
else
{
while (tries > 0)
{
HttpWebRequest webRequest = (HttpWebRequest) WebRequest.Create(url);
webRequest.Timeout = 30000; //30 Second Timeout
m_log.Debug("[WEBLOADER]: Sending Download Request...");
HttpWebResponse webResponse = (HttpWebResponse) webRequest.GetResponse();
m_log.Debug("[WEBLOADER]: Downloading Region Information From Remote Server...");
StreamReader reader = new StreamReader(webResponse.GetResponseStream());
string xmlSource = String.Empty;
string tempStr = reader.ReadLine();
while (tempStr != null)
{
xmlSource = xmlSource + tempStr;
tempStr = reader.ReadLine();
}
m_log.Debug("[WEBLOADER]: Done downloading region information from server. Total Bytes: " +
xmlSource.Length);
XmlDocument xmlDoc = new XmlDocument();
xmlDoc.LoadXml(xmlSource);
if (xmlDoc.FirstChild.Name == "Regions")
{
RegionInfo[] regionInfos = new RegionInfo[xmlDoc.FirstChild.ChildNodes.Count];
int i;
for (i = 0; i < xmlDoc.FirstChild.ChildNodes.Count; i++)
{
m_log.Debug(xmlDoc.FirstChild.ChildNodes[i].OuterXml);
regionInfos[i] =
new RegionInfo("REGION CONFIG #" + (i + 1), xmlDoc.FirstChild.ChildNodes[i],false,m_configSource);
}
while(tries > 0)
{
RegionInfo[] regionInfos = new RegionInfo[] {};
int regionCount = 0;
HttpWebRequest webRequest = (HttpWebRequest) WebRequest.Create(url);
webRequest.Timeout = 30000; //30 Second Timeout
m_log.DebugFormat("[WEBLOADER]: Sending download request to {0}", url);
if (i > 0)
return regionInfos;
}
try
{
HttpWebResponse webResponse = (HttpWebResponse) webRequest.GetResponse();
m_log.Debug("[WEBLOADER]: Downloading region information...");
StreamReader reader = new StreamReader(webResponse.GetResponseStream());
string xmlSource = String.Empty;
string tempStr = reader.ReadLine();
while (tempStr != null)
{
xmlSource = xmlSource + tempStr;
tempStr = reader.ReadLine();
}
m_log.Debug("[WEBLOADER]: Done downloading region information from server. Total Bytes: " +
xmlSource.Length);
XmlDocument xmlDoc = new XmlDocument();
xmlDoc.LoadXml(xmlSource);
if (xmlDoc.FirstChild.Name == "Regions")
{
regionCount = xmlDoc.FirstChild.ChildNodes.Count;
if (regionCount > 0)
{
regionInfos = new RegionInfo[regionCount];
int i;
for (i = 0; i < xmlDoc.FirstChild.ChildNodes.Count; i++)
{
m_log.Debug(xmlDoc.FirstChild.ChildNodes[i].OuterXml);
regionInfos[i] =
new RegionInfo("REGION CONFIG #" + (i + 1), xmlDoc.FirstChild.ChildNodes[i],false,m_configSource);
}
}
}
}
catch (WebException ex)
{
if (((HttpWebResponse)ex.Response).StatusCode == HttpStatusCode.NotFound)
{
if (!allowRegionless)
throw ex;
}
else
throw ex;
}
if (regionCount > 0 | allowRegionless)
return regionInfos;
m_log.Debug("[WEBLOADER]: Request yielded no regions.");
tries--;
@@ -108,8 +131,10 @@ namespace OpenSim.Framework.RegionLoader.Web
m_log.Debug("[WEBLOADER]: Retrying");
System.Threading.Thread.Sleep(wait);
}
}
return null;
}
m_log.Error("[WEBLOADER]: No region configs were available.");
return null;
}
}
}

View File

@@ -397,5 +397,18 @@ namespace OpenSim.Framework
set { m_LoadedCreationID = value; }
}
private bool m_GodBlockSearch = false;
public bool GodBlockSearch
{
get { return m_GodBlockSearch; }
set { m_GodBlockSearch = value; }
}
private bool m_Casino = false;
public bool Casino
{
get { return m_Casino; }
set { m_Casino = value; }
}
}
}

View File

@@ -182,6 +182,9 @@ namespace OpenSim.Framework.Serialization.External
case "FixedSun":
settings.FixedSun = bool.Parse(xtr.ReadElementContentAsString());
break;
case "SunPosition":
settings.SunPosition = double.Parse(xtr.ReadElementContentAsString());
break;
}
}
@@ -237,8 +240,9 @@ namespace OpenSim.Framework.Serialization.External
xtw.WriteElementString("TerrainLowerLimit", settings.TerrainLowerLimit.ToString());
xtw.WriteElementString("UseEstateSun", settings.UseEstateSun.ToString());
xtw.WriteElementString("FixedSun", settings.FixedSun.ToString());
// XXX: Need to expose interface to get sun phase information from sun module
// xtw.WriteStartElement("SunPhase",
xtw.WriteElementString("SunPosition", settings.SunPosition.ToString());
// Note: 'SunVector' isn't saved because this value is owned by the Sun Module, which
// calculates it automatically according to the date and other factors.
xtw.WriteEndElement();
xtw.WriteEndElement();

View File

@@ -31,6 +31,7 @@ using System.Diagnostics;
using System.IO;
using System.Reflection;
using System.Text;
using System.Text.RegularExpressions;
using System.Threading;
using System.Timers;
using log4net;
@@ -124,7 +125,6 @@ namespace OpenSim.Framework.Servers
m_logFileAppender = appender;
}
}
}
/// <summary>
@@ -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()));
}
}
@@ -395,6 +404,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()
{
@@ -443,45 +473,68 @@ namespace OpenSim.Framework.Servers
{
string buildVersion = string.Empty;
// Add commit hash and date information if available
// The commit hash and date are stored in a file bin/.version
// This file can automatically created by a post
// commit script in the opensim git master repository or
// by issuing the follwoing command from the top level
// directory of the opensim repository
// git log -n 1 --pretty="format:%h: %ci" >bin/.version
// For the full git commit hash use %H instead of %h
//
// The subversion information is deprecated and will be removed at a later date
// Add subversion revision information if available
// Try file "svn_revision" in the current directory first, then the .svn info.
// This allows to make the revision available in simulators not running from the source tree.
// FIXME: Making an assumption about the directory we're currently in - we do this all over the place
// elsewhere as well
string gitDir = "../.git/";
string gitRefPointerPath = gitDir + "HEAD";
string svnRevisionFileName = "svn_revision";
string svnFileName = ".svn/entries";
string gitCommitFileName = ".version";
string manualVersionFileName = ".version";
string inputLine;
int strcmp;
if (File.Exists(gitCommitFileName))
if (File.Exists(manualVersionFileName))
{
StreamReader CommitFile = File.OpenText(gitCommitFileName);
buildVersion = CommitFile.ReadLine();
CommitFile.Close();
using (StreamReader CommitFile = File.OpenText(manualVersionFileName))
buildVersion = CommitFile.ReadLine();
m_version += buildVersion ?? "";
}
else if (File.Exists(gitRefPointerPath))
{
// m_log.DebugFormat("[OPENSIM]: Found {0}", gitRefPointerPath);
// Remove the else logic when subversion mirror is no longer used
string rawPointer = "";
using (StreamReader pointerFile = File.OpenText(gitRefPointerPath))
rawPointer = pointerFile.ReadLine();
// m_log.DebugFormat("[OPENSIM]: rawPointer [{0}]", rawPointer);
Match m = Regex.Match(rawPointer, "^ref: (.+)$");
if (m.Success)
{
// m_log.DebugFormat("[OPENSIM]: Matched [{0}]", m.Groups[1].Value);
string gitRef = m.Groups[1].Value;
string gitRefPath = gitDir + gitRef;
if (File.Exists(gitRefPath))
{
// m_log.DebugFormat("[OPENSIM]: Found gitRefPath [{0}]", gitRefPath);
using (StreamReader refFile = File.OpenText(gitRefPath))
{
string gitHash = refFile.ReadLine();
m_version += gitHash.Substring(0, 7);
}
}
}
}
else
{
// Remove the else logic when subversion mirror is no longer used
if (File.Exists(svnRevisionFileName))
{
StreamReader RevisionFile = File.OpenText(svnRevisionFileName);
buildVersion = RevisionFile.ReadLine();
buildVersion.Trim();
RevisionFile.Close();
}
if (string.IsNullOrEmpty(buildVersion) && File.Exists(svnFileName))

View File

@@ -56,7 +56,6 @@ namespace OpenSim.Framework.Servers.HttpServer
private volatile int NotSocketErrors = 0;
public volatile bool HTTPDRunning = false;
protected Thread m_workerThread;
// protected HttpListener m_httpListener;
protected CoolHTTPListener m_httpListener2;
protected Dictionary<string, XmlRpcMethod> m_rpcHandlers = new Dictionary<string, XmlRpcMethod>();
@@ -66,7 +65,6 @@ namespace OpenSim.Framework.Servers.HttpServer
protected Dictionary<string, IRequestHandler> m_streamHandlers = new Dictionary<string, IRequestHandler>();
protected Dictionary<string, GenericHTTPMethod> m_HTTPHandlers = new Dictionary<string, GenericHTTPMethod>();
protected Dictionary<string, IHttpAgentHandler> m_agentHandlers = new Dictionary<string, IHttpAgentHandler>();
protected Dictionary<string, PollServiceEventArgs> m_pollHandlers =
new Dictionary<string, PollServiceEventArgs>();
@@ -155,7 +153,8 @@ namespace OpenSim.Framework.Servers.HttpServer
public List<string> GetStreamHandlerKeys()
{
return new List<string>(m_streamHandlers.Keys);
lock (m_streamHandlers)
return new List<string>(m_streamHandlers.Keys);
}
private static string GetHandlerKey(string httpMethod, string path)
@@ -196,7 +195,8 @@ namespace OpenSim.Framework.Servers.HttpServer
public List<string> GetXmlRpcHandlerKeys()
{
return new List<string>(m_rpcHandlers.Keys);
lock (m_rpcHandlers)
return new List<string>(m_rpcHandlers.Keys);
}
public bool AddHTTPHandler(string methodName, GenericHTTPMethod handler)
@@ -218,10 +218,10 @@ namespace OpenSim.Framework.Servers.HttpServer
public List<string> GetHTTPHandlerKeys()
{
return new List<string>(m_HTTPHandlers.Keys);
lock (m_HTTPHandlers)
return new List<string>(m_HTTPHandlers.Keys);
}
public bool AddPollServiceHTTPHandler(string methodName, GenericHTTPMethod handler, PollServiceEventArgs args)
{
bool pollHandlerResult = false;
@@ -242,10 +242,10 @@ namespace OpenSim.Framework.Servers.HttpServer
public List<string> GetPollServiceHandlerKeys()
{
return new List<string>(m_pollHandlers.Keys);
lock (m_pollHandlers)
return new List<string>(m_pollHandlers.Keys);
}
// Note that the agent string is provided simply to differentiate
// the handlers - it is NOT required to be an actual agent header
// value.
@@ -266,7 +266,8 @@ namespace OpenSim.Framework.Servers.HttpServer
public List<string> GetAgentHandlerKeys()
{
return new List<string>(m_agentHandlers.Keys);
lock (m_agentHandlers)
return new List<string>(m_agentHandlers.Keys);
}
public bool AddLLSDHandler(string path, LLSDMethod handler)
@@ -284,7 +285,8 @@ namespace OpenSim.Framework.Servers.HttpServer
public List<string> GetLLSDHandlerKeys()
{
return new List<string>(m_llsdHandlers.Keys);
lock (m_llsdHandlers)
return new List<string>(m_llsdHandlers.Keys);
}
public bool SetDefaultLLSDHandler(DefaultLLSDMethod handler)
@@ -404,15 +406,15 @@ namespace OpenSim.Framework.Servers.HttpServer
string requestMethod = request.HttpMethod;
string uriString = request.RawUrl;
string reqnum = "unknown";
// string reqnum = "unknown";
int tickstart = Environment.TickCount;
try
{
// OpenSim.Framework.WebUtil.OSHeaderRequestID
if (request.Headers["opensim-request-id"] != null)
reqnum = String.Format("{0}:{1}",request.RemoteIPEndPoint,request.Headers["opensim-request-id"]);
// m_log.DebugFormat("[BASE HTTP SERVER]: <{0}> handle request for {1}",reqnum,request.RawUrl);
// if (request.Headers["opensim-request-id"] != null)
// reqnum = String.Format("{0}:{1}",request.RemoteIPEndPoint,request.Headers["opensim-request-id"]);
//m_log.DebugFormat("[BASE HTTP SERVER]: <{0}> handle request for {1}",reqnum,request.RawUrl);
Thread.CurrentThread.CurrentCulture = new CultureInfo("en-US", true);
@@ -746,7 +748,8 @@ namespace OpenSim.Framework.Servers.HttpServer
private bool TryGetAgentHandler(OSHttpRequest request, OSHttpResponse response, out IHttpAgentHandler agentHandler)
{
agentHandler = null;
try
lock (m_agentHandlers)
{
foreach (IHttpAgentHandler handler in m_agentHandlers.Values)
{
@@ -757,9 +760,6 @@ namespace OpenSim.Framework.Servers.HttpServer
}
}
}
catch(KeyNotFoundException)
{
}
return false;
}
@@ -803,9 +803,12 @@ namespace OpenSim.Framework.Servers.HttpServer
XmlRpcMethod method;
bool methodWasFound;
bool keepAlive = false;
lock (m_rpcHandlers)
{
methodWasFound = m_rpcHandlers.TryGetValue(methodName, out method);
if (methodWasFound)
keepAlive = m_rpcHandlersKeepAlive[methodName];
}
if (methodWasFound)
@@ -824,7 +827,6 @@ namespace OpenSim.Framework.Servers.HttpServer
}
xmlRprcRequest.Params.Add(request.Headers.Get(xff)); // Param[3]
try
{
xmlRpcResponse = method(xmlRprcRequest, request.RemoteIPEndPoint);
@@ -846,7 +848,7 @@ namespace OpenSim.Framework.Servers.HttpServer
}
// if the method wasn't found, we can't determine KeepAlive state anyway, so lets do it only here
response.KeepAlive = m_rpcHandlersKeepAlive[methodName];
response.KeepAlive = keepAlive;
}
else
{
@@ -1106,7 +1108,6 @@ namespace OpenSim.Framework.Servers.HttpServer
/// <returns>true if we have one, false if not</returns>
private bool DoWeHaveALLSDHandler(string path)
{
string[] pathbase = path.Split('/');
string searchquery = "/";
@@ -1122,14 +1123,12 @@ namespace OpenSim.Framework.Servers.HttpServer
string bestMatch = null;
foreach (string pattern in m_llsdHandlers.Keys)
lock (m_llsdHandlers)
{
if (searchquery.StartsWith(pattern) && searchquery.Length >= pattern.Length)
foreach (string pattern in m_llsdHandlers.Keys)
{
if (searchquery.StartsWith(pattern) && searchquery.Length >= pattern.Length)
bestMatch = pattern;
}
}
@@ -1142,12 +1141,10 @@ namespace OpenSim.Framework.Servers.HttpServer
if (String.IsNullOrEmpty(bestMatch))
{
return false;
}
else
{
return true;
}
}
@@ -1232,29 +1229,32 @@ namespace OpenSim.Framework.Servers.HttpServer
string bestMatch = null;
foreach (string pattern in m_llsdHandlers.Keys)
lock (m_llsdHandlers)
{
if (searchquery.ToLower().StartsWith(pattern.ToLower()))
foreach (string pattern in m_llsdHandlers.Keys)
{
if (String.IsNullOrEmpty(bestMatch) || searchquery.Length > bestMatch.Length)
if (searchquery.ToLower().StartsWith(pattern.ToLower()))
{
// You have to specifically register for '/' and to get it, you must specificaly request it
//
if (pattern == "/" && searchquery == "/" || pattern != "/")
bestMatch = pattern;
if (String.IsNullOrEmpty(bestMatch) || searchquery.Length > bestMatch.Length)
{
// You have to specifically register for '/' and to get it, you must specificaly request it
//
if (pattern == "/" && searchquery == "/" || pattern != "/")
bestMatch = pattern;
}
}
}
}
if (String.IsNullOrEmpty(bestMatch))
{
llsdHandler = null;
return false;
}
else
{
llsdHandler = m_llsdHandlers[bestMatch];
return true;
if (String.IsNullOrEmpty(bestMatch))
{
llsdHandler = null;
return false;
}
else
{
llsdHandler = m_llsdHandlers[bestMatch];
return true;
}
}
}
@@ -1523,11 +1523,20 @@ namespace OpenSim.Framework.Servers.HttpServer
}
else
{
//m_log.Info("[BASE HTTP SERVER]: Doing HTTP Grunt work with response");
responsecode = (int)responsedata["int_response_code"];
responseString = (string)responsedata["str_response_string"];
contentType = (string)responsedata["content_type"];
try
{
//m_log.Info("[BASE HTTP SERVER]: Doing HTTP Grunt work with response");
responsecode = (int)responsedata["int_response_code"];
responseString = (string)responsedata["str_response_string"];
contentType = (string)responsedata["content_type"];
}
catch
{
responsecode = 500;
responseString = "No response could be obtained";
contentType = "text/plain";
responsedata = new Hashtable();
}
}
if (responsedata.ContainsKey("error_status_text"))
@@ -1807,7 +1816,8 @@ namespace OpenSim.Framework.Servers.HttpServer
//m_log.DebugFormat("[BASE HTTP SERVER]: Removing handler key {0}", handlerKey);
lock (m_streamHandlers) m_streamHandlers.Remove(handlerKey);
lock (m_streamHandlers)
m_streamHandlers.Remove(handlerKey);
}
public void RemoveHTTPHandler(string httpMethod, string path)
@@ -1827,29 +1837,23 @@ namespace OpenSim.Framework.Servers.HttpServer
public void RemovePollServiceHTTPHandler(string httpMethod, string path)
{
lock (m_pollHandlers)
{
if (m_pollHandlers.ContainsKey(httpMethod))
{
m_pollHandlers.Remove(httpMethod);
}
}
m_pollHandlers.Remove(path);
RemoveHTTPHandler(httpMethod, path);
}
public bool RemoveAgentHandler(string agent, IHttpAgentHandler handler)
{
try
lock (m_agentHandlers)
{
if (handler == m_agentHandlers[agent])
IHttpAgentHandler foundHandler;
if (m_agentHandlers.TryGetValue(agent, out foundHandler) && foundHandler == handler)
{
m_agentHandlers.Remove(agent);
return true;
}
}
catch(KeyNotFoundException)
{
}
return false;
}
@@ -1857,28 +1861,21 @@ 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)
{
try
lock (m_llsdHandlers)
{
if (handler == m_llsdHandlers[path])
LLSDMethod foundHandler;
if (m_llsdHandlers.TryGetValue(path, out foundHandler) && foundHandler == handler)
{
m_llsdHandlers.Remove(path);
return true;
}
}
catch (KeyNotFoundException)
{
// This is an exception to prevent crashing because of invalid code
}
return false;
}

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,7 +70,7 @@ 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>

View File

@@ -28,12 +28,17 @@
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;
@@ -42,8 +47,6 @@ namespace OpenSim.Framework.Servers.HttpServer
private Thread m_watcherThread;
private bool m_running = true;
public PollServiceRequestManager(BaseHttpServer pSrv, uint pWorkerThreadCount, int pTimeout)
{
m_server = pSrv;
@@ -52,22 +55,27 @@ 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();
m_watcherThread
= Watchdog.StartThread(
this.ThreadStart,
"PollServiceWatcherThread",
ThreadPriority.Normal,
false,
1000 * 60 * 10);
}
internal void ReQueueEvent(PollServiceHttpRequest req)
@@ -82,10 +90,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 +107,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 +133,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 +152,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();
}

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

@@ -29,7 +29,7 @@ namespace OpenSim
{
public class VersionInfo
{
private const string VERSION_NUMBER = "0.7.2";
private const string VERSION_NUMBER = "0.7.3CM";
private const Flavour VERSION_FLAVOUR = Flavour.Dev;
public enum Flavour

View File

@@ -64,7 +64,7 @@ namespace OpenSim.Framework.Tests
SecureSessionId = UUID.Random();
SessionId = UUID.Random();
AvAppearance = new AvatarAppearance(AgentId);
AvAppearance = new AvatarAppearance();
VisualParams = new byte[218];
//body

View File

@@ -68,7 +68,7 @@ namespace OpenSim.Framework.Tests
m_agentCircuitData1 = new AgentCircuitData();
m_agentCircuitData1.AgentID = AgentId1;
m_agentCircuitData1.Appearance = new AvatarAppearance(AgentId1);
m_agentCircuitData1.Appearance = new AvatarAppearance();
m_agentCircuitData1.BaseFolder = BaseFolder;
m_agentCircuitData1.CapsPath = CapsPath;
m_agentCircuitData1.child = false;
@@ -83,7 +83,7 @@ namespace OpenSim.Framework.Tests
m_agentCircuitData2 = new AgentCircuitData();
m_agentCircuitData2.AgentID = AgentId2;
m_agentCircuitData2.Appearance = new AvatarAppearance(AgentId2);
m_agentCircuitData2.Appearance = new AvatarAppearance();
m_agentCircuitData2.BaseFolder = BaseFolder;
m_agentCircuitData2.CapsPath = CapsPath;
m_agentCircuitData2.child = false;

View File

@@ -61,7 +61,7 @@ namespace OpenSim.Framework.Tests
"Magnitude of vector was incorrect.");
TestDelegate d = delegate() { Util.GetNormalizedVector(v1); };
bool causesArgumentException = TestHelper.AssertThisDelegateCausesArgumentException(d);
bool causesArgumentException = TestHelpers.AssertThisDelegateCausesArgumentException(d);
Assert.That(causesArgumentException, Is.True,
"Getting magnitude of null vector did not cause argument exception.");
@@ -94,12 +94,12 @@ namespace OpenSim.Framework.Tests
"Magnitude of vector was incorrect.");
TestDelegate d = delegate() { Util.GetNormalizedVector(v1); };
bool causesArgumentException = TestHelper.AssertThisDelegateCausesArgumentException(d);
bool causesArgumentException = TestHelpers.AssertThisDelegateCausesArgumentException(d);
Assert.That(causesArgumentException, Is.True,
"Getting magnitude of null vector did not cause argument exception.");
d = delegate() { Util.GetNormalizedVector(v2); };
causesArgumentException = TestHelper.AssertThisDelegateCausesArgumentException(d);
causesArgumentException = TestHelpers.AssertThisDelegateCausesArgumentException(d);
Assert.That(causesArgumentException, Is.True,
"Getting magnitude of null vector did not cause argument exception.");
}
@@ -122,7 +122,7 @@ namespace OpenSim.Framework.Tests
"Magnitude of vector was incorrect.");
TestDelegate d = delegate() { Util.GetNormalizedVector(v1); };
bool causesArgumentException = TestHelper.AssertThisDelegateCausesArgumentException(d);
bool causesArgumentException = TestHelpers.AssertThisDelegateCausesArgumentException(d);
Assert.That(causesArgumentException, Is.True,
"Getting magnitude of null vector did not cause argument exception.");
@@ -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;
@@ -56,8 +55,13 @@ namespace OpenSim.Framework
/// <summary>
/// The method used by Util.FireAndForget for asynchronously firing events
/// </summary>
/// <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.
/// </remarks>
public enum FireAndForgetMethod
{
None,
UnsafeQueueUserWorkItem,
QueueUserWorkItem,
BeginInvoke,
@@ -86,10 +90,13 @@ 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 FireAndForgetMethod = FireAndForgetMethod.SmartThreadPool;
public static FireAndForgetMethod DefaultFireAndForgetMethod = FireAndForgetMethod.SmartThreadPool;
public static FireAndForgetMethod FireAndForgetMethod = DefaultFireAndForgetMethod;
/// <summary>
/// Gets the name of the directory where the current running executable
@@ -324,10 +331,25 @@ namespace OpenSim.Framework
}
/// <summary>
/// Debug utility function to convert unbroken strings of XML into something human readable for occasional debugging purposes.
///
/// Please don't delete me even if I appear currently unused!
/// Debug utility function to convert OSD into formatted XML for debugging purposes.
/// </summary>
/// <param name="osd">
/// A <see cref="OSD"/>
/// </param>
/// <returns>
/// A <see cref="System.String"/>
/// </returns>
public static string GetFormattedXml(OSD osd)
{
return GetFormattedXml(OSDParser.SerializeLLSDXmlString(osd));
}
/// <summary>
/// Debug utility function to convert unbroken strings of XML into something human readable for occasional debugging purposes.
/// </summary>
/// <remarks>
/// Please don't delete me even if I appear currently unused!
/// </remarks>
/// <param name="rawXml"></param>
/// <returns></returns>
public static string GetFormattedXml(string rawXml)
@@ -431,26 +453,36 @@ namespace OpenSim.Framework
}
/// <summary>
/// Return an SHA1 hash of the given string
/// Return an SHA1 hash
/// </summary>
/// <param name="data"></param>
/// <returns></returns>
public static string SHA1Hash(string data)
public static string SHA1Hash(string data, Encoding enc)
{
return SHA1Hash(data, Encoding.Default);
return SHA1Hash(enc.GetBytes(data));
}
public static string SHA1Hash(string data, Encoding encoding)
public static string SHA1Hash(string data)
{
byte[] hash = ComputeSHA1Hash(data, encoding);
return SHA1Hash(Encoding.Default.GetBytes(data));
}
/// <summary>
/// Return an SHA1 hash
/// </summary>
/// <param name="data"></param>
/// <returns></returns>
public static string SHA1Hash(byte[] data)
{
byte[] hash = ComputeSHA1Hash(data);
return BitConverter.ToString(hash).Replace("-", String.Empty);
}
private static byte[] ComputeSHA1Hash(string src, Encoding encoding)
private static byte[] ComputeSHA1Hash(byte[] src)
{
SHA1CryptoServiceProvider SHA1 = new SHA1CryptoServiceProvider();
return SHA1.ComputeHash(encoding.GetBytes(src));
return SHA1.ComputeHash(src);
}
public static int fast_distance2d(int x, int y)
@@ -1353,11 +1385,30 @@ namespace OpenSim.Framework
return (ipaddr1 != null) ? "http://" + ipaddr1.ToString() + ":" + port1 : uri;
}
/// <summary>
/// Convert a string to a byte format suitable for transport in an LLUDP packet. The output is truncated to 256 bytes if necessary.
/// </summary>
/// <param name="str">
/// If null or empty, then an bytes[0] is returned.
/// Using "\0" will return a conversion of the null character to a byte. This is not the same as bytes[0]
/// </param>
/// <param name="args">
/// Arguments to substitute into the string via the {} mechanism.
/// </param>
/// <returns></returns>
public static byte[] StringToBytes256(string str, params object[] args)
{
return StringToBytes256(string.Format(str, args));
}
/// <summary>
/// Convert a string to a byte format suitable for transport in an LLUDP packet. The output is truncated to 256 bytes if necessary.
/// </summary>
/// <param name="str">
/// If null or empty, then an bytes[0] is returned.
/// Using "\0" will return a conversion of the null character to a byte. This is not the same as bytes[0]
/// </param>
/// <returns></returns>
public static byte[] StringToBytes256(string str)
{
if (String.IsNullOrEmpty(str)) { return Utils.EmptyBytes; }
@@ -1376,11 +1427,30 @@ namespace OpenSim.Framework
return data;
}
/// <summary>
/// Convert a string to a byte format suitable for transport in an LLUDP packet. The output is truncated to 1024 bytes if necessary.
/// </summary>
/// <param name="str">
/// If null or empty, then an bytes[0] is returned.
/// Using "\0" will return a conversion of the null character to a byte. This is not the same as bytes[0]
/// </param>
/// <param name="args">
/// Arguments to substitute into the string via the {} mechanism.
/// </param>
/// <returns></returns>
public static byte[] StringToBytes1024(string str, params object[] args)
{
return StringToBytes1024(string.Format(str, args));
}
/// <summary>
/// Convert a string to a byte format suitable for transport in an LLUDP packet. The output is truncated to 1024 bytes if necessary.
/// </summary>
/// <param name="str">
/// If null or empty, then an bytes[0] is returned.
/// Using "\0" will return a conversion of the null character to a byte. This is not the same as bytes[0]
/// </param>
/// <returns></returns>
public static byte[] StringToBytes1024(string str)
{
if (String.IsNullOrEmpty(str)) { return Utils.EmptyBytes; }
@@ -1486,25 +1556,47 @@ 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();
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.None:
realCallback.Invoke(obj);
break;
case FireAndForgetMethod.UnsafeQueueUserWorkItem:
ThreadPool.UnsafeQueueUserWorkItem(callback, obj);
ThreadPool.UnsafeQueueUserWorkItem(realCallback, obj);
break;
case FireAndForgetMethod.QueueUserWorkItem:
ThreadPool.QueueUserWorkItem(callback, obj);
ThreadPool.QueueUserWorkItem(realCallback, obj);
break;
case FireAndForgetMethod.BeginInvoke:
FireAndForgetWrapper wrapper = FireAndForgetWrapper.Instance;
wrapper.FireAndForget(callback, obj);
wrapper.FireAndForget(realCallback, obj);
break;
case FireAndForgetMethod.SmartThreadPool:
if (m_ThreadPool == null)
m_ThreadPool = new SmartThreadPool(2000, 15, 2);
m_ThreadPool.QueueWorkItem(SmartThreadPoolCallback, new object[] { callback, obj });
m_ThreadPool.QueueWorkItem(SmartThreadPoolCallback, new object[] { realCallback, obj });
break;
case FireAndForgetMethod.Thread:
Thread thread = new Thread(delegate(object o) { callback(o); });
Thread thread = new Thread(delegate(object o) { realCallback(o); });
thread.Start(obj);
break;
default:
@@ -1706,5 +1798,68 @@ namespace OpenSim.Framework
return (T)Enum.Parse(typeof(T), value); ;
}
#endregion
#region Universal User Identifiers
/// <summary>
/// </summary>
/// <param name="value">uuid[;endpoint[;name]]</param>
/// <param name="uuid"></param>
/// <param name="url"></param>
/// <param name="firstname"></param>
/// <param name="lastname"></param>
public static bool ParseUniversalUserIdentifier(string value, out UUID uuid, out string url, out string firstname, out string lastname, out string secret)
{
uuid = UUID.Zero; url = string.Empty; firstname = "Unknown"; lastname = "User"; secret = string.Empty;
string[] parts = value.Split(';');
if (parts.Length >= 1)
if (!UUID.TryParse(parts[0], out uuid))
return false;
if (parts.Length >= 2)
url = parts[1];
if (parts.Length >= 3)
{
string[] name = parts[2].Split();
if (name.Length == 2)
{
firstname = name[0];
lastname = name[1];
}
}
if (parts.Length >= 4)
secret = parts[3];
return true;
}
/// <summary>
///
/// </summary>
/// <param name="acircuit"></param>
/// <returns>uuid[;endpoint[;name]]</returns>
public static string ProduceUserUniversalIdentifier(AgentCircuitData acircuit)
{
if (acircuit.ServiceURLs.ContainsKey("HomeURI"))
{
string agentsURI = acircuit.ServiceURLs["HomeURI"].ToString();
if (!agentsURI.EndsWith("/"))
agentsURI += "/";
// This is ugly, but there's no other way, given that the name is changed
// in the agent circuit data for foreigners
if (acircuit.lastname.Contains("@"))
{
string[] parts = acircuit.firstname.Split(new char[] { '.' });
if (parts.Length == 2)
return acircuit.AgentID.ToString() + ";" + agentsURI + ";" + parts[0] + " " + parts[1];
}
return acircuit.AgentID.ToString() + ";" + agentsURI + ";" + acircuit.firstname + " " + acircuit.lastname;
}
else
return acircuit.AgentID.ToString();
}
#endregion
}
}

View File

@@ -40,19 +40,31 @@ 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 int LastTick { get; set; }
public ThreadWatchdogInfo(Thread thread)
/// <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;
LastTick = Environment.TickCount & Int32.MaxValue;
}
}
@@ -82,7 +94,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,6 +103,24 @@ 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;
@@ -98,6 +128,13 @@ namespace OpenSim.Framework
thread.IsBackground = isBackground;
thread.Start();
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);
return thread;
}
@@ -112,27 +149,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 +194,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 +212,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 +230,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
@@ -245,6 +243,7 @@ namespace OpenSim.Framework
catch (Exception ex)
{
errorMessage = ex.Message;
m_log.Debug("[WEB UTIL]: Exception making request: " + ex.ToString());
}
finally
{
@@ -907,15 +906,6 @@ namespace OpenSim.Framework
}
}
public class SynchronousRestObjectPoster
{
[Obsolete]
public static TResponse BeginPostObject<TRequest, TResponse>(string verb, string requestUrl, TRequest obj)
{
return SynchronousRestObjectRequester.MakeRequest<TRequest, TResponse>(verb, requestUrl, obj);
}
}
public class SynchronousRestObjectRequester
{
private static readonly ILog m_log =
@@ -988,9 +978,6 @@ namespace OpenSim.Framework
{
using (HttpWebResponse resp = (HttpWebResponse)request.GetResponse())
{
if (resp.StatusCode == HttpStatusCode.NotFound)
return deserial;
if (resp.ContentLength != 0)
{
Stream respStream = resp.GetResponseStream();
@@ -1000,9 +987,19 @@ namespace OpenSim.Framework
}
else
m_log.DebugFormat("[SynchronousRestObjectRequester]: Oops! no content found in response stream from {0} {1}", requestUrl, verb);
}
}
catch (WebException e)
{
HttpWebResponse hwr = (HttpWebResponse)e.Response;
if (hwr != null && hwr.StatusCode == HttpStatusCode.NotFound)
return deserial;
else
m_log.ErrorFormat(
"[SynchronousRestObjectRequester]: WebException {0} {1} {2} {3}",
requestUrl, typeof(TResponse).ToString(), e.Message, e.StackTrace);
}
catch (System.InvalidOperationException)
{
// This is what happens when there is invalid XML

View File

@@ -73,6 +73,7 @@ namespace OpenSim
AppDomain.CurrentDomain.UnhandledException +=
new UnhandledExceptionEventHandler(CurrentDomain_UnhandledException);
// Add the arguments supplied when running the application to the configuration
ArgvConfigSource configSource = new ArgvConfigSource(args);
@@ -91,6 +92,9 @@ namespace OpenSim
m_log.Info("[OPENSIM MAIN]: configured log4net using default OpenSim.exe.config");
}
m_log.DebugFormat(
"[OPENSIM MAIN]: System Locale is {0}", System.Threading.Thread.CurrentThread.CurrentCulture);
// Increase the number of IOCP threads available. Mono defaults to a tragically low number
int workerThreads, iocpThreads;
System.Threading.ThreadPool.GetMaxThreads(out workerThreads, out iocpThreads);
@@ -231,6 +235,8 @@ namespace OpenSim
configSource.Alias.AddAlias("Off", false);
configSource.Alias.AddAlias("True", true);
configSource.Alias.AddAlias("False", false);
configSource.Alias.AddAlias("Yes", true);
configSource.Alias.AddAlias("No", false);
configSource.AddSwitch("Startup", "background");
configSource.AddSwitch("Startup", "inifile");
@@ -239,6 +245,8 @@ namespace OpenSim
configSource.AddSwitch("Startup", "physics");
configSource.AddSwitch("Startup", "gui");
configSource.AddSwitch("Startup", "console");
configSource.AddSwitch("Startup", "save_crashes");
configSource.AddSwitch("Startup", "crash_dir");
configSource.AddConfig("StandAlone");
configSource.AddConfig("Network");

View File

@@ -328,7 +328,7 @@ namespace OpenSim
config.Set("meshing", "Meshmerizer");
config.Set("physical_prim", true);
config.Set("see_into_this_sim_from_neighbor", true);
config.Set("serverside_object_permissions", false);
config.Set("serverside_object_permissions", true);
config.Set("storage_plugin", "OpenSim.Data.SQLite.dll");
config.Set("storage_connection_string", "URI=file:OpenSim.db,version=3");
config.Set("storage_prim_inventories", true);
@@ -362,10 +362,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

@@ -37,6 +37,7 @@ 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;
@@ -130,7 +131,9 @@ namespace OpenSim
//m_log.InfoFormat("[OPENSIM MAIN]: GC Latency Mode: {0}", GCSettings.LatencyMode.ToString());
if (m_gui) // Driven by external GUI
{
m_console = new CommandConsole("Region");
}
else
{
switch (m_consoleType)
@@ -208,24 +211,21 @@ namespace OpenSim
/// </summary>
private void RegisterConsoleCommands()
{
m_console.Commands.AddCommand("region", false, "clear assets",
"clear assets",
"Clear the asset cache", HandleClearAssets);
m_console.Commands.AddCommand("region", false, "force update",
"force update",
"Force the update of all objects on clients",
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 scene",
@@ -267,12 +267,15 @@ 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>] [<OAR path>]",
"save oar [-p|--profile=<url>] [--noassets] [--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
"-p|--profile=<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
+ " <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.",
+ " If this is not given then the oar is saved to region.oar in the current directory.",
SaveOar);
m_console.Commands.AddCommand("region", false, "edit scale",
@@ -504,11 +507,6 @@ namespace OpenSim
}
}
private void HandleClearAssets(string module, string[] args)
{
MainConsole.Instance.Output("Not implemented.");
}
/// <summary>
/// Force resending of all updates to all clients in active region(s)
/// </summary>
@@ -546,6 +544,7 @@ namespace OpenSim
{
string regionName = string.Empty;
string regionFile = string.Empty;
if (cmd.Length == 3)
{
regionFile = cmd[2];
@@ -555,14 +554,17 @@ namespace OpenSim
regionName = cmd[2];
regionFile = cmd[3];
}
string extension = Path.GetExtension(regionFile).ToLower();
bool isXml = extension.Equals(".xml");
bool isIni = extension.Equals(".ini");
if (!isXml && !isIni)
{
MainConsole.Instance.Output("Usage: create region [\"region name\"] <region_file.ini>");
return;
}
if (!Path.IsPathRooted(regionFile))
{
string regionsDir = ConfigSource.Source.Configs["Startup"].GetString("regionload_regionsdir", "Regions").Trim();
@@ -579,8 +581,18 @@ namespace OpenSim
regInfo = new RegionInfo(regionName, regionFile, false, ConfigSource.Source, regionName);
}
IScene scene;
Scene existingScene;
if (SceneManager.TryGetScene(regInfo.RegionID, out existingScene))
{
MainConsole.Instance.OutputFormat(
"ERROR: Cannot create region {0} with ID {1}, this ID is already assigned to region {2}",
regInfo.RegionName, regInfo.RegionID, existingScene.RegionInfo.RegionName);
return;
}
PopulateRegionEstateInfo(regInfo);
IScene scene;
CreateRegion(regInfo, true, out scene);
regInfo.EstateSettings.Save();
}
@@ -835,18 +847,21 @@ 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);
}
else
{
MainConsole.Instance.Output("packet debug should be 0..255");
}
MainConsole.Instance.Output(String.Format("New packet debug: {0}", newDebug));
}
break;
@@ -1030,6 +1045,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

@@ -41,11 +41,15 @@ using OpenSim.Framework.Servers;
using OpenSim.Framework.Servers.HttpServer;
using OpenSim.Framework.Statistics;
using OpenSim.Region.ClientStack;
using OpenSim.Region.CoreModules.ServiceConnectorsOut.UserAccounts;
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;
namespace OpenSim
{
@@ -411,6 +415,9 @@ namespace OpenSim
scene.SnmpService.BootInfo("Loading prins", scene);
}
while (regionInfo.EstateSettings.EstateOwner == UUID.Zero && MainConsole.Instance != null)
SetUpEstateOwner(scene);
// Prims have to be loaded after module configuration since some modules may be invoked during the load
scene.LoadPrimsFromStorage(regionInfo.originRegionID);
@@ -487,10 +494,80 @@ namespace OpenSim
}
scene.StartTimer();
scene.StartTimerWatchdog();
scene.StartScripts();
return clientServer;
}
/// <summary>
/// Try to set up the estate owner for the given scene.
/// </summary>
/// <remarks>
/// The involves asking the user for information about the user on the console. If the user does not already
/// exist then it is created.
/// </remarks>
/// <param name="scene"></param>
private void SetUpEstateOwner(Scene scene)
{
RegionInfo regionInfo = scene.RegionInfo;
MainConsole.Instance.OutputFormat("Estate {0} has no owner set.", regionInfo.EstateSettings.EstateName);
List<char> excluded = new List<char>(new char[1]{' '});
string first = MainConsole.Instance.CmdPrompt("Estate owner first name", "Test", excluded);
string last = MainConsole.Instance.CmdPrompt("Estate owner last name", "User", excluded);
UserAccount account = scene.UserAccountService.GetUserAccount(regionInfo.ScopeID, first, last);
if (account == null)
{
// XXX: The LocalUserAccountServicesConnector is currently registering its inner service rather than
// itself!
// if (scene.UserAccountService is LocalUserAccountServicesConnector)
// {
// IUserAccountService innerUas
// = ((LocalUserAccountServicesConnector)scene.UserAccountService).UserAccountService;
//
// m_log.DebugFormat("B {0}", innerUas.GetType());
//
// if (innerUas is UserAccountService)
// {
if (scene.UserAccountService is UserAccountService)
{
string password = MainConsole.Instance.PasswdPrompt("Password");
string email = MainConsole.Instance.CmdPrompt("Email", "");
string rawPrincipalId = MainConsole.Instance.CmdPrompt("User ID", UUID.Random().ToString());
UUID principalId = UUID.Zero;
if (!UUID.TryParse(rawPrincipalId, out principalId))
{
m_log.ErrorFormat("[OPENSIM]: ID {0} is not a valid UUID", rawPrincipalId);
return;
}
account
= ((UserAccountService)scene.UserAccountService).CreateUser(
regionInfo.ScopeID, principalId, first, last, password, email);
}
// }
}
if (account == null)
{
m_log.ErrorFormat(
"[OPENSIM]: Unable to store account. If this simulator is connected to a grid, you must create the estate owner account first.");
}
else
{
regionInfo.EstateSettings.EstateOwner = account.PrincipalID;
regionInfo.EstateSettings.Save();
}
}
private void ShutdownRegion(Scene scene)
{
m_log.DebugFormat("[SHUTDOWN]: Shutting down region {0}", scene.RegionInfo.RegionName);
@@ -665,8 +742,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)
@@ -734,7 +811,7 @@ namespace OpenSim
public string Path
{
get { return "/simstatus/"; }
get { return "/simstatus"; }
}
}
@@ -772,7 +849,7 @@ namespace OpenSim
public string Path
{
// This is for the OpenSimulator instance and is the osSecret hashed
get { return "/" + osXStatsURI + "/"; }
get { return "/" + osXStatsURI; }
}
}
@@ -813,7 +890,7 @@ namespace OpenSim
public string Path
{
// This is for the OpenSimulator instance and is the user provided URI
get { return "/" + osUXStatsURI + "/"; }
get { return "/" + osUXStatsURI; }
}
}
@@ -918,7 +995,7 @@ namespace OpenSim
if (regInfo.EstateSettings.EstateID == 0) // No record at all
{
MainConsole.Instance.OutputFormat("Region {0} is not part of an estate.", regInfo.RegionName);
m_log.WarnFormat("[ESTATE] Region {0} is not part of an estate.", regInfo.RegionName);
List<EstateSettings> estates = EstateDataService.LoadEstateSettingsAll();
List<string> estateNames = new List<string>();
@@ -929,7 +1006,7 @@ namespace OpenSim
{
if (estates.Count == 0)
{
MainConsole.Instance.Output("No existing estates found. You must create a new one.");
m_log.Info("[ESTATE] No existing estates found. You must create a new one.");
if (CreateEstate(regInfo, estateNames))
break;

View File

@@ -1,10 +1,39 @@
using System;
/*
* 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.IO;
using System.Reflection;
using System.Text;
using OpenMetaverse;
using OpenMetaverse.StructuredData;
using Nini.Config;
using log4net;
@@ -12,11 +41,14 @@ using OpenSim.Framework;
using OpenSim.Framework.Capabilities;
using OpenSim.Region.Framework;
using OpenSim.Region.Framework.Scenes;
using OpenSim.Region.Framework.Scenes.Serialization;
using OpenSim.Framework.Servers;
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.Region.ClientStack.Linden
{
@@ -79,7 +111,7 @@ namespace OpenSim.Region.ClientStack.Linden
private bool m_persistBakedTextures = false;
private IAssetService m_assetService;
private bool m_dumpAssetsToFile;
private bool m_dumpAssetsToFile = false;
private string m_regionName;
public BunchOfCaps(Scene scene, Caps caps)
@@ -103,8 +135,7 @@ namespace OpenSim.Region.ClientStack.Linden
ItemUpdatedCall = m_Scene.CapsUpdateInventoryItemAsset;
TaskScriptUpdatedCall = m_Scene.CapsUpdateTaskInventoryScriptAsset;
CAPSFetchInventoryDescendents = m_Scene.HandleFetchInventoryDescendentsCAPS;
GetClient = m_Scene.SceneContents.GetControllingClient;
GetClient = m_Scene.SceneGraph.GetControllingClient;
}
/// <summary>
@@ -200,7 +231,7 @@ namespace OpenSim.Region.ClientStack.Linden
public string SeedCapRequest(string request, string path, string param,
OSHttpRequest httpRequest, OSHttpResponse httpResponse)
{
m_log.Debug("[CAPS]: Seed Caps Request in region: " + m_regionName);
// m_log.Debug("[CAPS]: Seed Caps Request in region: " + m_regionName);
if (!m_Scene.CheckClient(m_HostCapsObj.AgentID, httpRequest.RemoteIPEndPoint))
{
@@ -299,14 +330,22 @@ 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);
// 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");
@@ -342,6 +381,11 @@ namespace OpenSim.Region.ClientStack.Linden
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());
@@ -439,7 +483,7 @@ namespace OpenSim.Region.ClientStack.Linden
}
/// <summary>
///
/// Convert raw uploaded data into the appropriate asset and item.
/// </summary>
/// <param name="assetID"></param>
/// <param name="inventoryItem"></param>
@@ -448,6 +492,10 @@ namespace OpenSim.Region.ClientStack.Linden
UUID inventoryItem, UUID parentFolder, byte[] data, string inventoryType,
string assetType)
{
m_log.DebugFormat(
"Uploaded asset {0} for inventory item {1}, inv type {2}, asset type {3}",
assetID, inventoryItem, inventoryType, assetType);
sbyte assType = 0;
sbyte inType = 0;
@@ -474,6 +522,160 @@ namespace OpenSim.Region.ClientStack.Linden
break;
}
}
else if (inventoryType == "object")
{
inType = (sbyte)InventoryType.Object;
assType = (sbyte)AssetType.Object;
List<Vector3> positions = new List<Vector3>();
List<Quaternion> rotations = new List<Quaternion>();
OSDMap request = (OSDMap)OSDParser.DeserializeLLSDXml(data);
OSDArray instance_list = (OSDArray)request["instance_list"];
OSDArray mesh_list = (OSDArray)request["mesh_list"];
OSDArray texture_list = (OSDArray)request["texture_list"];
SceneObjectGroup grp = null;
List<UUID> textures = new List<UUID>();
for (int i = 0; i < texture_list.Count; i++)
{
AssetBase textureAsset = new AssetBase(UUID.Random(), assetName, (sbyte)AssetType.Texture, "");
textureAsset.Data = texture_list[i].AsBinary();
m_assetService.Store(textureAsset);
textures.Add(textureAsset.FullID);
}
for (int i = 0; i < mesh_list.Count; i++)
{
PrimitiveBaseShape pbs = PrimitiveBaseShape.CreateBox();
Primitive.TextureEntry textureEntry
= new Primitive.TextureEntry(Primitive.TextureEntry.WHITE_TEXTURE);
OSDMap inner_instance_list = (OSDMap)instance_list[i];
OSDArray face_list = (OSDArray)inner_instance_list["face_list"];
for (uint face = 0; face < face_list.Count; face++)
{
OSDMap faceMap = (OSDMap)face_list[(int)face];
Primitive.TextureEntryFace f = pbs.Textures.CreateFace(face);
if(faceMap.ContainsKey("fullbright"))
f.Fullbright = faceMap["fullbright"].AsBoolean();
if (faceMap.ContainsKey ("diffuse_color"))
f.RGBA = faceMap["diffuse_color"].AsColor4();
int textureNum = faceMap["image"].AsInteger();
float imagerot = faceMap["imagerot"].AsInteger();
float offsets = (float)faceMap["offsets"].AsReal();
float offsett = (float)faceMap["offsett"].AsReal();
float scales = (float)faceMap["scales"].AsReal();
float scalet = (float)faceMap["scalet"].AsReal();
if(imagerot != 0)
f.Rotation = imagerot;
if(offsets != 0)
f.OffsetU = offsets;
if (offsett != 0)
f.OffsetV = offsett;
if (scales != 0)
f.RepeatU = scales;
if (scalet != 0)
f.RepeatV = scalet;
if (textures.Count > textureNum)
f.TextureID = textures[textureNum];
else
f.TextureID = Primitive.TextureEntry.WHITE_TEXTURE;
textureEntry.FaceTextures[face] = f;
}
pbs.TextureEntry = textureEntry.GetBytes();
AssetBase meshAsset = new AssetBase(UUID.Random(), assetName, (sbyte)AssetType.Mesh, "");
meshAsset.Data = mesh_list[i].AsBinary();
m_assetService.Store(meshAsset);
pbs.SculptEntry = true;
pbs.SculptTexture = meshAsset.FullID;
pbs.SculptType = (byte)SculptType.Mesh;
pbs.SculptData = meshAsset.Data;
Vector3 position = inner_instance_list["position"].AsVector3();
Vector3 scale = inner_instance_list["scale"].AsVector3();
Quaternion rotation = inner_instance_list["rotation"].AsQuaternion();
// no longer used - begin ------------------------
// int physicsShapeType = inner_instance_list["physics_shape_type"].AsInteger();
// int material = inner_instance_list["material"].AsInteger();
// int mesh = inner_instance_list["mesh"].AsInteger();
// OSDMap permissions = (OSDMap)inner_instance_list["permissions"];
// int base_mask = permissions["base_mask"].AsInteger();
// int everyone_mask = permissions["everyone_mask"].AsInteger();
// UUID creator_id = permissions["creator_id"].AsUUID();
// UUID group_id = permissions["group_id"].AsUUID();
// int group_mask = permissions["group_mask"].AsInteger();
// bool is_owner_group = permissions["is_owner_group"].AsBoolean();
// UUID last_owner_id = permissions["last_owner_id"].AsUUID();
// int next_owner_mask = permissions["next_owner_mask"].AsInteger();
// UUID owner_id = permissions["owner_id"].AsUUID();
// int owner_mask = permissions["owner_mask"].AsInteger();
// no longer used - end ------------------------
UUID owner_id = m_HostCapsObj.AgentID;
SceneObjectPart prim
= new SceneObjectPart(owner_id, pbs, position, Quaternion.Identity, Vector3.Zero);
prim.Scale = scale;
prim.OffsetPosition = position;
rotations.Add(rotation);
positions.Add(position);
prim.UUID = UUID.Random();
prim.CreatorID = owner_id;
prim.OwnerID = owner_id;
prim.GroupID = UUID.Zero;
prim.LastOwnerID = prim.OwnerID;
prim.CreationDate = Util.UnixTimeSinceEpoch();
prim.Name = assetName;
prim.Description = "";
// prim.BaseMask = (uint)base_mask;
// prim.EveryoneMask = (uint)everyone_mask;
// prim.GroupMask = (uint)group_mask;
// prim.NextOwnerMask = (uint)next_owner_mask;
// prim.OwnerMask = (uint)owner_mask;
if (grp == null)
grp = new SceneObjectGroup(prim);
else
grp.AddPart(prim);
}
// Fix first link number
if (grp.Parts.Length > 1)
grp.RootPart.LinkNum++;
Vector3 rootPos = positions[0];
grp.AbsolutePosition = rootPos;
for (int i = 0; i < positions.Count; i++)
{
Vector3 offset = positions[i] - rootPos;
grp.Parts[i].OffsetPosition = offset;
}
for (int i = 0; i < rotations.Count; i++)
{
if (i != 0)
grp.Parts[i].RotationOffset = rotations[i];
}
grp.UpdateGroupRotationR(rotations[0]);
data = ASCIIEncoding.ASCII.GetBytes(SceneObjectSerializer.ToOriginalXmlFormat(grp));
}
AssetBase asset;
asset = new AssetBase(assetID, assetName, assType, m_HostCapsObj.AgentID.ToString());
@@ -497,7 +699,7 @@ namespace OpenSim.Region.ClientStack.Linden
item.CurrentPermissions = (uint)PermissionMask.All;
item.BasePermissions = (uint)PermissionMask.All;
item.EveryOnePermissions = 0;
item.NextPermissions = (uint)(PermissionMask.Move | PermissionMask.Modify | PermissionMask.Transfer);
item.NextPermissions = (uint)PermissionMask.All;
item.CreationDate = Util.UnixTimeSinceEpoch();
if (AddNewInventoryItem != null)
@@ -506,8 +708,6 @@ namespace OpenSim.Region.ClientStack.Linden
}
}
/// <summary>
///
/// </summary>
@@ -632,7 +832,7 @@ namespace OpenSim.Region.ClientStack.Linden
}
/// <summary>
///
/// Handle raw asset upload data via the capability.
/// </summary>
/// <param name="data"></param>
/// <param name="path"></param>
@@ -670,6 +870,7 @@ namespace OpenSim.Region.ClientStack.Linden
return res;
}
///Left this in and commented in case there are unforseen issues
//private void SaveAssetToFile(string filename, byte[] data)
//{
@@ -679,6 +880,7 @@ namespace OpenSim.Region.ClientStack.Linden
// bw.Close();
// fs.Close();
//}
private static void SaveAssetToFile(string filename, byte[] data)
{
string assetPath = "UserAssets";
@@ -719,7 +921,7 @@ namespace OpenSim.Region.ClientStack.Linden
}
/// <summary>
///
/// Handle raw uploaded asset data.
/// </summary>
/// <param name="data"></param>
/// <param name="path"></param>
@@ -752,6 +954,7 @@ namespace OpenSim.Region.ClientStack.Linden
return res;
}
///Left this in and commented in case there are unforseen issues
//private void SaveAssetToFile(string filename, byte[] data)
//{
@@ -761,6 +964,7 @@ namespace OpenSim.Region.ClientStack.Linden
// bw.Close();
// fs.Close();
//}
private static void SaveAssetToFile(string filename, byte[] data)
{
string assetPath = "UserAssets";
@@ -839,7 +1043,7 @@ namespace OpenSim.Region.ClientStack.Linden
uploadComplete.new_asset = inventoryItemID;
uploadComplete.compiled = errors.Count > 0 ? false : true;
uploadComplete.state = "complete";
uploadComplete.errors = new OSDArray();
uploadComplete.errors = new OpenSim.Framework.Capabilities.OSDArray();
uploadComplete.errors.Array = errors;
res = LLSDHelpers.SerialiseLLSDReply(uploadComplete);
@@ -905,7 +1109,7 @@ namespace OpenSim.Region.ClientStack.Linden
}
/// <summary>
///
/// Handle raw uploaded baked texture data.
/// </summary>
/// <param name="data"></param>
/// <param name="path"></param>
@@ -935,4 +1139,4 @@ namespace OpenSim.Region.ClientStack.Linden
}
}
}
}

View File

@@ -48,8 +48,8 @@ namespace OpenSim.Region.ClientStack.Linden
[Extension(Path = "/OpenSim/RegionModules", NodeName = "RegionModule")]
public class BunchOfCapsModule : INonSharedRegionModule
{
private static readonly ILog m_log =
LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType);
// private static readonly ILog m_log =
// LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType);
private Scene m_Scene;

View File

@@ -102,7 +102,6 @@ namespace OpenSim.Region.ClientStack.Linden
{
m_gConfig = null;
}
}
private void ReadConfigAndPopulate(Scene scene, IConfig startupConfig, string p)
@@ -179,9 +178,10 @@ namespace OpenSim.Region.ClientStack.Linden
{
Queue<OSD> queue = GetQueue(avatarID);
if (queue != null)
queue.Enqueue(ev);
lock (queue)
queue.Enqueue(ev);
}
catch(NullReferenceException e)
catch (NullReferenceException e)
{
m_log.Error("[EVENTQUEUE] Caught exception: " + e);
return false;
@@ -204,7 +204,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)
@@ -216,11 +216,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);
@@ -229,11 +231,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();
@@ -252,7 +256,6 @@ namespace OpenSim.Region.ClientStack.Linden
foreach (UUID ky in removeitems)
m_QueueUUIDAvatarMapping.Remove(ky);
}
}
@@ -338,12 +341,8 @@ namespace OpenSim.Region.ClientStack.Linden
Queue<OSD> queue = GetQueue(agentID);
if (queue != null)
lock (queue)
{
if (queue.Count > 0)
return true;
else
return false;
}
return queue.Count > 0;
return false;
}
@@ -358,8 +357,6 @@ namespace OpenSim.Region.ClientStack.Linden
element = queue.Dequeue(); // 15s timeout
}
int thisID = 0;
lock (m_ids)
thisID = m_ids[pAgentId];
@@ -431,7 +428,10 @@ namespace OpenSim.Region.ClientStack.Linden
// }
Queue<OSD> queue = TryGetQueue(agentID);
OSD element = queue.Dequeue(); // 15s timeout
OSD element;
lock (queue)
element = queue.Dequeue(); // 15s timeout
Hashtable responsedata = new Hashtable();
@@ -470,10 +470,14 @@ namespace OpenSim.Region.ClientStack.Linden
else
{
array.Add(element);
while (queue.Count > 0)
lock (queue)
{
array.Add(queue.Dequeue());
thisID++;
while (queue.Count > 0)
{
array.Add(queue.Dequeue());
thisID++;
}
}
}
@@ -520,6 +524,7 @@ namespace OpenSim.Region.ClientStack.Linden
AvatarID = m_QueueUUIDAvatarMapping[capUUID];
}
}
if (AvatarID != UUID.Zero)
{
return ProcessQueue(request, AvatarID, m_scene.CapsModule.GetCapsForUser(AvatarID));

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

@@ -50,8 +50,8 @@ namespace OpenSim.Region.ClientStack.Linden
[Extension(Path = "/OpenSim/RegionModules", NodeName = "RegionModule")]
public class GetMeshModule : INonSharedRegionModule
{
private static readonly ILog m_log =
LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType);
// private static readonly ILog m_log =
// LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType);
private Scene m_scene;
private IAssetService m_AssetService;
@@ -113,12 +113,12 @@ namespace OpenSim.Region.ClientStack.Linden
public void RegisterCaps(UUID agentID, Caps caps)
{
UUID capID = UUID.Random();
// UUID capID = UUID.Random();
//caps.RegisterHandler("GetTexture", new StreamHandler("GET", "/CAPS/" + capID, ProcessGetTexture));
if (m_URL == "localhost")
{
m_log.InfoFormat("[GETMESH]: /CAPS/{0} in region {1}", capID, m_scene.RegionInfo.RegionName);
// m_log.DebugFormat("[GETMESH]: /CAPS/{0} in region {1}", capID, m_scene.RegionInfo.RegionName);
GetMeshHandler gmeshHandler = new GetMeshHandler(m_AssetService);
IRequestHandler reqHandler = new RestHTTPHandler("GET", "/CAPS/" + UUID.Random(),
delegate(Hashtable m_dhttpMethod)
@@ -130,7 +130,7 @@ namespace OpenSim.Region.ClientStack.Linden
}
else
{
m_log.InfoFormat("[GETMESH]: {0} in region {1}", m_URL, m_scene.RegionInfo.RegionName);
// m_log.DebugFormat("[GETMESH]: {0} in region {1}", m_URL, m_scene.RegionInfo.RegionName);
caps.RegisterHandler("GetMesh", m_URL);
}
}

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