SimulationServiceConnector.cs 23 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630
  1. /*
  2. * Copyright (c) Contributors, http://opensimulator.org/
  3. * See CONTRIBUTORS.TXT for a full list of copyright holders.
  4. *
  5. * Redistribution and use in source and binary forms, with or without
  6. * modification, are permitted provided that the following conditions are met:
  7. * * Redistributions of source code must retain the above copyright
  8. * notice, this list of conditions and the following disclaimer.
  9. * * Redistributions in binary form must reproduce the above copyright
  10. * notice, this list of conditions and the following disclaimer in the
  11. * documentation and/or other materials provided with the distribution.
  12. * * Neither the name of the OpenSimulator Project nor the
  13. * names of its contributors may be used to endorse or promote products
  14. * derived from this software without specific prior written permission.
  15. *
  16. * THIS SOFTWARE IS PROVIDED BY THE DEVELOPERS ``AS IS'' AND ANY
  17. * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
  18. * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
  19. * DISCLAIMED. IN NO EVENT SHALL THE CONTRIBUTORS BE LIABLE FOR ANY
  20. * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
  21. * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
  22. * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
  23. * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
  24. * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
  25. * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
  26. */
  27. using System;
  28. using System.Collections.Generic;
  29. using System.IO;
  30. using System.Net;
  31. using System.Reflection;
  32. using System.Text;
  33. using OpenSim.Framework;
  34. using OpenSim.Services.Interfaces;
  35. using GridRegion = OpenSim.Services.Interfaces.GridRegion;
  36. using OpenMetaverse;
  37. using OpenMetaverse.StructuredData;
  38. using log4net;
  39. using Nini.Config;
  40. namespace OpenSim.Services.Connectors.Simulation
  41. {
  42. public class SimulationServiceConnector : ISimulationService
  43. {
  44. private static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType);
  45. //private GridRegion m_Region;
  46. public SimulationServiceConnector()
  47. {
  48. }
  49. public SimulationServiceConnector(IConfigSource config)
  50. {
  51. //m_Region = region;
  52. }
  53. public IScene GetScene(ulong regionHandle)
  54. {
  55. return null;
  56. }
  57. public ISimulationService GetInnerService()
  58. {
  59. return null;
  60. }
  61. #region Agents
  62. protected virtual string AgentPath()
  63. {
  64. return "/agent/";
  65. }
  66. public bool CreateAgent(GridRegion destination, AgentCircuitData aCircuit, uint flags, out string reason)
  67. {
  68. HttpWebRequest AgentCreateRequest = null;
  69. reason = String.Empty;
  70. if (SendRequest(destination, aCircuit, flags, out reason, out AgentCreateRequest))
  71. {
  72. string response = GetResponse(AgentCreateRequest, out reason);
  73. bool success = true;
  74. UnpackResponse(response, out success, out reason);
  75. return success;
  76. }
  77. return false;
  78. }
  79. protected bool SendRequest(GridRegion destination, AgentCircuitData aCircuit, uint flags, out string reason, out HttpWebRequest AgentCreateRequest)
  80. {
  81. reason = String.Empty;
  82. AgentCreateRequest = null;
  83. if (destination == null)
  84. {
  85. reason = "Destination is null";
  86. m_log.Debug("[REMOTE SIMULATION CONNECTOR]: Given destination is null");
  87. return false;
  88. }
  89. // Eventually, we want to use a caps url instead of the agentID
  90. string uri = string.Empty;
  91. try
  92. {
  93. uri = "http://" + destination.ExternalEndPoint.Address + ":" + destination.HttpPort + AgentPath() + aCircuit.AgentID + "/";
  94. }
  95. catch (Exception e)
  96. {
  97. m_log.Debug("[REMOTE SIMULATION CONNECTOR]: Unable to resolve external endpoint on agent create. Reason: " + e.Message);
  98. reason = e.Message;
  99. return false;
  100. }
  101. //Console.WriteLine(" >>> DoCreateChildAgentCall <<< " + uri);
  102. AgentCreateRequest = (HttpWebRequest)WebRequest.Create(uri);
  103. AgentCreateRequest.Method = "POST";
  104. AgentCreateRequest.ContentType = "application/json";
  105. AgentCreateRequest.Timeout = 10000;
  106. //AgentCreateRequest.KeepAlive = false;
  107. //AgentCreateRequest.Headers.Add("Authorization", authKey);
  108. // Fill it in
  109. OSDMap args = PackCreateAgentArguments(aCircuit, destination, flags);
  110. if (args == null)
  111. return false;
  112. string strBuffer = "";
  113. byte[] buffer = new byte[1];
  114. try
  115. {
  116. strBuffer = OSDParser.SerializeJsonString(args);
  117. Encoding str = Util.UTF8;
  118. buffer = str.GetBytes(strBuffer);
  119. }
  120. catch (Exception e)
  121. {
  122. m_log.WarnFormat("[REMOTE SIMULATION CONNECTOR]: Exception thrown on serialization of ChildCreate: {0}", e.Message);
  123. // ignore. buffer will be empty, caller should check.
  124. }
  125. Stream os = null;
  126. try
  127. { // send the Post
  128. AgentCreateRequest.ContentLength = buffer.Length; //Count bytes to send
  129. os = AgentCreateRequest.GetRequestStream();
  130. os.Write(buffer, 0, strBuffer.Length); //Send it
  131. m_log.InfoFormat("[REMOTE SIMULATION CONNECTOR]: Posted CreateAgent request to remote sim {0}, region {1}, x={2} y={3}",
  132. uri, destination.RegionName, destination.RegionLocX, destination.RegionLocY);
  133. }
  134. //catch (WebException ex)
  135. catch
  136. {
  137. //m_log.InfoFormat("[REMOTE SIMULATION CONNECTOR]: Bad send on ChildAgentUpdate {0}", ex.Message);
  138. reason = "cannot contact remote region";
  139. return false;
  140. }
  141. finally
  142. {
  143. if (os != null)
  144. os.Close();
  145. }
  146. return true;
  147. }
  148. protected string GetResponse(HttpWebRequest AgentCreateRequest, out string reason)
  149. {
  150. // Let's wait for the response
  151. //m_log.Info("[REMOTE SIMULATION CONNECTOR]: Waiting for a reply after DoCreateChildAgentCall");
  152. reason = string.Empty;
  153. WebResponse webResponse = null;
  154. StreamReader sr = null;
  155. string response = string.Empty;
  156. try
  157. {
  158. webResponse = AgentCreateRequest.GetResponse();
  159. if (webResponse == null)
  160. {
  161. m_log.Info("[REMOTE SIMULATION CONNECTOR]: Null reply on DoCreateChildAgentCall post");
  162. }
  163. else
  164. {
  165. sr = new StreamReader(webResponse.GetResponseStream());
  166. response = sr.ReadToEnd().Trim();
  167. m_log.InfoFormat("[REMOTE SIMULATION CONNECTOR]: DoCreateChildAgentCall reply was {0} ", response);
  168. }
  169. }
  170. catch (WebException ex)
  171. {
  172. m_log.InfoFormat("[REMOTE SIMULATION CONNECTOR]: exception on reply of DoCreateChildAgentCall {0}", ex.Message);
  173. reason = "Destination did not reply";
  174. return string.Empty;
  175. }
  176. finally
  177. {
  178. if (sr != null)
  179. sr.Close();
  180. }
  181. return response;
  182. }
  183. protected void UnpackResponse(string response, out bool result, out string reason)
  184. {
  185. result = true;
  186. reason = string.Empty;
  187. if (!String.IsNullOrEmpty(response))
  188. {
  189. try
  190. {
  191. // we assume we got an OSDMap back
  192. OSDMap r = Util.GetOSDMap(response);
  193. result = r["success"].AsBoolean();
  194. reason = r["reason"].AsString();
  195. }
  196. catch (NullReferenceException e)
  197. {
  198. m_log.InfoFormat("[REMOTE SIMULATION CONNECTOR]: exception on reply of DoCreateChildAgentCall {0}", e.Message);
  199. // check for old style response
  200. if (response.ToLower().StartsWith("true"))
  201. result = true;
  202. result = false;
  203. }
  204. }
  205. }
  206. protected virtual OSDMap PackCreateAgentArguments(AgentCircuitData aCircuit, GridRegion destination, uint flags)
  207. {
  208. OSDMap args = null;
  209. try
  210. {
  211. args = aCircuit.PackAgentCircuitData();
  212. }
  213. catch (Exception e)
  214. {
  215. m_log.Debug("[REMOTE SIMULATION CONNECTOR]: PackAgentCircuitData failed with exception: " + e.Message);
  216. return null;
  217. }
  218. // Add the input arguments
  219. args["destination_x"] = OSD.FromString(destination.RegionLocX.ToString());
  220. args["destination_y"] = OSD.FromString(destination.RegionLocY.ToString());
  221. args["destination_name"] = OSD.FromString(destination.RegionName);
  222. args["destination_uuid"] = OSD.FromString(destination.RegionID.ToString());
  223. args["teleport_flags"] = OSD.FromString(flags.ToString());
  224. return args;
  225. }
  226. public bool UpdateAgent(GridRegion destination, AgentData data)
  227. {
  228. return UpdateAgent(destination, (IAgentData)data);
  229. }
  230. public bool UpdateAgent(GridRegion destination, AgentPosition data)
  231. {
  232. return UpdateAgent(destination, (IAgentData)data);
  233. }
  234. private bool UpdateAgent(GridRegion destination, IAgentData cAgentData)
  235. {
  236. // Eventually, we want to use a caps url instead of the agentID
  237. string uri = string.Empty;
  238. try
  239. {
  240. uri = "http://" + destination.ExternalEndPoint.Address + ":" + destination.HttpPort + AgentPath() + cAgentData.AgentID + "/";
  241. }
  242. catch (Exception e)
  243. {
  244. m_log.Debug("[REMOTE SIMULATION CONNECTOR]: Unable to resolve external endpoint on agent update. Reason: " + e.Message);
  245. return false;
  246. }
  247. //Console.WriteLine(" >>> DoAgentUpdateCall <<< " + uri);
  248. HttpWebRequest ChildUpdateRequest = (HttpWebRequest)WebRequest.Create(uri);
  249. ChildUpdateRequest.Method = "PUT";
  250. ChildUpdateRequest.ContentType = "application/json";
  251. ChildUpdateRequest.Timeout = 30000;
  252. //ChildUpdateRequest.KeepAlive = false;
  253. // Fill it in
  254. OSDMap args = null;
  255. try
  256. {
  257. args = cAgentData.Pack();
  258. }
  259. catch (Exception e)
  260. {
  261. m_log.Debug("[REMOTE SIMULATION CONNECTOR]: PackUpdateMessage failed with exception: " + e.Message);
  262. }
  263. // Add the input arguments
  264. args["destination_x"] = OSD.FromString(destination.RegionLocX.ToString());
  265. args["destination_y"] = OSD.FromString(destination.RegionLocY.ToString());
  266. args["destination_name"] = OSD.FromString(destination.RegionName);
  267. args["destination_uuid"] = OSD.FromString(destination.RegionID.ToString());
  268. string strBuffer = "";
  269. byte[] buffer = new byte[1];
  270. try
  271. {
  272. strBuffer = OSDParser.SerializeJsonString(args);
  273. Encoding str = Util.UTF8;
  274. buffer = str.GetBytes(strBuffer);
  275. }
  276. catch (Exception e)
  277. {
  278. m_log.WarnFormat("[REMOTE SIMULATION CONNECTOR]: Exception thrown on serialization of ChildUpdate: {0}", e.Message);
  279. // ignore. buffer will be empty, caller should check.
  280. }
  281. Stream os = null;
  282. try
  283. { // send the Post
  284. ChildUpdateRequest.ContentLength = buffer.Length; //Count bytes to send
  285. os = ChildUpdateRequest.GetRequestStream();
  286. os.Write(buffer, 0, strBuffer.Length); //Send it
  287. //m_log.InfoFormat("[REMOTE SIMULATION CONNECTOR]: Posted AgentUpdate request to remote sim {0}", uri);
  288. }
  289. catch (WebException ex)
  290. //catch
  291. {
  292. m_log.InfoFormat("[REMOTE SIMULATION CONNECTOR]: Bad send on AgentUpdate {0}", ex.Message);
  293. return false;
  294. }
  295. finally
  296. {
  297. if (os != null)
  298. os.Close();
  299. }
  300. // Let's wait for the response
  301. //m_log.Info("[REMOTE SIMULATION CONNECTOR]: Waiting for a reply after ChildAgentUpdate");
  302. WebResponse webResponse = null;
  303. StreamReader sr = null;
  304. try
  305. {
  306. webResponse = ChildUpdateRequest.GetResponse();
  307. if (webResponse == null)
  308. {
  309. m_log.Info("[REMOTE SIMULATION CONNECTOR]: Null reply on ChilAgentUpdate post");
  310. }
  311. sr = new StreamReader(webResponse.GetResponseStream());
  312. //reply = sr.ReadToEnd().Trim();
  313. sr.ReadToEnd().Trim();
  314. sr.Close();
  315. //m_log.InfoFormat("[REMOTE SIMULATION CONNECTOR]: ChilAgentUpdate reply was {0} ", reply);
  316. }
  317. catch (WebException ex)
  318. {
  319. m_log.InfoFormat("[REMOTE SIMULATION CONNECTOR]: exception on reply of ChilAgentUpdate from {0}: {1}", uri, ex.Message);
  320. // ignore, really
  321. }
  322. finally
  323. {
  324. if (sr != null)
  325. sr.Close();
  326. }
  327. return true;
  328. }
  329. public bool RetrieveAgent(GridRegion destination, UUID id, out IAgentData agent)
  330. {
  331. agent = null;
  332. // Eventually, we want to use a caps url instead of the agentID
  333. string uri = "http://" + destination.ExternalEndPoint.Address + ":" + destination.HttpPort + AgentPath() + id + "/" + destination.RegionID.ToString() + "/";
  334. //Console.WriteLine(" >>> DoRetrieveRootAgentCall <<< " + uri);
  335. HttpWebRequest request = (HttpWebRequest)WebRequest.Create(uri);
  336. request.Method = "GET";
  337. request.Timeout = 10000;
  338. //request.Headers.Add("authorization", ""); // coming soon
  339. HttpWebResponse webResponse = null;
  340. string reply = string.Empty;
  341. StreamReader sr = null;
  342. try
  343. {
  344. webResponse = (HttpWebResponse)request.GetResponse();
  345. if (webResponse == null)
  346. {
  347. m_log.Info("[REMOTE SIMULATION CONNECTOR]: Null reply on agent get ");
  348. }
  349. sr = new StreamReader(webResponse.GetResponseStream());
  350. reply = sr.ReadToEnd().Trim();
  351. //Console.WriteLine("[REMOTE SIMULATION CONNECTOR]: ChilAgentUpdate reply was " + reply);
  352. }
  353. catch (WebException ex)
  354. {
  355. m_log.InfoFormat("[REMOTE SIMULATION CONNECTOR]: exception on reply of agent get {0}", ex.Message);
  356. // ignore, really
  357. return false;
  358. }
  359. finally
  360. {
  361. if (sr != null)
  362. sr.Close();
  363. }
  364. if (webResponse.StatusCode == HttpStatusCode.OK)
  365. {
  366. // we know it's jason
  367. OSDMap args = Util.GetOSDMap(reply);
  368. if (args == null)
  369. {
  370. //Console.WriteLine("[REMOTE SIMULATION CONNECTOR]: Error getting OSDMap from reply");
  371. return false;
  372. }
  373. agent = new CompleteAgentData();
  374. agent.Unpack(args);
  375. return true;
  376. }
  377. //Console.WriteLine("[REMOTE SIMULATION CONNECTOR]: DoRetrieveRootAgentCall returned status " + webResponse.StatusCode);
  378. return false;
  379. }
  380. public bool ReleaseAgent(UUID origin, UUID id, string uri)
  381. {
  382. WebRequest request = WebRequest.Create(uri);
  383. request.Method = "DELETE";
  384. request.Timeout = 10000;
  385. StreamReader sr = null;
  386. try
  387. {
  388. WebResponse webResponse = request.GetResponse();
  389. if (webResponse == null)
  390. {
  391. m_log.Info("[REMOTE SIMULATION CONNECTOR]: Null reply on ReleaseAgent");
  392. }
  393. sr = new StreamReader(webResponse.GetResponseStream());
  394. //reply = sr.ReadToEnd().Trim();
  395. sr.ReadToEnd().Trim();
  396. sr.Close();
  397. //m_log.InfoFormat("[REMOTE SIMULATION CONNECTOR]: ChilAgentUpdate reply was {0} ", reply);
  398. }
  399. catch (WebException ex)
  400. {
  401. m_log.InfoFormat("[REMOTE SIMULATION CONNECTOR]: exception on reply of ReleaseAgent {0}", ex.Message);
  402. return false;
  403. }
  404. finally
  405. {
  406. if (sr != null)
  407. sr.Close();
  408. }
  409. return true;
  410. }
  411. public bool CloseAgent(GridRegion destination, UUID id)
  412. {
  413. string uri = string.Empty;
  414. try
  415. {
  416. uri = "http://" + destination.ExternalEndPoint.Address + ":" + destination.HttpPort + AgentPath() + id + "/" + destination.RegionID.ToString() + "/";
  417. }
  418. catch (Exception e)
  419. {
  420. m_log.Debug("[REMOTE SIMULATION CONNECTOR]: Unable to resolve external endpoint on agent close. Reason: " + e.Message);
  421. return false;
  422. }
  423. //Console.WriteLine(" >>> DoCloseAgentCall <<< " + uri);
  424. WebRequest request = WebRequest.Create(uri);
  425. request.Method = "DELETE";
  426. request.Timeout = 10000;
  427. StreamReader sr = null;
  428. try
  429. {
  430. WebResponse webResponse = request.GetResponse();
  431. if (webResponse == null)
  432. {
  433. m_log.Info("[REMOTE SIMULATION CONNECTOR]: Null reply on agent delete ");
  434. }
  435. sr = new StreamReader(webResponse.GetResponseStream());
  436. //reply = sr.ReadToEnd().Trim();
  437. sr.ReadToEnd().Trim();
  438. sr.Close();
  439. //m_log.InfoFormat("[REMOTE SIMULATION CONNECTOR]: ChilAgentUpdate reply was {0} ", reply);
  440. }
  441. catch (WebException ex)
  442. {
  443. m_log.InfoFormat("[REMOTE SIMULATION CONNECTOR]: exception on reply of agent delete from {0}: {1}", destination.RegionName, ex.Message);
  444. return false;
  445. }
  446. finally
  447. {
  448. if (sr != null)
  449. sr.Close();
  450. }
  451. return true;
  452. }
  453. #endregion Agents
  454. #region Objects
  455. protected virtual string ObjectPath()
  456. {
  457. return "/object/";
  458. }
  459. public bool CreateObject(GridRegion destination, ISceneObject sog, bool isLocalCall)
  460. {
  461. string uri
  462. = "http://" + destination.ExternalEndPoint.Address + ":" + destination.HttpPort + ObjectPath() + sog.UUID + "/";
  463. //m_log.Debug(" >>> DoCreateObjectCall <<< " + uri);
  464. WebRequest ObjectCreateRequest = WebRequest.Create(uri);
  465. ObjectCreateRequest.Method = "POST";
  466. ObjectCreateRequest.ContentType = "application/json";
  467. ObjectCreateRequest.Timeout = 10000;
  468. OSDMap args = new OSDMap(2);
  469. args["sog"] = OSD.FromString(sog.ToXml2());
  470. args["extra"] = OSD.FromString(sog.ExtraToXmlString());
  471. string state = sog.GetStateSnapshot();
  472. if (state.Length > 0)
  473. args["state"] = OSD.FromString(state);
  474. // Add the input general arguments
  475. args["destination_x"] = OSD.FromString(destination.RegionLocX.ToString());
  476. args["destination_y"] = OSD.FromString(destination.RegionLocY.ToString());
  477. args["destination_name"] = OSD.FromString(destination.RegionName);
  478. args["destination_uuid"] = OSD.FromString(destination.RegionID.ToString());
  479. string strBuffer = "";
  480. byte[] buffer = new byte[1];
  481. try
  482. {
  483. strBuffer = OSDParser.SerializeJsonString(args);
  484. Encoding str = Util.UTF8;
  485. buffer = str.GetBytes(strBuffer);
  486. }
  487. catch (Exception e)
  488. {
  489. m_log.WarnFormat("[REMOTE SIMULATION CONNECTOR]: Exception thrown on serialization of CreateObject: {0}", e.Message);
  490. // ignore. buffer will be empty, caller should check.
  491. }
  492. Stream os = null;
  493. try
  494. { // send the Post
  495. ObjectCreateRequest.ContentLength = buffer.Length; //Count bytes to send
  496. os = ObjectCreateRequest.GetRequestStream();
  497. os.Write(buffer, 0, strBuffer.Length); //Send it
  498. m_log.InfoFormat("[REMOTE SIMULATION CONNECTOR]: Posted CreateObject request to remote sim {0}", uri);
  499. }
  500. catch (WebException ex)
  501. {
  502. m_log.InfoFormat("[REMOTE SIMULATION CONNECTOR]: Bad send on CreateObject {0}", ex.Message);
  503. return false;
  504. }
  505. finally
  506. {
  507. if (os != null)
  508. os.Close();
  509. }
  510. // Let's wait for the response
  511. //m_log.Info("[REMOTE SIMULATION CONNECTOR]: Waiting for a reply after DoCreateChildAgentCall");
  512. StreamReader sr = null;
  513. try
  514. {
  515. WebResponse webResponse = ObjectCreateRequest.GetResponse();
  516. if (webResponse == null)
  517. {
  518. m_log.Info("[REMOTE SIMULATION CONNECTOR]: Null reply on CreateObject post");
  519. return false;
  520. }
  521. sr = new StreamReader(webResponse.GetResponseStream());
  522. //reply = sr.ReadToEnd().Trim();
  523. sr.ReadToEnd().Trim();
  524. //m_log.InfoFormat("[REMOTE SIMULATION CONNECTOR]: DoCreateChildAgentCall reply was {0} ", reply);
  525. }
  526. catch (WebException ex)
  527. {
  528. m_log.InfoFormat("[REMOTE SIMULATION CONNECTOR]: exception on reply of CreateObject {0}", ex.Message);
  529. return false;
  530. }
  531. finally
  532. {
  533. if (sr != null)
  534. sr.Close();
  535. }
  536. return true;
  537. }
  538. public bool CreateObject(GridRegion destination, UUID userID, UUID itemID)
  539. {
  540. // TODO, not that urgent
  541. return false;
  542. }
  543. #endregion Objects
  544. }
  545. }