Merge branch 'master' of ssh://opensimulator.org/var/git/opensim
commit
58b251506c
|
@ -1845,7 +1845,7 @@ namespace OpenSim.Framework.Servers.HttpServer
|
||||||
/// property in StartHttp() for the HttpListener
|
/// property in StartHttp() for the HttpListener
|
||||||
public class HttpServerLogWriter : ILogWriter
|
public class HttpServerLogWriter : ILogWriter
|
||||||
{
|
{
|
||||||
private static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType);
|
// private static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType);
|
||||||
|
|
||||||
public void Write(object source, LogPrio priority, string message)
|
public void Write(object source, LogPrio priority, string message)
|
||||||
{
|
{
|
||||||
|
|
|
@ -215,7 +215,7 @@ namespace OpenSim.Region.Framework.Scenes
|
||||||
SceneObjectPart sop = m_parentScene.GetSceneObjectPart(sp.ParentID);
|
SceneObjectPart sop = m_parentScene.GetSceneObjectPart(sp.ParentID);
|
||||||
if (sop != null)
|
if (sop != null)
|
||||||
{
|
{
|
||||||
coarseLocations.Add(sop.AbsolutePosition + sp.AbsolutePosition);
|
coarseLocations.Add(sop.AbsolutePosition + sp.OffsetPosition);
|
||||||
avatarUUIDs.Add(sp.UUID);
|
avatarUUIDs.Add(sp.UUID);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
|
|
|
@ -311,7 +311,7 @@ namespace OpenSim.Region.Physics.Meshing
|
||||||
OSD decodedMeshOsd = new OSD();
|
OSD decodedMeshOsd = new OSD();
|
||||||
byte[] meshBytes = new byte[physSize];
|
byte[] meshBytes = new byte[physSize];
|
||||||
System.Buffer.BlockCopy(primShape.SculptData, physOffset, meshBytes, 0, physSize);
|
System.Buffer.BlockCopy(primShape.SculptData, physOffset, meshBytes, 0, physSize);
|
||||||
byte[] decompressed = new byte[physSize * 5];
|
// byte[] decompressed = new byte[physSize * 5];
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
using (MemoryStream inMs = new MemoryStream(meshBytes))
|
using (MemoryStream inMs = new MemoryStream(meshBytes))
|
||||||
|
|
|
@ -375,7 +375,7 @@ namespace PrimMesher
|
||||||
|
|
||||||
int coordsDown = rows.Count;
|
int coordsDown = rows.Count;
|
||||||
int coordsAcross = rows[0].Count;
|
int coordsAcross = rows[0].Count;
|
||||||
int lastColumn = coordsAcross - 1;
|
// int lastColumn = coordsAcross - 1;
|
||||||
|
|
||||||
float widthUnit = 1.0f / (coordsAcross - 1);
|
float widthUnit = 1.0f / (coordsAcross - 1);
|
||||||
float heightUnit = 1.0f / (coordsDown - 1);
|
float heightUnit = 1.0f / (coordsDown - 1);
|
||||||
|
|
|
@ -26,6 +26,7 @@
|
||||||
*/
|
*/
|
||||||
|
|
||||||
using System;
|
using System;
|
||||||
|
using System.Collections;
|
||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
using System.Linq;
|
using System.Linq;
|
||||||
using System.Net;
|
using System.Net;
|
||||||
|
@ -244,7 +245,9 @@ namespace OpenSim.Services.GridService
|
||||||
GridRegion region = m_GridService.GetRegionByPosition(regInfo.ScopeID, regInfo.RegionLocX, regInfo.RegionLocY);
|
GridRegion region = m_GridService.GetRegionByPosition(regInfo.ScopeID, regInfo.RegionLocX, regInfo.RegionLocY);
|
||||||
if (region != null)
|
if (region != null)
|
||||||
{
|
{
|
||||||
m_log.WarnFormat("[HYPERGRID LINKER]: Coordinates {0}-{1} are already occupied by region {2} with uuid {3}", regInfo.RegionLocX, regInfo.RegionLocY, region.RegionName, region.RegionID);
|
m_log.WarnFormat("[HYPERGRID LINKER]: Coordinates {0}-{1} are already occupied by region {2} with uuid {3}",
|
||||||
|
regInfo.RegionLocX / Constants.RegionSize, regInfo.RegionLocY / Constants.RegionSize,
|
||||||
|
region.RegionName, region.RegionID);
|
||||||
reason = "Coordinates are already in use";
|
reason = "Coordinates are already in use";
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
@ -273,7 +276,8 @@ namespace OpenSim.Services.GridService
|
||||||
region = m_GridService.GetRegionByUUID(scopeID, regionID);
|
region = m_GridService.GetRegionByUUID(scopeID, regionID);
|
||||||
if (region != null)
|
if (region != null)
|
||||||
{
|
{
|
||||||
m_log.DebugFormat("[HYPERGRID LINKER]: Region already exists in coordinates {0} {1}", region.RegionLocX / Constants.RegionSize, region.RegionLocY / Constants.RegionSize);
|
m_log.DebugFormat("[HYPERGRID LINKER]: Region already exists in coordinates {0} {1}",
|
||||||
|
region.RegionLocX / Constants.RegionSize, region.RegionLocY / Constants.RegionSize);
|
||||||
regInfo = region;
|
regInfo = region;
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
@ -425,15 +429,14 @@ namespace OpenSim.Services.GridService
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
MainConsole.Instance.Output("Region Name Region UUID");
|
MainConsole.Instance.Output("Region Name");
|
||||||
MainConsole.Instance.Output("Location URI");
|
MainConsole.Instance.Output("Location Region UUID");
|
||||||
MainConsole.Instance.Output("-------------------------------------------------------------------------------");
|
MainConsole.Instance.Output(new string('-', 72));
|
||||||
foreach (RegionData r in regions)
|
foreach (RegionData r in regions)
|
||||||
{
|
{
|
||||||
MainConsole.Instance.Output(String.Format("{0,-39} {1}\n{2,-39} {3}\n",
|
MainConsole.Instance.Output(String.Format("{0}\n{2,-32} {1}\n",
|
||||||
r.RegionName, r.RegionID,
|
r.RegionName, r.RegionID, String.Format("{0},{1} ({2},{3})", r.posX, r.posY,
|
||||||
String.Format("{0},{1} ({2},{3})", r.posX, r.posY, r.posX / 256, r.posY / 256),
|
r.posX / Constants.RegionSize, r.posY / Constants.RegionSize)));
|
||||||
r.Data["serverURI"].ToString()));
|
|
||||||
}
|
}
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
@ -461,11 +464,14 @@ namespace OpenSim.Services.GridService
|
||||||
xloc = Convert.ToInt32(cmdparams[0]) * (int)Constants.RegionSize;
|
xloc = Convert.ToInt32(cmdparams[0]) * (int)Constants.RegionSize;
|
||||||
yloc = Convert.ToInt32(cmdparams[1]) * (int)Constants.RegionSize;
|
yloc = Convert.ToInt32(cmdparams[1]) * (int)Constants.RegionSize;
|
||||||
serverURI = cmdparams[2];
|
serverURI = cmdparams[2];
|
||||||
if (cmdparams.Length == 4)
|
if (cmdparams.Length > 3)
|
||||||
remoteName = cmdparams[3];
|
remoteName = string.Join(" ", cmdparams, 3, cmdparams.Length - 3);
|
||||||
string reason = string.Empty;
|
string reason = string.Empty;
|
||||||
GridRegion regInfo;
|
GridRegion regInfo;
|
||||||
TryCreateLink(UUID.Zero, xloc, yloc, remoteName, 0, null, serverURI, UUID.Zero, out regInfo, out reason);
|
if (TryCreateLink(UUID.Zero, xloc, yloc, remoteName, 0, null, serverURI, UUID.Zero, out regInfo, out reason))
|
||||||
|
MainConsole.Instance.Output("Hyperlink established");
|
||||||
|
else
|
||||||
|
MainConsole.Instance.Output("Failed to link region: " + reason);
|
||||||
}
|
}
|
||||||
|
|
||||||
private void RunHGCommand(string command, string[] cmdparams)
|
private void RunHGCommand(string command, string[] cmdparams)
|
||||||
|
@ -489,18 +495,6 @@ namespace OpenSim.Services.GridService
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else if (command.Equals("link-region"))
|
else if (command.Equals("link-region"))
|
||||||
{
|
|
||||||
if (cmdparams.Length > 0 && cmdparams.Length < 5)
|
|
||||||
{
|
|
||||||
RunLinkRegionCommand(cmdparams);
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
LinkRegionCmdUsage();
|
|
||||||
}
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
else if (command.Equals("link-region"))
|
|
||||||
{
|
{
|
||||||
if (cmdparams.Length < 3)
|
if (cmdparams.Length < 3)
|
||||||
{
|
{
|
||||||
|
@ -516,40 +510,24 @@ namespace OpenSim.Services.GridService
|
||||||
}
|
}
|
||||||
|
|
||||||
//this should be the prefererred way of setting up hg links now
|
//this should be the prefererred way of setting up hg links now
|
||||||
if ( cmdparams[2].StartsWith("http") && ( cmdparams.Length >= 3 && cmdparams.Length <= 5 )) {
|
if (cmdparams[2].StartsWith("http"))
|
||||||
|
{
|
||||||
RunLinkRegionCommand(cmdparams);
|
RunLinkRegionCommand(cmdparams);
|
||||||
}
|
}
|
||||||
else if (cmdparams[2].Contains(":"))
|
else if (cmdparams[2].Contains(":"))
|
||||||
{
|
{
|
||||||
// New format
|
// New format
|
||||||
int xloc, yloc;
|
string[] parts = cmdparams[2].Split(':');
|
||||||
string mapName;
|
if (parts.Length > 2)
|
||||||
try
|
|
||||||
{
|
{
|
||||||
xloc = Convert.ToInt32(cmdparams[0]);
|
// Insert remote region name
|
||||||
yloc = Convert.ToInt32(cmdparams[1]);
|
ArrayList parameters = new ArrayList(cmdparams);
|
||||||
mapName = cmdparams[2];
|
parameters.Insert(3, parts[2]);
|
||||||
if (cmdparams.Length > 3)
|
cmdparams = (string[])parameters.ToArray(typeof(string));
|
||||||
for (int i = 3; i < cmdparams.Length; i++)
|
|
||||||
mapName += " " + cmdparams[i];
|
|
||||||
|
|
||||||
//m_log.Info(">> MapName: " + mapName);
|
|
||||||
}
|
|
||||||
catch (Exception e)
|
|
||||||
{
|
|
||||||
MainConsole.Instance.Output("[HGrid] Wrong format for link-region command: " + e.Message);
|
|
||||||
LinkRegionCmdUsage();
|
|
||||||
return;
|
|
||||||
}
|
}
|
||||||
|
cmdparams[2] = "http://" + parts[0] + ':' + parts[1];
|
||||||
|
|
||||||
// Convert cell coordinates given by the user to meters
|
RunLinkRegionCommand(cmdparams);
|
||||||
xloc = xloc * (int)Constants.RegionSize;
|
|
||||||
yloc = yloc * (int)Constants.RegionSize;
|
|
||||||
string reason = string.Empty;
|
|
||||||
if (TryLinkRegionToCoords(UUID.Zero, mapName, xloc, yloc, out reason) == null)
|
|
||||||
MainConsole.Instance.Output("Failed to link region: " + reason);
|
|
||||||
else
|
|
||||||
MainConsole.Instance.Output("Hyperlink established");
|
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
@ -558,16 +536,12 @@ namespace OpenSim.Services.GridService
|
||||||
int xloc, yloc;
|
int xloc, yloc;
|
||||||
uint externalPort;
|
uint externalPort;
|
||||||
string externalHostName;
|
string externalHostName;
|
||||||
string serverURI;
|
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
xloc = Convert.ToInt32(cmdparams[0]);
|
xloc = Convert.ToInt32(cmdparams[0]);
|
||||||
yloc = Convert.ToInt32(cmdparams[1]);
|
yloc = Convert.ToInt32(cmdparams[1]);
|
||||||
externalPort = Convert.ToUInt32(cmdparams[3]);
|
externalPort = Convert.ToUInt32(cmdparams[3]);
|
||||||
externalHostName = cmdparams[2];
|
externalHostName = cmdparams[2];
|
||||||
if ( cmdparams.Length == 4 ) {
|
|
||||||
|
|
||||||
}
|
|
||||||
//internalPort = Convert.ToUInt32(cmdparams[4]);
|
//internalPort = Convert.ToUInt32(cmdparams[4]);
|
||||||
//remotingPort = Convert.ToUInt32(cmdparams[5]);
|
//remotingPort = Convert.ToUInt32(cmdparams[5]);
|
||||||
}
|
}
|
||||||
|
@ -584,27 +558,30 @@ namespace OpenSim.Services.GridService
|
||||||
string reason = string.Empty;
|
string reason = string.Empty;
|
||||||
if (TryCreateLink(UUID.Zero, xloc, yloc, string.Empty, externalPort, externalHostName, UUID.Zero, out regInfo, out reason))
|
if (TryCreateLink(UUID.Zero, xloc, yloc, string.Empty, externalPort, externalHostName, UUID.Zero, out regInfo, out reason))
|
||||||
{
|
{
|
||||||
if (cmdparams.Length >= 5)
|
// What is this? The GridRegion instance will be discarded anyway,
|
||||||
{
|
// which effectively ignores any local name given with the command.
|
||||||
regInfo.RegionName = "";
|
//if (cmdparams.Length >= 5)
|
||||||
for (int i = 4; i < cmdparams.Length; i++)
|
//{
|
||||||
regInfo.RegionName += cmdparams[i] + " ";
|
// regInfo.RegionName = "";
|
||||||
}
|
// for (int i = 4; i < cmdparams.Length; i++)
|
||||||
|
// regInfo.RegionName += cmdparams[i] + " ";
|
||||||
|
//}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
else if (command.Equals("unlink-region"))
|
else if (command.Equals("unlink-region"))
|
||||||
{
|
{
|
||||||
if (cmdparams.Length < 1 || cmdparams.Length > 1)
|
if (cmdparams.Length < 1)
|
||||||
{
|
{
|
||||||
UnlinkRegionCmdUsage();
|
UnlinkRegionCmdUsage();
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
if (TryUnlinkRegion(cmdparams[0]))
|
string region = string.Join(" ", cmdparams);
|
||||||
MainConsole.Instance.Output("Successfully unlinked " + cmdparams[0]);
|
if (TryUnlinkRegion(region))
|
||||||
|
MainConsole.Instance.Output("Successfully unlinked " + region);
|
||||||
else
|
else
|
||||||
MainConsole.Instance.Output("Unable to unlink " + cmdparams[0] + ", region not found.");
|
MainConsole.Instance.Output("Unable to unlink " + region + ", region not found.");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -101,7 +101,7 @@ namespace OpenSim.Services.Interfaces
|
||||||
if (str != string.Empty)
|
if (str != string.Empty)
|
||||||
{
|
{
|
||||||
string[] parts = str.Split(new char[] { ';' });
|
string[] parts = str.Split(new char[] { ';' });
|
||||||
Dictionary<string, object> dic = new Dictionary<string, object>();
|
// Dictionary<string, object> dic = new Dictionary<string, object>();
|
||||||
foreach (string s in parts)
|
foreach (string s in parts)
|
||||||
{
|
{
|
||||||
string[] parts2 = s.Split(new char[] { '*' });
|
string[] parts2 = s.Split(new char[] { '*' });
|
||||||
|
|
Binary file not shown.
Loading…
Reference in New Issue