Merge branch 'master' of ssh://diva@opensimulator.org/var/git/opensim

0.6.8-post-fixes
Diva Canto 2009-09-26 07:49:04 -07:00
commit 7253a9453e
15 changed files with 112 additions and 34 deletions

View File

@ -39,7 +39,7 @@ namespace OpenSim.Data.MySQL
{
private string m_Realm;
private List<string> m_ColumnNames = null;
private int m_LastExpire = 0;
// private int m_LastExpire = 0;
public MySqlRegionData(string connectionString, string realm)
: base(connectionString)

View File

@ -39,7 +39,7 @@ namespace OpenSim.Data.MySQL
{
private string m_Realm;
private List<string> m_ColumnNames = null;
private int m_LastExpire = 0;
// private int m_LastExpire = 0;
public MySqlUserAccountData(string connectionString, string realm)
: base(connectionString)

View File

@ -118,6 +118,10 @@ namespace OpenSim.Region.CoreModules.Avatar.Inventory.Archiver
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;
bool succeeded = true;
@ -320,7 +324,9 @@ namespace OpenSim.Region.CoreModules.Avatar.Inventory.Archiver
SaveInvFolder(inventoryFolder, ArchiveConstants.INVENTORY_PATH, !foundStar);
}
SaveUsers();
// Don't put all this profile information into the archive right now.
//SaveUsers();
new AssetsRequest(
new AssetsArchiver(m_archiveWriter), m_assetUuids.Keys,
m_scene.AssetService, ReceivedAllAssets).Execute();
@ -409,5 +415,29 @@ namespace OpenSim.Region.CoreModules.Avatar.Inventory.Archiver
ArchiveConstants.INVENTORY_NODE_NAME_COMPONENT_SEPARATOR,
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;
}
}
}

View File

@ -200,7 +200,6 @@ namespace OpenSim.Region.CoreModules.Scripting.LSLHttp
if (m_RequestMap.ContainsKey(request))
{
UrlData urlData = m_RequestMap[request];
RequestData requestData=urlData.requests[request];
urlData.requests[request].responseCode = status;
urlData.requests[request].responseBody = body;
//urlData.requests[request].ev.Set();
@ -397,7 +396,7 @@ namespace OpenSim.Region.CoreModules.Scripting.LSLHttp
{
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 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() });
//send initial response?
Hashtable response = new Hashtable();
// Hashtable response = new Hashtable();
return;

View File

@ -79,12 +79,12 @@ namespace OpenSim.Region.CoreModules.World.Land
{
if (!enabledYN)
return;
/*
// For testing on a single instance
if (scene.RegionInfo.RegionLocX == 1004 && scene.RegionInfo.RegionLocY == 1000)
return;
//
*/
lock (m_startingScenes)
m_startingScenes.Add(scene.RegionInfo.originRegionID, scene);

View File

@ -47,8 +47,7 @@ namespace OpenSim.Region.Framework.Scenes.Hypergrid
private static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType);
// 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;
#endregion
@ -72,13 +71,13 @@ namespace OpenSim.Region.Framework.Scenes.Hypergrid
return null;
}
private string UserInventoryURL(UUID userID)
{
CachedUserInfo uinfo = m_scene.CommsManager.UserProfileCacheService.GetUserDetails(userID);
if (uinfo != null)
return (uinfo.UserProfile.UserInventoryURI == "") ? null : uinfo.UserProfile.UserInventoryURI;
return null;
}
// private string UserInventoryURL(UUID userID)
// {
// CachedUserInfo uinfo = m_scene.CommsManager.UserProfileCacheService.GetUserDetails(userID);
// if (uinfo != null)
// return (uinfo.UserProfile.UserInventoryURI == "") ? null : uinfo.UserProfile.UserInventoryURI;
// return null;
// }
private bool IsLocalUser(UUID userID)
{

View File

@ -78,7 +78,7 @@ namespace OpenSim.Region.Framework.Scenes.Hypergrid
if (regionHandle == m_regionInfo.RegionHandle)
{
// 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);
@ -90,7 +90,13 @@ namespace OpenSim.Region.Framework.Scenes.Hypergrid
// TODO: Get proper AVG Height
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;
if (posZLimit >= (position.Z - (localAVHeight / 2)) && !(Single.IsInfinity(newPosZ) || Single.IsNaN(newPosZ)))
{

View File

@ -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))

View File

@ -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>
/// The absolute position of this scene object in the scene
/// </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)
|| m_scene.TestBorderCross(val - Vector3.UnitY, Cardinals.N) || m_scene.TestBorderCross(val + Vector3.UnitY, Cardinals.S))
&& !IsAttachment)
&& !IsAttachmentCheckFull())
{
m_scene.CrossPrimGroupIntoNewRegion(val, this, true);
}

View File

@ -345,6 +345,21 @@ namespace PrimMesher
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)
{
this.v1 *= q;
@ -2141,6 +2156,18 @@ namespace PrimMesher
vert.Z += z;
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>

View File

@ -494,6 +494,18 @@ namespace PrimMesher
vert.Z += z;
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>
@ -556,7 +568,7 @@ namespace PrimMesher
if (path == null)
return;
String fileName = name + "_" + title + ".raw";
String completePath = Path.Combine(path, fileName);
String completePath = System.IO.Path.Combine(path, fileName);
StreamWriter sw = new StreamWriter(completePath);
for (int i = 0; i < this.faces.Count; i++)

View File

@ -44,7 +44,7 @@ namespace OpenSim.Server.Handlers.Authorization
{
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;

View File

@ -43,9 +43,9 @@ namespace OpenSim.Services.AuthenticationService
//
public class AuthenticationServiceBase : ServiceBase
{
private static readonly ILog m_log =
LogManager.GetLogger(
MethodBase.GetCurrentMethod().DeclaringType);
// private static readonly ILog m_log =
// LogManager.GetLogger(
// MethodBase.GetCurrentMethod().DeclaringType);
protected IAuthenticationData m_Database;

View File

@ -47,9 +47,9 @@ namespace OpenSim.Services.AuthenticationService
public class PasswordAuthenticationService :
AuthenticationServiceBase, IAuthenticationService
{
private static readonly ILog m_log =
LogManager.GetLogger(
MethodBase.GetCurrentMethod().DeclaringType);
// private static readonly ILog m_log =
// LogManager.GetLogger(
// MethodBase.GetCurrentMethod().DeclaringType);
public PasswordAuthenticationService(IConfigSource config) :
base(config)

View File

@ -43,9 +43,9 @@ namespace OpenSim.Services.AuthenticationService
public class WebkeyAuthenticationService :
AuthenticationServiceBase, IAuthenticationService
{
private static readonly ILog m_log =
LogManager.GetLogger(
MethodBase.GetCurrentMethod().DeclaringType);
// private static readonly ILog m_log =
// LogManager.GetLogger(
// MethodBase.GetCurrentMethod().DeclaringType);
public WebkeyAuthenticationService(IConfigSource config) :
base(config)