aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Framework
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--OpenSim/Framework/OSChatMessage.cs7
-rw-r--r--OpenSim/Framework/Servers/HttpServer/PollServiceRequestManager.cs7
-rw-r--r--OpenSim/Framework/Servers/HttpServer/PollServiceWorkerThread.cs13
3 files changed, 22 insertions, 5 deletions
diff --git a/OpenSim/Framework/OSChatMessage.cs b/OpenSim/Framework/OSChatMessage.cs
index 54fa275..7450be2 100644
--- a/OpenSim/Framework/OSChatMessage.cs
+++ b/OpenSim/Framework/OSChatMessage.cs
@@ -51,6 +51,7 @@ namespace OpenSim.Framework
51 protected object m_senderObject; 51 protected object m_senderObject;
52 protected ChatTypeEnum m_type; 52 protected ChatTypeEnum m_type;
53 protected UUID m_fromID; 53 protected UUID m_fromID;
54 protected UUID m_destination = UUID.Zero;
54 55
55 public OSChatMessage() 56 public OSChatMessage()
56 { 57 {
@@ -131,6 +132,12 @@ namespace OpenSim.Framework
131 set { m_fromID = value; } 132 set { m_fromID = value; }
132 } 133 }
133 134
135 public UUID Destination
136 {
137 get { return m_destination; }
138 set { m_destination = value; }
139 }
140
134 /// <summary> 141 /// <summary>
135 /// 142 ///
136 /// </summary> 143 /// </summary>
diff --git a/OpenSim/Framework/Servers/HttpServer/PollServiceRequestManager.cs b/OpenSim/Framework/Servers/HttpServer/PollServiceRequestManager.cs
index 3252251..5bc85ff 100644
--- a/OpenSim/Framework/Servers/HttpServer/PollServiceRequestManager.cs
+++ b/OpenSim/Framework/Servers/HttpServer/PollServiceRequestManager.cs
@@ -41,6 +41,7 @@ namespace OpenSim.Framework.Servers.HttpServer
41 41
42 private readonly BaseHttpServer m_server; 42 private readonly BaseHttpServer m_server;
43 private static Queue m_requests = Queue.Synchronized(new Queue()); 43 private static Queue m_requests = Queue.Synchronized(new Queue());
44 private static ManualResetEvent m_ev = new ManualResetEvent(false);
44 private uint m_WorkerThreadCount = 0; 45 private uint m_WorkerThreadCount = 0;
45 private Thread[] m_workerThreads; 46 private Thread[] m_workerThreads;
46 private PollServiceWorkerThread[] m_PollServiceWorkerThreads; 47 private PollServiceWorkerThread[] m_PollServiceWorkerThreads;
@@ -90,15 +91,17 @@ namespace OpenSim.Framework.Servers.HttpServer
90 { 91 {
91 lock (m_requests) 92 lock (m_requests)
92 m_requests.Enqueue(req); 93 m_requests.Enqueue(req);
94 m_ev.Set();
93 } 95 }
94 96
95 public void ThreadStart() 97 public void ThreadStart()
96 { 98 {
97 while (m_running) 99 while (m_running)
98 { 100 {
101 m_ev.WaitOne(1000);
102 m_ev.Reset();
99 Watchdog.UpdateThread(); 103 Watchdog.UpdateThread();
100 ProcessQueuedRequests(); 104 ProcessQueuedRequests();
101 Thread.Sleep(1000);
102 } 105 }
103 } 106 }
104 107
@@ -154,4 +157,4 @@ namespace OpenSim.Framework.Servers.HttpServer
154 m_running = false; 157 m_running = false;
155 } 158 }
156 } 159 }
157} \ No newline at end of file 160}
diff --git a/OpenSim/Framework/Servers/HttpServer/PollServiceWorkerThread.cs b/OpenSim/Framework/Servers/HttpServer/PollServiceWorkerThread.cs
index 35a8dee..d305782 100644
--- a/OpenSim/Framework/Servers/HttpServer/PollServiceWorkerThread.cs
+++ b/OpenSim/Framework/Servers/HttpServer/PollServiceWorkerThread.cs
@@ -89,8 +89,15 @@ namespace OpenSim.Framework.Servers.HttpServer
89 continue; 89 continue;
90 } 90 }
91 91
92 Hashtable responsedata = req.PollServiceArgs.GetEvents(req.RequestID, req.PollServiceArgs.Id, str.ReadToEnd()); 92 try
93 DoHTTPGruntWork(m_server, req, responsedata); 93 {
94 Hashtable responsedata = req.PollServiceArgs.GetEvents(req.RequestID, req.PollServiceArgs.Id, str.ReadToEnd());
95 DoHTTPGruntWork(m_server, req, responsedata);
96 }
97 catch (ObjectDisposedException) // Browser aborted before we could read body, server closed the stream
98 {
99 // Ignore it, no need to reply
100 }
94 } 101 }
95 else 102 else
96 { 103 {
@@ -161,4 +168,4 @@ namespace OpenSim.Framework.Servers.HttpServer
161 } 168 }
162 } 169 }
163 } 170 }
164} \ No newline at end of file 171}