aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Framework/Servers/BaseHttpServer.cs
diff options
context:
space:
mode:
authorJustin Clarke Casey2009-03-19 16:51:21 +0000
committerJustin Clarke Casey2009-03-19 16:51:21 +0000
commit1e6056c24b1a474a3bd2f95544326db83558c691 (patch)
treed6639f94d2ca5ffccadd50b9eb53896a0d6769c8 /OpenSim/Framework/Servers/BaseHttpServer.cs
parent* Add documentation to BaseHttpServer.AddHTTPHandler() (diff)
downloadopensim-SC_OLD-1e6056c24b1a474a3bd2f95544326db83558c691.zip
opensim-SC_OLD-1e6056c24b1a474a3bd2f95544326db83558c691.tar.gz
opensim-SC_OLD-1e6056c24b1a474a3bd2f95544326db83558c691.tar.bz2
opensim-SC_OLD-1e6056c24b1a474a3bd2f95544326db83558c691.tar.xz
* Add necessary locking to BaseHttpServer.RemoveHTTPHandler()
Diffstat (limited to 'OpenSim/Framework/Servers/BaseHttpServer.cs')
-rw-r--r--OpenSim/Framework/Servers/BaseHttpServer.cs21
1 files changed, 14 insertions, 7 deletions
diff --git a/OpenSim/Framework/Servers/BaseHttpServer.cs b/OpenSim/Framework/Servers/BaseHttpServer.cs
index 18b53b1..efa71f2 100644
--- a/OpenSim/Framework/Servers/BaseHttpServer.cs
+++ b/OpenSim/Framework/Servers/BaseHttpServer.cs
@@ -180,7 +180,7 @@ namespace OpenSim.Framework.Servers
180 /// 180 ///
181 /// http://<hostname>:<port><method> 181 /// http://<hostname>:<port><method>
182 /// 182 ///
183 /// if the method starts with a slash. For example, AddHTTPHandler("/object/", ...) on a standalone region 183 /// if the method name starts with a slash. For example, AddHTTPHandler("/object/", ...) on a standalone region
184 /// server will register a handler that can be invoked with either 184 /// server will register a handler that can be invoked with either
185 /// 185 ///
186 /// http://localhost:9000/?method=/object/ 186 /// http://localhost:9000/?method=/object/
@@ -1504,15 +1504,23 @@ namespace OpenSim.Framework.Servers
1504 lock (m_streamHandlers) m_streamHandlers.Remove(handlerKey); 1504 lock (m_streamHandlers) m_streamHandlers.Remove(handlerKey);
1505 } 1505 }
1506 1506
1507 /// <summary>
1508 /// Remove an HTTP handler
1509 /// </summary>
1510 /// <param name="httpMethod"></param>
1511 /// <param name="path"></param>
1507 public void RemoveHTTPHandler(string httpMethod, string path) 1512 public void RemoveHTTPHandler(string httpMethod, string path)
1508 { 1513 {
1509 if (httpMethod != null && httpMethod.Length == 0) 1514 lock (m_HTTPHandlers)
1510 { 1515 {
1511 m_HTTPHandlers.Remove(path); 1516 if (httpMethod != null && httpMethod.Length == 0)
1512 return; 1517 {
1518 m_HTTPHandlers.Remove(path);
1519 return;
1520 }
1521
1522 m_HTTPHandlers.Remove(GetHandlerKey(httpMethod, path));
1513 } 1523 }
1514
1515 m_HTTPHandlers.Remove(GetHandlerKey(httpMethod, path));
1516 } 1524 }
1517 1525
1518 /// <summary> 1526 /// <summary>
@@ -1540,7 +1548,6 @@ namespace OpenSim.Framework.Servers
1540 1548
1541 public bool RemoveLLSDHandler(string path, LLSDMethod handler) 1549 public bool RemoveLLSDHandler(string path, LLSDMethod handler)
1542 { 1550 {
1543
1544 try 1551 try
1545 { 1552 {
1546 if (handler == m_llsdHandlers[path]) 1553 if (handler == m_llsdHandlers[path])