Merge branch 'master' of ssh://opensimulator.org/var/git/opensim
commit
64b8ce73da
|
@ -44,7 +44,6 @@ namespace OpenSim.ConsoleClient
|
||||||
ReplyDelegate action)
|
ReplyDelegate action)
|
||||||
{
|
{
|
||||||
WebRequest request = WebRequest.Create(requestUrl);
|
WebRequest request = WebRequest.Create(requestUrl);
|
||||||
WebResponse response = null;
|
|
||||||
|
|
||||||
request.Method = "POST";
|
request.Method = "POST";
|
||||||
|
|
||||||
|
@ -64,16 +63,18 @@ namespace OpenSim.ConsoleClient
|
||||||
{
|
{
|
||||||
string reply = String.Empty;
|
string reply = String.Empty;
|
||||||
|
|
||||||
response = request.EndGetResponse(ar);
|
using (WebResponse response = request.EndGetResponse(ar))
|
||||||
|
|
||||||
try
|
|
||||||
{
|
{
|
||||||
StreamReader r = new StreamReader(response.GetResponseStream());
|
try
|
||||||
reply = r.ReadToEnd();
|
{
|
||||||
|
using (Stream s = response.GetResponseStream())
|
||||||
|
using (StreamReader r = new StreamReader(s))
|
||||||
|
reply = r.ReadToEnd();
|
||||||
|
|
||||||
}
|
}
|
||||||
catch (System.InvalidOperationException)
|
catch (System.InvalidOperationException)
|
||||||
{
|
{
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
action(requestUrl, data, reply);
|
action(requestUrl, data, reply);
|
||||||
|
|
|
@ -163,14 +163,18 @@ namespace OpenSim.Data.MSSQL
|
||||||
if (asset.Name.Length > 64)
|
if (asset.Name.Length > 64)
|
||||||
{
|
{
|
||||||
assetName = asset.Name.Substring(0, 64);
|
assetName = asset.Name.Substring(0, 64);
|
||||||
m_log.Warn("[ASSET DB]: Name field truncated from " + asset.Name.Length + " to " + assetName.Length + " characters on add");
|
m_log.WarnFormat(
|
||||||
|
"[ASSET DB]: Name '{0}' for asset {1} truncated from {2} to {3} characters on add",
|
||||||
|
asset.Name, asset.ID, asset.Name.Length, assetName.Length);
|
||||||
}
|
}
|
||||||
|
|
||||||
string assetDescription = asset.Description;
|
string assetDescription = asset.Description;
|
||||||
if (asset.Description.Length > 64)
|
if (asset.Description.Length > 64)
|
||||||
{
|
{
|
||||||
assetDescription = asset.Description.Substring(0, 64);
|
assetDescription = asset.Description.Substring(0, 64);
|
||||||
m_log.Warn("[ASSET DB]: Description field truncated from " + asset.Description.Length + " to " + assetDescription.Length + " characters on add");
|
m_log.WarnFormat(
|
||||||
|
"[ASSET DB]: Description '{0}' for asset {1} truncated from {2} to {3} characters on add",
|
||||||
|
asset.Description, asset.ID, asset.Description.Length, assetDescription.Length);
|
||||||
}
|
}
|
||||||
|
|
||||||
using (SqlConnection conn = new SqlConnection(m_connectionString))
|
using (SqlConnection conn = new SqlConnection(m_connectionString))
|
||||||
|
|
|
@ -173,14 +173,18 @@ namespace OpenSim.Data.MySQL
|
||||||
if (asset.Name.Length > 64)
|
if (asset.Name.Length > 64)
|
||||||
{
|
{
|
||||||
assetName = asset.Name.Substring(0, 64);
|
assetName = asset.Name.Substring(0, 64);
|
||||||
m_log.Warn("[ASSET DB]: Name field truncated from " + asset.Name.Length + " to " + assetName.Length + " characters on add");
|
m_log.WarnFormat(
|
||||||
|
"[ASSET DB]: Name '{0}' for asset {1} truncated from {2} to {3} characters on add",
|
||||||
|
asset.Name, asset.ID, asset.Name.Length, assetName.Length);
|
||||||
}
|
}
|
||||||
|
|
||||||
string assetDescription = asset.Description;
|
string assetDescription = asset.Description;
|
||||||
if (asset.Description.Length > 64)
|
if (asset.Description.Length > 64)
|
||||||
{
|
{
|
||||||
assetDescription = asset.Description.Substring(0, 64);
|
assetDescription = asset.Description.Substring(0, 64);
|
||||||
m_log.Warn("[ASSET DB]: Description field truncated from " + asset.Description.Length + " to " + assetDescription.Length + " characters on add");
|
m_log.WarnFormat(
|
||||||
|
"[ASSET DB]: Description '{0}' for asset {1} truncated from {2} to {3} characters on add",
|
||||||
|
asset.Description, asset.ID, asset.Description.Length, assetDescription.Length);
|
||||||
}
|
}
|
||||||
|
|
||||||
try
|
try
|
||||||
|
|
|
@ -204,14 +204,18 @@ namespace OpenSim.Data.MySQL
|
||||||
if (asset.Name.Length > 64)
|
if (asset.Name.Length > 64)
|
||||||
{
|
{
|
||||||
assetName = asset.Name.Substring(0, 64);
|
assetName = asset.Name.Substring(0, 64);
|
||||||
m_log.Warn("[XASSET DB]: Name field truncated from " + asset.Name.Length + " to " + assetName.Length + " characters on add");
|
m_log.WarnFormat(
|
||||||
|
"[XASSET DB]: Name '{0}' for asset {1} truncated from {2} to {3} characters on add",
|
||||||
|
asset.Name, asset.ID, asset.Name.Length, assetName.Length);
|
||||||
}
|
}
|
||||||
|
|
||||||
string assetDescription = asset.Description;
|
string assetDescription = asset.Description;
|
||||||
if (asset.Description.Length > 64)
|
if (asset.Description.Length > 64)
|
||||||
{
|
{
|
||||||
assetDescription = asset.Description.Substring(0, 64);
|
assetDescription = asset.Description.Substring(0, 64);
|
||||||
m_log.Warn("[XASSET DB]: Description field truncated from " + asset.Description.Length + " to " + assetDescription.Length + " characters on add");
|
m_log.WarnFormat(
|
||||||
|
"[XASSET DB]: Description '{0}' for asset {1} truncated from {2} to {3} characters on add",
|
||||||
|
asset.Description, asset.ID, asset.Description.Length, assetDescription.Length);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (m_enableCompression)
|
if (m_enableCompression)
|
||||||
|
|
|
@ -46,7 +46,7 @@ namespace OpenSim.Data.SQLite
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public class SQLiteAssetData : AssetDataBase
|
public class SQLiteAssetData : AssetDataBase
|
||||||
{
|
{
|
||||||
// private static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType);
|
private static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType);
|
||||||
|
|
||||||
private const string SelectAssetSQL = "select * from assets where UUID=:UUID";
|
private const string SelectAssetSQL = "select * from assets where UUID=:UUID";
|
||||||
private const string SelectAssetMetadataSQL = "select Name, Description, Type, Temporary, asset_flags, UUID, CreatorID from assets limit :start, :count";
|
private const string SelectAssetMetadataSQL = "select Name, Description, Type, Temporary, asset_flags, UUID, CreatorID from assets limit :start, :count";
|
||||||
|
@ -133,6 +133,24 @@ namespace OpenSim.Data.SQLite
|
||||||
/// <param name="asset">Asset Base</param>
|
/// <param name="asset">Asset Base</param>
|
||||||
override public void StoreAsset(AssetBase asset)
|
override public void StoreAsset(AssetBase asset)
|
||||||
{
|
{
|
||||||
|
string assetName = asset.Name;
|
||||||
|
if (asset.Name.Length > 64)
|
||||||
|
{
|
||||||
|
assetName = asset.Name.Substring(0, 64);
|
||||||
|
m_log.WarnFormat(
|
||||||
|
"[ASSET DB]: Name '{0}' for asset {1} truncated from {2} to {3} characters on add",
|
||||||
|
asset.Name, asset.ID, asset.Name.Length, assetName.Length);
|
||||||
|
}
|
||||||
|
|
||||||
|
string assetDescription = asset.Description;
|
||||||
|
if (asset.Description.Length > 64)
|
||||||
|
{
|
||||||
|
assetDescription = asset.Description.Substring(0, 64);
|
||||||
|
m_log.WarnFormat(
|
||||||
|
"[ASSET DB]: Description '{0}' for asset {1} truncated from {2} to {3} characters on add",
|
||||||
|
asset.Description, asset.ID, asset.Description.Length, assetDescription.Length);
|
||||||
|
}
|
||||||
|
|
||||||
//m_log.Info("[ASSET DB]: Creating Asset " + asset.FullID.ToString());
|
//m_log.Info("[ASSET DB]: Creating Asset " + asset.FullID.ToString());
|
||||||
if (ExistsAsset(asset.FullID))
|
if (ExistsAsset(asset.FullID))
|
||||||
{
|
{
|
||||||
|
@ -143,8 +161,8 @@ namespace OpenSim.Data.SQLite
|
||||||
using (SqliteCommand cmd = new SqliteCommand(UpdateAssetSQL, m_conn))
|
using (SqliteCommand cmd = new SqliteCommand(UpdateAssetSQL, m_conn))
|
||||||
{
|
{
|
||||||
cmd.Parameters.Add(new SqliteParameter(":UUID", asset.FullID.ToString()));
|
cmd.Parameters.Add(new SqliteParameter(":UUID", asset.FullID.ToString()));
|
||||||
cmd.Parameters.Add(new SqliteParameter(":Name", asset.Name));
|
cmd.Parameters.Add(new SqliteParameter(":Name", assetName));
|
||||||
cmd.Parameters.Add(new SqliteParameter(":Description", asset.Description));
|
cmd.Parameters.Add(new SqliteParameter(":Description", assetDescription));
|
||||||
cmd.Parameters.Add(new SqliteParameter(":Type", asset.Type));
|
cmd.Parameters.Add(new SqliteParameter(":Type", asset.Type));
|
||||||
cmd.Parameters.Add(new SqliteParameter(":Local", asset.Local));
|
cmd.Parameters.Add(new SqliteParameter(":Local", asset.Local));
|
||||||
cmd.Parameters.Add(new SqliteParameter(":Temporary", asset.Temporary));
|
cmd.Parameters.Add(new SqliteParameter(":Temporary", asset.Temporary));
|
||||||
|
@ -163,8 +181,8 @@ namespace OpenSim.Data.SQLite
|
||||||
using (SqliteCommand cmd = new SqliteCommand(InsertAssetSQL, m_conn))
|
using (SqliteCommand cmd = new SqliteCommand(InsertAssetSQL, m_conn))
|
||||||
{
|
{
|
||||||
cmd.Parameters.Add(new SqliteParameter(":UUID", asset.FullID.ToString()));
|
cmd.Parameters.Add(new SqliteParameter(":UUID", asset.FullID.ToString()));
|
||||||
cmd.Parameters.Add(new SqliteParameter(":Name", asset.Name));
|
cmd.Parameters.Add(new SqliteParameter(":Name", assetName));
|
||||||
cmd.Parameters.Add(new SqliteParameter(":Description", asset.Description));
|
cmd.Parameters.Add(new SqliteParameter(":Description", assetDescription));
|
||||||
cmd.Parameters.Add(new SqliteParameter(":Type", asset.Type));
|
cmd.Parameters.Add(new SqliteParameter(":Type", asset.Type));
|
||||||
cmd.Parameters.Add(new SqliteParameter(":Local", asset.Local));
|
cmd.Parameters.Add(new SqliteParameter(":Local", asset.Local));
|
||||||
cmd.Parameters.Add(new SqliteParameter(":Temporary", asset.Temporary));
|
cmd.Parameters.Add(new SqliteParameter(":Temporary", asset.Temporary));
|
||||||
|
|
|
@ -65,23 +65,27 @@ namespace OpenSim.Framework.Configuration.HTTP
|
||||||
byte[] buf = new byte[8192];
|
byte[] buf = new byte[8192];
|
||||||
HttpWebRequest request =
|
HttpWebRequest request =
|
||||||
(HttpWebRequest) WebRequest.Create(remoteConfigSettings.baseConfigURL + configFileName);
|
(HttpWebRequest) WebRequest.Create(remoteConfigSettings.baseConfigURL + configFileName);
|
||||||
HttpWebResponse response = (HttpWebResponse) request.GetResponse();
|
using (HttpWebResponse response = (HttpWebResponse)request.GetResponse())
|
||||||
|
|
||||||
Stream resStream = response.GetResponseStream();
|
|
||||||
|
|
||||||
string tempString = null;
|
|
||||||
int count = 0;
|
|
||||||
|
|
||||||
do
|
|
||||||
{
|
{
|
||||||
count = resStream.Read(buf, 0, buf.Length);
|
using (Stream resStream = response.GetResponseStream())
|
||||||
if (count != 0)
|
|
||||||
{
|
{
|
||||||
tempString = Util.UTF8.GetString(buf, 0, count);
|
string tempString = null;
|
||||||
sb.Append(tempString);
|
int count = 0;
|
||||||
|
|
||||||
|
do
|
||||||
|
{
|
||||||
|
count = resStream.Read(buf, 0, buf.Length);
|
||||||
|
if (count != 0)
|
||||||
|
{
|
||||||
|
tempString = Util.UTF8.GetString(buf, 0, count);
|
||||||
|
sb.Append(tempString);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
while (count > 0);
|
||||||
|
|
||||||
|
LoadDataFromString(sb.ToString());
|
||||||
}
|
}
|
||||||
} while (count > 0);
|
}
|
||||||
LoadDataFromString(sb.ToString());
|
|
||||||
}
|
}
|
||||||
catch (WebException)
|
catch (WebException)
|
||||||
{
|
{
|
||||||
|
|
|
@ -74,16 +74,26 @@ namespace OpenSim.Framework.RegionLoader.Web
|
||||||
|
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
HttpWebResponse webResponse = (HttpWebResponse) webRequest.GetResponse();
|
|
||||||
m_log.Debug("[WEBLOADER]: Downloading region information...");
|
|
||||||
StreamReader reader = new StreamReader(webResponse.GetResponseStream());
|
|
||||||
string xmlSource = String.Empty;
|
string xmlSource = String.Empty;
|
||||||
string tempStr = reader.ReadLine();
|
|
||||||
while (tempStr != null)
|
using (HttpWebResponse webResponse = (HttpWebResponse) webRequest.GetResponse())
|
||||||
{
|
{
|
||||||
xmlSource = xmlSource + tempStr;
|
m_log.Debug("[WEBLOADER]: Downloading region information...");
|
||||||
tempStr = reader.ReadLine();
|
|
||||||
|
using (Stream s = webResponse.GetResponseStream())
|
||||||
|
{
|
||||||
|
using (StreamReader reader = new StreamReader(s))
|
||||||
|
{
|
||||||
|
string tempStr = reader.ReadLine();
|
||||||
|
while (tempStr != null)
|
||||||
|
{
|
||||||
|
xmlSource = xmlSource + tempStr;
|
||||||
|
tempStr = reader.ReadLine();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
m_log.Debug("[WEBLOADER]: Done downloading region information from server. Total Bytes: " +
|
m_log.Debug("[WEBLOADER]: Done downloading region information from server. Total Bytes: " +
|
||||||
xmlSource.Length);
|
xmlSource.Length);
|
||||||
XmlDocument xmlDoc = new XmlDocument();
|
XmlDocument xmlDoc = new XmlDocument();
|
||||||
|
@ -107,17 +117,24 @@ namespace OpenSim.Framework.RegionLoader.Web
|
||||||
}
|
}
|
||||||
catch (WebException ex)
|
catch (WebException ex)
|
||||||
{
|
{
|
||||||
if (((HttpWebResponse)ex.Response).StatusCode == HttpStatusCode.NotFound)
|
using (HttpWebResponse response = (HttpWebResponse)ex.Response)
|
||||||
{
|
{
|
||||||
if (!allowRegionless)
|
if (response.StatusCode == HttpStatusCode.NotFound)
|
||||||
|
{
|
||||||
|
if (!allowRegionless)
|
||||||
|
throw ex;
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
throw ex;
|
throw ex;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
else
|
|
||||||
throw ex;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
if (regionCount > 0 | allowRegionless)
|
if (regionCount > 0 | allowRegionless)
|
||||||
|
{
|
||||||
return regionInfos;
|
return regionInfos;
|
||||||
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
m_log.Error("[WEBLOADER]: No region configs were available.");
|
m_log.Error("[WEBLOADER]: No region configs were available.");
|
||||||
|
@ -127,4 +144,4 @@ namespace OpenSim.Framework.RegionLoader.Web
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
|
@ -101,20 +101,11 @@ namespace OpenSim.Framework.Servers.HttpServer
|
||||||
using (WebResponse resp = request.GetResponse())
|
using (WebResponse resp = request.GetResponse())
|
||||||
{
|
{
|
||||||
XmlSerializer deserializer = new XmlSerializer(typeof(TResponse));
|
XmlSerializer deserializer = new XmlSerializer(typeof(TResponse));
|
||||||
Stream respStream = null;
|
|
||||||
try
|
using (Stream respStream = resp.GetResponseStream())
|
||||||
{
|
|
||||||
respStream = resp.GetResponseStream();
|
|
||||||
deserial = (TResponse)deserializer.Deserialize(respStream);
|
deserial = (TResponse)deserializer.Deserialize(respStream);
|
||||||
}
|
|
||||||
catch { }
|
|
||||||
finally
|
|
||||||
{
|
|
||||||
if (respStream != null)
|
|
||||||
respStream.Close();
|
|
||||||
resp.Close();
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
return deserial;
|
return deserial;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -227,9 +227,12 @@ namespace OpenSim.Framework.Servers
|
||||||
handlers.AppendFormat("\t{0}\n", s);
|
handlers.AppendFormat("\t{0}\n", s);
|
||||||
|
|
||||||
handlers.AppendFormat("* HTTP:\n");
|
handlers.AppendFormat("* HTTP:\n");
|
||||||
List<String> poll = httpServer.GetPollServiceHandlerKeys();
|
|
||||||
foreach (String s in httpServer.GetHTTPHandlerKeys())
|
foreach (String s in httpServer.GetHTTPHandlerKeys())
|
||||||
handlers.AppendFormat("\t{0} {1}\n", s, (poll.Contains(s) ? "(poll service)" : string.Empty));
|
handlers.AppendFormat("\t{0}\n", s);
|
||||||
|
|
||||||
|
handlers.AppendFormat("* HTTP (poll):\n");
|
||||||
|
foreach (String s in httpServer.GetPollServiceHandlerKeys())
|
||||||
|
handlers.AppendFormat("\t{0}\n", s);
|
||||||
|
|
||||||
handlers.AppendFormat("* JSONRPC:\n");
|
handlers.AppendFormat("* JSONRPC:\n");
|
||||||
foreach (String s in httpServer.GetJsonRpcHandlerKeys())
|
foreach (String s in httpServer.GetJsonRpcHandlerKeys())
|
||||||
|
|
|
@ -228,8 +228,8 @@ namespace OpenSim.Framework
|
||||||
errorMessage = we.Message;
|
errorMessage = we.Message;
|
||||||
if (we.Status == WebExceptionStatus.ProtocolError)
|
if (we.Status == WebExceptionStatus.ProtocolError)
|
||||||
{
|
{
|
||||||
HttpWebResponse webResponse = (HttpWebResponse)we.Response;
|
using (HttpWebResponse webResponse = (HttpWebResponse)we.Response)
|
||||||
errorMessage = String.Format("[{0}] {1}",webResponse.StatusCode,webResponse.StatusDescription);
|
errorMessage = String.Format("[{0}] {1}", webResponse.StatusCode, webResponse.StatusDescription);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
catch (Exception ex)
|
catch (Exception ex)
|
||||||
|
@ -387,8 +387,8 @@ namespace OpenSim.Framework
|
||||||
errorMessage = we.Message;
|
errorMessage = we.Message;
|
||||||
if (we.Status == WebExceptionStatus.ProtocolError)
|
if (we.Status == WebExceptionStatus.ProtocolError)
|
||||||
{
|
{
|
||||||
HttpWebResponse webResponse = (HttpWebResponse)we.Response;
|
using (HttpWebResponse webResponse = (HttpWebResponse)we.Response)
|
||||||
errorMessage = String.Format("[{0}] {1}",webResponse.StatusCode,webResponse.StatusDescription);
|
errorMessage = String.Format("[{0}] {1}",webResponse.StatusCode,webResponse.StatusDescription);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
catch (Exception ex)
|
catch (Exception ex)
|
||||||
|
@ -834,15 +834,16 @@ namespace OpenSim.Framework
|
||||||
{
|
{
|
||||||
if (e.Response is HttpWebResponse)
|
if (e.Response is HttpWebResponse)
|
||||||
{
|
{
|
||||||
HttpWebResponse httpResponse = (HttpWebResponse)e.Response;
|
using (HttpWebResponse httpResponse = (HttpWebResponse)e.Response)
|
||||||
|
{
|
||||||
if (httpResponse.StatusCode != HttpStatusCode.NotFound)
|
if (httpResponse.StatusCode != HttpStatusCode.NotFound)
|
||||||
{
|
{
|
||||||
// We don't appear to be handling any other status codes, so log these feailures to that
|
// We don't appear to be handling any other status codes, so log these feailures to that
|
||||||
// people don't spend unnecessary hours hunting phantom bugs.
|
// people don't spend unnecessary hours hunting phantom bugs.
|
||||||
m_log.DebugFormat(
|
m_log.DebugFormat(
|
||||||
"[ASYNC REQUEST]: Request {0} {1} failed with unexpected status code {2}",
|
"[ASYNC REQUEST]: Request {0} {1} failed with unexpected status code {2}",
|
||||||
verb, requestUrl, httpResponse.StatusCode);
|
verb, requestUrl, httpResponse.StatusCode);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -983,11 +984,9 @@ namespace OpenSim.Framework
|
||||||
Stream respStream = null;
|
Stream respStream = null;
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
respStream = resp.GetResponseStream();
|
using (respStream = resp.GetResponseStream())
|
||||||
using (StreamReader reader = new StreamReader(respStream))
|
using (StreamReader reader = new StreamReader(respStream))
|
||||||
{
|
respstring = reader.ReadToEnd();
|
||||||
respstring = reader.ReadToEnd();
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
catch (Exception e)
|
catch (Exception e)
|
||||||
{
|
{
|
||||||
|
@ -1127,10 +1126,11 @@ namespace OpenSim.Framework
|
||||||
{
|
{
|
||||||
if (resp.ContentLength != 0)
|
if (resp.ContentLength != 0)
|
||||||
{
|
{
|
||||||
Stream respStream = resp.GetResponseStream();
|
using (Stream respStream = resp.GetResponseStream())
|
||||||
XmlSerializer deserializer = new XmlSerializer(typeof(TResponse));
|
{
|
||||||
deserial = (TResponse)deserializer.Deserialize(respStream);
|
XmlSerializer deserializer = new XmlSerializer(typeof(TResponse));
|
||||||
respStream.Close();
|
deserial = (TResponse)deserializer.Deserialize(respStream);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
@ -1142,14 +1142,15 @@ namespace OpenSim.Framework
|
||||||
}
|
}
|
||||||
catch (WebException e)
|
catch (WebException e)
|
||||||
{
|
{
|
||||||
HttpWebResponse hwr = (HttpWebResponse)e.Response;
|
using (HttpWebResponse hwr = (HttpWebResponse)e.Response)
|
||||||
|
{
|
||||||
if (hwr != null && hwr.StatusCode == HttpStatusCode.NotFound)
|
if (hwr != null && hwr.StatusCode == HttpStatusCode.NotFound)
|
||||||
return deserial;
|
return deserial;
|
||||||
else
|
else
|
||||||
m_log.ErrorFormat(
|
m_log.ErrorFormat(
|
||||||
"[SynchronousRestObjectRequester]: WebException for {0} {1} {2}: {3} {4}",
|
"[SynchronousRestObjectRequester]: WebException for {0} {1} {2}: {3} {4}",
|
||||||
verb, requestUrl, typeof(TResponse).ToString(), e.Message, e.StackTrace);
|
verb, requestUrl, typeof(TResponse).ToString(), e.Message, e.StackTrace);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
catch (System.InvalidOperationException)
|
catch (System.InvalidOperationException)
|
||||||
{
|
{
|
||||||
|
|
|
@ -30,6 +30,7 @@ using System.Collections;
|
||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
using System.Diagnostics;
|
using System.Diagnostics;
|
||||||
using System.IO;
|
using System.IO;
|
||||||
|
using System.Linq;
|
||||||
using System.Reflection;
|
using System.Reflection;
|
||||||
using System.Text;
|
using System.Text;
|
||||||
using System.Text.RegularExpressions;
|
using System.Text.RegularExpressions;
|
||||||
|
@ -808,16 +809,28 @@ namespace OpenSim
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case "modules":
|
case "modules":
|
||||||
SceneManager.ForEachScene(
|
SceneManager.ForEachSelectedScene(
|
||||||
delegate(Scene scene) {
|
scene =>
|
||||||
MainConsole.Instance.Output("Loaded region modules in" + scene.RegionInfo.RegionName + " are:");
|
|
||||||
foreach (IRegionModuleBase module in scene.RegionModules.Values)
|
|
||||||
{
|
{
|
||||||
Type type = module.GetType().GetInterface("ISharedRegionModule");
|
MainConsole.Instance.OutputFormat("Loaded region modules in {0} are:", scene.Name);
|
||||||
string module_type = type != null ? "Shared" : "Non-Shared";
|
|
||||||
MainConsole.Instance.OutputFormat("New Region Module ({0}): {1}", module_type, module.Name);
|
List<IRegionModuleBase> sharedModules = new List<IRegionModuleBase>();
|
||||||
|
List<IRegionModuleBase> nonSharedModules = new List<IRegionModuleBase>();
|
||||||
|
|
||||||
|
foreach (IRegionModuleBase module in scene.RegionModules.Values)
|
||||||
|
{
|
||||||
|
if (module.GetType().GetInterface("ISharedRegionModule") != null)
|
||||||
|
nonSharedModules.Add(module);
|
||||||
|
else
|
||||||
|
sharedModules.Add(module);
|
||||||
|
}
|
||||||
|
|
||||||
|
foreach (IRegionModuleBase module in sharedModules.OrderBy(m => m.Name))
|
||||||
|
MainConsole.Instance.OutputFormat("New Region Module (Shared): {0}", module.Name);
|
||||||
|
|
||||||
|
foreach (IRegionModuleBase module in sharedModules.OrderBy(m => m.Name))
|
||||||
|
MainConsole.Instance.OutputFormat("New Region Module (Non-Shared): {0}", module.Name);
|
||||||
}
|
}
|
||||||
}
|
|
||||||
);
|
);
|
||||||
|
|
||||||
MainConsole.Instance.Output("");
|
MainConsole.Instance.Output("");
|
||||||
|
|
|
@ -668,7 +668,7 @@ namespace OpenSim
|
||||||
// listenIP = IPAddress.Parse("0.0.0.0");
|
// listenIP = IPAddress.Parse("0.0.0.0");
|
||||||
|
|
||||||
uint port = (uint) regionInfo.InternalEndPoint.Port;
|
uint port = (uint) regionInfo.InternalEndPoint.Port;
|
||||||
IClientNetworkServer clientNetworkServer;
|
|
||||||
if (m_autoCreateClientStack)
|
if (m_autoCreateClientStack)
|
||||||
{
|
{
|
||||||
clientNetworkServers = m_clientStackManager.CreateServers(
|
clientNetworkServers = m_clientStackManager.CreateServers(
|
||||||
|
|
|
@ -117,20 +117,21 @@ namespace OpenSim.Region.CoreModules.Scripting.LSLHttp
|
||||||
/// </summary>
|
/// </summary>
|
||||||
private Dictionary<string, UrlData> m_UrlMap = new Dictionary<string, UrlData>();
|
private Dictionary<string, UrlData> m_UrlMap = new Dictionary<string, UrlData>();
|
||||||
|
|
||||||
/// <summary>
|
private uint m_HttpsPort = 0;
|
||||||
/// Maximum number of external urls that can be set up by this module.
|
|
||||||
/// </summary>
|
|
||||||
private int m_TotalUrls = 100;
|
|
||||||
|
|
||||||
private uint https_port = 0;
|
|
||||||
private IHttpServer m_HttpServer = null;
|
private IHttpServer m_HttpServer = null;
|
||||||
private IHttpServer m_HttpsServer = null;
|
private IHttpServer m_HttpsServer = null;
|
||||||
|
|
||||||
private string m_ExternalHostNameForLSL = "";
|
public string ExternalHostNameForLSL { get; private set; }
|
||||||
public string ExternalHostNameForLSL
|
|
||||||
{
|
/// <summary>
|
||||||
get { return m_ExternalHostNameForLSL; }
|
/// The default maximum number of urls
|
||||||
}
|
/// </summary>
|
||||||
|
public const int DefaultTotalUrls = 100;
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Maximum number of external urls that can be set up by this module.
|
||||||
|
/// </summary>
|
||||||
|
public int TotalUrls { get; set; }
|
||||||
|
|
||||||
public Type ReplaceableInterface
|
public Type ReplaceableInterface
|
||||||
{
|
{
|
||||||
|
@ -144,16 +145,27 @@ namespace OpenSim.Region.CoreModules.Scripting.LSLHttp
|
||||||
|
|
||||||
public void Initialise(IConfigSource config)
|
public void Initialise(IConfigSource config)
|
||||||
{
|
{
|
||||||
m_ExternalHostNameForLSL = config.Configs["Network"].GetString("ExternalHostNameForLSL", System.Environment.MachineName);
|
IConfig networkConfig = config.Configs["Network"];
|
||||||
bool ssl_enabled = config.Configs["Network"].GetBoolean("https_listener",false);
|
|
||||||
|
|
||||||
if (ssl_enabled)
|
if (networkConfig != null)
|
||||||
https_port = (uint) config.Configs["Network"].GetInt("https_port",0);
|
{
|
||||||
|
ExternalHostNameForLSL = config.Configs["Network"].GetString("ExternalHostNameForLSL", null);
|
||||||
|
|
||||||
|
bool ssl_enabled = config.Configs["Network"].GetBoolean("https_listener", false);
|
||||||
|
|
||||||
|
if (ssl_enabled)
|
||||||
|
m_HttpsPort = (uint)config.Configs["Network"].GetInt("https_port", (int)m_HttpsPort);
|
||||||
|
}
|
||||||
|
|
||||||
|
if (ExternalHostNameForLSL == null)
|
||||||
|
ExternalHostNameForLSL = System.Environment.MachineName;
|
||||||
|
|
||||||
IConfig llFunctionsConfig = config.Configs["LL-Functions"];
|
IConfig llFunctionsConfig = config.Configs["LL-Functions"];
|
||||||
|
|
||||||
if (llFunctionsConfig != null)
|
if (llFunctionsConfig != null)
|
||||||
m_TotalUrls = llFunctionsConfig.GetInt("max_external_urls_per_simulator", m_TotalUrls);
|
TotalUrls = llFunctionsConfig.GetInt("max_external_urls_per_simulator", DefaultTotalUrls);
|
||||||
|
else
|
||||||
|
TotalUrls = DefaultTotalUrls;
|
||||||
}
|
}
|
||||||
|
|
||||||
public void PostInitialise()
|
public void PostInitialise()
|
||||||
|
@ -169,9 +181,9 @@ namespace OpenSim.Region.CoreModules.Scripting.LSLHttp
|
||||||
m_HttpServer = MainServer.Instance;
|
m_HttpServer = MainServer.Instance;
|
||||||
//
|
//
|
||||||
// We can use the https if it is enabled
|
// We can use the https if it is enabled
|
||||||
if (https_port > 0)
|
if (m_HttpsPort > 0)
|
||||||
{
|
{
|
||||||
m_HttpsServer = MainServer.GetHttpServer(https_port);
|
m_HttpsServer = MainServer.GetHttpServer(m_HttpsPort);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -204,12 +216,12 @@ namespace OpenSim.Region.CoreModules.Scripting.LSLHttp
|
||||||
|
|
||||||
lock (m_UrlMap)
|
lock (m_UrlMap)
|
||||||
{
|
{
|
||||||
if (m_UrlMap.Count >= m_TotalUrls)
|
if (m_UrlMap.Count >= TotalUrls)
|
||||||
{
|
{
|
||||||
engine.PostScriptEvent(itemID, "http_request", new Object[] { urlcode.ToString(), "URL_REQUEST_DENIED", "" });
|
engine.PostScriptEvent(itemID, "http_request", new Object[] { urlcode.ToString(), "URL_REQUEST_DENIED", "" });
|
||||||
return urlcode;
|
return urlcode;
|
||||||
}
|
}
|
||||||
string url = "http://" + m_ExternalHostNameForLSL + ":" + m_HttpServer.Port.ToString() + "/lslhttp/" + urlcode.ToString() + "/";
|
string url = "http://" + ExternalHostNameForLSL + ":" + m_HttpServer.Port.ToString() + "/lslhttp/" + urlcode.ToString() + "/";
|
||||||
|
|
||||||
UrlData urlData = new UrlData();
|
UrlData urlData = new UrlData();
|
||||||
urlData.hostID = host.UUID;
|
urlData.hostID = host.UUID;
|
||||||
|
@ -249,12 +261,12 @@ namespace OpenSim.Region.CoreModules.Scripting.LSLHttp
|
||||||
|
|
||||||
lock (m_UrlMap)
|
lock (m_UrlMap)
|
||||||
{
|
{
|
||||||
if (m_UrlMap.Count >= m_TotalUrls)
|
if (m_UrlMap.Count >= TotalUrls)
|
||||||
{
|
{
|
||||||
engine.PostScriptEvent(itemID, "http_request", new Object[] { urlcode.ToString(), "URL_REQUEST_DENIED", "" });
|
engine.PostScriptEvent(itemID, "http_request", new Object[] { urlcode.ToString(), "URL_REQUEST_DENIED", "" });
|
||||||
return urlcode;
|
return urlcode;
|
||||||
}
|
}
|
||||||
string url = "https://" + m_ExternalHostNameForLSL + ":" + m_HttpsServer.Port.ToString() + "/lslhttps/" + urlcode.ToString() + "/";
|
string url = "https://" + ExternalHostNameForLSL + ":" + m_HttpsServer.Port.ToString() + "/lslhttps/" + urlcode.ToString() + "/";
|
||||||
|
|
||||||
UrlData urlData = new UrlData();
|
UrlData urlData = new UrlData();
|
||||||
urlData.hostID = host.UUID;
|
urlData.hostID = host.UUID;
|
||||||
|
@ -377,7 +389,7 @@ namespace OpenSim.Region.CoreModules.Scripting.LSLHttp
|
||||||
public int GetFreeUrls()
|
public int GetFreeUrls()
|
||||||
{
|
{
|
||||||
lock (m_UrlMap)
|
lock (m_UrlMap)
|
||||||
return m_TotalUrls - m_UrlMap.Count;
|
return TotalUrls - m_UrlMap.Count;
|
||||||
}
|
}
|
||||||
|
|
||||||
public void ScriptRemoved(UUID itemID)
|
public void ScriptRemoved(UUID itemID)
|
||||||
|
@ -579,9 +591,9 @@ namespace OpenSim.Region.CoreModules.Scripting.LSLHttp
|
||||||
string url;
|
string url;
|
||||||
|
|
||||||
if (is_ssl)
|
if (is_ssl)
|
||||||
url = "https://" + m_ExternalHostNameForLSL + ":" + m_HttpsServer.Port.ToString() + uri_tmp;
|
url = "https://" + ExternalHostNameForLSL + ":" + m_HttpsServer.Port.ToString() + uri_tmp;
|
||||||
else
|
else
|
||||||
url = "http://" + m_ExternalHostNameForLSL + ":" + m_HttpServer.Port.ToString() + uri_tmp;
|
url = "http://" + ExternalHostNameForLSL + ":" + m_HttpServer.Port.ToString() + uri_tmp;
|
||||||
|
|
||||||
// Avoid a race - the request URL may have been released via llRequestUrl() whilst this
|
// Avoid a race - the request URL may have been released via llRequestUrl() whilst this
|
||||||
// request was being processed.
|
// request was being processed.
|
||||||
|
|
|
@ -838,13 +838,17 @@ namespace OpenSim.Region.CoreModules.Scripting.VectorRender
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
WebRequest request = HttpWebRequest.Create(url);
|
WebRequest request = HttpWebRequest.Create(url);
|
||||||
//Ckrinke: Comment out for now as 'str' is unused. Bring it back into play later when it is used.
|
|
||||||
//Ckrinke Stream str = null;
|
using (HttpWebResponse response = (HttpWebResponse)(request).GetResponse())
|
||||||
HttpWebResponse response = (HttpWebResponse)(request).GetResponse();
|
|
||||||
if (response.StatusCode == HttpStatusCode.OK)
|
|
||||||
{
|
{
|
||||||
Bitmap image = new Bitmap(response.GetResponseStream());
|
if (response.StatusCode == HttpStatusCode.OK)
|
||||||
return image;
|
{
|
||||||
|
using (Stream s = response.GetResponseStream())
|
||||||
|
{
|
||||||
|
Bitmap image = new Bitmap(s);
|
||||||
|
return image;
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
catch { }
|
catch { }
|
||||||
|
|
|
@ -868,20 +868,22 @@ namespace OpenSim.Region.CoreModules.World.WorldMap
|
||||||
}
|
}
|
||||||
|
|
||||||
string response_mapItems_reply = null;
|
string response_mapItems_reply = null;
|
||||||
{ // get the response
|
{
|
||||||
StreamReader sr = null;
|
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
WebResponse webResponse = mapitemsrequest.GetResponse();
|
using (WebResponse webResponse = mapitemsrequest.GetResponse())
|
||||||
if (webResponse != null)
|
|
||||||
{
|
{
|
||||||
sr = new StreamReader(webResponse.GetResponseStream());
|
if (webResponse != null)
|
||||||
response_mapItems_reply = sr.ReadToEnd().Trim();
|
{
|
||||||
}
|
using (Stream s = webResponse.GetResponseStream())
|
||||||
else
|
using (StreamReader sr = new StreamReader(s))
|
||||||
{
|
response_mapItems_reply = sr.ReadToEnd().Trim();
|
||||||
return new OSDMap();
|
}
|
||||||
}
|
else
|
||||||
|
{
|
||||||
|
return new OSDMap();
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
catch (WebException)
|
catch (WebException)
|
||||||
{
|
{
|
||||||
|
@ -908,11 +910,6 @@ namespace OpenSim.Region.CoreModules.World.WorldMap
|
||||||
|
|
||||||
return responseMap;
|
return responseMap;
|
||||||
}
|
}
|
||||||
finally
|
|
||||||
{
|
|
||||||
if (sr != null)
|
|
||||||
sr.Close();
|
|
||||||
}
|
|
||||||
|
|
||||||
OSD rezResponse = null;
|
OSD rezResponse = null;
|
||||||
try
|
try
|
||||||
|
@ -926,6 +923,7 @@ namespace OpenSim.Region.CoreModules.World.WorldMap
|
||||||
{
|
{
|
||||||
m_log.InfoFormat("[WORLD MAP]: exception on parse of RequestMapItems reply from {0}: {1}", httpserver, ex.Message);
|
m_log.InfoFormat("[WORLD MAP]: exception on parse of RequestMapItems reply from {0}: {1}", httpserver, ex.Message);
|
||||||
responseMap["connect"] = OSD.FromBoolean(false);
|
responseMap["connect"] = OSD.FromBoolean(false);
|
||||||
|
|
||||||
lock (m_blacklistedregions)
|
lock (m_blacklistedregions)
|
||||||
{
|
{
|
||||||
if (!m_blacklistedregions.ContainsKey(regionhandle))
|
if (!m_blacklistedregions.ContainsKey(regionhandle))
|
||||||
|
|
|
@ -52,7 +52,18 @@ namespace OpenSim.Region.Framework.Interfaces
|
||||||
string GetXMLState(UUID itemID);
|
string GetXMLState(UUID itemID);
|
||||||
bool SetXMLState(UUID itemID, string xml);
|
bool SetXMLState(UUID itemID, string xml);
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Post a script event to a single script.
|
||||||
|
/// </summary>
|
||||||
|
/// <returns>true if the post suceeded, false if it did not</returns>
|
||||||
|
/// <param name='itemID'>The item ID of the script.</param>
|
||||||
|
/// <param name='name'>The name of the event.</param>
|
||||||
|
/// <param name='args'>
|
||||||
|
/// The arguments of the event. These are in the order in which they appear.
|
||||||
|
/// e.g. for http_request this will be an object array of key request_id, string method, string body
|
||||||
|
/// </param>
|
||||||
bool PostScriptEvent(UUID itemID, string name, Object[] args);
|
bool PostScriptEvent(UUID itemID, string name, Object[] args);
|
||||||
|
|
||||||
bool PostObjectEvent(UUID itemID, string name, Object[] args);
|
bool PostObjectEvent(UUID itemID, string name, Object[] args);
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
|
|
|
@ -331,35 +331,30 @@ namespace OpenSim.Region.Framework.Scenes
|
||||||
|
|
||||||
public void SendCommandToPluginModules(string[] cmdparams)
|
public void SendCommandToPluginModules(string[] cmdparams)
|
||||||
{
|
{
|
||||||
ForEachCurrentScene(delegate(Scene scene) { scene.SendCommandToPlugins(cmdparams); });
|
ForEachSelectedScene(delegate(Scene scene) { scene.SendCommandToPlugins(cmdparams); });
|
||||||
}
|
}
|
||||||
|
|
||||||
public void SetBypassPermissionsOnCurrentScene(bool bypassPermissions)
|
public void SetBypassPermissionsOnCurrentScene(bool bypassPermissions)
|
||||||
{
|
{
|
||||||
ForEachCurrentScene(delegate(Scene scene) { scene.Permissions.SetBypassPermissions(bypassPermissions); });
|
ForEachSelectedScene(delegate(Scene scene) { scene.Permissions.SetBypassPermissions(bypassPermissions); });
|
||||||
}
|
}
|
||||||
|
|
||||||
private void ForEachCurrentScene(Action<Scene> func)
|
public void ForEachSelectedScene(Action<Scene> func)
|
||||||
{
|
{
|
||||||
if (CurrentScene == null)
|
if (CurrentScene == null)
|
||||||
{
|
ForEachScene(func);
|
||||||
lock (m_localScenes)
|
|
||||||
m_localScenes.ForEach(func);
|
|
||||||
}
|
|
||||||
else
|
else
|
||||||
{
|
|
||||||
func(CurrentScene);
|
func(CurrentScene);
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
public void RestartCurrentScene()
|
public void RestartCurrentScene()
|
||||||
{
|
{
|
||||||
ForEachCurrentScene(delegate(Scene scene) { scene.RestartNow(); });
|
ForEachSelectedScene(delegate(Scene scene) { scene.RestartNow(); });
|
||||||
}
|
}
|
||||||
|
|
||||||
public void BackupCurrentScene()
|
public void BackupCurrentScene()
|
||||||
{
|
{
|
||||||
ForEachCurrentScene(delegate(Scene scene) { scene.Backup(true); });
|
ForEachSelectedScene(delegate(Scene scene) { scene.Backup(true); });
|
||||||
}
|
}
|
||||||
|
|
||||||
public bool TrySetCurrentScene(string regionName)
|
public bool TrySetCurrentScene(string regionName)
|
||||||
|
@ -490,7 +485,7 @@ namespace OpenSim.Region.Framework.Scenes
|
||||||
/// <param name="name">Name of avatar to debug</param>
|
/// <param name="name">Name of avatar to debug</param>
|
||||||
public void SetDebugPacketLevelOnCurrentScene(int newDebug, string name)
|
public void SetDebugPacketLevelOnCurrentScene(int newDebug, string name)
|
||||||
{
|
{
|
||||||
ForEachCurrentScene(scene =>
|
ForEachSelectedScene(scene =>
|
||||||
scene.ForEachScenePresence(sp =>
|
scene.ForEachScenePresence(sp =>
|
||||||
{
|
{
|
||||||
if (name == null || sp.Name == name)
|
if (name == null || sp.Name == name)
|
||||||
|
@ -509,7 +504,7 @@ namespace OpenSim.Region.Framework.Scenes
|
||||||
{
|
{
|
||||||
List<ScenePresence> avatars = new List<ScenePresence>();
|
List<ScenePresence> avatars = new List<ScenePresence>();
|
||||||
|
|
||||||
ForEachCurrentScene(
|
ForEachSelectedScene(
|
||||||
delegate(Scene scene)
|
delegate(Scene scene)
|
||||||
{
|
{
|
||||||
scene.ForEachRootScenePresence(delegate(ScenePresence scenePresence)
|
scene.ForEachRootScenePresence(delegate(ScenePresence scenePresence)
|
||||||
|
@ -526,7 +521,7 @@ namespace OpenSim.Region.Framework.Scenes
|
||||||
{
|
{
|
||||||
List<ScenePresence> presences = new List<ScenePresence>();
|
List<ScenePresence> presences = new List<ScenePresence>();
|
||||||
|
|
||||||
ForEachCurrentScene(delegate(Scene scene)
|
ForEachSelectedScene(delegate(Scene scene)
|
||||||
{
|
{
|
||||||
scene.ForEachScenePresence(delegate(ScenePresence sp)
|
scene.ForEachScenePresence(delegate(ScenePresence sp)
|
||||||
{
|
{
|
||||||
|
@ -555,12 +550,12 @@ namespace OpenSim.Region.Framework.Scenes
|
||||||
|
|
||||||
public void ForceCurrentSceneClientUpdate()
|
public void ForceCurrentSceneClientUpdate()
|
||||||
{
|
{
|
||||||
ForEachCurrentScene(delegate(Scene scene) { scene.ForceClientUpdate(); });
|
ForEachSelectedScene(delegate(Scene scene) { scene.ForceClientUpdate(); });
|
||||||
}
|
}
|
||||||
|
|
||||||
public void HandleEditCommandOnCurrentScene(string[] cmdparams)
|
public void HandleEditCommandOnCurrentScene(string[] cmdparams)
|
||||||
{
|
{
|
||||||
ForEachCurrentScene(delegate(Scene scene) { scene.HandleEditCommand(cmdparams); });
|
ForEachSelectedScene(delegate(Scene scene) { scene.HandleEditCommand(cmdparams); });
|
||||||
}
|
}
|
||||||
|
|
||||||
public bool TryGetScenePresence(UUID avatarId, out ScenePresence avatar)
|
public bool TryGetScenePresence(UUID avatarId, out ScenePresence avatar)
|
||||||
|
|
|
@ -551,13 +551,20 @@ namespace OpenSim.Region.OptionalModules.Avatar.Voice.FreeSwitchVoice
|
||||||
reqStream.Close();
|
reqStream.Close();
|
||||||
}
|
}
|
||||||
|
|
||||||
HttpWebResponse fwdrsp = (HttpWebResponse)forwardreq.GetResponse();
|
using (HttpWebResponse fwdrsp = (HttpWebResponse)forwardreq.GetResponse())
|
||||||
Encoding encoding = Util.UTF8;
|
{
|
||||||
StreamReader fwdresponsestream = new StreamReader(fwdrsp.GetResponseStream(), encoding);
|
Encoding encoding = Util.UTF8;
|
||||||
fwdresponsestr = fwdresponsestream.ReadToEnd();
|
|
||||||
fwdresponsecontenttype = fwdrsp.ContentType;
|
using (Stream s = fwdrsp.GetResponseStream())
|
||||||
fwdresponsecode = (int)fwdrsp.StatusCode;
|
{
|
||||||
fwdresponsestream.Close();
|
using (StreamReader fwdresponsestream = new StreamReader(s))
|
||||||
|
{
|
||||||
|
fwdresponsestr = fwdresponsestream.ReadToEnd();
|
||||||
|
fwdresponsecontenttype = fwdrsp.ContentType;
|
||||||
|
fwdresponsecode = (int)fwdrsp.StatusCode;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
response["content_type"] = fwdresponsecontenttype;
|
response["content_type"] = fwdresponsecontenttype;
|
||||||
response["str_response_string"] = fwdresponsestr;
|
response["str_response_string"] = fwdresponsestr;
|
||||||
|
|
|
@ -1116,18 +1116,16 @@ namespace OpenSim.Region.OptionalModules.Avatar.Voice.VivoxVoice
|
||||||
// Otherwise prepare the request
|
// Otherwise prepare the request
|
||||||
m_log.DebugFormat("[VivoxVoice] Sending request <{0}>", requrl);
|
m_log.DebugFormat("[VivoxVoice] Sending request <{0}>", requrl);
|
||||||
|
|
||||||
HttpWebRequest req = (HttpWebRequest)WebRequest.Create(requrl);
|
HttpWebRequest req = (HttpWebRequest)WebRequest.Create(requrl);
|
||||||
HttpWebResponse rsp = null;
|
|
||||||
|
|
||||||
// We are sending just parameters, no content
|
// We are sending just parameters, no content
|
||||||
req.ContentLength = 0;
|
req.ContentLength = 0;
|
||||||
|
|
||||||
// Send request and retrieve the response
|
// Send request and retrieve the response
|
||||||
rsp = (HttpWebResponse)req.GetResponse();
|
using (HttpWebResponse rsp = (HttpWebResponse)req.GetResponse())
|
||||||
|
using (Stream s = rsp.GetResponseStream())
|
||||||
XmlTextReader rdr = new XmlTextReader(rsp.GetResponseStream());
|
using (XmlTextReader rdr = new XmlTextReader(s))
|
||||||
doc.Load(rdr);
|
doc.Load(rdr);
|
||||||
rdr.Close();
|
|
||||||
}
|
}
|
||||||
catch (Exception e)
|
catch (Exception e)
|
||||||
{
|
{
|
||||||
|
|
|
@ -1146,28 +1146,38 @@ namespace Nwc.XmlRpc
|
||||||
request.AllowWriteStreamBuffering = true;
|
request.AllowWriteStreamBuffering = true;
|
||||||
request.KeepAlive = !_disableKeepAlive;
|
request.KeepAlive = !_disableKeepAlive;
|
||||||
|
|
||||||
Stream stream = request.GetRequestStream();
|
using (Stream stream = request.GetRequestStream())
|
||||||
XmlTextWriter xml = new XmlTextWriter(stream, Encoding.ASCII);
|
{
|
||||||
_serializer.Serialize(xml, this);
|
using (XmlTextWriter xml = new XmlTextWriter(stream, Encoding.ASCII))
|
||||||
xml.Flush();
|
{
|
||||||
xml.Close();
|
_serializer.Serialize(xml, this);
|
||||||
|
xml.Flush();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
HttpWebResponse response = (HttpWebResponse)request.GetResponse();
|
|
||||||
StreamReader input = new StreamReader(response.GetResponseStream());
|
|
||||||
|
|
||||||
string inputXml = input.ReadToEnd();
|
|
||||||
XmlRpcResponse resp;
|
XmlRpcResponse resp;
|
||||||
try
|
|
||||||
|
using (HttpWebResponse response = (HttpWebResponse)request.GetResponse())
|
||||||
{
|
{
|
||||||
resp = (XmlRpcResponse)_deserializer.Deserialize(inputXml);
|
using (Stream s = response.GetResponseStream())
|
||||||
|
{
|
||||||
|
using (StreamReader input = new StreamReader(s))
|
||||||
|
{
|
||||||
|
string inputXml = input.ReadToEnd();
|
||||||
|
|
||||||
|
try
|
||||||
|
{
|
||||||
|
resp = (XmlRpcResponse)_deserializer.Deserialize(inputXml);
|
||||||
|
}
|
||||||
|
catch (Exception e)
|
||||||
|
{
|
||||||
|
RequestResponse = inputXml;
|
||||||
|
throw e;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
catch (Exception e)
|
|
||||||
{
|
|
||||||
RequestResponse = inputXml;
|
|
||||||
throw e;
|
|
||||||
}
|
|
||||||
input.Close();
|
|
||||||
response.Close();
|
|
||||||
return resp;
|
return resp;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -33,6 +33,11 @@ using Nini.Config;
|
||||||
using OpenSim.Region.Framework.Interfaces;
|
using OpenSim.Region.Framework.Interfaces;
|
||||||
using OpenSim.Region.Framework.Scenes;
|
using OpenSim.Region.Framework.Scenes;
|
||||||
|
|
||||||
|
// You will need to uncomment this line if you are adding a region module to some other assembly which does not already
|
||||||
|
// specify its assembly. Otherwise, the region modules in the assembly will not be picked up when OpenSimulator scans
|
||||||
|
// the available DLLs
|
||||||
|
//[assembly: Addin("MyModule", "1.0")]
|
||||||
|
|
||||||
namespace OpenSim.Region.OptionalModules.Example.BareBonesNonShared
|
namespace OpenSim.Region.OptionalModules.Example.BareBonesNonShared
|
||||||
{
|
{
|
||||||
/// <summary>
|
/// <summary>
|
||||||
|
|
|
@ -33,6 +33,11 @@ using Nini.Config;
|
||||||
using OpenSim.Region.Framework.Interfaces;
|
using OpenSim.Region.Framework.Interfaces;
|
||||||
using OpenSim.Region.Framework.Scenes;
|
using OpenSim.Region.Framework.Scenes;
|
||||||
|
|
||||||
|
// You will need to uncomment this line if you are adding a region module to some other assembly which does not already
|
||||||
|
// specify its assembly. Otherwise, the region modules in the assembly will not be picked up when OpenSimulator scans
|
||||||
|
// the available DLLs
|
||||||
|
//[assembly: Addin("MyModule", "1.0")]
|
||||||
|
|
||||||
namespace OpenSim.Region.OptionalModules.Example.BareBonesShared
|
namespace OpenSim.Region.OptionalModules.Example.BareBonesShared
|
||||||
{
|
{
|
||||||
/// <summary>
|
/// <summary>
|
||||||
|
|
|
@ -204,7 +204,7 @@ public sealed class BSCharacter : BSPhysObject
|
||||||
// move. Thus, the velocity cannot be forced to zero. The problem is that small velocity
|
// move. Thus, the velocity cannot be forced to zero. The problem is that small velocity
|
||||||
// errors can creap in and the avatar will slowly float off in some direction.
|
// errors can creap in and the avatar will slowly float off in some direction.
|
||||||
// So, the problem is that, when an avatar is standing, we cannot tell creaping error
|
// So, the problem is that, when an avatar is standing, we cannot tell creaping error
|
||||||
// from real pushing.OMV.Vector3.Zero;
|
// from real pushing.
|
||||||
// The code below keeps setting the velocity to zero hoping the world will keep pushing.
|
// The code below keeps setting the velocity to zero hoping the world will keep pushing.
|
||||||
|
|
||||||
_velocityMotor.Step(timeStep);
|
_velocityMotor.Step(timeStep);
|
||||||
|
@ -254,9 +254,11 @@ public sealed class BSCharacter : BSPhysObject
|
||||||
}
|
}
|
||||||
|
|
||||||
// If falling, we keep the world's downward vector no matter what the other axis specify.
|
// If falling, we keep the world's downward vector no matter what the other axis specify.
|
||||||
|
// The check for _velocity.Z < 0 makes jumping work (temporary upward force).
|
||||||
if (!Flying && !IsColliding)
|
if (!Flying && !IsColliding)
|
||||||
{
|
{
|
||||||
stepVelocity.Z = _velocity.Z;
|
if (_velocity.Z < 0)
|
||||||
|
stepVelocity.Z = _velocity.Z;
|
||||||
// DetailLog("{0},BSCharacter.MoveMotor,taint,overrideStepZWithWorldZ,stepVel={1}", LocalID, stepVelocity);
|
// DetailLog("{0},BSCharacter.MoveMotor,taint,overrideStepZWithWorldZ,stepVel={1}", LocalID, stepVelocity);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -512,7 +514,7 @@ public sealed class BSCharacter : BSPhysObject
|
||||||
// just assign to "Position" because of potential call loops.
|
// just assign to "Position" because of potential call loops.
|
||||||
PhysicsScene.TaintedObject(inTaintTime, "BSCharacter.PositionSanityCheck", delegate()
|
PhysicsScene.TaintedObject(inTaintTime, "BSCharacter.PositionSanityCheck", delegate()
|
||||||
{
|
{
|
||||||
DetailLog("{0},BSCharacter.PositionSanityCheck,taint,pos={1},orient={2}", LocalID, _position, _orientation);
|
DetailLog("{0},BSCharacter.PositionSanityCheck,taint,pos={1},orient={2}", LocalID, _position, _orientation);
|
||||||
ForcePosition = _position;
|
ForcePosition = _position;
|
||||||
});
|
});
|
||||||
ret = true;
|
ret = true;
|
||||||
|
@ -572,7 +574,7 @@ public sealed class BSCharacter : BSPhysObject
|
||||||
m_targetVelocity = value;
|
m_targetVelocity = value;
|
||||||
OMV.Vector3 targetVel = value;
|
OMV.Vector3 targetVel = value;
|
||||||
if (_setAlwaysRun)
|
if (_setAlwaysRun)
|
||||||
targetVel *= BSParam.AvatarAlwaysRunFactor;
|
targetVel *= new OMV.Vector3(BSParam.AvatarAlwaysRunFactor, BSParam.AvatarAlwaysRunFactor, 0f);
|
||||||
|
|
||||||
PhysicsScene.TaintedObject("BSCharacter.setTargetVelocity", delegate()
|
PhysicsScene.TaintedObject("BSCharacter.setTargetVelocity", delegate()
|
||||||
{
|
{
|
||||||
|
|
|
@ -470,7 +470,7 @@ public class BSPrim : BSPhysObject
|
||||||
// Note that this does not change _mass!
|
// Note that this does not change _mass!
|
||||||
public override void UpdatePhysicalMassProperties(float physMass, bool inWorld)
|
public override void UpdatePhysicalMassProperties(float physMass, bool inWorld)
|
||||||
{
|
{
|
||||||
if (PhysBody.HasPhysicalBody)
|
if (PhysBody.HasPhysicalBody && PhysShape.HasPhysicalShape)
|
||||||
{
|
{
|
||||||
if (IsStatic)
|
if (IsStatic)
|
||||||
{
|
{
|
||||||
|
|
|
@ -1,5 +1,12 @@
|
||||||
CURRENT PRIORITIES
|
CURRENT PRIORITIES
|
||||||
=================================================
|
=================================================
|
||||||
|
Use the HACD convex hull routine in Bullet rather than the C# version.
|
||||||
|
Speed up hullifying large meshes.
|
||||||
|
Enable vehicle border crossings (at least as poorly as ODE)
|
||||||
|
Terrain skirts
|
||||||
|
Avatar created in previous region and not new region when crossing border
|
||||||
|
Vehicle recreated in new sim at small Z value (offset from root value?) (DONE)
|
||||||
|
Lock axis
|
||||||
Deleting a linkset while standing on the root will leave the physical shape of the root behind.
|
Deleting a linkset while standing on the root will leave the physical shape of the root behind.
|
||||||
Not sure if it is because standing on it. Done with large prim linksets.
|
Not sure if it is because standing on it. Done with large prim linksets.
|
||||||
Vehicle angular vertical attraction
|
Vehicle angular vertical attraction
|
||||||
|
@ -7,16 +14,11 @@ vehicle angular banking
|
||||||
Center-of-gravity
|
Center-of-gravity
|
||||||
Vehicle angular deflection
|
Vehicle angular deflection
|
||||||
Preferred orientation angular correction fix
|
Preferred orientation angular correction fix
|
||||||
Enable vehicle border crossings (at least as poorly as ODE)
|
|
||||||
Terrain skirts
|
|
||||||
Avatar created in previous region and not new region when crossing border
|
|
||||||
Vehicle recreated in new sim at small Z value (offset from root value?) (DONE)
|
|
||||||
when should angular and linear motor targets be zeroed? when selected?
|
when should angular and linear motor targets be zeroed? when selected?
|
||||||
Need a vehicle.clear()? Or an 'else' in prestep if not physical.
|
Need a vehicle.clear()? Or an 'else' in prestep if not physical.
|
||||||
Teravus llMoveToTarget script debug
|
Teravus llMoveToTarget script debug
|
||||||
Mixing of hover, buoyancy/gravity, moveToTarget, into one force
|
Mixing of hover, buoyancy/gravity, moveToTarget, into one force
|
||||||
Setting hover height to zero disables hover even if hover flags are on (from SL wiki)
|
Setting hover height to zero disables hover even if hover flags are on (from SL wiki)
|
||||||
Nebadon vehicles turning funny in arena
|
|
||||||
limitMotorUp calibration (more down?)
|
limitMotorUp calibration (more down?)
|
||||||
llRotLookAt
|
llRotLookAt
|
||||||
llLookAt
|
llLookAt
|
||||||
|
@ -66,6 +68,8 @@ Vehicle attributes are not restored when a vehicle is rezzed on region creation
|
||||||
|
|
||||||
GENERAL TODO LIST:
|
GENERAL TODO LIST:
|
||||||
=================================================
|
=================================================
|
||||||
|
Resitution of a prim works on another prim but not on terrain.
|
||||||
|
The dropped prim doesn't bounce properly on the terrain.
|
||||||
Add a sanity check for PIDTarget location.
|
Add a sanity check for PIDTarget location.
|
||||||
Level-of-detail for mesh creation. Prims with circular interiors require lod of 32.
|
Level-of-detail for mesh creation. Prims with circular interiors require lod of 32.
|
||||||
Is much saved with lower LODs? At the moment, all set to 32.
|
Is much saved with lower LODs? At the moment, all set to 32.
|
||||||
|
@ -163,7 +167,6 @@ Create tests for different interface components
|
||||||
Have test objects/scripts measure themselves and turn color if correct/bad
|
Have test objects/scripts measure themselves and turn color if correct/bad
|
||||||
Test functions in SL and calibrate correctness there
|
Test functions in SL and calibrate correctness there
|
||||||
Create auto rezzer and tracker to run through the tests
|
Create auto rezzer and tracker to run through the tests
|
||||||
Use the HACD convex hull routine in Bullet rather than the C# version.
|
|
||||||
Do we need to do convex hulls all the time? Can complex meshes be left meshes?
|
Do we need to do convex hulls all the time? Can complex meshes be left meshes?
|
||||||
There is some problem with meshes and collisions
|
There is some problem with meshes and collisions
|
||||||
Hulls are not as detailed as meshes. Hulled vehicles insides are different shape.
|
Hulls are not as detailed as meshes. Hulled vehicles insides are different shape.
|
||||||
|
@ -334,4 +337,5 @@ Child movement in linkset (don't rebuild linkset) (DONE 20130122))
|
||||||
Avatar standing on a moving object should start to move with the object. (DONE 20130125)
|
Avatar standing on a moving object should start to move with the object. (DONE 20130125)
|
||||||
Angular motion around Z moves the vehicle in world Z and not vehicle Z in ODE.
|
Angular motion around Z moves the vehicle in world Z and not vehicle Z in ODE.
|
||||||
Verify that angular motion specified around Z moves in the vehicle coordinates.
|
Verify that angular motion specified around Z moves in the vehicle coordinates.
|
||||||
DONE 20130120: BulletSim properly applies force in vehicle relative coordinates.
|
DONE 20130120: BulletSim properly applies force in vehicle relative coordinates.
|
||||||
|
Nebadon vehicles turning funny in arena (DONE)
|
|
@ -9423,6 +9423,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
|
||||||
return UUID.Zero.ToString();
|
return UUID.Zero.ToString();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
public LSL_String llRequestURL()
|
public LSL_String llRequestURL()
|
||||||
{
|
{
|
||||||
m_host.AddScriptLPS(1);
|
m_host.AddScriptLPS(1);
|
||||||
|
|
|
@ -443,7 +443,6 @@ default
|
||||||
string itemName = "TestNoStop";
|
string itemName = "TestNoStop";
|
||||||
|
|
||||||
SceneObjectPart partWhereRezzed = CreateScript(script, itemName, userId);
|
SceneObjectPart partWhereRezzed = CreateScript(script, itemName, userId);
|
||||||
TaskInventoryItem rezzedItem = partWhereRezzed.Inventory.GetInventoryItem(itemName);
|
|
||||||
|
|
||||||
// Wait for the script to start the event before we try stopping it.
|
// Wait for the script to start the event before we try stopping it.
|
||||||
m_chatEvent.WaitOne(60000);
|
m_chatEvent.WaitOne(60000);
|
||||||
|
|
|
@ -0,0 +1,250 @@
|
||||||
|
/*
|
||||||
|
* Copyright (c) Contributors, http://opensimulator.org/
|
||||||
|
* See CONTRIBUTORS.TXT for a full list of copyright holders.
|
||||||
|
*
|
||||||
|
* Redistribution and use in source and binary forms, with or without
|
||||||
|
* modification, are permitted provided that the following conditions are met:
|
||||||
|
* * Redistributions of source code must retain the above copyright
|
||||||
|
* notice, this list of conditions and the following disclaimer.
|
||||||
|
* * Redistributions in binary form must reproduce the above copyright
|
||||||
|
* notice, this list of conditions and the following disclaimer in the
|
||||||
|
* documentation and/or other materials provided with the distribution.
|
||||||
|
* * Neither the name of the OpenSimulator Project nor the
|
||||||
|
* names of its contributors may be used to endorse or promote products
|
||||||
|
* derived from this software without specific prior written permission.
|
||||||
|
*
|
||||||
|
* THIS SOFTWARE IS PROVIDED BY THE DEVELOPERS ``AS IS'' AND ANY
|
||||||
|
* EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
|
||||||
|
* WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
|
||||||
|
* DISCLAIMED. IN NO EVENT SHALL THE CONTRIBUTORS BE LIABLE FOR ANY
|
||||||
|
* DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
|
||||||
|
* (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
|
||||||
|
* LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
|
||||||
|
* ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
|
||||||
|
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
|
||||||
|
* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||||
|
*/
|
||||||
|
|
||||||
|
using System;
|
||||||
|
using System.Collections.Generic;
|
||||||
|
using System.IO;
|
||||||
|
using System.Net;
|
||||||
|
using System.Reflection;
|
||||||
|
using System.Text;
|
||||||
|
using log4net;
|
||||||
|
using Nini.Config;
|
||||||
|
using NUnit.Framework;
|
||||||
|
using OpenMetaverse;
|
||||||
|
using OpenSim.Framework;
|
||||||
|
using OpenSim.Framework.Servers;
|
||||||
|
using OpenSim.Framework.Servers.HttpServer;
|
||||||
|
using OpenSim.Region.CoreModules.Scripting.LSLHttp;
|
||||||
|
using OpenSim.Region.Framework.Scenes;
|
||||||
|
using OpenSim.Region.ScriptEngine.Shared;
|
||||||
|
using OpenSim.Region.ScriptEngine.Shared.Api;
|
||||||
|
using OpenSim.Region.ScriptEngine.Shared.ScriptBase;
|
||||||
|
using OpenSim.Services.Interfaces;
|
||||||
|
using OpenSim.Tests.Common;
|
||||||
|
using OpenSim.Tests.Common.Mock;
|
||||||
|
|
||||||
|
namespace OpenSim.Region.ScriptEngine.Shared.Tests
|
||||||
|
{
|
||||||
|
/// <summary>
|
||||||
|
/// Tests for HTTP related functions in LSL
|
||||||
|
/// </summary>
|
||||||
|
[TestFixture]
|
||||||
|
public class LSL_ApiHttpTests : OpenSimTestCase
|
||||||
|
{
|
||||||
|
private Scene m_scene;
|
||||||
|
private MockScriptEngine m_engine;
|
||||||
|
private UrlModule m_urlModule;
|
||||||
|
|
||||||
|
private TaskInventoryItem m_scriptItem;
|
||||||
|
private LSL_Api m_lslApi;
|
||||||
|
|
||||||
|
[TestFixtureSetUp]
|
||||||
|
public void TestFixtureSetUp()
|
||||||
|
{
|
||||||
|
// Don't allow tests to be bamboozled by asynchronous events. Execute everything on the same thread.
|
||||||
|
Util.FireAndForgetMethod = FireAndForgetMethod.RegressionTest;
|
||||||
|
}
|
||||||
|
|
||||||
|
[TestFixtureTearDown]
|
||||||
|
public void TestFixureTearDown()
|
||||||
|
{
|
||||||
|
// We must set this back afterwards, otherwise later tests will fail since they're expecting multiple
|
||||||
|
// threads. Possibly, later tests should be rewritten so none of them require async stuff (which regression
|
||||||
|
// tests really shouldn't).
|
||||||
|
Util.FireAndForgetMethod = Util.DefaultFireAndForgetMethod;
|
||||||
|
}
|
||||||
|
|
||||||
|
[SetUp]
|
||||||
|
public override void SetUp()
|
||||||
|
{
|
||||||
|
base.SetUp();
|
||||||
|
|
||||||
|
// This is an unfortunate bit of clean up we have to do because MainServer manages things through static
|
||||||
|
// variables and the VM is not restarted between tests.
|
||||||
|
uint port = 9999;
|
||||||
|
MainServer.RemoveHttpServer(port);
|
||||||
|
|
||||||
|
BaseHttpServer server = new BaseHttpServer(port, false, 0, "");
|
||||||
|
MainServer.AddHttpServer(server);
|
||||||
|
MainServer.Instance = server;
|
||||||
|
|
||||||
|
server.Start();
|
||||||
|
|
||||||
|
m_engine = new MockScriptEngine();
|
||||||
|
m_urlModule = new UrlModule();
|
||||||
|
|
||||||
|
m_scene = new SceneHelpers().SetupScene();
|
||||||
|
SceneHelpers.SetupSceneModules(m_scene, new IniConfigSource(), m_engine, m_urlModule);
|
||||||
|
|
||||||
|
SceneObjectGroup so = SceneHelpers.AddSceneObject(m_scene);
|
||||||
|
m_scriptItem = TaskInventoryHelpers.AddScript(m_scene, so.RootPart);
|
||||||
|
|
||||||
|
// This is disconnected from the actual script - the mock engine does not set up any LSL_Api atm.
|
||||||
|
// Possibly this could be done and we could obtain it directly from the MockScriptEngine.
|
||||||
|
m_lslApi = new LSL_Api();
|
||||||
|
m_lslApi.Initialize(m_engine, so.RootPart, m_scriptItem, null);
|
||||||
|
}
|
||||||
|
|
||||||
|
[TearDown]
|
||||||
|
public void TearDown()
|
||||||
|
{
|
||||||
|
MainServer.Instance.Stop();
|
||||||
|
}
|
||||||
|
|
||||||
|
[Test]
|
||||||
|
public void TestLlReleaseUrl()
|
||||||
|
{
|
||||||
|
TestHelpers.InMethod();
|
||||||
|
|
||||||
|
m_lslApi.llRequestURL();
|
||||||
|
string returnedUri = m_engine.PostedEvents[m_scriptItem.ItemID][0].Params[2].ToString();
|
||||||
|
|
||||||
|
{
|
||||||
|
// Check that the initial number of URLs is correct
|
||||||
|
Assert.That(m_lslApi.llGetFreeURLs().value, Is.EqualTo(m_urlModule.TotalUrls - 1));
|
||||||
|
}
|
||||||
|
|
||||||
|
{
|
||||||
|
// Check releasing a non-url
|
||||||
|
m_lslApi.llReleaseURL("GARBAGE");
|
||||||
|
Assert.That(m_lslApi.llGetFreeURLs().value, Is.EqualTo(m_urlModule.TotalUrls - 1));
|
||||||
|
}
|
||||||
|
|
||||||
|
{
|
||||||
|
// Check releasing a non-existing url
|
||||||
|
m_lslApi.llReleaseURL("http://example.com");
|
||||||
|
Assert.That(m_lslApi.llGetFreeURLs().value, Is.EqualTo(m_urlModule.TotalUrls - 1));
|
||||||
|
}
|
||||||
|
|
||||||
|
{
|
||||||
|
// Check URL release
|
||||||
|
m_lslApi.llReleaseURL(returnedUri);
|
||||||
|
Assert.That(m_lslApi.llGetFreeURLs().value, Is.EqualTo(m_urlModule.TotalUrls));
|
||||||
|
|
||||||
|
HttpWebRequest webRequest = (HttpWebRequest)WebRequest.Create(returnedUri);
|
||||||
|
|
||||||
|
bool gotExpectedException = false;
|
||||||
|
|
||||||
|
try
|
||||||
|
{
|
||||||
|
using (HttpWebResponse webResponse = (HttpWebResponse)webRequest.GetResponse())
|
||||||
|
{}
|
||||||
|
}
|
||||||
|
catch (WebException e)
|
||||||
|
{
|
||||||
|
using (HttpWebResponse response = (HttpWebResponse)e.Response)
|
||||||
|
gotExpectedException = response.StatusCode == HttpStatusCode.NotFound;
|
||||||
|
}
|
||||||
|
|
||||||
|
Assert.That(gotExpectedException, Is.True);
|
||||||
|
}
|
||||||
|
|
||||||
|
{
|
||||||
|
// Check releasing the same URL again
|
||||||
|
m_lslApi.llReleaseURL(returnedUri);
|
||||||
|
Assert.That(m_lslApi.llGetFreeURLs().value, Is.EqualTo(m_urlModule.TotalUrls));
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
[Test]
|
||||||
|
public void TestLlRequestUrl()
|
||||||
|
{
|
||||||
|
TestHelpers.InMethod();
|
||||||
|
|
||||||
|
string requestId = m_lslApi.llRequestURL();
|
||||||
|
Assert.That(requestId, Is.Not.EqualTo(UUID.Zero.ToString()));
|
||||||
|
string returnedUri;
|
||||||
|
|
||||||
|
{
|
||||||
|
// Check that URL is correctly set up
|
||||||
|
Assert.That(m_lslApi.llGetFreeURLs().value, Is.EqualTo(m_urlModule.TotalUrls - 1));
|
||||||
|
|
||||||
|
Assert.That(m_engine.PostedEvents.ContainsKey(m_scriptItem.ItemID));
|
||||||
|
|
||||||
|
List<EventParams> events = m_engine.PostedEvents[m_scriptItem.ItemID];
|
||||||
|
Assert.That(events.Count, Is.EqualTo(1));
|
||||||
|
EventParams eventParams = events[0];
|
||||||
|
Assert.That(eventParams.EventName, Is.EqualTo("http_request"));
|
||||||
|
|
||||||
|
UUID returnKey;
|
||||||
|
string rawReturnKey = eventParams.Params[0].ToString();
|
||||||
|
string method = eventParams.Params[1].ToString();
|
||||||
|
returnedUri = eventParams.Params[2].ToString();
|
||||||
|
|
||||||
|
Assert.That(UUID.TryParse(rawReturnKey, out returnKey), Is.True);
|
||||||
|
Assert.That(method, Is.EqualTo(ScriptBaseClass.URL_REQUEST_GRANTED));
|
||||||
|
Assert.That(Uri.IsWellFormedUriString(returnedUri, UriKind.Absolute), Is.True);
|
||||||
|
}
|
||||||
|
|
||||||
|
{
|
||||||
|
// Check that request to URL works.
|
||||||
|
string testResponse = "Hello World";
|
||||||
|
|
||||||
|
m_engine.ClearPostedEvents();
|
||||||
|
m_engine.PostEventHook
|
||||||
|
+= (itemId, evp) => m_lslApi.llHTTPResponse(evp.Params[0].ToString(), 200, testResponse);
|
||||||
|
|
||||||
|
// Console.WriteLine("Trying {0}", returnedUri);
|
||||||
|
HttpWebRequest webRequest = (HttpWebRequest)WebRequest.Create(returnedUri);
|
||||||
|
|
||||||
|
AssertHttpResponse(returnedUri, testResponse);
|
||||||
|
|
||||||
|
Assert.That(m_engine.PostedEvents.ContainsKey(m_scriptItem.ItemID));
|
||||||
|
|
||||||
|
List<EventParams> events = m_engine.PostedEvents[m_scriptItem.ItemID];
|
||||||
|
Assert.That(events.Count, Is.EqualTo(1));
|
||||||
|
EventParams eventParams = events[0];
|
||||||
|
Assert.That(eventParams.EventName, Is.EqualTo("http_request"));
|
||||||
|
|
||||||
|
UUID returnKey;
|
||||||
|
string rawReturnKey = eventParams.Params[0].ToString();
|
||||||
|
string method = eventParams.Params[1].ToString();
|
||||||
|
string body = eventParams.Params[2].ToString();
|
||||||
|
|
||||||
|
Assert.That(UUID.TryParse(rawReturnKey, out returnKey), Is.True);
|
||||||
|
Assert.That(method, Is.EqualTo("GET"));
|
||||||
|
Assert.That(body, Is.EqualTo(""));
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
private void AssertHttpResponse(string uri, string expectedResponse)
|
||||||
|
{
|
||||||
|
HttpWebRequest webRequest = (HttpWebRequest)WebRequest.Create(uri);
|
||||||
|
|
||||||
|
using (HttpWebResponse webResponse = (HttpWebResponse)webRequest.GetResponse())
|
||||||
|
{
|
||||||
|
using (Stream stream = webResponse.GetResponseStream())
|
||||||
|
{
|
||||||
|
using (StreamReader reader = new StreamReader(stream))
|
||||||
|
{
|
||||||
|
Assert.That(reader.ReadToEnd(), Is.EqualTo(expectedResponse));
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
|
@ -222,7 +222,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Tests
|
||||||
// Store an avatar with a different height from default in a notecard.
|
// Store an avatar with a different height from default in a notecard.
|
||||||
UUID userId = TestHelpers.ParseTail(0x1);
|
UUID userId = TestHelpers.ParseTail(0x1);
|
||||||
float firstHeight = 1.9f;
|
float firstHeight = 1.9f;
|
||||||
float secondHeight = 2.1f;
|
// float secondHeight = 2.1f;
|
||||||
string firstAppearanceNcName = "appearanceNc1";
|
string firstAppearanceNcName = "appearanceNc1";
|
||||||
string secondAppearanceNcName = "appearanceNc2";
|
string secondAppearanceNcName = "appearanceNc2";
|
||||||
|
|
||||||
|
|
|
@ -73,7 +73,6 @@ namespace OpenSim.Services.Connectors
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
public virtual string Helo()
|
public virtual string Helo()
|
||||||
{
|
{
|
||||||
HttpWebRequest req = (HttpWebRequest)HttpWebRequest.Create(m_ServerURI);
|
HttpWebRequest req = (HttpWebRequest)HttpWebRequest.Create(m_ServerURI);
|
||||||
|
@ -82,10 +81,12 @@ namespace OpenSim.Services.Connectors
|
||||||
|
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
WebResponse response = req.GetResponse();
|
using (WebResponse response = req.GetResponse())
|
||||||
if (response.Headers.Get("X-Handlers-Provided") == null) // just in case this ever returns a null
|
{
|
||||||
return string.Empty;
|
if (response.Headers.Get("X-Handlers-Provided") == null) // just in case this ever returns a null
|
||||||
return response.Headers.Get("X-Handlers-Provided");
|
return string.Empty;
|
||||||
|
return response.Headers.Get("X-Handlers-Provided");
|
||||||
|
}
|
||||||
}
|
}
|
||||||
catch (Exception e)
|
catch (Exception e)
|
||||||
{
|
{
|
||||||
|
@ -95,6 +96,5 @@ namespace OpenSim.Services.Connectors
|
||||||
// fail
|
// fail
|
||||||
return string.Empty;
|
return string.Empty;
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
|
@ -171,41 +171,45 @@ namespace OpenSim.Services.Connectors.Hypergrid
|
||||||
// Let's wait for the response
|
// Let's wait for the response
|
||||||
//m_log.Info("[USER AGENT CONNECTOR]: Waiting for a reply after DoCreateChildAgentCall");
|
//m_log.Info("[USER AGENT CONNECTOR]: Waiting for a reply after DoCreateChildAgentCall");
|
||||||
|
|
||||||
WebResponse webResponse = null;
|
|
||||||
StreamReader sr = null;
|
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
webResponse = AgentCreateRequest.GetResponse();
|
using (WebResponse webResponse = AgentCreateRequest.GetResponse())
|
||||||
if (webResponse == null)
|
|
||||||
{
|
{
|
||||||
m_log.Info("[USER AGENT CONNECTOR]: Null reply on DoCreateChildAgentCall post");
|
if (webResponse == null)
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
|
|
||||||
sr = new StreamReader(webResponse.GetResponseStream());
|
|
||||||
string response = sr.ReadToEnd().Trim();
|
|
||||||
m_log.InfoFormat("[USER AGENT CONNECTOR]: DoCreateChildAgentCall reply was {0} ", response);
|
|
||||||
|
|
||||||
if (!String.IsNullOrEmpty(response))
|
|
||||||
{
|
{
|
||||||
try
|
m_log.Info("[USER AGENT CONNECTOR]: Null reply on DoCreateChildAgentCall post");
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
using (Stream s = webResponse.GetResponseStream())
|
||||||
{
|
{
|
||||||
// we assume we got an OSDMap back
|
using (StreamReader sr = new StreamReader(s))
|
||||||
OSDMap r = Util.GetOSDMap(response);
|
{
|
||||||
bool success = r["success"].AsBoolean();
|
string response = sr.ReadToEnd().Trim();
|
||||||
reason = r["reason"].AsString();
|
m_log.InfoFormat("[USER AGENT CONNECTOR]: DoCreateChildAgentCall reply was {0} ", response);
|
||||||
return success;
|
|
||||||
}
|
|
||||||
catch (NullReferenceException e)
|
|
||||||
{
|
|
||||||
m_log.InfoFormat("[USER AGENT CONNECTOR]: exception on reply of DoCreateChildAgentCall {0}", e.Message);
|
|
||||||
|
|
||||||
// check for old style response
|
if (!String.IsNullOrEmpty(response))
|
||||||
if (response.ToLower().StartsWith("true"))
|
{
|
||||||
return true;
|
try
|
||||||
|
{
|
||||||
|
// we assume we got an OSDMap back
|
||||||
|
OSDMap r = Util.GetOSDMap(response);
|
||||||
|
bool success = r["success"].AsBoolean();
|
||||||
|
reason = r["reason"].AsString();
|
||||||
|
return success;
|
||||||
|
}
|
||||||
|
catch (NullReferenceException e)
|
||||||
|
{
|
||||||
|
m_log.InfoFormat("[USER AGENT CONNECTOR]: exception on reply of DoCreateChildAgentCall {0}", e.Message);
|
||||||
|
|
||||||
return false;
|
// check for old style response
|
||||||
|
if (response.ToLower().StartsWith("true"))
|
||||||
|
return true;
|
||||||
|
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -216,11 +220,6 @@ namespace OpenSim.Services.Connectors.Hypergrid
|
||||||
reason = "Destination did not reply";
|
reason = "Destination did not reply";
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
finally
|
|
||||||
{
|
|
||||||
if (sr != null)
|
|
||||||
sr.Close();
|
|
||||||
}
|
|
||||||
|
|
||||||
return true;
|
return true;
|
||||||
|
|
||||||
|
|
|
@ -168,22 +168,27 @@ namespace OpenSim.Services.Connectors
|
||||||
// Let's wait for the response
|
// Let's wait for the response
|
||||||
//m_log.Info("[REST COMMS]: Waiting for a reply after DoHelloNeighbourCall");
|
//m_log.Info("[REST COMMS]: Waiting for a reply after DoHelloNeighbourCall");
|
||||||
|
|
||||||
StreamReader sr = null;
|
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
WebResponse webResponse = helloNeighbourRequest.GetResponse();
|
using (WebResponse webResponse = helloNeighbourRequest.GetResponse())
|
||||||
if (webResponse == null)
|
|
||||||
{
|
{
|
||||||
m_log.DebugFormat(
|
if (webResponse == null)
|
||||||
"[REST COMMS]: Null reply on DoHelloNeighbourCall post from {0} to {1}",
|
{
|
||||||
thisRegion.RegionName, region.RegionName);
|
m_log.DebugFormat(
|
||||||
|
"[REST COMMS]: Null reply on DoHelloNeighbourCall post from {0} to {1}",
|
||||||
|
thisRegion.RegionName, region.RegionName);
|
||||||
|
}
|
||||||
|
|
||||||
|
using (Stream s = webResponse.GetResponseStream())
|
||||||
|
{
|
||||||
|
using (StreamReader sr = new StreamReader(s))
|
||||||
|
{
|
||||||
|
//reply = sr.ReadToEnd().Trim();
|
||||||
|
sr.ReadToEnd().Trim();
|
||||||
|
//m_log.InfoFormat("[REST COMMS]: DoHelloNeighbourCall reply was {0} ", reply);
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
sr = new StreamReader(webResponse.GetResponseStream());
|
|
||||||
//reply = sr.ReadToEnd().Trim();
|
|
||||||
sr.ReadToEnd().Trim();
|
|
||||||
//m_log.InfoFormat("[REST COMMS]: DoHelloNeighbourCall reply was {0} ", reply);
|
|
||||||
|
|
||||||
}
|
}
|
||||||
catch (Exception e)
|
catch (Exception e)
|
||||||
{
|
{
|
||||||
|
@ -193,11 +198,6 @@ namespace OpenSim.Services.Connectors
|
||||||
|
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
finally
|
|
||||||
{
|
|
||||||
if (sr != null)
|
|
||||||
sr.Close();
|
|
||||||
}
|
|
||||||
|
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
|
@ -339,36 +339,38 @@ namespace OpenSim.Services.Connectors.SimianGrid
|
||||||
// Simian does not require the asset ID to be in the URL because it's in the post data.
|
// Simian does not require the asset ID to be in the URL because it's in the post data.
|
||||||
// By appending it to the URL also, we allow caching proxies (squid) to invalidate asset URLs
|
// By appending it to the URL also, we allow caching proxies (squid) to invalidate asset URLs
|
||||||
HttpWebRequest request = (HttpWebRequest)HttpWebRequest.Create(m_serverUrl + asset.FullID.ToString());
|
HttpWebRequest request = (HttpWebRequest)HttpWebRequest.Create(m_serverUrl + asset.FullID.ToString());
|
||||||
|
|
||||||
HttpWebResponse response = MultipartForm.Post(request, postParameters);
|
|
||||||
using (Stream responseStream = response.GetResponseStream())
|
|
||||||
{
|
|
||||||
string responseStr = null;
|
|
||||||
|
|
||||||
try
|
using (HttpWebResponse response = MultipartForm.Post(request, postParameters))
|
||||||
|
{
|
||||||
|
using (Stream responseStream = response.GetResponseStream())
|
||||||
{
|
{
|
||||||
responseStr = responseStream.GetStreamString();
|
string responseStr = null;
|
||||||
OSD responseOSD = OSDParser.Deserialize(responseStr);
|
|
||||||
if (responseOSD.Type == OSDType.Map)
|
try
|
||||||
{
|
{
|
||||||
OSDMap responseMap = (OSDMap)responseOSD;
|
responseStr = responseStream.GetStreamString();
|
||||||
if (responseMap["Success"].AsBoolean())
|
OSD responseOSD = OSDParser.Deserialize(responseStr);
|
||||||
return asset.ID;
|
if (responseOSD.Type == OSDType.Map)
|
||||||
|
{
|
||||||
|
OSDMap responseMap = (OSDMap)responseOSD;
|
||||||
|
if (responseMap["Success"].AsBoolean())
|
||||||
|
return asset.ID;
|
||||||
|
else
|
||||||
|
errorMessage = "Upload failed: " + responseMap["Message"].AsString();
|
||||||
|
}
|
||||||
else
|
else
|
||||||
errorMessage = "Upload failed: " + responseMap["Message"].AsString();
|
{
|
||||||
|
errorMessage = "Response format was invalid:\n" + responseStr;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
else
|
catch (Exception ex)
|
||||||
{
|
{
|
||||||
errorMessage = "Response format was invalid:\n" + responseStr;
|
if (!String.IsNullOrEmpty(responseStr))
|
||||||
|
errorMessage = "Failed to parse the response:\n" + responseStr;
|
||||||
|
else
|
||||||
|
errorMessage = "Failed to retrieve the response: " + ex.Message;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
catch (Exception ex)
|
|
||||||
{
|
|
||||||
if (!String.IsNullOrEmpty(responseStr))
|
|
||||||
errorMessage = "Failed to parse the response:\n" + responseStr;
|
|
||||||
else
|
|
||||||
errorMessage = "Failed to retrieve the response: " + ex.Message;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
catch (WebException ex)
|
catch (WebException ex)
|
||||||
|
@ -378,6 +380,7 @@ namespace OpenSim.Services.Connectors.SimianGrid
|
||||||
|
|
||||||
m_log.WarnFormat("[SIMIAN ASSET CONNECTOR]: Failed to store asset \"{0}\" ({1}, {2}): {3}",
|
m_log.WarnFormat("[SIMIAN ASSET CONNECTOR]: Failed to store asset \"{0}\" ({1}, {2}): {3}",
|
||||||
asset.Name, asset.ID, asset.Metadata.ContentType, errorMessage);
|
asset.Name, asset.ID, asset.Metadata.ContentType, errorMessage);
|
||||||
|
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -40,10 +40,33 @@ namespace OpenSim.Tests.Common
|
||||||
{
|
{
|
||||||
public class MockScriptEngine : INonSharedRegionModule, IScriptModule, IScriptEngine
|
public class MockScriptEngine : INonSharedRegionModule, IScriptModule, IScriptEngine
|
||||||
{
|
{
|
||||||
|
public IConfigSource ConfigSource { get; private set; }
|
||||||
|
|
||||||
|
public IConfig Config { get; private set; }
|
||||||
|
|
||||||
private Scene m_scene;
|
private Scene m_scene;
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Expose posted events to tests.
|
||||||
|
/// </summary>
|
||||||
|
public Dictionary<UUID, List<EventParams>> PostedEvents { get; private set; }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// A very primitive way of hooking text cose to a posed event.
|
||||||
|
/// </summary>
|
||||||
|
/// <remarks>
|
||||||
|
/// May be replaced with something that uses more original code in the future.
|
||||||
|
/// </remarks>
|
||||||
|
public event Action<UUID, EventParams> PostEventHook;
|
||||||
|
|
||||||
public void Initialise(IConfigSource source)
|
public void Initialise(IConfigSource source)
|
||||||
{
|
{
|
||||||
|
ConfigSource = source;
|
||||||
|
|
||||||
|
// Can set later on if required
|
||||||
|
Config = new IniConfig("MockScriptEngine", ConfigSource);
|
||||||
|
|
||||||
|
PostedEvents = new Dictionary<UUID, List<EventParams>>();
|
||||||
}
|
}
|
||||||
|
|
||||||
public void Close()
|
public void Close()
|
||||||
|
@ -85,7 +108,28 @@ namespace OpenSim.Tests.Common
|
||||||
|
|
||||||
public bool PostScriptEvent(UUID itemID, string name, object[] args)
|
public bool PostScriptEvent(UUID itemID, string name, object[] args)
|
||||||
{
|
{
|
||||||
return false;
|
// Console.WriteLine("Posting event {0} for {1}", name, itemID);
|
||||||
|
|
||||||
|
EventParams evParams = new EventParams(name, args, null);
|
||||||
|
|
||||||
|
List<EventParams> eventsForItem;
|
||||||
|
|
||||||
|
if (!PostedEvents.ContainsKey(itemID))
|
||||||
|
{
|
||||||
|
eventsForItem = new List<EventParams>();
|
||||||
|
PostedEvents.Add(itemID, eventsForItem);
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
eventsForItem = PostedEvents[itemID];
|
||||||
|
}
|
||||||
|
|
||||||
|
eventsForItem.Add(evParams);
|
||||||
|
|
||||||
|
if (PostEventHook != null)
|
||||||
|
PostEventHook(itemID, evParams);
|
||||||
|
|
||||||
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
public bool PostObjectEvent(UUID itemID, string name, object[] args)
|
public bool PostObjectEvent(UUID itemID, string name, object[] args)
|
||||||
|
@ -195,11 +239,7 @@ namespace OpenSim.Tests.Common
|
||||||
|
|
||||||
public Scene World { get { return m_scene; } }
|
public Scene World { get { return m_scene; } }
|
||||||
|
|
||||||
public IScriptModule ScriptModule { get { throw new System.NotImplementedException(); } }
|
public IScriptModule ScriptModule { get { return this; } }
|
||||||
|
|
||||||
public IConfig Config { get { throw new System.NotImplementedException (); } }
|
|
||||||
|
|
||||||
public IConfigSource ConfigSource { get { throw new System.NotImplementedException (); } }
|
|
||||||
|
|
||||||
public string ScriptEnginePath { get { throw new System.NotImplementedException (); }}
|
public string ScriptEnginePath { get { throw new System.NotImplementedException (); }}
|
||||||
|
|
||||||
|
@ -210,5 +250,10 @@ namespace OpenSim.Tests.Common
|
||||||
public string[] ScriptReferencedAssemblies { get { throw new System.NotImplementedException (); } }
|
public string[] ScriptReferencedAssemblies { get { throw new System.NotImplementedException (); } }
|
||||||
|
|
||||||
public ParameterInfo[] ScriptBaseClassParameters { get { throw new System.NotImplementedException (); } }
|
public ParameterInfo[] ScriptBaseClassParameters { get { throw new System.NotImplementedException (); } }
|
||||||
|
|
||||||
|
public void ClearPostedEvents()
|
||||||
|
{
|
||||||
|
PostedEvents.Clear();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
|
@ -47,6 +47,8 @@ namespace OpenSim.Tests
|
||||||
[SetUp]
|
[SetUp]
|
||||||
public void SetUp()
|
public void SetUp()
|
||||||
{
|
{
|
||||||
|
base.SetUp();
|
||||||
|
|
||||||
m_basePath = Path.Combine(Path.GetTempPath(), Path.GetRandomFileName());
|
m_basePath = Path.Combine(Path.GetTempPath(), Path.GetRandomFileName());
|
||||||
string path = Path.Combine(m_basePath, m_testSubdirectory);
|
string path = Path.Combine(m_basePath, m_testSubdirectory);
|
||||||
Directory.CreateDirectory(path);
|
Directory.CreateDirectory(path);
|
||||||
|
|
|
@ -322,12 +322,19 @@
|
||||||
|
|
||||||
[Map]
|
[Map]
|
||||||
;# {GenerateMaptiles} {} {Generate map tiles?} {true false} true
|
;# {GenerateMaptiles} {} {Generate map tiles?} {true false} true
|
||||||
;; Map tile options. You can choose to generate normal maptiles or nominate an uploaded texture to
|
;; Map tile options.
|
||||||
;; be the map tile using the MaptileStaticUUID parameter in this section or for individual regions in
|
;; If true, then maptiles are generated using the MapImageModule below.
|
||||||
;; the regions config file(s). If you do not want to upload map tiles at all, then you will need
|
;; If false then the texture referenced by MaptileStaticUUID is used instead, which can also be overriden
|
||||||
;; to disable the MapImageServiceModule entirely.
|
;; in individual region config file(s). If you do not want to upload map tiles at all, then you will need
|
||||||
|
;; both to set this to false and comment out the [Modules] MapImageServiceModule setting in config-include/
|
||||||
; GenerateMaptiles = true
|
; GenerateMaptiles = true
|
||||||
|
|
||||||
|
;# {MapImageModule} [] {The map image module to use} {MapImageModule Warp3DImageModule} MapImageModule
|
||||||
|
;; The module to use in order to generate map images.
|
||||||
|
;; MapImageModule is the default. Warp3DImageModule is an alternative experimental module that can
|
||||||
|
;; generate better images.
|
||||||
|
;MapImageModule = "MapImageModule"
|
||||||
|
|
||||||
;# {MaptileRefresh} {GenerateMaptiles} {Maptile refresh period?} {} 0
|
;# {MaptileRefresh} {GenerateMaptiles} {Maptile refresh period?} {} 0
|
||||||
;; If desired, a running region can update the map tiles periodically
|
;; If desired, a running region can update the map tiles periodically
|
||||||
;; to reflect building activity. This names no sense of you don't have
|
;; to reflect building activity. This names no sense of you don't have
|
||||||
|
|
|
@ -52,7 +52,8 @@
|
||||||
|
|
||||||
AssetServiceConnector = "8003/OpenSim.Server.Handlers.dll:AssetServiceConnector"
|
AssetServiceConnector = "8003/OpenSim.Server.Handlers.dll:AssetServiceConnector"
|
||||||
InventoryInConnector = "8003/OpenSim.Server.Handlers.dll:XInventoryInConnector"
|
InventoryInConnector = "8003/OpenSim.Server.Handlers.dll:XInventoryInConnector"
|
||||||
VoiceConnector = "8004/OpenSim.Server.Handlers.dll:FreeswitchServerConnector"
|
;; Uncomment if you have set up Freeswitch (see [FreeswitchService] below)
|
||||||
|
;VoiceConnector = "8004/OpenSim.Server.Handlers.dll:FreeswitchServerConnector"
|
||||||
GridServiceConnector = "8003/OpenSim.Server.Handlers.dll:GridServiceConnector"
|
GridServiceConnector = "8003/OpenSim.Server.Handlers.dll:GridServiceConnector"
|
||||||
GridInfoServerInConnector = "8002/OpenSim.Server.Handlers.dll:GridInfoServerInConnector"
|
GridInfoServerInConnector = "8002/OpenSim.Server.Handlers.dll:GridInfoServerInConnector"
|
||||||
AuthenticationServiceConnector = "8003/OpenSim.Server.Handlers.dll:AuthenticationServiceConnector"
|
AuthenticationServiceConnector = "8003/OpenSim.Server.Handlers.dll:AuthenticationServiceConnector"
|
||||||
|
|
|
@ -30,7 +30,8 @@
|
||||||
[ServiceList]
|
[ServiceList]
|
||||||
AssetServiceConnector = "8003/OpenSim.Server.Handlers.dll:AssetServiceConnector"
|
AssetServiceConnector = "8003/OpenSim.Server.Handlers.dll:AssetServiceConnector"
|
||||||
InventoryInConnector = "8003/OpenSim.Server.Handlers.dll:XInventoryInConnector"
|
InventoryInConnector = "8003/OpenSim.Server.Handlers.dll:XInventoryInConnector"
|
||||||
VoiceConnector = "8004/OpenSim.Server.Handlers.dll:FreeswitchServerConnector"
|
;; Uncomment if you have set up Freeswitch (see [FreeswitchService] below)
|
||||||
|
;VoiceConnector = "8004/OpenSim.Server.Handlers.dll:FreeswitchServerConnector"
|
||||||
GridServiceConnector = "8003/OpenSim.Server.Handlers.dll:GridServiceConnector"
|
GridServiceConnector = "8003/OpenSim.Server.Handlers.dll:GridServiceConnector"
|
||||||
GridInfoServerInConnector = "8002/OpenSim.Server.Handlers.dll:GridInfoServerInConnector"
|
GridInfoServerInConnector = "8002/OpenSim.Server.Handlers.dll:GridInfoServerInConnector"
|
||||||
AuthenticationServiceConnector = "8003/OpenSim.Server.Handlers.dll:AuthenticationServiceConnector"
|
AuthenticationServiceConnector = "8003/OpenSim.Server.Handlers.dll:AuthenticationServiceConnector"
|
||||||
|
|
|
@ -2196,7 +2196,6 @@
|
||||||
<ReferencePath>../../../../bin/</ReferencePath>
|
<ReferencePath>../../../../bin/</ReferencePath>
|
||||||
<Reference name="System"/>
|
<Reference name="System"/>
|
||||||
<Reference name="System.Data"/>
|
<Reference name="System.Data"/>
|
||||||
<Reference name="System.Net"/>
|
|
||||||
<Reference name="System.Web"/>
|
<Reference name="System.Web"/>
|
||||||
<Reference name="System.Xml"/>
|
<Reference name="System.Xml"/>
|
||||||
<Reference name="OpenMetaverseTypes" path="../../../../bin/"/>
|
<Reference name="OpenMetaverseTypes" path="../../../../bin/"/>
|
||||||
|
@ -3391,6 +3390,8 @@
|
||||||
<Reference name="System.Xml"/>
|
<Reference name="System.Xml"/>
|
||||||
<Reference name="OpenSim.Framework"/>
|
<Reference name="OpenSim.Framework"/>
|
||||||
<Reference name="OpenSim.Framework.Communications"/>
|
<Reference name="OpenSim.Framework.Communications"/>
|
||||||
|
<Reference name="OpenSim.Framework.Servers"/>
|
||||||
|
<Reference name="OpenSim.Framework.Servers.HttpServer"/>
|
||||||
<Reference name="OpenSim.Region.CoreModules"/>
|
<Reference name="OpenSim.Region.CoreModules"/>
|
||||||
<Reference name="OpenSim.Region.Framework"/>
|
<Reference name="OpenSim.Region.Framework"/>
|
||||||
<Reference name="OpenSim.Region.OptionalModules"/>
|
<Reference name="OpenSim.Region.OptionalModules"/>
|
||||||
|
|
Loading…
Reference in New Issue