Merge branch 'master' of ssh://diva@opensimulator.org/var/git/opensim
commit
7253a9453e
|
@ -39,7 +39,7 @@ namespace OpenSim.Data.MySQL
|
||||||
{
|
{
|
||||||
private string m_Realm;
|
private string m_Realm;
|
||||||
private List<string> m_ColumnNames = null;
|
private List<string> m_ColumnNames = null;
|
||||||
private int m_LastExpire = 0;
|
// private int m_LastExpire = 0;
|
||||||
|
|
||||||
public MySqlRegionData(string connectionString, string realm)
|
public MySqlRegionData(string connectionString, string realm)
|
||||||
: base(connectionString)
|
: base(connectionString)
|
||||||
|
|
|
@ -39,7 +39,7 @@ namespace OpenSim.Data.MySQL
|
||||||
{
|
{
|
||||||
private string m_Realm;
|
private string m_Realm;
|
||||||
private List<string> m_ColumnNames = null;
|
private List<string> m_ColumnNames = null;
|
||||||
private int m_LastExpire = 0;
|
// private int m_LastExpire = 0;
|
||||||
|
|
||||||
public MySqlUserAccountData(string connectionString, string realm)
|
public MySqlUserAccountData(string connectionString, string realm)
|
||||||
: base(connectionString)
|
: base(connectionString)
|
||||||
|
|
|
@ -118,6 +118,10 @@ namespace OpenSim.Region.CoreModules.Avatar.Inventory.Archiver
|
||||||
|
|
||||||
protected void ReceivedAllAssets(ICollection<UUID> assetsFoundUuids, ICollection<UUID> assetsNotFoundUuids)
|
protected void ReceivedAllAssets(ICollection<UUID> assetsFoundUuids, ICollection<UUID> assetsNotFoundUuids)
|
||||||
{
|
{
|
||||||
|
// We're almost done. Just need to write out the control file now
|
||||||
|
m_archiveWriter.WriteFile(ArchiveConstants.CONTROL_FILE_PATH, Create0p1ControlFile());
|
||||||
|
m_log.InfoFormat("[ARCHIVER]: Added control file to archive.");
|
||||||
|
|
||||||
Exception reportedException = null;
|
Exception reportedException = null;
|
||||||
bool succeeded = true;
|
bool succeeded = true;
|
||||||
|
|
||||||
|
@ -320,7 +324,9 @@ namespace OpenSim.Region.CoreModules.Avatar.Inventory.Archiver
|
||||||
SaveInvFolder(inventoryFolder, ArchiveConstants.INVENTORY_PATH, !foundStar);
|
SaveInvFolder(inventoryFolder, ArchiveConstants.INVENTORY_PATH, !foundStar);
|
||||||
}
|
}
|
||||||
|
|
||||||
SaveUsers();
|
// Don't put all this profile information into the archive right now.
|
||||||
|
//SaveUsers();
|
||||||
|
|
||||||
new AssetsRequest(
|
new AssetsRequest(
|
||||||
new AssetsArchiver(m_archiveWriter), m_assetUuids.Keys,
|
new AssetsArchiver(m_archiveWriter), m_assetUuids.Keys,
|
||||||
m_scene.AssetService, ReceivedAllAssets).Execute();
|
m_scene.AssetService, ReceivedAllAssets).Execute();
|
||||||
|
@ -409,5 +415,29 @@ namespace OpenSim.Region.CoreModules.Avatar.Inventory.Archiver
|
||||||
ArchiveConstants.INVENTORY_NODE_NAME_COMPONENT_SEPARATOR,
|
ArchiveConstants.INVENTORY_NODE_NAME_COMPONENT_SEPARATOR,
|
||||||
id);
|
id);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Create the control file for a 0.1 version archive
|
||||||
|
/// </summary>
|
||||||
|
/// <returns></returns>
|
||||||
|
public static string Create0p1ControlFile()
|
||||||
|
{
|
||||||
|
StringWriter sw = new StringWriter();
|
||||||
|
XmlTextWriter xtw = new XmlTextWriter(sw);
|
||||||
|
xtw.Formatting = Formatting.Indented;
|
||||||
|
xtw.WriteStartDocument();
|
||||||
|
xtw.WriteStartElement("archive");
|
||||||
|
xtw.WriteAttributeString("major_version", "0");
|
||||||
|
xtw.WriteAttributeString("minor_version", "1");
|
||||||
|
xtw.WriteEndElement();
|
||||||
|
|
||||||
|
xtw.Flush();
|
||||||
|
xtw.Close();
|
||||||
|
|
||||||
|
String s = sw.ToString();
|
||||||
|
sw.Close();
|
||||||
|
|
||||||
|
return s;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
|
@ -200,11 +200,10 @@ namespace OpenSim.Region.CoreModules.Scripting.LSLHttp
|
||||||
if (m_RequestMap.ContainsKey(request))
|
if (m_RequestMap.ContainsKey(request))
|
||||||
{
|
{
|
||||||
UrlData urlData = m_RequestMap[request];
|
UrlData urlData = m_RequestMap[request];
|
||||||
RequestData requestData=urlData.requests[request];
|
|
||||||
urlData.requests[request].responseCode = status;
|
urlData.requests[request].responseCode = status;
|
||||||
urlData.requests[request].responseBody = body;
|
urlData.requests[request].responseBody = body;
|
||||||
//urlData.requests[request].ev.Set();
|
//urlData.requests[request].ev.Set();
|
||||||
urlData.requests[request].requestDone=true;
|
urlData.requests[request].requestDone =true;
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
@ -397,7 +396,7 @@ namespace OpenSim.Region.CoreModules.Scripting.LSLHttp
|
||||||
{
|
{
|
||||||
Hashtable headers = (Hashtable)request["headers"];
|
Hashtable headers = (Hashtable)request["headers"];
|
||||||
|
|
||||||
string uri_full = "http://" + m_ExternalHostNameForLSL + ":" + m_HttpServer.Port.ToString() + uri;// "/lslhttp/" + urlcode.ToString() + "/";
|
// string uri_full = "http://" + m_ExternalHostNameForLSL + ":" + m_HttpServer.Port.ToString() + uri;// "/lslhttp/" + urlcode.ToString() + "/";
|
||||||
|
|
||||||
int pos1 = uri.IndexOf("/");// /lslhttp
|
int pos1 = uri.IndexOf("/");// /lslhttp
|
||||||
int pos2 = uri.IndexOf("/", pos1 + 1);// /lslhttp/
|
int pos2 = uri.IndexOf("/", pos1 + 1);// /lslhttp/
|
||||||
|
@ -471,7 +470,7 @@ namespace OpenSim.Region.CoreModules.Scripting.LSLHttp
|
||||||
url.engine.PostScriptEvent(url.itemID, "http_request", new Object[] { requestID.ToString(), request["http-method"].ToString(), request["body"].ToString() });
|
url.engine.PostScriptEvent(url.itemID, "http_request", new Object[] { requestID.ToString(), request["http-method"].ToString(), request["body"].ToString() });
|
||||||
|
|
||||||
//send initial response?
|
//send initial response?
|
||||||
Hashtable response = new Hashtable();
|
// Hashtable response = new Hashtable();
|
||||||
|
|
||||||
return;
|
return;
|
||||||
|
|
||||||
|
|
|
@ -79,12 +79,12 @@ namespace OpenSim.Region.CoreModules.World.Land
|
||||||
{
|
{
|
||||||
if (!enabledYN)
|
if (!enabledYN)
|
||||||
return;
|
return;
|
||||||
|
/*
|
||||||
// For testing on a single instance
|
// For testing on a single instance
|
||||||
if (scene.RegionInfo.RegionLocX == 1004 && scene.RegionInfo.RegionLocY == 1000)
|
if (scene.RegionInfo.RegionLocX == 1004 && scene.RegionInfo.RegionLocY == 1000)
|
||||||
return;
|
return;
|
||||||
//
|
//
|
||||||
|
*/
|
||||||
lock (m_startingScenes)
|
lock (m_startingScenes)
|
||||||
m_startingScenes.Add(scene.RegionInfo.originRegionID, scene);
|
m_startingScenes.Add(scene.RegionInfo.originRegionID, scene);
|
||||||
|
|
||||||
|
|
|
@ -47,8 +47,7 @@ namespace OpenSim.Region.Framework.Scenes.Hypergrid
|
||||||
private static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType);
|
private static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType);
|
||||||
|
|
||||||
// This maps between inventory server urls and inventory server clients
|
// This maps between inventory server urls and inventory server clients
|
||||||
private Dictionary<string, InventoryClient> m_inventoryServers = new Dictionary<string, InventoryClient>();
|
// private Dictionary<string, InventoryClient> m_inventoryServers = new Dictionary<string, InventoryClient>();
|
||||||
|
|
||||||
|
|
||||||
private Scene m_scene;
|
private Scene m_scene;
|
||||||
#endregion
|
#endregion
|
||||||
|
@ -72,13 +71,13 @@ namespace OpenSim.Region.Framework.Scenes.Hypergrid
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
|
|
||||||
private string UserInventoryURL(UUID userID)
|
// private string UserInventoryURL(UUID userID)
|
||||||
{
|
// {
|
||||||
CachedUserInfo uinfo = m_scene.CommsManager.UserProfileCacheService.GetUserDetails(userID);
|
// CachedUserInfo uinfo = m_scene.CommsManager.UserProfileCacheService.GetUserDetails(userID);
|
||||||
if (uinfo != null)
|
// if (uinfo != null)
|
||||||
return (uinfo.UserProfile.UserInventoryURI == "") ? null : uinfo.UserProfile.UserInventoryURI;
|
// return (uinfo.UserProfile.UserInventoryURI == "") ? null : uinfo.UserProfile.UserInventoryURI;
|
||||||
return null;
|
// return null;
|
||||||
}
|
// }
|
||||||
|
|
||||||
private bool IsLocalUser(UUID userID)
|
private bool IsLocalUser(UUID userID)
|
||||||
{
|
{
|
||||||
|
|
|
@ -78,7 +78,7 @@ namespace OpenSim.Region.Framework.Scenes.Hypergrid
|
||||||
if (regionHandle == m_regionInfo.RegionHandle)
|
if (regionHandle == m_regionInfo.RegionHandle)
|
||||||
{
|
{
|
||||||
// Teleport within the same region
|
// Teleport within the same region
|
||||||
if (position.X < 0 || position.X > Constants.RegionSize || position.Y < 0 || position.Y > Constants.RegionSize || position.Z < 0)
|
if (IsOutsideRegion(avatar.Scene, position) || position.Z < 0)
|
||||||
{
|
{
|
||||||
Vector3 emergencyPos = new Vector3(128, 128, 128);
|
Vector3 emergencyPos = new Vector3(128, 128, 128);
|
||||||
|
|
||||||
|
@ -90,7 +90,13 @@ namespace OpenSim.Region.Framework.Scenes.Hypergrid
|
||||||
// TODO: Get proper AVG Height
|
// TODO: Get proper AVG Height
|
||||||
float localAVHeight = 1.56f;
|
float localAVHeight = 1.56f;
|
||||||
|
|
||||||
float posZLimit = (float)avatar.Scene.Heightmap[(int)position.X, (int)position.Y];
|
float posZLimit = 22;
|
||||||
|
|
||||||
|
if (position.X > 0 && position.X <= (int)Constants.RegionSize && position.Y > 0 && position.Y <= (int)Constants.RegionSize)
|
||||||
|
{
|
||||||
|
posZLimit = (float) avatar.Scene.Heightmap[(int) position.X, (int) position.Y];
|
||||||
|
}
|
||||||
|
|
||||||
float newPosZ = posZLimit + localAVHeight;
|
float newPosZ = posZLimit + localAVHeight;
|
||||||
if (posZLimit >= (position.Z - (localAVHeight / 2)) && !(Single.IsInfinity(newPosZ) || Single.IsNaN(newPosZ)))
|
if (posZLimit >= (position.Z - (localAVHeight / 2)) && !(Single.IsInfinity(newPosZ) || Single.IsNaN(newPosZ)))
|
||||||
{
|
{
|
||||||
|
|
|
@ -1118,7 +1118,7 @@ namespace OpenSim.Region.Framework.Scenes
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
private bool IsOutsideRegion(Scene s, Vector3 pos)
|
protected bool IsOutsideRegion(Scene s, Vector3 pos)
|
||||||
{
|
{
|
||||||
|
|
||||||
if (s.TestBorderCross(pos,Cardinals.N))
|
if (s.TestBorderCross(pos,Cardinals.N))
|
||||||
|
|
|
@ -245,6 +245,11 @@ namespace OpenSim.Region.Framework.Scenes
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
private bool IsAttachmentCheckFull()
|
||||||
|
{
|
||||||
|
return (IsAttachment || (m_rootPart.Shape.PCode == 9 && m_rootPart.Shape.State != 0));
|
||||||
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// The absolute position of this scene object in the scene
|
/// The absolute position of this scene object in the scene
|
||||||
/// </summary>
|
/// </summary>
|
||||||
|
@ -257,7 +262,7 @@ namespace OpenSim.Region.Framework.Scenes
|
||||||
|
|
||||||
if ((m_scene.TestBorderCross(val - Vector3.UnitX, Cardinals.E) || m_scene.TestBorderCross(val + Vector3.UnitX, Cardinals.W)
|
if ((m_scene.TestBorderCross(val - Vector3.UnitX, Cardinals.E) || m_scene.TestBorderCross(val + Vector3.UnitX, Cardinals.W)
|
||||||
|| m_scene.TestBorderCross(val - Vector3.UnitY, Cardinals.N) || m_scene.TestBorderCross(val + Vector3.UnitY, Cardinals.S))
|
|| m_scene.TestBorderCross(val - Vector3.UnitY, Cardinals.N) || m_scene.TestBorderCross(val + Vector3.UnitY, Cardinals.S))
|
||||||
&& !IsAttachment)
|
&& !IsAttachmentCheckFull())
|
||||||
{
|
{
|
||||||
m_scene.CrossPrimGroupIntoNewRegion(val, this, true);
|
m_scene.CrossPrimGroupIntoNewRegion(val, this, true);
|
||||||
}
|
}
|
||||||
|
|
|
@ -345,6 +345,21 @@ namespace PrimMesher
|
||||||
this.v3.Z *= z;
|
this.v3.Z *= z;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public void AddPos(float x, float y, float z)
|
||||||
|
{
|
||||||
|
this.v1.X += x;
|
||||||
|
this.v2.X += x;
|
||||||
|
this.v3.X += x;
|
||||||
|
|
||||||
|
this.v1.Y += y;
|
||||||
|
this.v2.Y += y;
|
||||||
|
this.v3.Y += y;
|
||||||
|
|
||||||
|
this.v1.Z += z;
|
||||||
|
this.v2.Z += z;
|
||||||
|
this.v3.Z += z;
|
||||||
|
}
|
||||||
|
|
||||||
public void AddRot(Quat q)
|
public void AddRot(Quat q)
|
||||||
{
|
{
|
||||||
this.v1 *= q;
|
this.v1 *= q;
|
||||||
|
@ -2141,6 +2156,18 @@ namespace PrimMesher
|
||||||
vert.Z += z;
|
vert.Z += z;
|
||||||
this.coords[i] = vert;
|
this.coords[i] = vert;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (this.viewerFaces != null)
|
||||||
|
{
|
||||||
|
int numViewerFaces = this.viewerFaces.Count;
|
||||||
|
|
||||||
|
for (i = 0; i < numViewerFaces; i++)
|
||||||
|
{
|
||||||
|
ViewerFace v = this.viewerFaces[i];
|
||||||
|
v.AddPos(x, y, z);
|
||||||
|
this.viewerFaces[i] = v;
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
|
|
|
@ -494,6 +494,18 @@ namespace PrimMesher
|
||||||
vert.Z += z;
|
vert.Z += z;
|
||||||
this.coords[i] = vert;
|
this.coords[i] = vert;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (this.viewerFaces != null)
|
||||||
|
{
|
||||||
|
int numViewerFaces = this.viewerFaces.Count;
|
||||||
|
|
||||||
|
for (i = 0; i < numViewerFaces; i++)
|
||||||
|
{
|
||||||
|
ViewerFace v = this.viewerFaces[i];
|
||||||
|
v.AddPos(x, y, z);
|
||||||
|
this.viewerFaces[i] = v;
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
|
@ -556,7 +568,7 @@ namespace PrimMesher
|
||||||
if (path == null)
|
if (path == null)
|
||||||
return;
|
return;
|
||||||
String fileName = name + "_" + title + ".raw";
|
String fileName = name + "_" + title + ".raw";
|
||||||
String completePath = Path.Combine(path, fileName);
|
String completePath = System.IO.Path.Combine(path, fileName);
|
||||||
StreamWriter sw = new StreamWriter(completePath);
|
StreamWriter sw = new StreamWriter(completePath);
|
||||||
|
|
||||||
for (int i = 0; i < this.faces.Count; i++)
|
for (int i = 0; i < this.faces.Count; i++)
|
||||||
|
|
|
@ -44,7 +44,7 @@ namespace OpenSim.Server.Handlers.Authorization
|
||||||
{
|
{
|
||||||
public class AuthorizationServerPostHandler : BaseStreamHandler
|
public class AuthorizationServerPostHandler : BaseStreamHandler
|
||||||
{
|
{
|
||||||
private static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType);
|
// private static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType);
|
||||||
|
|
||||||
private IAuthorizationService m_AuthorizationService;
|
private IAuthorizationService m_AuthorizationService;
|
||||||
|
|
||||||
|
|
|
@ -43,9 +43,9 @@ namespace OpenSim.Services.AuthenticationService
|
||||||
//
|
//
|
||||||
public class AuthenticationServiceBase : ServiceBase
|
public class AuthenticationServiceBase : ServiceBase
|
||||||
{
|
{
|
||||||
private static readonly ILog m_log =
|
// private static readonly ILog m_log =
|
||||||
LogManager.GetLogger(
|
// LogManager.GetLogger(
|
||||||
MethodBase.GetCurrentMethod().DeclaringType);
|
// MethodBase.GetCurrentMethod().DeclaringType);
|
||||||
|
|
||||||
protected IAuthenticationData m_Database;
|
protected IAuthenticationData m_Database;
|
||||||
|
|
||||||
|
|
|
@ -47,9 +47,9 @@ namespace OpenSim.Services.AuthenticationService
|
||||||
public class PasswordAuthenticationService :
|
public class PasswordAuthenticationService :
|
||||||
AuthenticationServiceBase, IAuthenticationService
|
AuthenticationServiceBase, IAuthenticationService
|
||||||
{
|
{
|
||||||
private static readonly ILog m_log =
|
// private static readonly ILog m_log =
|
||||||
LogManager.GetLogger(
|
// LogManager.GetLogger(
|
||||||
MethodBase.GetCurrentMethod().DeclaringType);
|
// MethodBase.GetCurrentMethod().DeclaringType);
|
||||||
|
|
||||||
public PasswordAuthenticationService(IConfigSource config) :
|
public PasswordAuthenticationService(IConfigSource config) :
|
||||||
base(config)
|
base(config)
|
||||||
|
|
|
@ -43,9 +43,9 @@ namespace OpenSim.Services.AuthenticationService
|
||||||
public class WebkeyAuthenticationService :
|
public class WebkeyAuthenticationService :
|
||||||
AuthenticationServiceBase, IAuthenticationService
|
AuthenticationServiceBase, IAuthenticationService
|
||||||
{
|
{
|
||||||
private static readonly ILog m_log =
|
// private static readonly ILog m_log =
|
||||||
LogManager.GetLogger(
|
// LogManager.GetLogger(
|
||||||
MethodBase.GetCurrentMethod().DeclaringType);
|
// MethodBase.GetCurrentMethod().DeclaringType);
|
||||||
|
|
||||||
public WebkeyAuthenticationService(IConfigSource config) :
|
public WebkeyAuthenticationService(IConfigSource config) :
|
||||||
base(config)
|
base(config)
|
||||||
|
|
Loading…
Reference in New Issue