Mantis Bug Tracker

View Issue Details Jump to Notes ] Issue History ] Print ]
IDProjectCategoryView StatusDate SubmittedLast Update
0005936opensim[REGION] Script Functionspublic2012-03-14 13:012012-03-30 16:57
Assigned Tomelanie 
Statuspatch includedResolutionopen 
PlatformOperating SystemOperating System Version
Product Versionmaster (dev code) 
Target VersionFixed in Version 
Summary0005936: [PATCH] new osGetInventoryLandmarkParams function
DescriptionFunction to get more landmark information than with llGetInventoryData

Needed to allow to use a landmark instead of encoded url in a Teleport script
Usefull to get other information like gatekeeper (to check if landmark is in world or external, for example)

osGetInventoryLandmarkParams(string landmarkName, int type)

type is one of
LANDMARK_URL (secondlife://host:port:region/X/Y/Z/ [^])
LANDMARK_ADDRESS (host:port:region)
LANDMARK_MAPSEARCH (http://host:port/ [^] region)
LANDMARK_GATEKEEPER (http://host:port [^])
Additional InformationCurrently output of following values are limited to local destination or destinations hyperlinked with the server
The function logs an error message and return relevant message to script, so script is not stopped.

This is because World.GridService.GetRegionByUUID(UUID.Zero, new UUID(landmark.RegionID));
does not output result in other cases.

We tried to find other ways to get the region data, but didn't succeed. Any idea is welcome.

However, we published the patch because we think it is already useful as is.
TagsNo tags attached.
Git Revision or version numberdev
Run Mode Grid (Multiple Regions per Sim)
Physics EngineODE
Script Engine
EnvironmentMono / Linux32
Mono Version2.6.3
Attached Filespatch file icon 003-196652c-osGetInventoryLandmarkParams.patch [^] (7,225 bytes) 2012-03-14 13:23 [Show Content]
patch file icon 003-ee29c75-osGetInventoryLandmarkParams-clean.patch [^] (7,659 bytes) 2012-03-14 15:31 [Show Content]
patch file icon 004-33ec28d-Cosmetic_fixes.patch [^] (20,624 bytes) 2012-03-14 17:23 [Show Content]
patch file icon 005-3bfeebf-osGetInventoryLandmarkParams-clean.patch [^] (7,715 bytes) 2012-03-14 17:26 [Show Content]
patch file icon 006-7ba62461-osGetInventoryLandmarkParams.patch [^] (8,909 bytes) 2012-03-15 14:39 [Show Content]

- Relationships

-  Notes
melanie (administrator)
2012-03-14 13:04

There is no patch included?
GuduleLapointe (reporter)
2012-03-14 13:23

Oops. Added
melanie (administrator)
2012-03-14 13:40

There are some issues with this patch and it can't be applied as-is.

The patch apparently removes access to an existing function, osGetLandmarkURL(). It is our policy to preserve existing content, therefore removal if functions, even if redundant, is not an option. Please do not remove existing functionality.

The patch uses 8-space tabs. OpenSim uses 4-space tabs. Please correct these issues.
GuduleLapointe (reporter)
2012-03-14 14:33

Oops again. This function does not exist actually. It a test of mines, and was never published. I just forgot to remove the commented lines.

I check that, the spaces, and I'll resubmit.
GuduleLapointe (reporter)
2012-03-14 15:33

patch is cleaned and resubmitted as
smxy (reporter)
2012-03-14 17:16

The formatting of the if statements looks wrong to me. I see lots of:

if something
return something

Shouldn't the return lines be indented?

Also, there are a number of statements that are broken up over multiple lines, with no indentation of the continuation lines, making them hard to read and follow. They'd be easier to read, I think, if they were either recombined as a single line or if the continuation lines were indented.
GuduleLapointe (reporter)
2012-03-14 17:27

You're right.

Updated in 005-3bfeebf-osGetInventoryLandmarkParams-clean.patch
(please ignore 004.* file)
GuduleLapointe (reporter)
2012-03-14 18:11

I found a couple of bugs.

- From some HG grids, region name contains http://localhost:8002 [^] before the actual url (misconfiguration? viewer cache?). Any way, I have to handle this case and strip that out.
- There is an error left in one of the "if"... (LANMARK_POSITION instead of LANDMARK_POSITION)

I make corrections for this, but I'll still make some more tests before submitted the revised version.
GuduleLapointe (reporter)
2012-03-15 14:45
edited on: 2012-03-15 17:26


Includes the new function and these fixes from previous versions:
- strip out localhost from results
- fix LANDMARK_REGION_NAME constant error in one of the if tests
- fix encoded url (spaces replaced by "%20" instead of "+", which made errors with second life:// links.
- get the gatekeeperURI from regionName if landmark.Gatekeeper returned illegal vaue (i.e. localhost)
- previous cosmetic changes

- Issue History
Date Modified Username Field Change
2012-03-14 13:01 GuduleLapointe New Issue
2012-03-14 13:04 melanie Note Added: 0021095
2012-03-14 13:04 melanie Assigned To => melanie
2012-03-14 13:04 melanie Status new => feedback
2012-03-14 13:23 GuduleLapointe File Added: 003-196652c-osGetInventoryLandmarkParams.patch
2012-03-14 13:23 GuduleLapointe Note Added: 0021097
2012-03-14 13:23 GuduleLapointe Status feedback => assigned
2012-03-14 13:40 melanie Note Added: 0021098
2012-03-14 13:40 melanie Status assigned => feedback
2012-03-14 14:33 GuduleLapointe Note Added: 0021099
2012-03-14 14:33 GuduleLapointe Status feedback => assigned
2012-03-14 15:31 GuduleLapointe File Added: 003-ee29c75-osGetInventoryLandmarkParams-clean.patch
2012-03-14 15:33 GuduleLapointe Note Added: 0021100
2012-03-14 17:16 smxy Note Added: 0021102
2012-03-14 17:23 GuduleLapointe File Added: 004-33ec28d-Cosmetic_fixes.patch
2012-03-14 17:26 GuduleLapointe File Added: 005-3bfeebf-osGetInventoryLandmarkParams-clean.patch
2012-03-14 17:27 GuduleLapointe Note Added: 0021103
2012-03-14 18:11 GuduleLapointe Note Added: 0021104
2012-03-15 14:39 GuduleLapointe File Added: 006-7ba62461-osGetInventoryLandmarkParams.patch
2012-03-15 14:45 GuduleLapointe Note Added: 0021112
2012-03-15 17:26 GuduleLapointe Note Edited: 0021112 View Revisions
2012-03-16 20:58 justincc Status assigned => patch included

Copyright © 2000 - 2012 MantisBT Group
Powered by Mantis Bugtracker