aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/ApplicationPlugins/Rest
diff options
context:
space:
mode:
Diffstat (limited to 'OpenSim/ApplicationPlugins/Rest')
-rw-r--r--OpenSim/ApplicationPlugins/Rest/Regions/RegionDetails.cs4
-rw-r--r--OpenSim/ApplicationPlugins/Rest/Regions/RestRegionPlugin.cs16
-rw-r--r--OpenSim/ApplicationPlugins/Rest/RestPlugin.cs24
3 files changed, 22 insertions, 22 deletions
diff --git a/OpenSim/ApplicationPlugins/Rest/Regions/RegionDetails.cs b/OpenSim/ApplicationPlugins/Rest/Regions/RegionDetails.cs
index 7fc1267..5102e3f 100644
--- a/OpenSim/ApplicationPlugins/Rest/Regions/RegionDetails.cs
+++ b/OpenSim/ApplicationPlugins/Rest/Regions/RegionDetails.cs
@@ -23,7 +23,7 @@
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*/ 27*/
28 28
29using libsecondlife; 29using libsecondlife;
@@ -65,7 +65,7 @@ namespace OpenSim.ApplicationPlugins.Rest.Regions
65 region_external_hostname = regInfo.ExternalHostName; 65 region_external_hostname = regInfo.ExternalHostName;
66 66
67 if (!String.IsNullOrEmpty(regInfo.MasterAvatarFirstName)) 67 if (!String.IsNullOrEmpty(regInfo.MasterAvatarFirstName))
68 region_owner = String.Format("{0} {1}", regInfo.MasterAvatarFirstName, 68 region_owner = String.Format("{0} {1}", regInfo.MasterAvatarFirstName,
69 regInfo.MasterAvatarLastName); 69 regInfo.MasterAvatarLastName);
70 } 70 }
71 } 71 }
diff --git a/OpenSim/ApplicationPlugins/Rest/Regions/RestRegionPlugin.cs b/OpenSim/ApplicationPlugins/Rest/Regions/RestRegionPlugin.cs
index 8a6fb09..0716cf6 100644
--- a/OpenSim/ApplicationPlugins/Rest/Regions/RestRegionPlugin.cs
+++ b/OpenSim/ApplicationPlugins/Rest/Regions/RestRegionPlugin.cs
@@ -23,7 +23,7 @@
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*/ 27*/
28 28
29using System; 29using System;
@@ -57,12 +57,12 @@ namespace OpenSim.ApplicationPlugins.Rest.Regions
57 [Extension("/OpenSim/Startup")] 57 [Extension("/OpenSim/Startup")]
58 public class RestRegionPlugin : RestPlugin 58 public class RestRegionPlugin : RestPlugin
59 { 59 {
60 private static readonly log4net.ILog _log = 60 private static readonly log4net.ILog _log =
61 log4net.LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType); 61 log4net.LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType);
62 62
63 #region overriding properties 63 #region overriding properties
64 public override string Name 64 public override string Name
65 { 65 {
66 get { return "REGION"; } 66 get { return "REGION"; }
67 } 67 }
68 68
@@ -86,7 +86,7 @@ namespace OpenSim.ApplicationPlugins.Rest.Regions
86 try 86 try
87 { 87 {
88 base.Initialise(openSim); 88 base.Initialise(openSim);
89 if (IsEnabled) 89 if (IsEnabled)
90 m_log.InfoFormat("{0} Rest Plugins Enabled", MsgID); 90 m_log.InfoFormat("{0} Rest Plugins Enabled", MsgID);
91 else 91 else
92 m_log.WarnFormat("{0} Rest Plugins are disabled", MsgID); 92 m_log.WarnFormat("{0} Rest Plugins are disabled", MsgID);
@@ -122,7 +122,7 @@ namespace OpenSim.ApplicationPlugins.Rest.Regions
122 StringWriter sw = new StringWriter(); 122 StringWriter sw = new StringWriter();
123 XmlTextWriter xw = new XmlTextWriter(sw); 123 XmlTextWriter xw = new XmlTextWriter(sw);
124 xw.Formatting = Formatting.Indented; 124 xw.Formatting = Formatting.Indented;
125 125
126 xw.WriteStartElement(String.Empty, "regions", String.Empty); 126 xw.WriteStartElement(String.Empty, "regions", String.Empty);
127 foreach (Scene s in App.SceneManager.Scenes) 127 foreach (Scene s in App.SceneManager.Scenes)
128 { 128 {
@@ -132,7 +132,7 @@ namespace OpenSim.ApplicationPlugins.Rest.Regions
132 } 132 }
133 xw.WriteEndElement(); 133 xw.WriteEndElement();
134 xw.Close(); 134 xw.Close();
135 135
136 return sw.ToString(); 136 return sw.ToString();
137 } 137 }
138 138
@@ -154,7 +154,7 @@ namespace OpenSim.ApplicationPlugins.Rest.Regions
154 154
155 xs.Serialize(xw, new RegionDetails(scene.RegionInfo)); 155 xs.Serialize(xw, new RegionDetails(scene.RegionInfo));
156 xw.Close(); 156 xw.Close();
157 157
158 return sw.ToString(); 158 return sw.ToString();
159 } 159 }
160 #endregion methods 160 #endregion methods
diff --git a/OpenSim/ApplicationPlugins/Rest/RestPlugin.cs b/OpenSim/ApplicationPlugins/Rest/RestPlugin.cs
index 0e54f4d..05ea956 100644
--- a/OpenSim/ApplicationPlugins/Rest/RestPlugin.cs
+++ b/OpenSim/ApplicationPlugins/Rest/RestPlugin.cs
@@ -23,7 +23,7 @@
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*/ 27*/
28 28
29using System; 29using System;
@@ -54,7 +54,7 @@ namespace OpenSim.ApplicationPlugins.Rest
54 { 54 {
55 #region properties 55 #region properties
56 56
57 protected static readonly log4net.ILog m_log = 57 protected static readonly log4net.ILog m_log =
58 log4net.LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType); 58 log4net.LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType);
59 59
60 private IConfig _config; // Configuration source: Rest Plugins 60 private IConfig _config; // Configuration source: Rest Plugins
@@ -100,8 +100,8 @@ namespace OpenSim.ApplicationPlugins.Rest
100 /// </summary> 100 /// </summary>
101 public bool IsEnabled 101 public bool IsEnabled
102 { 102 {
103 get 103 get
104 { 104 {
105 return (null != _pluginConfig) && _pluginConfig.GetBoolean("enabled", false); 105 return (null != _pluginConfig) && _pluginConfig.GetBoolean("enabled", false);
106 } 106 }
107 } 107 }
@@ -109,7 +109,7 @@ namespace OpenSim.ApplicationPlugins.Rest
109 /// <summary> 109 /// <summary>
110 /// OpenSimMain application 110 /// OpenSimMain application
111 /// </summary> 111 /// </summary>
112 public OpenSimMain App 112 public OpenSimMain App
113 { 113 {
114 get { return _app; } 114 get { return _app; }
115 } 115 }
@@ -117,7 +117,7 @@ namespace OpenSim.ApplicationPlugins.Rest
117 /// <summary> 117 /// <summary>
118 /// RPC server 118 /// RPC server
119 /// </summary> 119 /// </summary>
120 public BaseHttpServer HttpServer 120 public BaseHttpServer HttpServer
121 { 121 {
122 get { return _httpd; } 122 get { return _httpd; }
123 } 123 }
@@ -171,7 +171,7 @@ namespace OpenSim.ApplicationPlugins.Rest
171 return; 171 return;
172 } 172 }
173 173
174 if (!_config.GetBoolean("enabled", false)) 174 if (!_config.GetBoolean("enabled", false))
175 { 175 {
176 m_log.WarnFormat("{0} Rest Plugins are disabled", MsgID); 176 m_log.WarnFormat("{0} Rest Plugins are disabled", MsgID);
177 return; 177 return;
@@ -184,10 +184,10 @@ namespace OpenSim.ApplicationPlugins.Rest
184 _godkey = _config.GetString("god_key", String.Empty); 184 _godkey = _config.GetString("god_key", String.Empty);
185 // Retrive prefix if any. 185 // Retrive prefix if any.
186 _prefix = _config.GetString("prefix", "/admin"); 186 _prefix = _config.GetString("prefix", "/admin");
187 187
188 // Get plugin specific config 188 // Get plugin specific config
189 _pluginConfig = openSim.ConfigSource.Configs[ConfigName]; 189 _pluginConfig = openSim.ConfigSource.Configs[ConfigName];
190 190
191 m_log.InfoFormat("{0} Rest Plugins Enabled", MsgID); 191 m_log.InfoFormat("{0} Rest Plugins Enabled", MsgID);
192 } 192 }
193 catch (Exception e) 193 catch (Exception e)
@@ -200,7 +200,7 @@ namespace OpenSim.ApplicationPlugins.Rest
200 // not possible for the openSim pointer to be null. However 200 // not possible for the openSim pointer to be null. However
201 // were the implementation to be changed, this could 201 // were the implementation to be changed, this could
202 // result in a silent initialization failure. Harmless 202 // result in a silent initialization failure. Harmless
203 // except for lack of function and lack of any 203 // except for lack of function and lack of any
204 // diagnostic indication as to why. The same is true if 204 // diagnostic indication as to why. The same is true if
205 // the HTTP server reference is bad. 205 // the HTTP server reference is bad.
206 // We should at least issue a message... 206 // We should at least issue a message...
@@ -214,7 +214,7 @@ namespace OpenSim.ApplicationPlugins.Rest
214 214
215 public void AddRestStreamHandler(string httpMethod, string path, RestMethod method) 215 public void AddRestStreamHandler(string httpMethod, string path, RestMethod method)
216 { 216 {
217 if (!path.StartsWith(_prefix)) 217 if (!path.StartsWith(_prefix))
218 { 218 {
219 path = String.Format("{0}{1}", _prefix, path); 219 path = String.Format("{0}{1}", _prefix, path);
220 } 220 }
@@ -226,7 +226,7 @@ namespace OpenSim.ApplicationPlugins.Rest
226 m_log.DebugFormat("{0} Added REST handler {1} {2}", MsgID, httpMethod, path); 226 m_log.DebugFormat("{0} Added REST handler {1} {2}", MsgID, httpMethod, path);
227 } 227 }
228 228
229 229
230 public bool VerifyGod(string key) 230 public bool VerifyGod(string key)
231 { 231 {
232 if (String.IsNullOrEmpty(key)) return false; 232 if (String.IsNullOrEmpty(key)) return false;