diff options
author | Jeff Ames | 2008-05-25 23:27:38 +0000 |
---|---|---|
committer | Jeff Ames | 2008-05-25 23:27:38 +0000 |
commit | 5d77625e9ac4ce1fc7b8fd67aabf563678ef0d5d (patch) | |
tree | b010c015ac515fe2a3dd0c9f89c16cbc6383d685 /OpenSim/ApplicationPlugins/Rest/Regions | |
parent | * A hacky Top Scripts display. It isn't accurate as far as ms accounting, ho... (diff) | |
download | opensim-SC-5d77625e9ac4ce1fc7b8fd67aabf563678ef0d5d.zip opensim-SC-5d77625e9ac4ce1fc7b8fd67aabf563678ef0d5d.tar.gz opensim-SC-5d77625e9ac4ce1fc7b8fd67aabf563678ef0d5d.tar.bz2 opensim-SC-5d77625e9ac4ce1fc7b8fd67aabf563678ef0d5d.tar.xz |
Update svn properties. Formatting cleanup.
Diffstat (limited to 'OpenSim/ApplicationPlugins/Rest/Regions')
4 files changed, 127 insertions, 131 deletions
diff --git a/OpenSim/ApplicationPlugins/Rest/Regions/GETHandler.cs b/OpenSim/ApplicationPlugins/Rest/Regions/GETHandler.cs index b89976f..81eb5bd 100644 --- a/OpenSim/ApplicationPlugins/Rest/Regions/GETHandler.cs +++ b/OpenSim/ApplicationPlugins/Rest/Regions/GETHandler.cs | |||
@@ -1,30 +1,29 @@ | |||
1 | /* | 1 | /* |
2 | * Copyright (c) Contributors, http://opensimulator.org/ | 2 | * Copyright (c) Contributors, http://opensimulator.org/ |
3 | * See CONTRIBUTORS.TXT for a full list of copyright holders. | 3 | * See CONTRIBUTORS.TXT for a full list of copyright holders. |
4 | * | 4 | * |
5 | * Redistribution and use in source and binary forms, with or without | 5 | * Redistribution and use in source and binary forms, with or without |
6 | * modification, are permitted provided that the following conditions are met: | 6 | * modification, are permitted provided that the following conditions are met: |
7 | * * Redistributions of source code must retain the above copyright | 7 | * * Redistributions of source code must retain the above copyright |
8 | * notice, this list of conditions and the following disclaimer. | 8 | * notice, this list of conditions and the following disclaimer. |
9 | * * Redistributions in binary form must reproduce the above copyright | 9 | * * Redistributions in binary form must reproduce the above copyright |
10 | * notice, this list of conditions and the following disclaimer in the | 10 | * notice, this list of conditions and the following disclaimer in the |
11 | * documentation and/or other materials provided with the distribution. | 11 | * documentation and/or other materials provided with the distribution. |
12 | * * Neither the name of the OpenSim Project nor the | 12 | * * Neither the name of the OpenSim Project nor the |
13 | * names of its contributors may be used to endorse or promote products | 13 | * names of its contributors may be used to endorse or promote products |
14 | * derived from this software without specific prior written permission. | 14 | * derived from this software without specific prior written permission. |
15 | * | 15 | * |
16 | * THIS SOFTWARE IS PROVIDED BY THE DEVELOPERS ``AS IS'' AND ANY | 16 | * THIS SOFTWARE IS PROVIDED BY THE DEVELOPERS ``AS IS'' AND ANY |
17 | * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED | 17 | * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED |
18 | * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE | 18 | * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE |
19 | * DISCLAIMED. IN NO EVENT SHALL THE CONTRIBUTORS BE LIABLE FOR ANY | 19 | * DISCLAIMED. IN NO EVENT SHALL THE CONTRIBUTORS BE LIABLE FOR ANY |
20 | * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES | 20 | * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES |
21 | * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; | 21 | * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; |
22 | * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND | 22 | * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND |
23 | * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT | 23 | * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT |
24 | * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS | 24 | * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS |
25 | * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. | 25 | * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. |
26 | * | 26 | */ |
27 | */ | ||
28 | 27 | ||
29 | using System; | 28 | using System; |
30 | using System.Threading; | 29 | using System.Threading; |
@@ -54,10 +53,10 @@ namespace OpenSim.ApplicationPlugins.Rest.Regions | |||
54 | public partial class RestRegionPlugin : RestPlugin | 53 | public partial class RestRegionPlugin : RestPlugin |
55 | { | 54 | { |
56 | #region GET methods | 55 | #region GET methods |
57 | public string GetHandler(string request, string path, string param, | 56 | public string GetHandler(string request, string path, string param, |
58 | OSHttpRequest httpRequest, OSHttpResponse httpResponse) | 57 | OSHttpRequest httpRequest, OSHttpResponse httpResponse) |
59 | { | 58 | { |
60 | // foreach (string h in httpRequest.Headers.AllKeys) | 59 | // foreach (string h in httpRequest.Headers.AllKeys) |
61 | // foreach (string v in httpRequest.Headers.GetValues(h)) | 60 | // foreach (string v in httpRequest.Headers.GetValues(h)) |
62 | // m_log.DebugFormat("{0} IsGod: {1} -> {2}", MsgID, h, v); | 61 | // m_log.DebugFormat("{0} IsGod: {1} -> {2}", MsgID, h, v); |
63 | 62 | ||
@@ -72,7 +71,7 @@ namespace OpenSim.ApplicationPlugins.Rest.Regions | |||
72 | // param not empty: specific region | 71 | // param not empty: specific region |
73 | return GetHandlerRegion(httpResponse, param); | 72 | return GetHandlerRegion(httpResponse, param); |
74 | } | 73 | } |
75 | catch (Exception e) | 74 | catch (Exception e) |
76 | { | 75 | { |
77 | return Failure(httpResponse, OSHttpStatusCode.ServerErrorInternalError, "GET", e); | 76 | return Failure(httpResponse, OSHttpStatusCode.ServerErrorInternalError, "GET", e); |
78 | } | 77 | } |
@@ -88,7 +87,7 @@ namespace OpenSim.ApplicationPlugins.Rest.Regions | |||
88 | XmlWriter.WriteEndElement(); | 87 | XmlWriter.WriteEndElement(); |
89 | } | 88 | } |
90 | XmlWriter.WriteEndElement(); | 89 | XmlWriter.WriteEndElement(); |
91 | 90 | ||
92 | return XmlWriterResult; | 91 | return XmlWriterResult; |
93 | } | 92 | } |
94 | 93 | ||
@@ -141,7 +140,7 @@ namespace OpenSim.ApplicationPlugins.Rest.Regions | |||
141 | // m_log.DebugFormat("{0} GET comps advanced: >{1}<", MsgID, comps[1]); | 140 | // m_log.DebugFormat("{0} GET comps advanced: >{1}<", MsgID, comps[1]); |
142 | 141 | ||
143 | // check for {terrain,stats,prims} | 142 | // check for {terrain,stats,prims} |
144 | switch (comps[1].ToLower()) | 143 | switch (comps[1].ToLower()) |
145 | { | 144 | { |
146 | case "terrain": | 145 | case "terrain": |
147 | return RegionTerrain(httpResponse, scene); | 146 | return RegionTerrain(httpResponse, scene); |
@@ -175,13 +174,13 @@ namespace OpenSim.ApplicationPlugins.Rest.Regions | |||
175 | XmlWriter.WriteStartElement(String.Empty, "users", String.Empty); | 174 | XmlWriter.WriteStartElement(String.Empty, "users", String.Empty); |
176 | XmlWriter.WriteString(users.ToString()); | 175 | XmlWriter.WriteString(users.ToString()); |
177 | XmlWriter.WriteEndElement(); | 176 | XmlWriter.WriteEndElement(); |
178 | 177 | ||
179 | XmlWriter.WriteStartElement(String.Empty, "objects", String.Empty); | 178 | XmlWriter.WriteStartElement(String.Empty, "objects", String.Empty); |
180 | XmlWriter.WriteString(objects.ToString()); | 179 | XmlWriter.WriteString(objects.ToString()); |
181 | XmlWriter.WriteEndElement(); | 180 | XmlWriter.WriteEndElement(); |
182 | 181 | ||
183 | XmlWriter.WriteEndDocument(); | 182 | XmlWriter.WriteEndDocument(); |
184 | 183 | ||
185 | return XmlWriterResult; | 184 | return XmlWriterResult; |
186 | } | 185 | } |
187 | 186 | ||
diff --git a/OpenSim/ApplicationPlugins/Rest/Regions/POSTHandler.cs b/OpenSim/ApplicationPlugins/Rest/Regions/POSTHandler.cs index 00fe0d2..e6131f1 100644 --- a/OpenSim/ApplicationPlugins/Rest/Regions/POSTHandler.cs +++ b/OpenSim/ApplicationPlugins/Rest/Regions/POSTHandler.cs | |||
@@ -1,30 +1,29 @@ | |||
1 | /* | 1 | /* |
2 | * Copyright (c) Contributors, http://opensimulator.org/ | 2 | * Copyright (c) Contributors, http://opensimulator.org/ |
3 | * See CONTRIBUTORS.TXT for a full list of copyright holders. | 3 | * See CONTRIBUTORS.TXT for a full list of copyright holders. |
4 | * | 4 | * |
5 | * Redistribution and use in source and binary forms, with or without | 5 | * Redistribution and use in source and binary forms, with or without |
6 | * modification, are permitted provided that the following conditions are met: | 6 | * modification, are permitted provided that the following conditions are met: |
7 | * * Redistributions of source code must retain the above copyright | 7 | * * Redistributions of source code must retain the above copyright |
8 | * notice, this list of conditions and the following disclaimer. | 8 | * notice, this list of conditions and the following disclaimer. |
9 | * * Redistributions in binary form must reproduce the above copyright | 9 | * * Redistributions in binary form must reproduce the above copyright |
10 | * notice, this list of conditions and the following disclaimer in the | 10 | * notice, this list of conditions and the following disclaimer in the |
11 | * documentation and/or other materials provided with the distribution. | 11 | * documentation and/or other materials provided with the distribution. |
12 | * * Neither the name of the OpenSim Project nor the | 12 | * * Neither the name of the OpenSim Project nor the |
13 | * names of its contributors may be used to endorse or promote products | 13 | * names of its contributors may be used to endorse or promote products |
14 | * derived from this software without specific prior written permission. | 14 | * derived from this software without specific prior written permission. |
15 | * | 15 | * |
16 | * THIS SOFTWARE IS PROVIDED BY THE DEVELOPERS ``AS IS'' AND ANY | 16 | * THIS SOFTWARE IS PROVIDED BY THE DEVELOPERS ``AS IS'' AND ANY |
17 | * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED | 17 | * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED |
18 | * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE | 18 | * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE |
19 | * DISCLAIMED. IN NO EVENT SHALL THE CONTRIBUTORS BE LIABLE FOR ANY | 19 | * DISCLAIMED. IN NO EVENT SHALL THE CONTRIBUTORS BE LIABLE FOR ANY |
20 | * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES | 20 | * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES |
21 | * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; | 21 | * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; |
22 | * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND | 22 | * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND |
23 | * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT | 23 | * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT |
24 | * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS | 24 | * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS |
25 | * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. | 25 | * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. |
26 | * | 26 | */ |
27 | */ | ||
28 | 27 | ||
29 | using System; | 28 | using System; |
30 | using System.Threading; | 29 | using System.Threading; |
@@ -54,10 +53,10 @@ namespace OpenSim.ApplicationPlugins.Rest.Regions | |||
54 | public partial class RestRegionPlugin : RestPlugin | 53 | public partial class RestRegionPlugin : RestPlugin |
55 | { | 54 | { |
56 | #region POST methods | 55 | #region POST methods |
57 | public string PostHandler(string request, string path, string param, | 56 | public string PostHandler(string request, string path, string param, |
58 | OSHttpRequest httpRequest, OSHttpResponse httpResponse) | 57 | OSHttpRequest httpRequest, OSHttpResponse httpResponse) |
59 | { | 58 | { |
60 | // foreach (string h in httpRequest.Headers.AllKeys) | 59 | // foreach (string h in httpRequest.Headers.AllKeys) |
61 | // foreach (string v in httpRequest.Headers.GetValues(h)) | 60 | // foreach (string v in httpRequest.Headers.GetValues(h)) |
62 | // m_log.DebugFormat("{0} IsGod: {1} -> {2}", MsgID, h, v); | 61 | // m_log.DebugFormat("{0} IsGod: {1} -> {2}", MsgID, h, v); |
63 | 62 | ||
@@ -67,17 +66,17 @@ namespace OpenSim.ApplicationPlugins.Rest.Regions | |||
67 | try | 66 | try |
68 | { | 67 | { |
69 | // param empty: new region post | 68 | // param empty: new region post |
70 | if (!IsGod(httpRequest)) | 69 | if (!IsGod(httpRequest)) |
71 | // XXX: this needs to be turned into a FailureUnauthorized(...) | 70 | // XXX: this needs to be turned into a FailureUnauthorized(...) |
72 | return Failure(httpResponse, OSHttpStatusCode.ClientErrorUnauthorized, | 71 | return Failure(httpResponse, OSHttpStatusCode.ClientErrorUnauthorized, |
73 | "GET", "you are not god"); | 72 | "GET", "you are not god"); |
74 | 73 | ||
75 | if (String.IsNullOrEmpty(param)) return CreateRegion(httpRequest, httpResponse); | 74 | if (String.IsNullOrEmpty(param)) return CreateRegion(httpRequest, httpResponse); |
76 | 75 | ||
77 | return Failure(httpResponse, OSHttpStatusCode.ClientErrorNotFound, | 76 | return Failure(httpResponse, OSHttpStatusCode.ClientErrorNotFound, |
78 | "POST", "url {0} not supported", param); | 77 | "POST", "url {0} not supported", param); |
79 | } | 78 | } |
80 | catch (Exception e) | 79 | catch (Exception e) |
81 | { | 80 | { |
82 | return Failure(httpResponse, OSHttpStatusCode.ServerErrorInternalError, "POST", e); | 81 | return Failure(httpResponse, OSHttpStatusCode.ServerErrorInternalError, "POST", e); |
83 | } | 82 | } |
@@ -93,7 +92,7 @@ namespace OpenSim.ApplicationPlugins.Rest.Regions | |||
93 | XmlWriter.WriteEndElement(); | 92 | XmlWriter.WriteEndElement(); |
94 | } | 93 | } |
95 | XmlWriter.WriteEndElement(); | 94 | XmlWriter.WriteEndElement(); |
96 | 95 | ||
97 | return XmlWriterResult; | 96 | return XmlWriterResult; |
98 | } | 97 | } |
99 | #endregion POST methods | 98 | #endregion POST methods |
diff --git a/OpenSim/ApplicationPlugins/Rest/Regions/RegionDetails.cs b/OpenSim/ApplicationPlugins/Rest/Regions/RegionDetails.cs index c86c67f..5de623c 100644 --- a/OpenSim/ApplicationPlugins/Rest/Regions/RegionDetails.cs +++ b/OpenSim/ApplicationPlugins/Rest/Regions/RegionDetails.cs | |||
@@ -1,30 +1,29 @@ | |||
1 | /* | 1 | /* |
2 | * Copyright (c) Contributors, http://opensimulator.org/ | 2 | * Copyright (c) Contributors, http://opensimulator.org/ |
3 | * See CONTRIBUTORS.TXT for a full list of copyright holders. | 3 | * See CONTRIBUTORS.TXT for a full list of copyright holders. |
4 | * | 4 | * |
5 | * Redistribution and use in source and binary forms, with or without | 5 | * Redistribution and use in source and binary forms, with or without |
6 | * modification, are permitted provided that the following conditions are met: | 6 | * modification, are permitted provided that the following conditions are met: |
7 | * * Redistributions of source code must retain the above copyright | 7 | * * Redistributions of source code must retain the above copyright |
8 | * notice, this list of conditions and the following disclaimer. | 8 | * notice, this list of conditions and the following disclaimer. |
9 | * * Redistributions in binary form must reproduce the above copyright | 9 | * * Redistributions in binary form must reproduce the above copyright |
10 | * notice, this list of conditions and the following disclaimer in the | 10 | * notice, this list of conditions and the following disclaimer in the |
11 | * documentation and/or other materials provided with the distribution. | 11 | * documentation and/or other materials provided with the distribution. |
12 | * * Neither the name of the OpenSim Project nor the | 12 | * * Neither the name of the OpenSim Project nor the |
13 | * names of its contributors may be used to endorse or promote products | 13 | * names of its contributors may be used to endorse or promote products |
14 | * derived from this software without specific prior written permission. | 14 | * derived from this software without specific prior written permission. |
15 | * | 15 | * |
16 | * THIS SOFTWARE IS PROVIDED BY THE DEVELOPERS ``AS IS'' AND ANY | 16 | * THIS SOFTWARE IS PROVIDED BY THE DEVELOPERS ``AS IS'' AND ANY |
17 | * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED | 17 | * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED |
18 | * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE | 18 | * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE |
19 | * DISCLAIMED. IN NO EVENT SHALL THE CONTRIBUTORS BE LIABLE FOR ANY | 19 | * DISCLAIMED. IN NO EVENT SHALL THE CONTRIBUTORS BE LIABLE FOR ANY |
20 | * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES | 20 | * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES |
21 | * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; | 21 | * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; |
22 | * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND | 22 | * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND |
23 | * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT | 23 | * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT |
24 | * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS | 24 | * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS |
25 | * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. | 25 | * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. |
26 | * | 26 | */ |
27 | */ | ||
28 | 27 | ||
29 | using libsecondlife; | 28 | using libsecondlife; |
30 | using System; | 29 | using System; |
@@ -65,35 +64,35 @@ namespace OpenSim.ApplicationPlugins.Rest.Regions | |||
65 | region_external_hostname = regInfo.ExternalHostName; | 64 | region_external_hostname = regInfo.ExternalHostName; |
66 | 65 | ||
67 | if (!String.IsNullOrEmpty(regInfo.MasterAvatarFirstName)) | 66 | if (!String.IsNullOrEmpty(regInfo.MasterAvatarFirstName)) |
68 | region_owner = String.Format("{0} {1}", regInfo.MasterAvatarFirstName, | 67 | region_owner = String.Format("{0} {1}", regInfo.MasterAvatarFirstName, |
69 | regInfo.MasterAvatarLastName); | 68 | regInfo.MasterAvatarLastName); |
70 | } | 69 | } |
71 | 70 | ||
72 | public string this[string idx] | 71 | public string this[string idx] |
73 | { | 72 | { |
74 | get | 73 | get |
75 | { | 74 | { |
76 | switch(idx.ToLower()) | 75 | switch(idx.ToLower()) |
77 | { | 76 | { |
78 | case "name": | 77 | case "name": |
79 | return region_name; | 78 | return region_name; |
80 | case "id": | 79 | case "id": |
81 | return region_id; | 80 | return region_id; |
82 | case "location": | 81 | case "location": |
83 | return String.Format("<x>{0}</x><y>{1}</y>", region_x, region_y); | 82 | return String.Format("<x>{0}</x><y>{1}</y>", region_x, region_y); |
84 | case "owner": | 83 | case "owner": |
85 | return region_owner; | 84 | return region_owner; |
86 | case "owner_id": | 85 | case "owner_id": |
87 | return region_owner_id; | 86 | return region_owner_id; |
88 | case "http_port": | 87 | case "http_port": |
89 | return region_http_port.ToString(); | 88 | return region_http_port.ToString(); |
90 | case "server_uri": | 89 | case "server_uri": |
91 | return region_server_uri; | 90 | return region_server_uri; |
92 | case "external_hostname": | 91 | case "external_hostname": |
93 | case "hostname": | 92 | case "hostname": |
94 | return region_external_hostname; | 93 | return region_external_hostname; |
95 | 94 | ||
96 | default: | 95 | default: |
97 | return null; | 96 | return null; |
98 | } | 97 | } |
99 | } | 98 | } |
diff --git a/OpenSim/ApplicationPlugins/Rest/Regions/RestRegionPlugin.cs b/OpenSim/ApplicationPlugins/Rest/Regions/RestRegionPlugin.cs index 6d585a4..24bed99 100644 --- a/OpenSim/ApplicationPlugins/Rest/Regions/RestRegionPlugin.cs +++ b/OpenSim/ApplicationPlugins/Rest/Regions/RestRegionPlugin.cs | |||
@@ -1,30 +1,29 @@ | |||
1 | /* | 1 | /* |
2 | * Copyright (c) Contributors, http://opensimulator.org/ | 2 | * Copyright (c) Contributors, http://opensimulator.org/ |
3 | * See CONTRIBUTORS.TXT for a full list of copyright holders. | 3 | * See CONTRIBUTORS.TXT for a full list of copyright holders. |
4 | * | 4 | * |
5 | * Redistribution and use in source and binary forms, with or without | 5 | * Redistribution and use in source and binary forms, with or without |
6 | * modification, are permitted provided that the following conditions are met: | 6 | * modification, are permitted provided that the following conditions are met: |
7 | * * Redistributions of source code must retain the above copyright | 7 | * * Redistributions of source code must retain the above copyright |
8 | * notice, this list of conditions and the following disclaimer. | 8 | * notice, this list of conditions and the following disclaimer. |
9 | * * Redistributions in binary form must reproduce the above copyright | 9 | * * Redistributions in binary form must reproduce the above copyright |
10 | * notice, this list of conditions and the following disclaimer in the | 10 | * notice, this list of conditions and the following disclaimer in the |
11 | * documentation and/or other materials provided with the distribution. | 11 | * documentation and/or other materials provided with the distribution. |
12 | * * Neither the name of the OpenSim Project nor the | 12 | * * Neither the name of the OpenSim Project nor the |
13 | * names of its contributors may be used to endorse or promote products | 13 | * names of its contributors may be used to endorse or promote products |
14 | * derived from this software without specific prior written permission. | 14 | * derived from this software without specific prior written permission. |
15 | * | 15 | * |
16 | * THIS SOFTWARE IS PROVIDED BY THE DEVELOPERS ``AS IS'' AND ANY | 16 | * THIS SOFTWARE IS PROVIDED BY THE DEVELOPERS ``AS IS'' AND ANY |
17 | * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED | 17 | * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED |
18 | * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE | 18 | * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE |
19 | * DISCLAIMED. IN NO EVENT SHALL THE CONTRIBUTORS BE LIABLE FOR ANY | 19 | * DISCLAIMED. IN NO EVENT SHALL THE CONTRIBUTORS BE LIABLE FOR ANY |
20 | * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES | 20 | * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES |
21 | * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; | 21 | * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; |
22 | * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND | 22 | * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND |
23 | * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT | 23 | * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT |
24 | * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS | 24 | * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS |
25 | * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. | 25 | * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. |
26 | * | 26 | */ |
27 | */ | ||
28 | 27 | ||
29 | using System; | 28 | using System; |
30 | using System.Threading; | 29 | using System.Threading; |
@@ -58,8 +57,8 @@ namespace OpenSim.ApplicationPlugins.Rest.Regions | |||
58 | public partial class RestRegionPlugin : RestPlugin | 57 | public partial class RestRegionPlugin : RestPlugin |
59 | { | 58 | { |
60 | #region overriding properties | 59 | #region overriding properties |
61 | public override string Name | 60 | public override string Name |
62 | { | 61 | { |
63 | get { return "REGION"; } | 62 | get { return "REGION"; } |
64 | } | 63 | } |
65 | 64 | ||
@@ -83,7 +82,7 @@ namespace OpenSim.ApplicationPlugins.Rest.Regions | |||
83 | try | 82 | try |
84 | { | 83 | { |
85 | base.Initialise(openSim); | 84 | base.Initialise(openSim); |
86 | if (!IsEnabled) | 85 | if (!IsEnabled) |
87 | { | 86 | { |
88 | m_log.WarnFormat("{0} Rest Plugins are disabled", MsgID); | 87 | m_log.WarnFormat("{0} Rest Plugins are disabled", MsgID); |
89 | return; | 88 | return; |