diff options
author | Jeff Ames | 2008-03-04 06:10:24 +0000 |
---|---|---|
committer | Jeff Ames | 2008-03-04 06:10:24 +0000 |
commit | d9224e259f9c42684bad482cd1fbf23712fdbf26 (patch) | |
tree | 853baaf6f20426e020f145adafc20cc82520e036 /ThirdParty/3Di/RegionProxy/RegionProxyPlugin.cs | |
parent | Update svn properties. Minor formatting cleanup. (diff) | |
download | opensim-SC-d9224e259f9c42684bad482cd1fbf23712fdbf26.zip opensim-SC-d9224e259f9c42684bad482cd1fbf23712fdbf26.tar.gz opensim-SC-d9224e259f9c42684bad482cd1fbf23712fdbf26.tar.bz2 opensim-SC-d9224e259f9c42684bad482cd1fbf23712fdbf26.tar.xz |
More minor cleanup.
Diffstat (limited to '')
-rw-r--r-- | ThirdParty/3Di/RegionProxy/RegionProxyPlugin.cs | 44 |
1 files changed, 22 insertions, 22 deletions
diff --git a/ThirdParty/3Di/RegionProxy/RegionProxyPlugin.cs b/ThirdParty/3Di/RegionProxy/RegionProxyPlugin.cs index f1bf42e..99a6727 100644 --- a/ThirdParty/3Di/RegionProxy/RegionProxyPlugin.cs +++ b/ThirdParty/3Di/RegionProxy/RegionProxyPlugin.cs | |||
@@ -77,7 +77,7 @@ namespace OpenSim.ApplicationPlugins.RegionProxy | |||
77 | { | 77 | { |
78 | Console.WriteLine("Starting proxy"); | 78 | Console.WriteLine("Starting proxy"); |
79 | string proxyURL = openSim.ConfigSource.Configs["Network"].GetString("proxy_url", ""); | 79 | string proxyURL = openSim.ConfigSource.Configs["Network"].GetString("proxy_url", ""); |
80 | if(proxyURL.Length==0) return; | 80 | if(proxyURL.Length==0) return; |
81 | 81 | ||
82 | uint port = (uint) Int32.Parse(proxyURL.Split(new char[] { ':' })[2]); | 82 | uint port = (uint) Int32.Parse(proxyURL.Split(new char[] { ':' })[2]); |
83 | command_server = new BaseHttpServer(port); | 83 | command_server = new BaseHttpServer(port); |
@@ -112,7 +112,7 @@ namespace OpenSim.ApplicationPlugins.RegionProxy | |||
112 | } | 112 | } |
113 | 113 | ||
114 | private XmlRpcResponse AddPort(XmlRpcRequest request) | 114 | private XmlRpcResponse AddPort(XmlRpcRequest request) |
115 | { | 115 | { |
116 | try { | 116 | try { |
117 | int clientPort = (int) request.Params[0]; | 117 | int clientPort = (int) request.Params[0]; |
118 | int regionPort = (int) request.Params[1]; | 118 | int regionPort = (int) request.Params[1]; |
@@ -122,8 +122,8 @@ namespace OpenSim.ApplicationPlugins.RegionProxy | |||
122 | m_log.Error("[PROXY]"+e.Message); | 122 | m_log.Error("[PROXY]"+e.Message); |
123 | m_log.Error("[PROXY]"+e.StackTrace); | 123 | m_log.Error("[PROXY]"+e.StackTrace); |
124 | } | 124 | } |
125 | return new XmlRpcResponse(); | 125 | return new XmlRpcResponse(); |
126 | } | 126 | } |
127 | 127 | ||
128 | private XmlRpcResponse AddRegion(XmlRpcRequest request) | 128 | private XmlRpcResponse AddRegion(XmlRpcRequest request) |
129 | { | 129 | { |
@@ -137,8 +137,8 @@ namespace OpenSim.ApplicationPlugins.RegionProxy | |||
137 | m_log.Error("[PROXY]"+e.Message); | 137 | m_log.Error("[PROXY]"+e.Message); |
138 | m_log.Error("[PROXY]"+e.StackTrace); | 138 | m_log.Error("[PROXY]"+e.StackTrace); |
139 | } | 139 | } |
140 | return new XmlRpcResponse(); | 140 | return new XmlRpcResponse(); |
141 | } | 141 | } |
142 | 142 | ||
143 | private XmlRpcResponse ChangeRegion(XmlRpcRequest request) | 143 | private XmlRpcResponse ChangeRegion(XmlRpcRequest request) |
144 | { | 144 | { |
@@ -152,9 +152,9 @@ namespace OpenSim.ApplicationPlugins.RegionProxy | |||
152 | m_log.Error("[PROXY]"+e.Message); | 152 | m_log.Error("[PROXY]"+e.Message); |
153 | m_log.Error("[PROXY]"+e.StackTrace); | 153 | m_log.Error("[PROXY]"+e.StackTrace); |
154 | } | 154 | } |
155 | return new XmlRpcResponse(); | 155 | return new XmlRpcResponse(); |
156 | } | 156 | } |
157 | 157 | ||
158 | private XmlRpcResponse DeleteRegion(XmlRpcRequest request) | 158 | private XmlRpcResponse DeleteRegion(XmlRpcRequest request) |
159 | { | 159 | { |
160 | try { | 160 | try { |
@@ -165,8 +165,8 @@ namespace OpenSim.ApplicationPlugins.RegionProxy | |||
165 | m_log.Error("[PROXY]"+e.Message); | 165 | m_log.Error("[PROXY]"+e.Message); |
166 | m_log.Error("[PROXY]"+e.StackTrace); | 166 | m_log.Error("[PROXY]"+e.StackTrace); |
167 | } | 167 | } |
168 | return new XmlRpcResponse(); | 168 | return new XmlRpcResponse(); |
169 | } | 169 | } |
170 | 170 | ||
171 | private XmlRpcResponse BlockClientMessages(XmlRpcRequest request) | 171 | private XmlRpcResponse BlockClientMessages(XmlRpcRequest request) |
172 | { | 172 | { |
@@ -178,8 +178,8 @@ namespace OpenSim.ApplicationPlugins.RegionProxy | |||
178 | m_log.Error("[PROXY]"+e.Message); | 178 | m_log.Error("[PROXY]"+e.Message); |
179 | m_log.Error("[PROXY]"+e.StackTrace); | 179 | m_log.Error("[PROXY]"+e.StackTrace); |
180 | } | 180 | } |
181 | return new XmlRpcResponse(); | 181 | return new XmlRpcResponse(); |
182 | } | 182 | } |
183 | 183 | ||
184 | private XmlRpcResponse UnblockClientMessages(XmlRpcRequest request) | 184 | private XmlRpcResponse UnblockClientMessages(XmlRpcRequest request) |
185 | { | 185 | { |
@@ -191,8 +191,8 @@ namespace OpenSim.ApplicationPlugins.RegionProxy | |||
191 | m_log.Error("[PROXY]"+e.Message); | 191 | m_log.Error("[PROXY]"+e.Message); |
192 | m_log.Error("[PROXY]"+e.StackTrace); | 192 | m_log.Error("[PROXY]"+e.StackTrace); |
193 | } | 193 | } |
194 | return new XmlRpcResponse(); | 194 | return new XmlRpcResponse(); |
195 | } | 195 | } |
196 | } | 196 | } |
197 | 197 | ||
198 | 198 | ||
@@ -322,14 +322,14 @@ namespace OpenSim.ApplicationPlugins.RegionProxy | |||
322 | data.regions.Clear(); | 322 | data.regions.Clear(); |
323 | data.regions.Add(new IPEndPoint(IPAddress.Parse(newRegionUrl), newRegionPort)); | 323 | data.regions.Add(new IPEndPoint(IPAddress.Parse(newRegionUrl), newRegionPort)); |
324 | } | 324 | } |
325 | 325 | ||
326 | public void DeleteRegion(int oldRegionPort, string oldRegionUrl) | 326 | public void DeleteRegion(int oldRegionPort, string oldRegionUrl) |
327 | { | 327 | { |
328 | m_log.InfoFormat("[PROXY]"+"DeleteRegion {0} {1}", oldRegionPort, oldRegionUrl); | 328 | m_log.InfoFormat("[PROXY]"+"DeleteRegion {0} {1}", oldRegionPort, oldRegionUrl); |
329 | EndPoint regionEP = new IPEndPoint(IPAddress.Parse(oldRegionUrl), oldRegionPort); | 329 | EndPoint regionEP = new IPEndPoint(IPAddress.Parse(oldRegionUrl), oldRegionPort); |
330 | EndPoint client = proxy_map.GetClient(regionEP); | 330 | EndPoint client = proxy_map.GetClient(regionEP); |
331 | ProxyMap.RegionData data = proxy_map.GetRegionData(client); | 331 | ProxyMap.RegionData data = proxy_map.GetRegionData(client); |
332 | data.regions.Remove(regionEP); | 332 | data.regions.Remove(regionEP); |
333 | } | 333 | } |
334 | 334 | ||
335 | public void AddPort(int clientPort, int regionPort, string regionUrl) | 335 | public void AddPort(int clientPort, int regionPort, string regionUrl) |
@@ -405,10 +405,10 @@ namespace OpenSim.ApplicationPlugins.RegionProxy | |||
405 | try | 405 | try |
406 | { | 406 | { |
407 | int numBytes = sd.server.EndReceiveFrom(result, ref sd.senderEP); | 407 | int numBytes = sd.server.EndReceiveFrom(result, ref sd.senderEP); |
408 | if (numBytes > 0) | 408 | if (numBytes > 0) |
409 | { | 409 | { |
410 | SendMessage(sd.recvBuffer, numBytes, sd.senderEP, sd); | 410 | SendMessage(sd.recvBuffer, numBytes, sd.senderEP, sd); |
411 | } | 411 | } |
412 | } | 412 | } |
413 | catch (Exception e) | 413 | catch (Exception e) |
414 | { | 414 | { |