aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Framework
diff options
context:
space:
mode:
authorMelanie2011-02-07 23:07:36 +0000
committerMelanie2011-02-07 23:07:36 +0000
commit076f2ac8dbfa3dae31961ceadc41f4c0319f1fb0 (patch)
treed6d80e7364bd96b95dddfbf03b708e2ea6ba3f77 /OpenSim/Framework
parentFix merge issues (diff)
parentHunting down mantis #5365 (diff)
downloadopensim-SC_OLD-076f2ac8dbfa3dae31961ceadc41f4c0319f1fb0.zip
opensim-SC_OLD-076f2ac8dbfa3dae31961ceadc41f4c0319f1fb0.tar.gz
opensim-SC_OLD-076f2ac8dbfa3dae31961ceadc41f4c0319f1fb0.tar.bz2
opensim-SC_OLD-076f2ac8dbfa3dae31961ceadc41f4c0319f1fb0.tar.xz
Merge branch 'master' into careminster-presence-refactor
Diffstat (limited to 'OpenSim/Framework')
-rw-r--r--OpenSim/Framework/AgentCircuitData.cs30
-rw-r--r--OpenSim/Framework/Capabilities/CapsHandlers.cs2
-rw-r--r--OpenSim/Framework/Servers/HttpServer/BaseHttpServer.cs32
3 files changed, 62 insertions, 2 deletions
diff --git a/OpenSim/Framework/AgentCircuitData.cs b/OpenSim/Framework/AgentCircuitData.cs
index 1600bdc..3dbc215 100644
--- a/OpenSim/Framework/AgentCircuitData.cs
+++ b/OpenSim/Framework/AgentCircuitData.cs
@@ -220,6 +220,8 @@ namespace OpenSim.Framework
220 args["packed_appearance"] = appmap; 220 args["packed_appearance"] = appmap;
221 } 221 }
222 222
223 // Old, bad way. Keeping it fow now for backwards compatibility
224 // OBSOLETE -- soon to be deleted
223 if (ServiceURLs != null && ServiceURLs.Count > 0) 225 if (ServiceURLs != null && ServiceURLs.Count > 0)
224 { 226 {
225 OSDArray urls = new OSDArray(ServiceURLs.Count * 2); 227 OSDArray urls = new OSDArray(ServiceURLs.Count * 2);
@@ -232,6 +234,19 @@ namespace OpenSim.Framework
232 args["service_urls"] = urls; 234 args["service_urls"] = urls;
233 } 235 }
234 236
237 // again, this time the right way
238 if (ServiceURLs != null && ServiceURLs.Count > 0)
239 {
240 OSDMap urls = new OSDMap();
241 foreach (KeyValuePair<string, object> kvp in ServiceURLs)
242 {
243 //System.Console.WriteLine("XXX " + kvp.Key + "=" + kvp.Value);
244 urls[kvp.Key] = OSD.FromString((kvp.Value == null) ? string.Empty : kvp.Value.ToString());
245 }
246 args["serviceurls"] = urls;
247 }
248
249
235 return args; 250 return args;
236 } 251 }
237 252
@@ -327,7 +342,20 @@ namespace OpenSim.Framework
327 } 342 }
328 343
329 ServiceURLs = new Dictionary<string, object>(); 344 ServiceURLs = new Dictionary<string, object>();
330 if (args.ContainsKey("service_urls") && args["service_urls"] != null && (args["service_urls"]).Type == OSDType.Array) 345 // Try parse the new way, OSDMap
346 if (args.ContainsKey("serviceurls") && args["serviceurls"] != null && (args["serviceurls"]).Type == OSDType.Map)
347 {
348 OSDMap urls = (OSDMap)(args["serviceurls"]);
349 foreach (KeyValuePair<String, OSD> kvp in urls)
350 {
351 ServiceURLs[kvp.Key] = kvp.Value.AsString();
352 //System.Console.WriteLine("XXX " + kvp.Key + "=" + ServiceURLs[kvp.Key]);
353
354 }
355 }
356 // else try the old way, OSDArray
357 // OBSOLETE -- soon to be deleted
358 else if (args.ContainsKey("service_urls") && args["service_urls"] != null && (args["service_urls"]).Type == OSDType.Array)
331 { 359 {
332 OSDArray urls = (OSDArray)(args["service_urls"]); 360 OSDArray urls = (OSDArray)(args["service_urls"]);
333 for (int i = 0; i < urls.Count / 2; i++) 361 for (int i = 0; i < urls.Count / 2; i++)
diff --git a/OpenSim/Framework/Capabilities/CapsHandlers.cs b/OpenSim/Framework/Capabilities/CapsHandlers.cs
index 864e6dd..e1c800e 100644
--- a/OpenSim/Framework/Capabilities/CapsHandlers.cs
+++ b/OpenSim/Framework/Capabilities/CapsHandlers.cs
@@ -88,8 +88,8 @@ namespace OpenSim.Framework.Capabilities
88 /// handler to be removed</param> 88 /// handler to be removed</param>
89 public void Remove(string capsName) 89 public void Remove(string capsName)
90 { 90 {
91 // This line must be here, or caps will break!
92 m_httpListener.RemoveStreamHandler("POST", m_capsHandlers[capsName].Path); 91 m_httpListener.RemoveStreamHandler("POST", m_capsHandlers[capsName].Path);
92 m_httpListener.RemoveStreamHandler("GET", m_capsHandlers[capsName].Path);
93 m_capsHandlers.Remove(capsName); 93 m_capsHandlers.Remove(capsName);
94 } 94 }
95 95
diff --git a/OpenSim/Framework/Servers/HttpServer/BaseHttpServer.cs b/OpenSim/Framework/Servers/HttpServer/BaseHttpServer.cs
index d4ee7ba..4c35132 100644
--- a/OpenSim/Framework/Servers/HttpServer/BaseHttpServer.cs
+++ b/OpenSim/Framework/Servers/HttpServer/BaseHttpServer.cs
@@ -143,6 +143,11 @@ namespace OpenSim.Framework.Servers.HttpServer
143 } 143 }
144 } 144 }
145 145
146 public List<string> GetStreamHandlerKeys()
147 {
148 return new List<string>(m_streamHandlers.Keys);
149 }
150
146 private static string GetHandlerKey(string httpMethod, string path) 151 private static string GetHandlerKey(string httpMethod, string path)
147 { 152 {
148 return httpMethod + ":" + path; 153 return httpMethod + ":" + path;
@@ -179,6 +184,11 @@ namespace OpenSim.Framework.Servers.HttpServer
179 } 184 }
180 } 185 }
181 186
187 public List<string> GetXmlRpcHandlerKeys()
188 {
189 return new List<string>(m_rpcHandlers.Keys);
190 }
191
182 public bool AddHTTPHandler(string methodName, GenericHTTPMethod handler) 192 public bool AddHTTPHandler(string methodName, GenericHTTPMethod handler)
183 { 193 {
184 //m_log.DebugFormat("[BASE HTTP SERVER]: Registering {0}", methodName); 194 //m_log.DebugFormat("[BASE HTTP SERVER]: Registering {0}", methodName);
@@ -196,6 +206,12 @@ namespace OpenSim.Framework.Servers.HttpServer
196 return false; 206 return false;
197 } 207 }
198 208
209 public List<string> GetHTTPHandlerKeys()
210 {
211 return new List<string>(m_HTTPHandlers.Keys);
212 }
213
214
199 public bool AddPollServiceHTTPHandler(string methodName, GenericHTTPMethod handler, PollServiceEventArgs args) 215 public bool AddPollServiceHTTPHandler(string methodName, GenericHTTPMethod handler, PollServiceEventArgs args)
200 { 216 {
201 bool pollHandlerResult = false; 217 bool pollHandlerResult = false;
@@ -214,6 +230,12 @@ namespace OpenSim.Framework.Servers.HttpServer
214 return false; 230 return false;
215 } 231 }
216 232
233 public List<string> GetPollServiceHandlerKeys()
234 {
235 return new List<string>(m_pollHandlers.Keys);
236 }
237
238
217 // Note that the agent string is provided simply to differentiate 239 // Note that the agent string is provided simply to differentiate
218 // the handlers - it is NOT required to be an actual agent header 240 // the handlers - it is NOT required to be an actual agent header
219 // value. 241 // value.
@@ -232,6 +254,11 @@ namespace OpenSim.Framework.Servers.HttpServer
232 return false; 254 return false;
233 } 255 }
234 256
257 public List<string> GetAgentHandlerKeys()
258 {
259 return new List<string>(m_agentHandlers.Keys);
260 }
261
235 public bool AddLLSDHandler(string path, LLSDMethod handler) 262 public bool AddLLSDHandler(string path, LLSDMethod handler)
236 { 263 {
237 lock (m_llsdHandlers) 264 lock (m_llsdHandlers)
@@ -245,6 +272,11 @@ namespace OpenSim.Framework.Servers.HttpServer
245 return false; 272 return false;
246 } 273 }
247 274
275 public List<string> GetLLSDHandlerKeys()
276 {
277 return new List<string>(m_llsdHandlers.Keys);
278 }
279
248 public bool SetDefaultLLSDHandler(DefaultLLSDMethod handler) 280 public bool SetDefaultLLSDHandler(DefaultLLSDMethod handler)
249 { 281 {
250 m_defaultLlsdHandler = handler; 282 m_defaultLlsdHandler = handler;