Commit Graph

1071 Commits (8b267b5bb547b807dd3cb6cd83ea03bd101e19ff)

Author SHA1 Message Date
Diva Canto 79d51c27bb One more module converted: InventoryArchiverModule. 2012-11-11 07:31:25 -08:00
Diva Canto 09deaa890d One more module converted: GroupsModule. 2012-11-10 17:56:25 -08:00
Diva Canto 562c585bc6 One more module converted: GodsModule. 2012-11-10 17:34:42 -08:00
Diva Canto cdcb67a952 One more module converted: GesturesModule. 2012-11-10 17:21:09 -08:00
Diva Canto fe2fa70c74 One more module converted: Combat/CombatModule. 2012-11-10 16:42:52 -08:00
Diva Canto 74dd38db70 One more module converted: AvatarFactoryModule. 2012-11-10 16:24:15 -08:00
SignpostMarv fb7bbe167a formatting DialogModule for 80-character width terminal 2012-11-10 08:12:31 -08:00
SignpostMarv 5cba04e2d6 Converting DialogModule to INonSharedRegionModule 2012-11-10 08:12:31 -08:00
teravus b2dfa6f022 To keep things consistent allowing an UnregisterModuleInterface... Force the GodModule to request the dialog module interface on a kickuser call and not to use the 'in memory cached one'. Thanks Ar3s for locating the offending inconsistency. 2012-11-06 19:03:41 -05:00
Diva Canto 89322aaf94 Prevent IMs being sent to prims when avies decline inventory offers from them. 2012-11-04 15:17:47 -08:00
Justin Clark-Casey (justincc) 8dfe59d7b8 Comment out checks not to overwrite existing IAR/OAR files for now on "save iar/oar" since this causes problems for some backup systems.
Needs more thought, maybe an explicit --force/--overwrite switch
Comments on http://opensimulator.org/mantis/view.php?id=6389
2012-11-01 03:42:15 +00:00
Justin Clark-Casey (justincc) 6235d16c31 Make "show object part" command correctly display script status.
Uses new IEntityInventory.TryGetScriptInstanceRunning()
Makes it clearer that TaskInventoryItem.ScriptRunning cannot be used as it is temporary and not updated.
2012-10-31 00:31:18 +00:00
Justin Clark-Casey (justincc) 3531f29a6a minor: Fix verbose IAR save message to make it a bit clearer that item data is being saved at that point, not asset data. 2012-10-27 00:24:25 +01:00
Justin Clark-Casey (justincc) 67432fcbf2 Fix "save iar" hanging permanently if the asset request phase times out.
Unlike "save oar", this was happening on the same thread as the original request.
The timeout happens on another so the original thread is never aborted.
On "save oar" this leaves the thread hanging (still bad) but on "save iar" it left the console thread hanging.
Temporary fix is to make "save iar" do asset request on a separate thread, like "save oar".
Longer term fix will be to restructure asset save to use a ManualResetEvent rather than a separate timeout timer.
2012-10-26 23:08:59 +01:00
Justin Clark-Casey (justincc) 2fb89b5aac Comment out InventoryTransferModule.NeedSceneCacheClear() and invocations since the call itself does nothing and the return value is ignored by all callers.
This is a very old method (+4 years) so is probably confusing code cruft.
2012-10-26 01:15:16 +01:00
Justin Clark-Casey (justincc) c13a99dc5c Fix script error messages not showing up in viewer 3 and associated viewers.
Viewer 3 will discard such a message if the chat message owner does not match the avatar.
We were filling the ownerID with the primID, so this never matched, hence viewer 3 did not see any script error messages.
This commit fills the ownerID in with the prim ownerID so the script owner will receive script error messages.
This does not affect viewer 1 and associated viewers which continue to process script errors as normal.
2012-10-25 03:26:12 +01:00
Justin Clark-Casey (justincc) f76dceb90b Get "save oar" and "save iar" to tell you in a more friendly manner if the filename to save already exists, rather than exception throwing.
Also changes ConsoleUtil.CheckFileExists to CheckFileDoesNotExist() since this is more meaningful in the context, even though it does result in double negatives.
2012-10-24 03:08:58 +01:00
Justin Clark-Casey (justincc) da2b23f18d Improve efficiency of friends notification by only make one PresenceService call for all friends rather than one for each friend.
However, large groups could still take a very long time since we still need to message each avatar on different simulators.
2012-10-20 02:02:13 +01:00
Justin Clark-Casey (justincc) 16c9c1dff7 On receiving TaskInventoryAccepted with a destination folder in the binary bucket slot for RLV, notify the viewer about inventory folder updates.
The viewer would not see the folder move without this, either on accept or decline.
This commit also updates the TaskInventoryOffered message to better conform with the data LL uses
Changes are, agentID is prim owner rather than prim id, agent name is now simply object name rather than name with owner detail,
message is just folder name in single quotes, message is not timestamped.
However, folder is not renamed "still #RLV/~<name>".  Long term solution is probably not to do these operations server-side.
Notes will be added to http://opensimulator.org/mantis/view.php?id=6311
2012-10-06 02:34:49 +01:00
Mic Bowman b9baab5521 Fix the use of the wrong index when locating the assets associated
with wearables. The fact that this hasn't caused problems earlier
suggests either that no one is using multiple layers of wearables or
that this code is useless because the assets are coming in with the
wearables request.
2012-10-03 10:45:57 -07:00
Melanie ca5c0814f4 Merge branch 'master' of melanie@opensimulator.org:/var/git/opensim 2012-10-02 23:02:53 +01:00
Melanie f1886c449c Attempt to fix Mantis #6311. Honor a destination folder if one is given 2012-10-02 23:02:01 +01:00
SignpostMarv 35b7c80e0b implementing osDropAttachment & osDropAttachmentAt 2012-10-02 22:14:46 +01:00
Justin Clark-Casey (justincc) 818379ba14 Fire EventManager.TriggerOnAttach (and hence LSL attach event) when an object is attached from the scene.
Enables previously disabled regression test.
Based on SingpostMarv's patch in http://opensimulator.org/mantis/view.php?id=6302 but I prefer a simpler approach that does not expose a resume scripts option right now.
2012-09-29 01:14:23 +01:00
Justin Clark-Casey (justincc) d588467d5b Extend attachment regression test to check for appropriate attach event firing.
This reveals that the event is not being fired when an object is attached from ground, which is incorrect.
This check is temporairly disabled.
2012-09-29 00:07:11 +01:00
Diva Canto 87d810217e Guard against inventory get failures. 2012-09-22 14:01:51 -07:00
Justin Clark-Casey (justincc) 967d42d393 Correctly override and call base OpenSimTestCase.SetUp() method in GridConnectorsTests and ArchiverTests.
Remove unrelated compile warning from AttachmentsModuleTests.
2012-09-19 01:06:42 +01:00
Justin Clark-Casey (justincc) 224efe7b76 minor: Comment out friends notification log spam for now. 2012-09-12 01:58:01 +01:00
Justin Clark-Casey (justincc) 7ea832d47c Fix regression introduced in a0d178b2 (Sat Aug 25 02:00:17 2012) where folders with asset type of 'Folder' and 'Unknown' were accidentally treated as system folders.
This prevented more than one additional ordinary folder from being created in the base "My Inventory" user folder.
Added regression test for this case.
Switched tests to use XInventoryService with mostly implemented TestXInventoryDataPlugin rather than InventoryService
Disabled TestLoadIarV0_1SameNameCreator() since this has not been working for a very long time (ever since XInventoryService) started being used
since it doesnt' preserve creator data in the same way as InventoryService did and so effectively lost the OSPAs.
However, nobody noticed/complained about this issue and OSPAs have been superseded by HG like creator information via the --home save oar/iar switch.
2012-08-29 02:01:43 +01:00
Justin Clark-Casey (justincc) bcbd450fe4 Add --force flag to "kick user" console command to allow bypassing of recent race condition checks.
This is to allow a second attempt to remove an avatar even if "show connections" shows them as already inactive (i.e. close has already been attempted once).
You should only attempt --force if a normal kick fails.
This is partly for diagnostics as we have seen some connections occasionally remain on lbsa plaza even if they are registered as inactive.
This is not a permanent solution and may not work anyway - the ultimate solution is to stop this problem from happening in the first place.
2012-08-20 20:24:54 +01:00
Melanie 9aec62f0ac Fix scripted detach of temp attachments 2012-08-20 15:59:38 +01:00
Melanie 9bd2c1b88a As per lindn spec, disable detach and drop for temp attachments 2012-08-14 01:12:27 +01:00
Melanie fe4c3a37c0 Lay some groundwork for temp attachments. Decouple attachments from inventory. 2012-08-14 00:12:15 +01:00
Justin Clark-Casey (justincc) 2724cf685e Fix build break. 2012-08-03 23:13:19 +01:00
Justin Clark-Casey (justincc) 0e3b08fa5b Update settings loading in AvatarFactoryModule which should have been in last commit 205f2326 2012-08-03 23:09:47 +01:00
Justin Clark-Casey (justincc) 35efa88c26 Rename OpenSim.Framework.Statistics to OpenSim.Framework.Monitoring.
This better reflects the long-term purpose of that project and matches Monitoring modules.
2012-07-25 23:11:50 +01:00
Justin Clark-Casey (justincc) c846a5461c Remove bad using statement in AttachmentsModuleTests.
It seems that the mono 2.10.8.1 doesn't choke on this but for some reason 2.4.3 fails.
2012-07-24 22:46:22 +01:00
Justin Clark-Casey (justincc) c992629576 extend regression TestRezScriptedAttachmentFromInventory() to check actual start of script rather than just the script status reported by SOG.ContainsScripts() 2012-07-24 22:40:06 +01:00
Justin Clark-Casey (justincc) 2858b1b1f4 extend regression TestDetachScriptedAttachementToInventory() to check correct running status on a re-rezzed attachment 2012-07-24 22:33:54 +01:00
Melanie e126915bc1 Change attachment handling to remove object from the scene first as per
justincc's original work. Sample scripts before doing so. Also refactor some
crucial common code and eliminate parameters that were only ever used with
the same constant value.
2012-07-23 21:39:26 +01:00
Melanie fe99948c58 Fix the order of operations on detach. The object must always be serialized
while still in the scene to avoid losing important script state.
DeleteSceneObject can not be called before doing this!
2012-07-20 11:54:59 +02:00
Justin Clark-Casey (justincc) c4533e755b Comment out OnIncomingInstantMessage and OnInstantMessage handlers in GroupsModule, since these led to a private blank method 2012-07-19 23:13:08 +01:00
Justin Clark-Casey (justincc) ecb759c1e5 Fix regression where llGiveInventory() had stopped asking non-owner receivers to accept/decline.
This appears to be a regression from back in commit db91044 (Mon Aug 22 2011) where we started to send TaskInventoryOffered msg dialog rather than InventoryOffered dialog.
This is probably correct, but failed because the bucket was too large and because we wouldn't have handled the TaskInventoryDeclined option anyway.
This patch handles both of these and make llGiveInventoryList() use TaskInventoryOffered as well
Fixes http://opensimulator.org/mantis/view.php?id=6089
2012-07-17 23:31:38 +01:00
Justin Clark-Casey (justincc) 356d597296 Restore update of inventory item on derez/logout. This is necessary to update the name if this has been changed whilst attached.
Note, this behaviour appears to be at variance with the ll grid as of Tues 17 July 2012, testing with viewer 3.2.1.
The item name in inventory does not change either at the point of detach or after a relog.
2012-07-17 00:17:51 +01:00
Justin Clark-Casey (justincc) b6476eaac3 Stop sending the viewer an inventory create message if a known attachment item is updated.
This doesn't seem to make any sense and probably stems from a period when this code was directly involved in attaching objects directly from the scene.
This message is already being sent by InventoryAccessModule code instead.
2012-07-17 00:00:26 +01:00
Justin Clark-Casey (justincc) 33cff9b9d7 Allow XEngine StartDelay to be configured in the [XEngine] config section.
This is only currently meant for use by regression tests that don't have any issues if XEngine is started up quickly, since no other operations will be occuring simultaneously.
Therefore, this is not yet documented externally.
2012-07-11 21:55:18 +01:00
Justin Clark-Casey (justincc) fc24563206 Add regression TestDetachScriptedAttachmentToInventory()
This currently only does a relatively crude check for a ScriptState node in the serialized xml
2012-07-11 21:43:35 +01:00
Justin Clark-Casey (justincc) 14d05dc2a9 Add regression TestRezScriptedAttachmentsFromInventory() though this currently only checks for the presence of script items, not for started scripts 2012-07-11 19:54:40 +01:00
Justin Clark-Casey (justincc) f3134b5cf6 When an attachment is detached to inv or derezzed, stop the scripts, update the known item with script state still in the script engine and then remove the scripts.
This is to fix a regression starting from 5301648 where attachments had to start being deleted before persistence in order to avoid race conditions with hud update threads.
2012-07-10 22:41:11 +01:00
Justin Clark-Casey (justincc) 2eaa6d5ace Do not allow a script to attach a prim if its being sat upon.
This prevents a stack overflow where a get position on the avatar will refer to the attachment which will in turn refer back to the avatar.
This required recording of all sitting avatars on a prim which is done separately from recording the sit target avatar.
Recording HashSet is null if there are no sitting avatars in order to save memory.
2012-07-09 21:24:32 +01:00
Justin Clark-Casey (justincc) 74014a3854 minor: Remove some wrong comments in attachments regression tests 2012-07-06 23:13:00 +01:00
Justin Clark-Casey (justincc) 056c9a59b2 Add assert to attachment regression tests to check that number of objects in the scene graph 2012-07-06 23:07:50 +01:00
Justin Clark-Casey (justincc) f6e5791ecd refactor: extract method UpdateUserInventoryWithAttachment() from AttachObject() for better code comprehension 2012-07-06 22:07:19 +01:00
Justin Clark-Casey (justincc) 951b45b80f Add OSSL function osForceAttachToAvatarFromInventory()
This works like osForceAttachToAvatar() but allows an object to be directly specified from the script object's inventory rather than forcing it to be rezzed in the scene first.
Still only attaches objects to the owner of the script.
This allows one to bypass the complicated co-ordination of first rezzing objects in the scene before attaching them.
Threat level high.
2012-07-05 00:05:06 +01:00
Justin Clark-Casey (justincc) bfa6896678 Change AttachmentsModule.DetachSingleAttachmentToInv() to accept a SOG directly instead of an item ID to then shuffle through attachments, saving CPU busywork.
Almost all callers already had the sog to hand.
Still checking that it's really an attachment, but now by inspecting SOG.AttachedAvatar
2012-06-28 23:31:23 +01:00
Justin Clark-Casey (justincc) 571fd966cb Rather than iterating through all SOGs in the scene looking for the one that matches out fromItemID on detach, go through the agent's attachment sog list instead. 2012-06-28 23:01:12 +01:00
Justin Clark-Casey (justincc) f263d6a910 Remove code that tried to delete an attachment back to inventory if RezSingleAttachmentFromInventoryInternal() returned null.
null would only ever be returned if the item couldn't be located within inventory and this would happen immediately.
In this case, derezzing wouldn't work anyway since there is no item to derez.
2012-06-28 22:48:49 +01:00
Justin Clark-Casey (justincc) bb48060b44 Fix issue in InventoryArchiveTestCase where it didn't call down to OpenSimTestCase.SetUp() 2012-06-27 00:50:36 +01:00
Justin Clark-Casey (justincc) d043213317 refactor: Move ScenePresence <-> AgentData attachments copying code into AttachmentsModule. 2012-06-27 00:41:46 +01:00
Justin Clark-Casey (justincc) 5bec5bcf71 Automatically disable log4net before each regression test so that logging is confined to a single test if it's turned on.
This involves making test classes inherit from a common OpenSimTestCase.
This will be applied to more classes as required.
2012-06-27 00:01:51 +01:00
Justin Clark-Casey (justincc) 99954c1498 refactor: Remove unnecessary AttachmentModuleTests.m_userId in favour of local variables 2012-06-26 22:53:08 +01:00
Justin Clark-Casey (justincc) 2b82c421ad refactor: Use local attachment module variables instead of global m_attMod.
This also avoids confusion between tests where one sets up m_attMod and another accidentally uses it after failing to set one up itself.
2012-06-26 22:31:25 +01:00
Justin Clark-Casey (justincc) 4329cc7b8a refactor: make m_presence a local variable in all AttachmentsModuleTests since it doesn't need to be global and some tests set up more than one sp 2012-06-26 22:21:54 +01:00
Justin Clark-Casey (justincc) 32a4ce94f0 Add regression test to check that attachments in source region are deleting when an agent teleports to a neighbouring region 2012-06-26 22:16:44 +01:00
Justin Clark-Casey (justincc) f5316984ab minor: update currently commented out log message at top of AvatarFactoryModule.SetAppearance() for future use 2012-06-25 23:31:22 +01:00
Justin Clark-Casey (justincc) e5b739aaeb When attachments are being saved and deleted for a closing root agent, delete first to avoid a hud race condition with update threads.
If delete doesn't occur first then the update thread can outrace the IsAttachment = false necessary to save attachments and send hud artifacts to other viewers.
2012-06-25 22:48:13 +01:00
Justin Clark-Casey (justincc) 5301648cff In AttachmentsModule.DetachSingleAttachmentToInvInternal(), remove attachment before changing properties for correct inventory serialization.
Serialization of attachments requires IsAttachment = false so that correct positions are serialized instead of avatar position.
However, doing this when a hud is still attached allows race conditions with update threads, resulting in hud artifacts on other viewers.
This change sets SOG.IsDeleted before serialization changes take place (IsDeleted itself is not a serialized property).
LLClientView then screens out any deleted SOGs before sending updates to viewers.
2012-06-25 21:08:19 +01:00
Justin Clark-Casey (justincc) 4cf49369b5 Stop flicking IsAttachment false and then true in AttachmentsModule.UpdateAttachmentPosition() in order to avoid a hud update race condition.
Previously, setting IsAttachment to false then true was necessary to serialize the updated attachment object information.
However, UpdateAttachmentPosition no longer does this update.
Whilst IsAttachment is set to false there is a race condition where the update thread can wrongly send hud object updates to clients that do not own the hud, resulting in screen artifacts.
2012-06-22 01:43:26 +01:00
Justin Clark-Casey (justincc) 798846c5b6 refactor AttachmentsModule tests to use a common method for standard attachment item setup 2012-06-22 00:40:04 +01:00
Justin Clark-Casey (justincc) 06617ffd06 Add regression test for updating attachment position 2012-06-22 00:18:30 +01:00
Justin Clark-Casey (justincc) 1aa7469253 correct wrong incomplete comment from previous commit 3c3ea19 in AttachmentsModule 2012-06-14 02:30:40 +01:00
Justin Clark-Casey (justincc) 3c3ea19620 Fix a bug where scene objects attached as HUDs through scripts would not disappear for other avatars.
We do this by sending a kill message for that object to all other avatars apart from the one that has the hud.
2012-06-14 02:26:38 +01:00
Melanie 5c646e2603 Remove the "Profile" config as it's covered by the replaceable interface 2012-06-04 18:22:09 +01:00
Justin Clark-Casey (justincc) bf0b8170f7 Add console command "teleport user" to allow teleport from the region console
See "help teleport user" on the console for more details
2012-05-29 23:35:20 +01:00
Justin Clark-Casey (justincc) 67ebe80dd9 Resolve some mono compiler warnings. 2012-05-25 04:03:16 +01:00
Justin Clark-Casey (justincc) 68918d632f Fetch the dialog module reference in AttachmentsModule in RegionLoaded() not AddRegion()
The reference is not guaranteed to be there when AddRegion() is called but will definitely be present at RegionLoaded() if it's going to be present at all.
2012-05-23 02:09:31 +01:00
Justin Clark-Casey (justincc) ff429a259b Fix bug where an avatar that had an object they owned attached through llAttachToAvatar() or osForceAttachToAvatar() would wrongly have next permissions come into play when they detached that object and rezzed it in scene.
This is because the attachments module code was setting the 'object slam' bit by using PermissionMask.All
Solution here is to route the attachment item creation call through the existing inventory code in BasicInventoryAccessModule rather than copy/pasted code in AttachmentsModule itself.
2012-05-23 01:58:10 +01:00
Justin Clark-Casey (justincc) af6c85308a minor: add explanative comment to 'missing baked texture' logging commonly seen on inter-simulator teleports where avatar baked textures are not available from the asset service. 2012-05-14 18:57:42 +01:00
Justin Clark-Casey (justincc) 5053506d88 refactor: Instead of performing a ScenePresence lookup twice over LocateClientObject() and GetClientScene(), do the lookup just once in LocateClientObject() 2012-05-07 18:27:33 +01:00
Justin Clark-Casey (justincc) cdf97ab3a6 Fix a bug in FriendsModule.StatusNotify() where all subsequent friends would not be notified once a non-local friend was found. 2012-05-07 17:21:45 +01:00
Justin Clark-Casey (justincc) 01b00ad0d5 Fire the scripting changed event with CHANGED_OWNER when an object that has changed owners is rezzed.
This needs to occur after the script is resumed rather than before, when the event is just dropped.
Addresses http://opensimulator.org/mantis/view.php?id=5890 and http://opensimulator.org/mantis/view.php?id=5952
2012-05-05 00:29:14 +01:00
Talun 92fde6ed26 Mantis 60004 problems with damage and llSetDamage. In damage enabled areas this patch - Deletes any objects that have damage set > 0 that deliver that damage to an avatar Stops Gods receiving damage, Stops volume detect objects causing damage Deletes NPCS when their helth reduces to zero Gradually "heals" damage to an avatar Resets health on going to a non damage area 2012-05-04 21:01:09 +01:00
Justin Clark-Casey (justincc) 37dd174697 refactor: Split most of EntityTransferModule.Teleport() into its same region and different region teleport components.
DoTeleport() now retrives IEventQueue itself rather than requiring it to be passed in.
2012-05-01 17:52:30 +01:00
Oren Hurvitz 37d770f814 Use DotNetZip to compress OARs and IARs.
DotNetZip provides much better compression than standard .NET.
2012-04-27 19:46:31 +01:00
Justin Clark-Casey (justincc) 07e62df558 Add regression test for teleporting an agent between separated regions on the same simulator.
This involves a large amount of change in test scene setup code to allow test scenes to share shared modules
SetupScene is now an instance method that requires an instantiation of SceneHelpers, though other SceneHelpers methods are still static
May split these out into separate classes in the future.
2012-04-27 00:58:54 +01:00
Justin Clark-Casey (justincc) 6b299a4287 Comment out some debug ATTACHMENTS log messages for now. 2012-04-25 00:52:33 +01:00
Justin Clark-Casey (justincc) 39a6d7cab4 Comment out the noisier AVFACTORY log messages for now.
Permanently comment out warnings about ScenePresence not being found - this is entirely expected if the avatar has alraedy logged out or left the scene.
2012-04-25 00:47:32 +01:00
Oren Hurvitz 2f398231ac Minor improvements to logging
Eliminated an extra newline in the console if the log line doesn't contain a category (example of a category: "[ASSETS]").
2012-04-24 21:38:09 +01:00
Talun 679da63da6 Mantis 5977 Corrections to llRegionSayTo
Signed-off-by: BlueWall <jamesh@bluewallgroup.com>
2012-04-23 07:16:33 -04:00
Justin Clark-Casey (justincc) 2b98e2f106 Stop teleports from dropping tall avatars through or embedding them in the floor when lured by short avatars.
This involves giving the ceiling of the Z-component in a lure rather than the floor.
Ideally we would give the exact float compensating for relative avatar height but it looks like that isn't possible with the parcel id format used in lures
2012-04-20 02:50:36 +01:00
Kevin Cozens a366c05ae2 Added ability to exclude inventory items or folders when saving IAR files. 2012-04-13 23:31:12 +01:00
Snoopy Pfeffer 8be14095fe HGFriendsModule: Type casts to fix compile error 2012-04-11 18:56:28 +02:00
Snoopy Pfeffer 1f4d3d3582 HGFriendsModule: Added optional user level based restriction to send friendship invitations to foreign users. 2012-04-11 18:52:07 +02:00
Diva Canto f2ede8c7e0 HGFriendsModule: add the scaffolding for supporting permissions pertaining to HG friendships. Snoopy take it from here. 2012-04-11 08:13:11 -07:00
Justin Clark-Casey (justincc) 7d8bb33c5b Store FromItemID for attachments once on SOG instead of on every SOP and only ever using the root part entry.
This eliminates some pointless memory use.
2012-04-07 00:33:02 +01:00
Justin Clark-Casey (justincc) 3525c876c8 Make default "show friends" console command show friends fetched from the friends service.
There is no a --cache option which will show friends from the local cache if available.
2012-03-30 01:57:38 +01:00
Justin Clark-Casey (justincc) bce7964ac2 refactor: Move "friends show cache" console command out into separate FriendsCommandsModule.
Expose required methods on IFriendsModule.  Rename GetFriends() -> GetFriendsFromCache() for self-documentation
2012-03-30 01:05:29 +01:00
Justin Clark-Casey (justincc) 59157d9d63 Add simple login test with online friends. Add IFriendsModule.GrantRights() for granting rights via a module call.
Rename IFriendsModule.GetFriendPerms() -> GetRightsGrantedByFriend() to be more self-documenting and consistent with friends module terminology.
Add some method doc.
2012-03-30 00:42:55 +01:00
Justin Clark-Casey (justincc) bf09d6a22b refactor: Stop passing both IClientAPI and agentID to friend event listeners, these are redundant. Replace a few magic numbers with FriendRights enum already used elsewhere. 2012-03-29 18:31:57 +01:00
Justin Clark-Casey (justincc) 012b01f224 Add simple regression test for logging in with offline friends. Don't expect to receive any in this instance. 2012-03-29 03:19:45 +01:00
Justin Clark-Casey (justincc) 22a85b947a Add back parts of reverted changes that were not concerned with child agent caching.
This adds ScenePresence to IClientAPI.SceneAgent earlier on in the add client process so that its information is available to EventManager.OnNewClient() and OnClientLogin()
Also add a code comment as to why we're caching friend information for child agents.
2012-03-29 01:26:30 +01:00
Melanie bd83676d6c Change namespace on CallingCardModule and correct interface file placemant. Also ass OpenSource header 2012-03-29 01:13:08 +01:00
Justin Clark-Casey (justincc) 93ac47f0d3 Revert "Simplify friends caching by only doing this for root agents - no functions require caching for child agents."
We need to cache child agents so that friends object edit/delete permissions will work across boarders on regions hosted by different simulators.

This reverts commit d9f7b8549b.
2012-03-29 01:08:47 +01:00
Melanie c52ff5cf7b Committing the Avination calling card module 2012-03-29 00:47:09 +01:00
Melanie 532e3dad26 Pushing the Avination Calling card hooks. Module to follow. 2012-03-29 00:31:11 +01:00
Justin Clark-Casey (justincc) d9f7b8549b Simplify friends caching by only doing this for root agents - no functions require caching for child agents.
This allows us to avoid unnecessary multiple calls to the friends service.
All friends functions originate from the root agent and only go to other root agents in existing code.
This also allows us to eliminate complex ref counting.
2012-03-28 23:40:25 +01:00
Justin Clark-Casey (justincc) 12d3ea3029 Add "friends show cache <first-name> <last-name>" command for debugging purposes.
This adds a reverse lookup (name -> ID) to IUserManagement instead of hitting the UserAccountService directly.
2012-03-28 02:51:34 +01:00
Diva Canto df624c13c9 HG Friends: don't notify if the server isn't there. 2012-03-22 15:08:57 -07:00
Diva Canto 4a9ca3ca8f HG Friends: reroute the status notifications to the HGFriends service, so that they can scale better. They were previously being handled by the UAS; that is still there, but it's now obsolete and will be removed in a future release. 2012-03-21 10:35:06 -07:00
Diva Canto d8bcb78b10 HG Friends: pulled sim-bound notification code to HGStatusNotifier, so that we can better manage this traffic. 2012-03-21 09:14:17 -07:00
Diva Canto 1089e9b842 Removed extraneous debug message 2012-03-21 08:08:12 -07:00
Diva Canto d49dd5573b Removed extraneous debug messages. Added a check for UUID.Zero. 2012-03-20 21:36:02 -07:00
Diva Canto d08ad6459a HG Friends: allow the establishment of HG friendships without requiring co-presence in the same sim. Using avatar picker, users can now search for names such as "first.last@grid.com:9000", find them, and request friendship. Friendship requests are stored if target user is offline. TESTED ON STANDALONE ONLY. 2012-03-20 17:14:19 -07:00
Justin Clark-Casey (justincc) 1e4180fc93 Clean up "save iar" help 2012-03-17 02:54:19 +00:00
Justin Clark-Casey (justincc) 6e26f17923 minor: In IAR save, log when we start adding the control file rather than saying afterwards that we added it. 2012-03-10 02:13:17 +00:00
Justin Clark-Casey (justincc) 749c3fef8a Change "help" to display categories/module list then "help <category/module>" to display commands in a category.
This is to deal with the hundred lines of command splurge when one previously typed "help"
Modelled somewhat on the mysql console
One can still type help <command> to get per command help at any point.
Categories capitalized to avoid conflict with the all-lowercase commands (except for commander system, as of yet).
Does not affect command parsing or any other aspects of the console apart from the help system.
Backwards compatible with existing modules.
2012-03-08 01:51:37 +00:00
Diva Canto 8fccd2b555 Send the right name and creation date on the BasicProfileModule. 2012-03-01 19:55:51 -08:00
Justin Clark-Casey (justincc) b48b0b1e58 Remove EXPERIMENTAL tags from load iar/save iar commands. 2012-02-25 00:48:41 +00:00
Dan Lake 784263f5e3 Added the TriggerAvatarAppearanceChanged to EventManager. It's triggered by AvatarFactoryModule after an avatar's appearance has been succesfully changed and persisted (if the persist option is set). 2012-02-17 13:45:45 -08:00
Dan Lake 2ebb421331 Refactor appearance saving for NPC to use AvatarFactoryModule interface. 2012-02-14 17:20:34 -08:00
Snoopy Pfeffer 83ef13a79a Changed save oar and save iar parameter -p|--profile to -h|--home, including corresponding RemoteAdmin parameter 2012-02-03 23:53:18 +01:00
Snoopy Pfeffer 1a18948935 Corrected console help texts for "save iar" 2012-02-03 23:04:18 +01:00
Melanie c08d6df7e1 Prevent a changed attachment that has been saved from being saved again. 2012-02-01 09:38:20 +00:00
Melanie fcc1fa2c32 Straighten out some attachment mess. Don't save attachment states for HG
visitors at all. On Leaving a sim, save only the changed ones. Don't save
all scripted stuff when leaving a sim.
2012-02-01 09:36:14 +00:00
nebadon d053625663 Update save oar and save iar help responses to reflect new -h|--home
switches which replace -p|--profile ie: "save oar
--home=http://hg.osgrid.org:80 region.oar"
2012-01-25 15:59:07 -07:00
Justin Clark-Casey (justincc) 38db874755 If deserializing a scene object fails during IAR load then ignore the object rather than halting the IAR load with an exception. 2012-01-11 14:33:26 +00:00
Justin Clark-Casey (justincc) 18497cef73 Add avatar names to appearance log messages 2012-01-10 18:54:20 +00:00
Diva Canto a22d0dcab9 HG Friends: fixed bug introduced by 571efeddb2 (r/17672) 2012-01-10 09:58:53 -08:00
Melanie 6f19e231b6 Don't try to save a NPCs attachment states on NPC delete 2012-01-07 18:09:45 +00:00
Justin Clark-Casey (justincc) c201b54b85 Improve "app rebake" command to return a better message if no uploaded texture ids were available for the rebake request 2012-01-05 19:40:54 +00:00
Justin Clark-Casey (justincc) 8fb70a2058 Add "appearance rebake" command to ask a specific viewer to rebake textures from the server end.
This is not as useful as it sounds, since you can only request rebakes for texture IDs already received.
In other words, if the viewer has never sent the server this information (which happens quite often) then it will have no effect.
Nonetheless, this is useful for diagnostic/debugging purposes.
2012-01-04 22:45:07 +00:00
Justin Clark-Casey (justincc) 0634c38505 Separate out rebake request code from cache validation code AvatarFactoryModule.
This allows some logic simplification and allows an external caller to manually request rebakes even if textures are uploaded (future command).
2012-01-04 22:22:46 +00:00
BlueWall 6941058824 Profile Updates
Update basic profile to use the replaceable interface, making configuration less error-prone. Add support to query avatar's home user account and profile service for regions usng the updated OpenProfileModule with Hypergrid.
2012-01-03 11:10:23 -05:00
Diva Canto 571efeddb2 Added UserManagementModule.IsLocalGridUser(UUID) to be used throughout region Scenes and Modules. Changed existing modules to use it instead of assuming that foreign = null account. 2011-12-29 16:12:06 -08:00
Justin Clark-Casey (justincc) e8fbeeba5f Fix race condition where the appearance update timer could be stopped just after another thread had started it on QueueAppearanceSave() or *Send()
However, the window for this race is very small, and the next queued appearance save or send would restart the timer anyway.
2011-12-19 19:08:24 +00:00
Justin Clark-Casey (justincc) 0b91ec8dd2 Migrate detailed "appearance show" report generation up to AvatarFactoryModule from AppearanceInfoModule so that it can be used in debug (inactive).
Further filters "debug packet <level>" to exclused [Request]ObjectPropertiesFamily if level is below 25.
Adjust some method doc
Minor changes to some logging messages.
2011-12-19 18:58:05 +00:00
Justin Clark-Casey (justincc) b242ceda1e In AvatarFactoryModule.SetApperance(), perform ValidateBakedTextureCache() in the same thread rather than on another one.
The caller is already an async thread from LLClientView so this doesn't hold up the client.
However, launching on a separate thread does remove the effect of m_setAppearanceLock
This was potentially allowing two different SetAppearance threads to interfere with each other, though this probably rarely happens, if at all.
2011-12-13 20:42:39 +00:00
Justin Clark-Casey (justincc) 5f276c3212 Print out one log message for every missing baked texture, rather than two. 2011-12-09 23:54:39 +00:00
Justin Clark-Casey (justincc) 4e9f50b878 Add commented log lines to FetchInventoryDescendents2 path for future use.
Haven't been able to resolve issue where attachments are removed by the viewer on relog on a localhost
2011-12-09 22:32:28 +00:00
Justin Clark-Casey (justincc) 4567555c49 Implement IOSHttpRequest and IOSHttpResponse http interfaces and use instead of OSHttpRequest/OSHttpResponse.
This is required for the substitution of different HTTP servers or the newer HttpServer.dll without having to commit to a particular implementation.
This is also required to write regression tests that involve the HTTP layer.
If you need to recompile, all you need to do is replace OSHttpRequest/OSHttpResponse references with IOSHttpRequest/IOSHttpResponse.
2011-12-05 20:44:20 +00:00
Justin Clark-Casey (justincc) e21949deaf Comment out the vebose logging on HGFriendsModule.
Recent issues in http://opensimulator.org/mantis/view.php?id=5794 were not related to HG friends
2011-11-16 00:26:54 +00:00
Justin Clark-Casey (justincc) 122304317c temporarily increasing logging in HGFriendsModule for debugging 2011-11-15 22:14:31 +00:00
Justin Clark-Casey (justincc) 828e4a5b09 Add comments about trying to avoid synchronous work off the EventManager.OnMakeRootAgent event since this is on the critical path for transfer of avatars from one region to another. 2011-11-15 20:26:42 +00:00
Justin Clark-Casey (justincc) 64784bc0cf remove SceneCommunicationService.OnAvatarCrossingIntoRegion. This stuff is not being used any more - it's now IEntityTransferModule and SimulationService instead 2011-11-15 17:30:58 +00:00
Justin Clark-Casey (justincc) 430821d837 Rename FetchFriendslist() -> CacheFriends() and RefetchFriends() -> RecacheFriends() to reflect their intended function 2011-11-15 16:12:35 +00:00
Justin Clark-Casey (justincc) 2b5b4ac167 refactor: rename m_NeedsListOfFriends => m_NeedsListOfOnlineFriends to better reflect its actual function 2011-11-15 16:05:08 +00:00
Justin Clark-Casey (justincc) 50803dfe2c For clients that are entering a simulator from initial login, stop executing FriendsModule.FetchFriendslist() asychronously.
Executing this asynchronously allows a race condition where subsequent friends fetches hit a cache that FetchFriendsList() had not yet populated.
Changing this to synchronous may improve issues where a user does not see friends as online even though they are.
I don't believe synchronous is a problem here, but if it is, then a more complicated signalling mechanism is required.  Locking the cache isn't sufficient.
2011-11-15 15:57:53 +00:00
Justin Clark-Casey (justincc) 8d0aaa359f refactor: Don't create a new UUID for passing uuids to client - UUIDs are structs are so not passed by reference (and they're immutable!) 2011-11-15 15:05:10 +00:00
Justin Clark-Casey (justincc) 89632f3ea8 Add test for removing a friendship. 2011-11-14 20:56:56 +00:00
Justin Clark-Casey (justincc) e5ff7f389b Improved method doc for AddFriend() - it actually does set up a two-way relationship.
Rename IFriendsModule.AddFriend() to AddFriendship()
2011-11-14 20:31:16 +00:00
Justin Clark-Casey (justincc) a64def8b73 minor: remove some mono compiler warnings 2011-11-14 18:16:14 +00:00
Justin Clark-Casey (justincc) 348d15707d Add test for adding a friend whilst online 2011-11-14 18:08:02 +00:00
Justin Clark-Casey (justincc) de895ee54a Add very simple FriendsModuleTests.TestNoFriends() 2011-11-14 17:18:51 +00:00
Justin Clark-Casey (justincc) ff36a1bc7b If a friends identifier which is too short is given to HGFriendsModule.GetOnlineFriends() then spit out a warning rather than failing on the String.Substring().
This is to progress http://opensimulator.org/mantis/view.php?id=5789
2011-11-14 16:06:06 +00:00
Justin Clark-Casey (justincc) 49ec85ae15 Do a ScenePresence null check in HGMessageTransferModule.SendIMToScene() to stop a NullReferenceException being thrown if an HG IM is sent to a simulator running multiple regions
This is an attempt to address http://opensimulator.org/mantis/view.php?id=5791
2011-11-14 15:24:02 +00:00
Melanie c7dd7b13a2 Convert SendKillObject to take a list of uint rather than sending one
packet per prim. More to come as we change to make use of this.
2011-11-06 20:38:07 +00:00
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) a62ccb5c4c Merge branch 'master' of ssh://opensimulator.org/var/git/opensim 2011-11-03 20:12:10 +00: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
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) 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
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) 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) 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
Pixel Tomsen c2272a755f Fix missing Busy-Mode Response
http://opensimulator.org/mantis/view.php?id=5748
2011-10-22 13:17:07 -04: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 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) 5ddefc2564 remove now redundant m_physical_prim flag from SOP.ApplyPhysics() 2011-10-15 02:47:27 +01:00
Justin Clark-Casey (justincc) c93c9ea072 factor common code out into SOP.RemoveFromPhysics() 2011-10-15 02:02:39 +01:00
Dan Lake 3142982353 Removed redundant scene presence lookups in HGMessageTransferModule 2011-10-05 12:58:24 -07: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 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
Dan Lake e77c919290 Remove usage of Linden packet types from inside Attachments Module and interface 2011-10-03 11:55:54 -07: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) 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
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) 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
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) 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) 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) 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) 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) 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) 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) 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) 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) 7d58b5fa15 move common code into AttachmentsModule.DeleteAttachmentsFromScene() 2011-08-31 17:53:58 +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) 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) 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) 1de68b34d9 refactor: migrate DropObject handling fully into AttachmentsModule from Scene 2011-08-30 22:25:38 +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
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
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
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
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) 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) 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) 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) 34aed96a2f replace old TestAddAttachments() with a more thorough TestAddAttachment() 2011-08-23 21:20:23 +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
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) 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) 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) 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) 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