Merge branch 'master' into casper

avinationmerge
CasperW 2009-12-21 13:29:48 +01:00
commit d8d6e8a304
15 changed files with 190 additions and 288 deletions

View File

@ -252,6 +252,8 @@ namespace OpenSim.Framework.Servers.HttpServer
} }
private void OnRequest(object source, RequestEventArgs args) private void OnRequest(object source, RequestEventArgs args)
{
try
{ {
IHttpClientContext context = (IHttpClientContext)source; IHttpClientContext context = (IHttpClientContext)source;
IHttpRequest request = args.Request; IHttpRequest request = args.Request;
@ -306,7 +308,11 @@ namespace OpenSim.Framework.Servers.HttpServer
{ {
OnHandleRequestIOThread(context, request); OnHandleRequestIOThread(context, request);
} }
}
catch (Exception e)
{
m_log.ErrorFormat("[BASE HTTP SERVER]: OnRequest() failed with {0} {1}", e.Message, e.StackTrace);
}
} }
public void OnHandleRequestIOThread(IHttpClientContext context, IHttpRequest request) public void OnHandleRequestIOThread(IHttpClientContext context, IHttpRequest request)
@ -465,11 +471,11 @@ namespace OpenSim.Framework.Servers.HttpServer
catch (SocketException e) catch (SocketException e)
{ {
// This has to be here to prevent a Linux/Mono crash // This has to be here to prevent a Linux/Mono crash
m_log.WarnFormat("[BASE HTTP SERVER] XmlRpcRequest issue {0}.\nNOTE: this may be spurious on Linux.", e); m_log.WarnFormat("[BASE HTTP SERVER]: XmlRpcRequest issue {0}.\nNOTE: this may be spurious on Linux.", e);
} }
catch (IOException e) catch (IOException e)
{ {
m_log.Warn("[BASE HTTP SERVER] XmlRpcRequest issue: " + e.Message); m_log.Warn("[BASE HTTP SERVER]: XmlRpcRequest issue: " + e.Message);
} }
return; return;
} }
@ -548,7 +554,7 @@ namespace OpenSim.Framework.Servers.HttpServer
} }
catch (IOException e) catch (IOException e)
{ {
m_log.ErrorFormat("[BASE HTTP SERVER] HandleRequest() threw ", e); m_log.ErrorFormat("[BASE HTTP SERVER]: HandleRequest() threw ", e);
} }
catch (InvalidOperationException e) catch (InvalidOperationException e)
{ {
@ -763,7 +769,7 @@ namespace OpenSim.Framework.Servers.HttpServer
byte[] buf = Encoding.UTF8.GetBytes("Not found"); byte[] buf = Encoding.UTF8.GetBytes("Not found");
response.KeepAlive = false; response.KeepAlive = false;
m_log.ErrorFormat("[BASE HTTP SERVER] Handler not found for http request {0}", request.RawUrl); m_log.ErrorFormat("[BASE HTTP SERVER]: Handler not found for http request {0}", request.RawUrl);
response.SendChunked = false; response.SendChunked = false;
response.ContentLength64 = buf.Length; response.ContentLength64 = buf.Length;
@ -775,7 +781,7 @@ namespace OpenSim.Framework.Servers.HttpServer
} }
catch (Exception ex) catch (Exception ex)
{ {
m_log.Warn("[HTTPD]: Error - " + ex.Message); m_log.Warn("[BASE HTTP SERVER]: Error - " + ex.Message);
} }
finally finally
{ {
@ -787,11 +793,11 @@ namespace OpenSim.Framework.Servers.HttpServer
catch (SocketException e) catch (SocketException e)
{ {
// This has to be here to prevent a Linux/Mono crash // This has to be here to prevent a Linux/Mono crash
m_log.WarnFormat("[BASE HTTP SERVER] XmlRpcRequest issue {0}.\nNOTE: this may be spurious on Linux.", e); m_log.WarnFormat("[BASE HTTP SERVER]: XmlRpcRequest issue {0}.\nNOTE: this may be spurious on Linux.", e);
} }
catch (IOException e) catch (IOException e)
{ {
m_log.Warn("[BASE HTTP SERVER] XmlRpcRequest issue: " + e.Message); m_log.Warn("[BASE HTTP SERVER]: XmlRpcRequest issue: " + e.Message);
} }
} }
return; return;
@ -812,7 +818,7 @@ namespace OpenSim.Framework.Servers.HttpServer
} }
catch (Exception ex) catch (Exception ex)
{ {
m_log.Warn("[HTTPD]: Error - " + ex.Message); m_log.Warn("[BASE HTTP SERVER]: Error - " + ex.Message);
} }
finally finally
{ {
@ -824,11 +830,11 @@ namespace OpenSim.Framework.Servers.HttpServer
catch (SocketException e) catch (SocketException e)
{ {
// This has to be here to prevent a Linux/Mono crash // This has to be here to prevent a Linux/Mono crash
m_log.WarnFormat("[BASE HTTP SERVER] XmlRpcRequest issue {0}.\nNOTE: this may be spurious on Linux.", e); m_log.WarnFormat("[BASE HTTP SERVER]: XmlRpcRequest issue {0}.\nNOTE: this may be spurious on Linux.", e);
} }
catch (IOException e) catch (IOException e)
{ {
m_log.Warn("[BASE HTTP SERVER] XmlRpcRequest issue: " + e.Message); m_log.Warn("[BASE HTTP SERVER]: XmlRpcRequest issue: " + e.Message);
} }
} }
} }
@ -864,7 +870,7 @@ namespace OpenSim.Framework.Servers.HttpServer
} }
catch (Exception ex) catch (Exception ex)
{ {
m_log.Warn("[HTTPD]: Error - " + ex.Message); m_log.Warn("[BASE HTTP SERVER]: Error - " + ex.Message);
} }
if (llsdRequest != null)// && m_defaultLlsdHandler != null) if (llsdRequest != null)// && m_defaultLlsdHandler != null)
@ -925,7 +931,7 @@ namespace OpenSim.Framework.Servers.HttpServer
} }
catch (Exception ex) catch (Exception ex)
{ {
m_log.Warn("[HTTPD]: Error - " + ex.Message); m_log.Warn("[BASE HTTP SERVER]: Error - " + ex.Message);
} }
finally finally
{ {
@ -939,12 +945,12 @@ namespace OpenSim.Framework.Servers.HttpServer
} }
catch (IOException e) catch (IOException e)
{ {
m_log.DebugFormat("[BASE HTTP SERVER] LLSD IOException {0}.", e); m_log.DebugFormat("[BASE HTTP SERVER]: LLSD IOException {0}.", e);
} }
catch (SocketException e) catch (SocketException e)
{ {
// This has to be here to prevent a Linux/Mono crash // This has to be here to prevent a Linux/Mono crash
m_log.WarnFormat("[BASE HTTP SERVER] LLSD issue {0}.\nNOTE: this may be spurious on Linux.", e); m_log.WarnFormat("[BASE HTTP SERVER]: LLSD issue {0}.\nNOTE: this may be spurious on Linux.", e);
} }
} }
} }
@ -1482,11 +1488,11 @@ namespace OpenSim.Framework.Servers.HttpServer
catch (SocketException e) catch (SocketException e)
{ {
// This has to be here to prevent a Linux/Mono crash // This has to be here to prevent a Linux/Mono crash
m_log.WarnFormat("[BASE HTTP SERVER] XmlRpcRequest issue {0}.\nNOTE: this may be spurious on Linux.", e); m_log.WarnFormat("[BASE HTTP SERVER]: XmlRpcRequest issue {0}.\nNOTE: this may be spurious on Linux.", e);
} }
catch (IOException e) catch (IOException e)
{ {
m_log.Warn("[BASE HTTP SERVER] XmlRpcRequest issue: " + e.Message); m_log.Warn("[BASE HTTP SERVER]: XmlRpcRequest issue: " + e.Message);
} }
} }
} }
@ -1510,7 +1516,7 @@ namespace OpenSim.Framework.Servers.HttpServer
} }
catch (Exception ex) catch (Exception ex)
{ {
m_log.Warn("[HTTPD]: Error - " + ex.Message); m_log.Warn("[BASE HTTP SERVER]: Error - " + ex.Message);
} }
finally finally
{ {
@ -1523,7 +1529,7 @@ namespace OpenSim.Framework.Servers.HttpServer
catch (SocketException e) catch (SocketException e)
{ {
// This has to be here to prevent a Linux/Mono crash // This has to be here to prevent a Linux/Mono crash
m_log.WarnFormat("[BASE HTTP SERVER] XmlRpcRequest issue {0}.\nNOTE: this may be spurious on Linux.", e); m_log.WarnFormat("[BASE HTTP SERVER]: XmlRpcRequest issue {0}.\nNOTE: this may be spurious on Linux.", e);
} }
} }
} }
@ -1546,7 +1552,7 @@ namespace OpenSim.Framework.Servers.HttpServer
} }
catch (Exception ex) catch (Exception ex)
{ {
m_log.Warn("[HTTPD]: Error - " + ex.Message); m_log.Warn("[BASE HTTP SERVER]: Error - " + ex.Message);
} }
finally finally
{ {
@ -1566,7 +1572,7 @@ namespace OpenSim.Framework.Servers.HttpServer
public void Start() public void Start()
{ {
m_log.Info("[HTTPD]: Starting up HTTP Server"); m_log.Info("[BASE HTTP SERVER]: Starting up HTTP Server");
StartHTTP(); StartHTTP();
} }
@ -1574,7 +1580,7 @@ namespace OpenSim.Framework.Servers.HttpServer
{ {
try try
{ {
m_log.Info("[HTTPD]: Spawned main thread OK"); m_log.Debug("[BASE HTTP SERVER]: Spawned main thread OK");
//m_httpListener = new HttpListener(); //m_httpListener = new HttpListener();
NotSocketErrors = 0; NotSocketErrors = 0;
if (!m_ssl) if (!m_ssl)
@ -1614,8 +1620,8 @@ namespace OpenSim.Framework.Servers.HttpServer
} }
catch (Exception e) catch (Exception e)
{ {
m_log.Error("[HTTPD]: Error - " + e.Message); m_log.Error("[BASE HTTP SERVER]: Error - " + e.Message);
m_log.Error("[HTTPD]: Tip: Do you have permission to listen on port " + m_port + ", " + m_sslport + "?"); m_log.Error("[BASE HTTP SERVER]: Tip: Do you have permission to listen on port " + m_port + ", " + m_sslport + "?");
// We want this exception to halt the entire server since in current configurations we aren't too // We want this exception to halt the entire server since in current configurations we aren't too
// useful without inbound HTTP. // useful without inbound HTTP.
@ -1636,7 +1642,7 @@ namespace OpenSim.Framework.Servers.HttpServer
public void httpServerException(object source, Exception exception) public void httpServerException(object source, Exception exception)
{ {
m_log.ErrorFormat("[HTTPSERVER]: {0} had an exception {1}", source.ToString(), exception.ToString()); m_log.ErrorFormat("[BASE HTTP SERVER]: {0} had an exception {1}", source.ToString(), exception.ToString());
/* /*
if (HTTPDRunning)// && NotSocketErrors > 5) if (HTTPDRunning)// && NotSocketErrors > 5)
{ {
@ -1662,7 +1668,7 @@ namespace OpenSim.Framework.Servers.HttpServer
} }
catch (NullReferenceException) catch (NullReferenceException)
{ {
m_log.Warn("[BASEHTTPSERVER]: Null Reference when stopping HttpServer."); m_log.Warn("[BASE HTTP SERVER]: Null Reference when stopping HttpServer.");
} }
} }

View File

@ -29,7 +29,7 @@ namespace OpenSim
{ {
public class VersionInfo public class VersionInfo
{ {
private const string VERSION_NUMBER = "0.6.9CM"; private const string VERSION_NUMBER = "0.6.91CM";
private const Flavour VERSION_FLAVOUR = Flavour.Dev; private const Flavour VERSION_FLAVOUR = Flavour.Dev;
public enum Flavour public enum Flavour
{ {

View File

@ -405,6 +405,7 @@ namespace OpenSim.Region.CoreModules.ServiceConnectorsOut.Grid
if (parts.Length >= 2) if (parts.Length >= 2)
{ {
portstr = parts[1]; portstr = parts[1];
//m_log.Debug("-- port = " + portstr);
if (!UInt32.TryParse(portstr, out port)) if (!UInt32.TryParse(portstr, out port))
regionName = parts[1]; regionName = parts[1];
} }
@ -620,8 +621,16 @@ namespace OpenSim.Region.CoreModules.ServiceConnectorsOut.Grid
clonedRegion.RegionLocX = (int)x; clonedRegion.RegionLocX = (int)x;
clonedRegion.RegionLocY = (int)y; clonedRegion.RegionLocY = (int)y;
// Get the user's home region information // Get the user's home region information and adapt the region handle
GridRegion home = m_aScene.GridService.GetRegionByUUID(m_aScene.RegionInfo.ScopeID, uinfo.UserProfile.HomeRegionID); GridRegion home = GetRegionByUUID(m_aScene.RegionInfo.ScopeID, uinfo.UserProfile.HomeRegionID);
if (m_HyperlinkHandles.ContainsKey(uinfo.UserProfile.HomeRegionID))
{
ulong realHandle = m_HyperlinkHandles[uinfo.UserProfile.HomeRegionID];
Utils.LongToUInts(realHandle, out x, out y);
m_log.DebugFormat("[HGrid]: Foreign user is going elsewhere. Adjusting home handle from {0}-{1} to {2}-{3}", home.RegionLocX, home.RegionLocY, x, y);
home.RegionLocX = (int)x;
home.RegionLocY = (int)y;
}
// Get the user's service URLs // Get the user's service URLs
string serverURI = ""; string serverURI = "";

View File

@ -157,7 +157,9 @@ namespace OpenSim.Region.CoreModules.ServiceConnectorsOut.Interregion
} }
// m_log.DebugFormat("[LOCAL COMMS]: Did not find region {0} for SendCreateChildAgent", regionHandle); // m_log.DebugFormat("[LOCAL COMMS]: Did not find region {0} for SendCreateChildAgent", regionHandle);
reason = "Did not find region."; uint x = 0, y = 0;
Utils.LongToUInts(regionHandle, out x, out y);
reason = "Did not find region " + x + "-" + y;
return false; return false;
} }

View File

@ -35,7 +35,7 @@ namespace OpenSim.Region.Framework.Interfaces
string ScriptEngineName { get; } string ScriptEngineName { get; }
string GetXMLState(UUID itemID); string GetXMLState(UUID itemID);
void SetXMLState(UUID itemID, string xml); bool SetXMLState(UUID itemID, string xml);
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);

View File

@ -1328,7 +1328,7 @@ namespace OpenSim.Region.Framework.Scenes
maintc = Util.EnvironmentTickCountSubtract(maintc); maintc = Util.EnvironmentTickCountSubtract(maintc);
maintc = (int)(m_timespan * 1000) - maintc; maintc = (int)(m_timespan * 1000) - maintc;
if ((maintc < (m_timespan * 1000)) && maintc > 0) if (maintc > 0)
Thread.Sleep(maintc); Thread.Sleep(maintc);
// Tell the watchdog that this thread is still alive // Tell the watchdog that this thread is still alive

View File

@ -513,24 +513,11 @@ namespace OpenSim.Region.Framework.Scenes
{ {
// If this is a linkset, we don't want the physics engine mucking up our group position here. // If this is a linkset, we don't want the physics engine mucking up our group position here.
PhysicsActor actor = PhysActor; PhysicsActor actor = PhysActor;
if (actor != null && _parentID == 0) if (actor != null && _parentID == 0)
{ {
m_groupPosition = actor.Position; m_groupPosition = actor.Position;
} }
/*
if (actor != null)
{
if (_parentID == 0)
{
m_groupPosition = actor.Position;
}
else
{
m_groupPosition = ParentGroup.AbsolutePosition; // KF+Casper Update Child prims too!
}
}
*/
if (IsAttachment) if (IsAttachment)
{ {
ScenePresence sp = m_parentGroup.Scene.GetScenePresence(AttachedAvatar); ScenePresence sp = m_parentGroup.Scene.GetScenePresence(AttachedAvatar);
@ -545,7 +532,6 @@ namespace OpenSim.Region.Framework.Scenes
StoreUndoState(); StoreUndoState();
m_groupPosition = value; m_groupPosition = value;
PhysicsActor actor = PhysActor; PhysicsActor actor = PhysActor;
if (actor != null) if (actor != null)
{ {
@ -1755,16 +1741,17 @@ namespace OpenSim.Region.Framework.Scenes
public Vector3 GetWorldPosition() public Vector3 GetWorldPosition()
{ {
Quaternion parentRot = ParentGroup.RootPart.RotationOffset; Quaternion parentRot = ParentGroup.RootPart.RotationOffset;
Vector3 axPos = OffsetPosition; Vector3 axPos = OffsetPosition;
axPos *= parentRot; axPos *= parentRot;
Vector3 translationOffsetPosition = axPos; Vector3 translationOffsetPosition = axPos;
if(_parentID == 0)
int tx = (int)GroupPosition.X; {
int ty = (int)GroupPosition.Y; return GroupPosition;
int tz = (int)GroupPosition.Z; }
else
return GroupPosition + translationOffsetPosition; {
return ParentGroup.AbsolutePosition + translationOffsetPosition; //KF: Fix child prim position
}
} }
/// <summary> /// <summary>

View File

@ -26,6 +26,7 @@
*/ */
using System; using System;
using System.Xml;
using System.IO; using System.IO;
using System.Collections.Generic; using System.Collections.Generic;
using System.Reflection; using System.Reflection;
@ -295,15 +296,55 @@ namespace OpenSim.Region.Framework.Scenes
private void RestoreSavedScriptState(UUID oldID, UUID newID) private void RestoreSavedScriptState(UUID oldID, UUID newID)
{ {
IScriptModule[] engines = m_part.ParentGroup.Scene.RequestModuleInterfaces<IScriptModule>();
if (engines == null) // No engine at all
return;
if (m_part.ParentGroup.m_savedScriptState.ContainsKey(oldID)) if (m_part.ParentGroup.m_savedScriptState.ContainsKey(oldID))
{ {
string fpath = Path.Combine("ScriptEngines/"+m_part.ParentGroup.Scene.RegionInfo.RegionID.ToString(), XmlDocument doc = new XmlDocument();
newID.ToString()+".state");
FileStream fs = File.Create(fpath); doc.LoadXml(m_part.ParentGroup.m_savedScriptState[oldID]);
Byte[] buffer = enc.GetBytes(m_part.ParentGroup.m_savedScriptState[oldID]);
fs.Write(buffer,0,buffer.Length); ////////// CRUFT WARNING ///////////////////////////////////
fs.Close(); //
m_part.ParentGroup.m_savedScriptState.Remove(oldID); // Old objects will have <ScriptState><State> ...
// This format is XEngine ONLY
//
// New objects have <State Engine="...." ...><ScriptState>...
// This can be passed to any engine
//
XmlNode n = doc.SelectSingleNode("ScriptState");
if (n != null) // Old format data
{
XmlDocument newDoc = new XmlDocument();
XmlElement rootN = newDoc.CreateElement("", "State", "");
XmlAttribute uuidA = newDoc.CreateAttribute("", "UUID", "");
uuidA.Value = oldID.ToString();
rootN.Attributes.Append(uuidA);
XmlAttribute engineA = newDoc.CreateAttribute("", "Engine", "");
engineA.Value = "XEngine";
rootN.Attributes.Append(engineA);
newDoc.AppendChild(rootN);
XmlNode stateN = newDoc.ImportNode(n, true);
rootN.AppendChild(stateN);
// This created document has only the minimun data
// necessary for XEngine to parse it successfully
m_part.ParentGroup.m_savedScriptState[oldID] = newDoc.OuterXml;
}
foreach (IScriptModule e in engines)
{
if (e != null)
{
if (e.SetXMLState(newID, m_part.ParentGroup.m_savedScriptState[oldID]))
break;
}
}
} }
} }

View File

@ -129,7 +129,7 @@ namespace OpenSim.Region.Framework.Scenes
private Vector3? m_forceToApply; private Vector3? m_forceToApply;
private uint m_requestedSitTargetID; private uint m_requestedSitTargetID;
private UUID m_requestedSitTargetUUID; private UUID m_requestedSitTargetUUID;
private Vector3 m_requestedSitOffset;
private SendCourseLocationsMethod m_sendCourseLocationsMethod; private SendCourseLocationsMethod m_sendCourseLocationsMethod;
private bool m_startAnimationSet; private bool m_startAnimationSet;
@ -1926,7 +1926,7 @@ namespace OpenSim.Region.Framework.Scenes
m_nextSitAnimation = part.SitAnimation; m_nextSitAnimation = part.SitAnimation;
} }
m_requestedSitTargetID = part.LocalId; m_requestedSitTargetID = part.LocalId;
m_requestedSitOffset = offset; //m_requestedSitOffset = offset;
m_requestedSitTargetUUID = targetID; m_requestedSitTargetUUID = targetID;
m_log.DebugFormat("[SIT]: Client requested Sit Position: {0}", offset); m_log.DebugFormat("[SIT]: Client requested Sit Position: {0}", offset);
@ -2159,7 +2159,7 @@ namespace OpenSim.Region.Framework.Scenes
if (part != null) if (part != null)
{ {
m_requestedSitTargetID = part.LocalId; m_requestedSitTargetID = part.LocalId;
m_requestedSitOffset = offset; //m_requestedSitOffset = offset;
m_requestedSitTargetUUID = targetID; m_requestedSitTargetUUID = targetID;
m_log.DebugFormat("[SIT]: Client requested Sit Position: {0}", offset); m_log.DebugFormat("[SIT]: Client requested Sit Position: {0}", offset);

View File

@ -4476,8 +4476,8 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
double x, y, z, s, t; double x, y, z, s, t;
s = Math.Cos(angle / 2); s = Math.Cos(angle * 0.5);
t = Math.Sin(angle / 2); // temp value to avoid 2 more sin() calcs t = Math.Sin(angle * 0.5); // temp value to avoid 2 more sin() calcs
x = axis.x * t; x = axis.x * t;
y = axis.y * t; y = axis.y * t;
z = axis.z * t; z = axis.z * t;

View File

@ -1348,6 +1348,9 @@ namespace OpenSim.Region.ScriptEngine.XEngine
XmlAttribute assetID = doc.CreateAttribute("", "Asset", ""); XmlAttribute assetID = doc.CreateAttribute("", "Asset", "");
assetID.Value = instance.AssetID.ToString(); assetID.Value = instance.AssetID.ToString();
stateData.Attributes.Append(assetID); stateData.Attributes.Append(assetID);
XmlAttribute engineName = doc.CreateAttribute("", "Engine", "");
engineName.Value = ScriptEngineName;
stateData.Attributes.Append(engineName);
doc.AppendChild(stateData); doc.AppendChild(stateData);
// Add <ScriptState>...</ScriptState> // Add <ScriptState>...</ScriptState>
@ -1447,10 +1450,10 @@ namespace OpenSim.Region.ScriptEngine.XEngine
return false; return false;
} }
public void SetXMLState(UUID itemID, string xml) public bool SetXMLState(UUID itemID, string xml)
{ {
if (xml == String.Empty) if (xml == String.Empty)
return; return false;
XmlDocument doc = new XmlDocument(); XmlDocument doc = new XmlDocument();
@ -1461,24 +1464,28 @@ namespace OpenSim.Region.ScriptEngine.XEngine
catch (Exception) catch (Exception)
{ {
m_log.Error("[XEngine]: Exception decoding XML data from region transfer"); m_log.Error("[XEngine]: Exception decoding XML data from region transfer");
return; return false;
} }
XmlNodeList rootL = doc.GetElementsByTagName("State"); XmlNodeList rootL = doc.GetElementsByTagName("State");
if (rootL.Count < 1) if (rootL.Count < 1)
return; return false;
XmlElement rootE = (XmlElement)rootL[0]; XmlElement rootE = (XmlElement)rootL[0];
if (rootE.GetAttribute("UUID") != itemID.ToString()) if (rootE.GetAttribute("Engine") != ScriptEngineName)
return; return false;
// string assetID = rootE.GetAttribute("Asset"); // On rez from inventory, that ID will have changed. It was only
// advisory anyway. So we don't check it anymore.
//
// if (rootE.GetAttribute("UUID") != itemID.ToString())
// return;
XmlNodeList stateL = rootE.GetElementsByTagName("ScriptState"); XmlNodeList stateL = rootE.GetElementsByTagName("ScriptState");
if (stateL.Count != 1) if (stateL.Count != 1)
return; return false;
XmlElement stateE = (XmlElement)stateL[0]; XmlElement stateE = (XmlElement)stateL[0];
@ -1487,7 +1494,7 @@ namespace OpenSim.Region.ScriptEngine.XEngine
XmlNodeList assemL = rootE.GetElementsByTagName("Assembly"); XmlNodeList assemL = rootE.GetElementsByTagName("Assembly");
if (assemL.Count != 1) if (assemL.Count != 1)
return; return false;
XmlElement assemE = (XmlElement)assemL[0]; XmlElement assemE = (XmlElement)assemL[0];
@ -1527,7 +1534,8 @@ namespace OpenSim.Region.ScriptEngine.XEngine
sfs.Close(); sfs.Close();
XmlNodeList mapL = rootE.GetElementsByTagName("LineMap"); XmlNodeList mapL = rootE.GetElementsByTagName("LineMap");
if (mapL.Count > 0)
{
XmlElement mapE = (XmlElement)mapL[0]; XmlElement mapE = (XmlElement)mapL[0];
string mappath = Path.Combine("ScriptEngines", World.RegionInfo.RegionID.ToString()); string mappath = Path.Combine("ScriptEngines", World.RegionInfo.RegionID.ToString());
@ -1541,5 +1549,8 @@ namespace OpenSim.Region.ScriptEngine.XEngine
msw.Close(); msw.Close();
mfs.Close(); mfs.Close();
} }
return true;
}
} }
} }

View File

@ -92,12 +92,12 @@ namespace OpenSim.Services.Connectors.Grid
try try
{ {
UUID.TryParse((string)hash["uuid"], out uuid); UUID.TryParse((string)hash["uuid"], out uuid);
m_log.Debug(">> HERE, uuid: " + uuid); //m_log.Debug(">> HERE, uuid: " + uuid);
info.RegionID = uuid; info.RegionID = uuid;
if ((string)hash["handle"] != null) if ((string)hash["handle"] != null)
{ {
realHandle = Convert.ToUInt64((string)hash["handle"]); realHandle = Convert.ToUInt64((string)hash["handle"]);
m_log.Debug(">> HERE, realHandle: " + realHandle); //m_log.Debug(">> HERE, realHandle: " + realHandle);
} }
//if (hash["region_image"] != null) //if (hash["region_image"] != null)
//{ //{

View File

@ -44,9 +44,9 @@ namespace OpenSim.Tests.Clients.GridClient
{ {
public class GridClient public class GridClient
{ {
private static readonly ILog m_log = // private static readonly ILog m_log =
LogManager.GetLogger( // LogManager.GetLogger(
MethodBase.GetCurrentMethod().DeclaringType); // MethodBase.GetCurrentMethod().DeclaringType);
public static void Main(string[] args) public static void Main(string[] args)
{ {

View File

@ -1,119 +0,0 @@
[Config]
; The port number for the asset server to listen on.
listen_port = 8003
; Points to an XML file which describes assets to load on startup.
; This is "./assets/AssetSets.xml" by default and can be changed below.
;assetset_location = ./assets/AssetSets.xml
[Plugins]
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
; Asset Storage Provider
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
; SimpleAssetStorage is a very basic storage system for the purposes of
; illustrating a storage backend example. The assets are stored in
; SimpleAssets/ and TempAssets/ (which is deleted when the server shuts down).
; Metadata is generated for all of the files at startup and when new assets are
; uploaded.
;asset_storage_provider = SimpleAssetStorage
; OpenSimAssetStorage connects to a database that has an assets table created
; by OpenSim. This backend combined with the OpenSimFrontend will allow the asset
; server to be used as a drop-in replacement for OpenSim.Grid.AssetServer.exe,
; while also allowing other frontends to run.
asset_storage_provider = OpenSimAssetStorage
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
; Inventory Storage Provider
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
; SimpleInventoryStorage is a very basic inventory storage system for the
; purposes of illustrating an inventory backend example. The inventory is stored
; in SimpleInventory/ by creating a folder for each agent that contains all of
; the inventory items and folders serialized as XML files.
;inventory_storage_provider = SimpleInventoryStorage
; OpenSimInventoryStorage connects to a database that has an inventory table
; created by OpenSim. This backend combined with the OpenSimInventoryFrontend
; will allow the server to be used as a drop-in replacement for
; OpenSim.Grid.InventoryServer.exe, while also allowing other frontends to run.
; *** NOTE: Inventory is not currently implemented.
inventory_storage_provider = OpenSimInventoryStorage
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
; Authentication Provider
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
; NullAuthentication does nothing.
authentication_provider = NullAuthentication
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
; Authorization Provider
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
; Authorize all is a dummy authorization module that allows all requests for
; metadata, data, and asset creation. Use this extension if your primary
; storage provider or front-end interface does not support authentication.
authorization_provider = AuthorizeAll
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
; Metrics Provider
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
; NullMetrics contains empty logging functions. Use this metrics provider if
; you want to disable metrics collection and reporting.
metrics_provider = NullMetrics
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
; Frontends
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
; Specify multiple frontends as a comma-separated list.
; ReferenceFrontend is a simple frontend that provides three basic REST
; methods. /assetid/metadata will return the metadata for an asset (currently in
; LLSD format, that will change soon). /assetid/data will return the raw asset
; data with proper Content-Type and Content-Disposition headers to make
; downloading assets in a web browser easy.
; OpenSimAssetFrontend is a frontend that matches the existing OpenSim XML for
; transferring grid assets. This will allow the asset server to function as a
; drop-in replacement for OpenSim.Grid.AssetServer.exe, and can be combined with
; OpenSimAssetStorage to provide an identical replacement, or any other asset
; storage backend.
; OpenSimInventoryFrontend is a frontend that matches the existing OpenSim XML
; for transferring inventory. This will allow the inventory server to function as
; a drop-in replacement for OpenSim.Grid.InventoryServer.exe, and can be combined
; with OpenSimInventoryStorage to provide an identical replacement, or any other
; inventory storage backend.
; *** NOTE: Inventory is not currently implemented.
; BrowseFrontend is an HTML interface for browsing through the asset store.
frontends = ReferenceFrontend,OpenSimAssetFrontend,OpenSimInventoryFrontend,BrowseFrontend
[OpenSim]
; The OpenSim section applies to the OpenSim plugin (OpenSimAssetStorage,
; OpenSimInventoryStorage, OpenSimAssetFronend, OpenSimInventoryFrontend).
; The database provider determines which database to use. Any database backend
; supported by OpenSim is supported.
asset_database_provider = "OpenSim.Data.SQLite.dll"
;asset_database_provider = "OpenSim.Data.MySQL.dll"
inventory_database_provider = "OpenSim.Data.SQLite.dll"
;inventory_database_provider = "OpenSim.Data.MySQL.dll"
; Database connection string used by the database backend.
; For SQLite
asset_database_connect = "URI=file:Asset.db,version=3"
inventory_database_connect = "URI=file:Inventory.db,version=3"
; For MySQL
;asset_database_connect = "Server=localhost; Database=opensim; User=changeme; Password=changeme;"
;inventory_database_connect = "Server=localhost; Database=opensim; User=changeme; Password=changeme;"

View File

@ -1,35 +0,0 @@
; * The startup section lists all the connectors to start up in this server
; * instance. This may be only one, or it may be the entire server suite.
; * Multiple connectors should be seaprated by commas.
; *
; * These are the IN connectors the server uses, the in connectors
; * read this config file and load the needed OUT and database connectors
; *
; *
[Startup]
ServiceConnectors = "OpenSim.Server.Handlers.dll:GridServiceConnector"
; * This is common for all services, it's the network setup for the entire
; * server instance
; *
[Network]
port = 8001
; * The following are for the remote console
; * They have no effect for the local or basic console types
; * Leave commented to diable logins to the console
;ConsoleUser = Test
;ConsolePass = secret
; * As an example, the below configuration precisely mimicks the legacy
; * asset server. It is read by the asset IN connector (defined above)
; * and it then loads the OUT connector (a local database module). That,
; * in turn, reads the asset loader and database connection information
; *
[GridService]
LocalServiceModule = "OpenSim.Services.GridService.dll:GridService"
StorageProvider = "OpenSim.Data.Null.dll:NullRegionData"
;StorageProvider = "OpenSim.Data.MySQL.dll:MySqlRegionData"
;ConnectionString = "Data Source=localhost;Database=opensim;User ID=opensim;Password=***;"
Realm = "regions"