diff options
author | Adam Frisby | 2008-04-21 07:09:17 +0000 |
---|---|---|
committer | Adam Frisby | 2008-04-21 07:09:17 +0000 |
commit | fef3b3689492dea63693c964bcdbec9f5137eb5e (patch) | |
tree | 7791eef001d85d3e1de863a68f26ff9434d062ca /OpenSim/Region/Communications/OGS1 | |
parent | * Terrain Module code has been reformatted to comply with guidelines. (diff) | |
download | opensim-SC_OLD-fef3b3689492dea63693c964bcdbec9f5137eb5e.zip opensim-SC_OLD-fef3b3689492dea63693c964bcdbec9f5137eb5e.tar.gz opensim-SC_OLD-fef3b3689492dea63693c964bcdbec9f5137eb5e.tar.bz2 opensim-SC_OLD-fef3b3689492dea63693c964bcdbec9f5137eb5e.tar.xz |
* Optimised using statements and namespace references across entire project (this took a while to run).
Diffstat (limited to '')
4 files changed, 22 insertions, 15 deletions
diff --git a/OpenSim/Region/Communications/OGS1/OGS1GridServices.cs b/OpenSim/Region/Communications/OGS1/OGS1GridServices.cs index 1135ddd..eada868 100644 --- a/OpenSim/Region/Communications/OGS1/OGS1GridServices.cs +++ b/OpenSim/Region/Communications/OGS1/OGS1GridServices.cs | |||
@@ -30,15 +30,17 @@ using System.Collections; | |||
30 | using System.Collections.Generic; | 30 | using System.Collections.Generic; |
31 | using System.Net; | 31 | using System.Net; |
32 | using System.Net.Sockets; | 32 | using System.Net.Sockets; |
33 | using System.Reflection; | ||
33 | using System.Runtime.Remoting; | 34 | using System.Runtime.Remoting; |
34 | using System.Runtime.Remoting.Channels; | 35 | using System.Runtime.Remoting.Channels; |
35 | using System.Runtime.Remoting.Channels.Tcp; | 36 | using System.Runtime.Remoting.Channels.Tcp; |
36 | using System.Security.Authentication; | 37 | using System.Security.Authentication; |
38 | using System.Threading; | ||
37 | using libsecondlife; | 39 | using libsecondlife; |
40 | using log4net; | ||
38 | using Nwc.XmlRpc; | 41 | using Nwc.XmlRpc; |
39 | using OpenSim.Framework; | 42 | using OpenSim.Framework; |
40 | using OpenSim.Framework.Communications; | 43 | using OpenSim.Framework.Communications; |
41 | using OpenSim.Framework.Console; | ||
42 | using OpenSim.Framework.Servers; | 44 | using OpenSim.Framework.Servers; |
43 | using OpenSim.Region.Communications.Local; | 45 | using OpenSim.Region.Communications.Local; |
44 | 46 | ||
@@ -46,7 +48,7 @@ namespace OpenSim.Region.Communications.OGS1 | |||
46 | { | 48 | { |
47 | public class OGS1GridServices : IGridServices, IInterRegionCommunications | 49 | public class OGS1GridServices : IGridServices, IInterRegionCommunications |
48 | { | 50 | { |
49 | private static readonly log4net.ILog m_log = log4net.LogManager.GetLogger(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType); | 51 | private static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType); |
50 | 52 | ||
51 | private LocalBackEndServices m_localBackend = new LocalBackEndServices(); | 53 | private LocalBackEndServices m_localBackend = new LocalBackEndServices(); |
52 | private Dictionary<ulong, RegionInfo> m_remoteRegionInfoCache = new Dictionary<ulong, RegionInfo>(); | 54 | private Dictionary<ulong, RegionInfo> m_remoteRegionInfoCache = new Dictionary<ulong, RegionInfo>(); |
@@ -1461,7 +1463,7 @@ namespace OpenSim.Region.Communications.OGS1 | |||
1461 | Socket socket = new Socket(AddressFamily.InterNetwork, SocketType.Stream, ProtocolType.Tcp); | 1463 | Socket socket = new Socket(AddressFamily.InterNetwork, SocketType.Stream, ProtocolType.Tcp); |
1462 | IAsyncResult ar = socket.BeginConnect(m_EndPoint, ConnectedMethodCallback, socket); | 1464 | IAsyncResult ar = socket.BeginConnect(m_EndPoint, ConnectedMethodCallback, socket); |
1463 | ar.AsyncWaitHandle.WaitOne(timeOut*1000, false); | 1465 | ar.AsyncWaitHandle.WaitOne(timeOut*1000, false); |
1464 | System.Threading.Thread.Sleep(500); | 1466 | Thread.Sleep(500); |
1465 | } | 1467 | } |
1466 | 1468 | ||
1467 | public bool Available | 1469 | public bool Available |
diff --git a/OpenSim/Region/Communications/OGS1/OGS1InterSimComms.cs b/OpenSim/Region/Communications/OGS1/OGS1InterSimComms.cs index 2e106d7..8285fb1 100644 --- a/OpenSim/Region/Communications/OGS1/OGS1InterSimComms.cs +++ b/OpenSim/Region/Communications/OGS1/OGS1InterSimComms.cs | |||
@@ -26,8 +26,10 @@ | |||
26 | */ | 26 | */ |
27 | 27 | ||
28 | using System; | 28 | using System; |
29 | using System.Reflection; | ||
29 | using System.Runtime.Remoting; | 30 | using System.Runtime.Remoting; |
30 | using libsecondlife; | 31 | using libsecondlife; |
32 | using log4net; | ||
31 | using OpenSim.Framework; | 33 | using OpenSim.Framework; |
32 | 34 | ||
33 | namespace OpenSim.Region.Communications.OGS1 | 35 | namespace OpenSim.Region.Communications.OGS1 |
@@ -153,7 +155,7 @@ namespace OpenSim.Region.Communications.OGS1 | |||
153 | 155 | ||
154 | public class OGS1InterRegionRemoting : MarshalByRefObject | 156 | public class OGS1InterRegionRemoting : MarshalByRefObject |
155 | { | 157 | { |
156 | private static readonly log4net.ILog m_log = log4net.LogManager.GetLogger(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType); | 158 | private static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType); |
157 | 159 | ||
158 | public OGS1InterRegionRemoting() | 160 | public OGS1InterRegionRemoting() |
159 | { | 161 | { |
diff --git a/OpenSim/Region/Communications/OGS1/OGS1InventoryService.cs b/OpenSim/Region/Communications/OGS1/OGS1InventoryService.cs index fbe905c..e0167a7 100644 --- a/OpenSim/Region/Communications/OGS1/OGS1InventoryService.cs +++ b/OpenSim/Region/Communications/OGS1/OGS1InventoryService.cs | |||
@@ -27,19 +27,21 @@ | |||
27 | 27 | ||
28 | using System; | 28 | using System; |
29 | using System.Collections.Generic; | 29 | using System.Collections.Generic; |
30 | using System.Net; | ||
31 | using System.Reflection; | ||
30 | using libsecondlife; | 32 | using libsecondlife; |
33 | using log4net; | ||
31 | using OpenSim.Framework; | 34 | using OpenSim.Framework; |
32 | using OpenSim.Framework.Communications; | 35 | using OpenSim.Framework.Communications; |
33 | using OpenSim.Framework.Communications.Cache; | 36 | using OpenSim.Framework.Communications.Cache; |
34 | using OpenSim.Framework.Console; | ||
35 | using OpenSim.Framework.Servers; | 37 | using OpenSim.Framework.Servers; |
36 | 38 | ||
37 | namespace OpenSim.Region.Communications.OGS1 | 39 | namespace OpenSim.Region.Communications.OGS1 |
38 | { | 40 | { |
39 | public class OGS1InventoryService : IInventoryServices | 41 | public class OGS1InventoryService : IInventoryServices |
40 | { | 42 | { |
41 | private static readonly log4net.ILog m_log | 43 | private static readonly ILog m_log |
42 | = log4net.LogManager.GetLogger(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType); | 44 | = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType); |
43 | 45 | ||
44 | private string _inventoryServerUrl; | 46 | private string _inventoryServerUrl; |
45 | private Dictionary<LLUUID, InventoryRequest> m_RequestingInventory = new Dictionary<LLUUID, InventoryRequest>(); | 47 | private Dictionary<LLUUID, InventoryRequest> m_RequestingInventory = new Dictionary<LLUUID, InventoryRequest>(); |
@@ -71,7 +73,7 @@ namespace OpenSim.Region.Communications.OGS1 | |||
71 | 73 | ||
72 | requester.BeginPostObject<Guid>(_inventoryServerUrl + "/GetInventory/", userID.UUID); | 74 | requester.BeginPostObject<Guid>(_inventoryServerUrl + "/GetInventory/", userID.UUID); |
73 | } | 75 | } |
74 | catch (System.Net.WebException e) | 76 | catch (WebException e) |
75 | { | 77 | { |
76 | m_log.ErrorFormat("[OGS1 INVENTORY SERVICE]: Request inventory operation failed, {0} {1}", | 78 | m_log.ErrorFormat("[OGS1 INVENTORY SERVICE]: Request inventory operation failed, {0} {1}", |
77 | e.Source, e.Message); | 79 | e.Source, e.Message); |
@@ -153,7 +155,7 @@ namespace OpenSim.Region.Communications.OGS1 | |||
153 | SynchronousRestObjectPoster.BeginPostObject<InventoryFolderBase, bool>( | 155 | SynchronousRestObjectPoster.BeginPostObject<InventoryFolderBase, bool>( |
154 | "POST", _inventoryServerUrl + "/NewFolder/", folder); | 156 | "POST", _inventoryServerUrl + "/NewFolder/", folder); |
155 | } | 157 | } |
156 | catch (System.Net.WebException e) | 158 | catch (WebException e) |
157 | { | 159 | { |
158 | m_log.ErrorFormat("[OGS1 INVENTORY SERVICE]: Add new inventory folder operation failed, {0} {1}", | 160 | m_log.ErrorFormat("[OGS1 INVENTORY SERVICE]: Add new inventory folder operation failed, {0} {1}", |
159 | e.Source, e.Message); | 161 | e.Source, e.Message); |
@@ -167,7 +169,7 @@ namespace OpenSim.Region.Communications.OGS1 | |||
167 | SynchronousRestObjectPoster.BeginPostObject<InventoryFolderBase, bool>( | 169 | SynchronousRestObjectPoster.BeginPostObject<InventoryFolderBase, bool>( |
168 | "POST", _inventoryServerUrl + "/MoveFolder/", folder); | 170 | "POST", _inventoryServerUrl + "/MoveFolder/", folder); |
169 | } | 171 | } |
170 | catch (System.Net.WebException e) | 172 | catch (WebException e) |
171 | { | 173 | { |
172 | m_log.ErrorFormat("[OGS1 INVENTORY SERVICE]: Move inventory folder operation failed, {0} {1}", | 174 | m_log.ErrorFormat("[OGS1 INVENTORY SERVICE]: Move inventory folder operation failed, {0} {1}", |
173 | e.Source, e.Message); | 175 | e.Source, e.Message); |
@@ -181,7 +183,7 @@ namespace OpenSim.Region.Communications.OGS1 | |||
181 | SynchronousRestObjectPoster.BeginPostObject<InventoryItemBase, bool>( | 183 | SynchronousRestObjectPoster.BeginPostObject<InventoryItemBase, bool>( |
182 | "POST", _inventoryServerUrl + "/NewItem/", item); | 184 | "POST", _inventoryServerUrl + "/NewItem/", item); |
183 | } | 185 | } |
184 | catch (System.Net.WebException e) | 186 | catch (WebException e) |
185 | { | 187 | { |
186 | m_log.ErrorFormat("[OGS1 INVENTORY SERVICE]: Add new inventory item operation failed, {0} {1}", | 188 | m_log.ErrorFormat("[OGS1 INVENTORY SERVICE]: Add new inventory item operation failed, {0} {1}", |
187 | e.Source, e.Message); | 189 | e.Source, e.Message); |
@@ -195,7 +197,7 @@ namespace OpenSim.Region.Communications.OGS1 | |||
195 | SynchronousRestObjectPoster.BeginPostObject<InventoryItemBase, bool>( | 197 | SynchronousRestObjectPoster.BeginPostObject<InventoryItemBase, bool>( |
196 | "POST", _inventoryServerUrl + "/DeleteItem/", item); | 198 | "POST", _inventoryServerUrl + "/DeleteItem/", item); |
197 | } | 199 | } |
198 | catch (System.Net.WebException e) | 200 | catch (WebException e) |
199 | { | 201 | { |
200 | m_log.ErrorFormat("[OGS1 INVENTORY SERVICE]: Delete inventory item operation failed, {0} {1}", | 202 | m_log.ErrorFormat("[OGS1 INVENTORY SERVICE]: Delete inventory item operation failed, {0} {1}", |
201 | e.Source, e.Message); | 203 | e.Source, e.Message); |
diff --git a/OpenSim/Region/Communications/OGS1/OGS1UserServices.cs b/OpenSim/Region/Communications/OGS1/OGS1UserServices.cs index c140213..56b0e8c 100644 --- a/OpenSim/Region/Communications/OGS1/OGS1UserServices.cs +++ b/OpenSim/Region/Communications/OGS1/OGS1UserServices.cs | |||
@@ -29,17 +29,18 @@ using System; | |||
29 | using System.Collections; | 29 | using System.Collections; |
30 | using System.Collections.Generic; | 30 | using System.Collections.Generic; |
31 | using System.Net; | 31 | using System.Net; |
32 | using System.Reflection; | ||
32 | using System.Text.RegularExpressions; | 33 | using System.Text.RegularExpressions; |
33 | using libsecondlife; | 34 | using libsecondlife; |
35 | using log4net; | ||
34 | using Nwc.XmlRpc; | 36 | using Nwc.XmlRpc; |
35 | using OpenSim.Framework; | 37 | using OpenSim.Framework; |
36 | using OpenSim.Framework.Console; | ||
37 | 38 | ||
38 | namespace OpenSim.Region.Communications.OGS1 | 39 | namespace OpenSim.Region.Communications.OGS1 |
39 | { | 40 | { |
40 | public class OGS1UserServices : IUserService | 41 | public class OGS1UserServices : IUserService |
41 | { | 42 | { |
42 | private static readonly log4net.ILog m_log = log4net.LogManager.GetLogger(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType); | 43 | private static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType); |
43 | 44 | ||
44 | private CommunicationsOGS1 m_parent; | 45 | private CommunicationsOGS1 m_parent; |
45 | 46 | ||
@@ -158,7 +159,7 @@ namespace OpenSim.Region.Communications.OGS1 | |||
158 | { | 159 | { |
159 | XmlRpcResponse resp = req.Send(m_parent.NetworkServersInfo.UserURL, 3000); | 160 | XmlRpcResponse resp = req.Send(m_parent.NetworkServersInfo.UserURL, 3000); |
160 | } | 161 | } |
161 | catch (System.Net.WebException) | 162 | catch (WebException) |
162 | { | 163 | { |
163 | m_log.Warn("[LOGOFF]: Unable to notify grid server of user logoff"); | 164 | m_log.Warn("[LOGOFF]: Unable to notify grid server of user logoff"); |
164 | } | 165 | } |