diff options
author | UbitUmarov | 2018-01-31 15:19:16 +0000 |
---|---|---|
committer | UbitUmarov | 2018-01-31 15:19:16 +0000 |
commit | 3635943d39c337f75a3be48fdb4be2cae20e4bd4 (patch) | |
tree | 2d56e43c6c3196ac322bcc7114949291b3a59bd5 /OpenSim/Region/ClientStack/Linden/Caps/FetchInventory2Module.cs | |
parent | disable the new Cap_FetchLib2 because viewers do not suport it for opensim. T... (diff) | |
download | opensim-SC-3635943d39c337f75a3be48fdb4be2cae20e4bd4.zip opensim-SC-3635943d39c337f75a3be48fdb4be2cae20e4bd4.tar.gz opensim-SC-3635943d39c337f75a3be48fdb4be2cae20e4bd4.tar.bz2 opensim-SC-3635943d39c337f75a3be48fdb4be2cae20e4bd4.tar.xz |
remove cap FetchLib2 suport code
Diffstat (limited to '')
-rw-r--r-- | OpenSim/Region/ClientStack/Linden/Caps/FetchInventory2Module.cs | 35 |
1 files changed, 0 insertions, 35 deletions
diff --git a/OpenSim/Region/ClientStack/Linden/Caps/FetchInventory2Module.cs b/OpenSim/Region/ClientStack/Linden/Caps/FetchInventory2Module.cs index 0ea4bdb..eef9435 100644 --- a/OpenSim/Region/ClientStack/Linden/Caps/FetchInventory2Module.cs +++ b/OpenSim/Region/ClientStack/Linden/Caps/FetchInventory2Module.cs | |||
@@ -47,14 +47,12 @@ namespace OpenSim.Region.ClientStack.Linden | |||
47 | // private static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType); | 47 | // private static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType); |
48 | 48 | ||
49 | public bool Enabled { get; private set; } | 49 | public bool Enabled { get; private set; } |
50 | private bool m_enabledLib; | ||
51 | 50 | ||
52 | private Scene m_scene; | 51 | private Scene m_scene; |
53 | 52 | ||
54 | private IInventoryService m_inventoryService; | 53 | private IInventoryService m_inventoryService; |
55 | private ILibraryService m_LibraryService; | 54 | private ILibraryService m_LibraryService; |
56 | private string m_fetchInventory2Url; | 55 | private string m_fetchInventory2Url; |
57 | private string m_fetchLib2Url; | ||
58 | 56 | ||
59 | #region ISharedRegionModule Members | 57 | #region ISharedRegionModule Members |
60 | 58 | ||
@@ -65,12 +63,9 @@ namespace OpenSim.Region.ClientStack.Linden | |||
65 | return; | 63 | return; |
66 | 64 | ||
67 | m_fetchInventory2Url = config.GetString("Cap_FetchInventory2", string.Empty); | 65 | m_fetchInventory2Url = config.GetString("Cap_FetchInventory2", string.Empty); |
68 | m_fetchLib2Url = config.GetString("Cap_FetchLib2", "localhost"); | ||
69 | 66 | ||
70 | if (m_fetchInventory2Url != string.Empty) | 67 | if (m_fetchInventory2Url != string.Empty) |
71 | Enabled = true; | 68 | Enabled = true; |
72 | if (m_fetchInventory2Url != string.Empty) | ||
73 | m_enabledLib = true; | ||
74 | } | 69 | } |
75 | 70 | ||
76 | public void AddRegion(Scene s) | 71 | public void AddRegion(Scene s) |
@@ -116,8 +111,6 @@ namespace OpenSim.Region.ClientStack.Linden | |||
116 | private void RegisterCaps(UUID agentID, Caps caps) | 111 | private void RegisterCaps(UUID agentID, Caps caps) |
117 | { | 112 | { |
118 | RegisterFetchCap(agentID, caps, "FetchInventory2", m_fetchInventory2Url); | 113 | RegisterFetchCap(agentID, caps, "FetchInventory2", m_fetchInventory2Url); |
119 | if(m_enabledLib) | ||
120 | RegisterFetchLibCap(agentID, caps, "FetchLib2", m_fetchLib2Url); | ||
121 | } | 114 | } |
122 | 115 | ||
123 | private void RegisterFetchCap(UUID agentID, Caps caps, string capName, string url) | 116 | private void RegisterFetchCap(UUID agentID, Caps caps, string capName, string url) |
@@ -147,33 +140,5 @@ namespace OpenSim.Region.ClientStack.Linden | |||
147 | // "[FETCH INVENTORY2 MODULE]: Registered capability {0} at {1} in region {2} for {3}", | 140 | // "[FETCH INVENTORY2 MODULE]: Registered capability {0} at {1} in region {2} for {3}", |
148 | // capName, capUrl, m_scene.RegionInfo.RegionName, agentID); | 141 | // capName, capUrl, m_scene.RegionInfo.RegionName, agentID); |
149 | } | 142 | } |
150 | |||
151 | private void RegisterFetchLibCap(UUID agentID, Caps caps, string capName, string url) | ||
152 | { | ||
153 | string capUrl; | ||
154 | |||
155 | if (url == "localhost") | ||
156 | { | ||
157 | capUrl = "/CAPS/" + UUID.Random(); | ||
158 | |||
159 | FetchLib2Handler fetchHandler = new FetchLib2Handler(m_inventoryService, m_LibraryService, agentID); | ||
160 | |||
161 | IRequestHandler reqHandler | ||
162 | = new RestStreamHandler( | ||
163 | "POST", capUrl, fetchHandler.FetchLibRequest, capName, agentID.ToString()); | ||
164 | |||
165 | caps.RegisterHandler(capName, reqHandler); | ||
166 | } | ||
167 | else | ||
168 | { | ||
169 | capUrl = url; | ||
170 | |||
171 | caps.RegisterHandler(capName, capUrl); | ||
172 | } | ||
173 | |||
174 | // m_log.DebugFormat( | ||
175 | // "[FETCH INVENTORY2 MODULE]: Registered capability {0} at {1} in region {2} for {3}", | ||
176 | // capName, capUrl, m_scene.RegionInfo.RegionName, agentID); | ||
177 | } | ||
178 | } | 143 | } |
179 | } | 144 | } |