Converted logging to use log4net.
Changed LogBase to ConsoleBase, which handles console I/O. This is mostly an in-place conversion, so lots of refactoring can still be done.ThreadPoolClientBranch
parent
7a61bcff86
commit
6ed5283bc0
|
@ -40,19 +40,21 @@ namespace OpenSim.ApplicationPlugins.LoadRegions
|
|||
[Extension("/OpenSim/Startup")]
|
||||
public class LoadRegionsPlugin : IApplicationPlugin
|
||||
{
|
||||
private static readonly log4net.ILog m_log = log4net.LogManager.GetLogger(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType);
|
||||
|
||||
public void Initialise(OpenSimMain openSim)
|
||||
{
|
||||
MainLog.Instance.Notice("LOADREGIONS", "Load Regions addin being initialised");
|
||||
m_log.Info("[LOADREGIONS]: Load Regions addin being initialised");
|
||||
|
||||
IRegionLoader regionLoader;
|
||||
if (openSim.ConfigSource.Configs["Startup"].GetString("region_info_source", "filesystem") == "filesystem")
|
||||
{
|
||||
MainLog.Instance.Notice("LOADREGIONS", "Loading Region Info from filesystem");
|
||||
m_log.Info("[LOADREGIONS]: Loading Region Info from filesystem");
|
||||
regionLoader = new RegionLoaderFileSystem();
|
||||
}
|
||||
else
|
||||
{
|
||||
MainLog.Instance.Notice("LOADREGIONSPLUGIN", "Loading Region Info from web");
|
||||
m_log.Info("[LOADREGIONSPLUGIN]: Loading Region Info from web");
|
||||
regionLoader = new RegionLoaderWebServer();
|
||||
}
|
||||
|
||||
|
@ -63,7 +65,7 @@ namespace OpenSim.ApplicationPlugins.LoadRegions
|
|||
|
||||
for (int i = 0; i < regionsToLoad.Length; i++)
|
||||
{
|
||||
MainLog.Instance.Debug("LOADREGIONS", "Creating Region: " + regionsToLoad[i].RegionName + " (ThreadID: " + System.Threading.Thread.CurrentThread.ManagedThreadId.ToString() + ")");
|
||||
m_log.Debug("[LOADREGIONS]: Creating Region: " + regionsToLoad[i].RegionName + " (ThreadID: " + System.Threading.Thread.CurrentThread.ManagedThreadId.ToString() + ")");
|
||||
openSim.CreateRegion(regionsToLoad[i]);
|
||||
}
|
||||
|
||||
|
@ -73,17 +75,17 @@ namespace OpenSim.ApplicationPlugins.LoadRegions
|
|||
|
||||
public void LoadRegionFromConfig(OpenSimMain openSim, ulong regionhandle)
|
||||
{
|
||||
MainLog.Instance.Notice("LOADREGIONS", "Load Regions addin being initialised");
|
||||
m_log.Info("[LOADREGIONS]: Load Regions addin being initialised");
|
||||
|
||||
IRegionLoader regionLoader;
|
||||
if (openSim.ConfigSource.Configs["Startup"].GetString("region_info_source", "filesystem") == "filesystem")
|
||||
{
|
||||
MainLog.Instance.Notice("LOADREGIONS", "Loading Region Info from filesystem");
|
||||
m_log.Info("[LOADREGIONS]: Loading Region Info from filesystem");
|
||||
regionLoader = new RegionLoaderFileSystem();
|
||||
}
|
||||
else
|
||||
{
|
||||
MainLog.Instance.Notice("LOADREGIONS", "Loading Region Info from web");
|
||||
m_log.Info("[LOADREGIONS]: Loading Region Info from web");
|
||||
regionLoader = new RegionLoaderWebServer();
|
||||
}
|
||||
|
||||
|
@ -93,7 +95,7 @@ namespace OpenSim.ApplicationPlugins.LoadRegions
|
|||
{
|
||||
if (regionhandle == regionsToLoad[i].RegionHandle)
|
||||
{
|
||||
MainLog.Instance.Debug("LOADREGIONS", "Creating Region: " + regionsToLoad[i].RegionName + " (ThreadID: " + System.Threading.Thread.CurrentThread.ManagedThreadId.ToString() + ")");
|
||||
m_log.Debug("[LOADREGIONS]: Creating Region: " + regionsToLoad[i].RegionName + " (ThreadID: " + System.Threading.Thread.CurrentThread.ManagedThreadId.ToString() + ")");
|
||||
openSim.CreateRegion(regionsToLoad[i]);
|
||||
}
|
||||
}
|
||||
|
|
|
@ -64,4 +64,4 @@ using System.Runtime.InteropServices;
|
|||
// [assembly: AssemblyVersion("1.0.*")]
|
||||
|
||||
[assembly : AssemblyVersion("1.0.0.0")]
|
||||
[assembly : AssemblyFileVersion("1.0.0.0")]
|
||||
[assembly : AssemblyFileVersion("1.0.0.0")]
|
||||
|
|
|
@ -46,6 +46,8 @@ namespace OpenSim.ApplicationPlugins.LoadRegions
|
|||
[Extension("/OpenSim/Startup")]
|
||||
public class RemoteAdminPlugin : IApplicationPlugin
|
||||
{
|
||||
private static readonly log4net.ILog m_log = log4net.LogManager.GetLogger(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType);
|
||||
|
||||
private OpenSimMain m_app;
|
||||
private BaseHttpServer m_httpd;
|
||||
private string requiredPassword = String.Empty;
|
||||
|
@ -56,7 +58,7 @@ namespace OpenSim.ApplicationPlugins.LoadRegions
|
|||
{
|
||||
if (openSim.ConfigSource.Configs["RemoteAdmin"].GetBoolean("enabled", false))
|
||||
{
|
||||
MainLog.Instance.Verbose("RADMIN", "Remote Admin Plugin Enabled");
|
||||
m_log.Info("[RADMIN]: Remote Admin Plugin Enabled");
|
||||
requiredPassword = openSim.ConfigSource.Configs["RemoteAdmin"].GetString("access_password", String.Empty);
|
||||
|
||||
m_app = openSim;
|
||||
|
@ -126,7 +128,7 @@ namespace OpenSim.ApplicationPlugins.LoadRegions
|
|||
else
|
||||
{
|
||||
string message = (string) requestData["message"];
|
||||
MainLog.Instance.Verbose("RADMIN", "Broadcasting: " + message);
|
||||
m_log.Info("[RADMIN]: Broadcasting: " + message);
|
||||
|
||||
responseData["accepted"] = "true";
|
||||
response.Value = responseData;
|
||||
|
@ -153,7 +155,7 @@ namespace OpenSim.ApplicationPlugins.LoadRegions
|
|||
{
|
||||
string file = (string)requestData["filename"];
|
||||
LLUUID regionID = LLUUID.Parse((string)requestData["regionid"]);
|
||||
MainLog.Instance.Verbose("RADMIN", "Terrain Loading: " + file);
|
||||
m_log.Info("[RADMIN]: Terrain Loading: " + file);
|
||||
|
||||
responseData["accepted"] = "true";
|
||||
|
||||
|
@ -177,7 +179,7 @@ namespace OpenSim.ApplicationPlugins.LoadRegions
|
|||
|
||||
public XmlRpcResponse XmlRpcShutdownMethod(XmlRpcRequest request)
|
||||
{
|
||||
MainLog.Instance.Verbose("RADMIN", "Received Shutdown Administrator Request");
|
||||
m_log.Info("[RADMIN]: Received Shutdown Administrator Request");
|
||||
XmlRpcResponse response = new XmlRpcResponse();
|
||||
Hashtable requestData = (Hashtable) request.Params[0];
|
||||
Hashtable responseData = new Hashtable();
|
||||
|
@ -233,7 +235,7 @@ namespace OpenSim.ApplicationPlugins.LoadRegions
|
|||
|
||||
public XmlRpcResponse XmlRpcCreateRegionMethod(XmlRpcRequest request)
|
||||
{
|
||||
MainLog.Instance.Verbose("RADMIN", "Received Create Region Administrator Request");
|
||||
m_log.Info("[RADMIN]: Received Create Region Administrator Request");
|
||||
XmlRpcResponse response = new XmlRpcResponse();
|
||||
Hashtable requestData = (Hashtable) request.Params[0];
|
||||
Hashtable responseData = new Hashtable();
|
||||
|
@ -284,7 +286,7 @@ namespace OpenSim.ApplicationPlugins.LoadRegions
|
|||
|
||||
public XmlRpcResponse XmlRpcCreateUserMethod(XmlRpcRequest request)
|
||||
{
|
||||
MainLog.Instance.Verbose("RADMIN", "Received Create User Administrator Request");
|
||||
m_log.Info("[RADMIN]: Received Create User Administrator Request");
|
||||
XmlRpcResponse response = new XmlRpcResponse();
|
||||
Hashtable requestData = (Hashtable) request.Params[0];
|
||||
Hashtable responseData = new Hashtable();
|
||||
|
@ -312,14 +314,14 @@ namespace OpenSim.ApplicationPlugins.LoadRegions
|
|||
responseData["error"] = "Error creating user";
|
||||
responseData["avatar_uuid"] = LLUUID.Zero;
|
||||
response.Value = responseData;
|
||||
MainLog.Instance.Error("RADMIN", "Error creating user (" + tempfirstname + " " + templastname + ") :");
|
||||
m_log.Error("[RADMIN]: Error creating user (" + tempfirstname + " " + templastname + ") :");
|
||||
}
|
||||
else
|
||||
{
|
||||
responseData["created"] = "true";
|
||||
responseData["avatar_uuid"] = tempuserID;
|
||||
response.Value = responseData;
|
||||
MainLog.Instance.Verbose("RADMIN", "User " + tempfirstname + " " + templastname + " created. Userid " + tempuserID + " assigned.");
|
||||
m_log.Info("[RADMIN]: User " + tempfirstname + " " + templastname + " created. Userid " + tempuserID + " assigned.");
|
||||
}
|
||||
}
|
||||
catch (Exception e)
|
||||
|
|
|
@ -61,4 +61,4 @@ using System.Runtime.InteropServices;
|
|||
//
|
||||
|
||||
[assembly : AssemblyVersion("1.0.0.0")]
|
||||
[assembly : AssemblyFileVersion("1.0.0.0")]
|
||||
[assembly : AssemblyFileVersion("1.0.0.0")]
|
||||
|
|
|
@ -27,6 +27,7 @@
|
|||
*/
|
||||
|
||||
using System;
|
||||
using OpenSim.Framework.Console;
|
||||
|
||||
namespace OpenSim.Framework
|
||||
{
|
||||
|
|
|
@ -44,6 +44,8 @@ namespace OpenSim.Framework.AssetLoader.Filesystem
|
|||
{
|
||||
public class AssetLoaderFileSystem : IAssetLoader
|
||||
{
|
||||
private static readonly log4net.ILog m_log = log4net.LogManager.GetLogger(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType);
|
||||
|
||||
protected AssetBase CreateAsset(string assetIdStr, string name, string path, bool isImage)
|
||||
{
|
||||
AssetBase asset = new AssetBase(
|
||||
|
@ -53,13 +55,13 @@ namespace OpenSim.Framework.AssetLoader.Filesystem
|
|||
|
||||
if (!String.IsNullOrEmpty(path))
|
||||
{
|
||||
MainLog.Instance.Verbose("ASSETS", "Loading: [{0}][{1}]", name, path);
|
||||
m_log.Info(String.Format("[ASSETS]: Loading: [{0}][{1}]", name, path));
|
||||
|
||||
LoadAsset(asset, isImage, path);
|
||||
}
|
||||
else
|
||||
{
|
||||
MainLog.Instance.Verbose("ASSETS", "Instantiated: [{0}]", name);
|
||||
m_log.Info(String.Format("[ASSETS]: Instantiated: [{0}]", name));
|
||||
}
|
||||
|
||||
return asset;
|
||||
|
@ -106,14 +108,12 @@ namespace OpenSim.Framework.AssetLoader.Filesystem
|
|||
}
|
||||
catch (XmlException e)
|
||||
{
|
||||
MainLog.Instance.Error("ASSETS", "Error loading {0} : {1}", assetSetPath, e);
|
||||
m_log.Error(String.Format("[ASSETS]: Error loading {0} : {1}", assetSetPath, e));
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
MainLog.Instance.Error(
|
||||
"ASSETS",
|
||||
"Asset set control file assets/AssetSets.xml does not exist! No assets loaded.");
|
||||
m_log.Error("[ASSETS]: Asset set control file assets/AssetSets.xml does not exist! No assets loaded.");
|
||||
}
|
||||
|
||||
assets.ForEach(action);
|
||||
|
@ -126,7 +126,7 @@ namespace OpenSim.Framework.AssetLoader.Filesystem
|
|||
/// <param name="assets"></param>
|
||||
protected void LoadXmlAssetSet(string assetSetPath, List<AssetBase> assets)
|
||||
{
|
||||
MainLog.Instance.Verbose("ASSETS", "Loading asset set {0}", assetSetPath);
|
||||
m_log.Info(String.Format("[ASSETS]: Loading asset set {0}", assetSetPath));
|
||||
|
||||
if (File.Exists(assetSetPath))
|
||||
{
|
||||
|
@ -152,12 +152,12 @@ namespace OpenSim.Framework.AssetLoader.Filesystem
|
|||
}
|
||||
catch (XmlException e)
|
||||
{
|
||||
MainLog.Instance.Error("ASSETS", "Error loading {0} : {1}", assetSetPath, e);
|
||||
m_log.Error(String.Format("[ASSETS]: Error loading {0} : {1}", assetSetPath, e));
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
MainLog.Instance.Error("ASSETS", "Asset set file {0} does not exist!", assetSetPath);
|
||||
m_log.Error(String.Format("[ASSETS]: Asset set file {0} does not exist!", assetSetPath));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -36,11 +36,12 @@ namespace OpenSim.Framework
|
|||
|
||||
public class ClientManager
|
||||
{
|
||||
private static readonly log4net.ILog m_log = log4net.LogManager.GetLogger(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType);
|
||||
|
||||
private Dictionary<uint, IClientAPI> m_clients;
|
||||
|
||||
public void ForEachClient(ForEachClientDelegate whatToDo)
|
||||
{
|
||||
|
||||
// Wasteful, I know
|
||||
IClientAPI[] LocalClients = new IClientAPI[0];
|
||||
lock (m_clients)
|
||||
|
@ -57,7 +58,7 @@ namespace OpenSim.Framework
|
|||
}
|
||||
catch (System.Exception e)
|
||||
{
|
||||
OpenSim.Framework.Console.MainLog.Instance.Warn("CLIENT", "Unable to do ForEachClient for one of the clients" + "\n Reason: " + e.ToString());
|
||||
m_log.Warn("[CLIENT]: Unable to do ForEachClient for one of the clients" + "\n Reason: " + e.ToString());
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -116,11 +117,9 @@ namespace OpenSim.Framework
|
|||
}
|
||||
catch (System.Exception e)
|
||||
{
|
||||
OpenSim.Framework.Console.MainLog.Instance.Error("CLIENT", string.Format("Unable to shutdown circuit for: {0}\n Reason: {1}", agentId, e));
|
||||
m_log.Error(string.Format("[CLIENT]: Unable to shutdown circuit for: {0}\n Reason: {1}", agentId, e));
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
private uint[] GetAllCircuits(LLUUID agentId)
|
||||
|
@ -134,7 +133,6 @@ namespace OpenSim.Framework
|
|||
m_clients.Values.CopyTo(LocalClients, 0);
|
||||
}
|
||||
|
||||
|
||||
for (int i = 0; i < LocalClients.Length; i++ )
|
||||
{
|
||||
if (LocalClients[i].AgentId == agentId)
|
||||
|
@ -160,7 +158,6 @@ namespace OpenSim.Framework
|
|||
m_clients.Values.CopyTo(LocalClients, 0);
|
||||
}
|
||||
|
||||
|
||||
for (int i = 0; i < LocalClients.Length; i++)
|
||||
{
|
||||
if (LocalClients[i].AgentId != sender.AgentId)
|
||||
|
|
|
@ -44,6 +44,8 @@ namespace OpenSim.Framework.Communications.Cache
|
|||
/// </summary>
|
||||
public class AssetCache : IAssetReceiver
|
||||
{
|
||||
private static readonly log4net.ILog m_log = log4net.LogManager.GetLogger(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType);
|
||||
|
||||
public Dictionary<LLUUID, AssetInfo> Assets;
|
||||
public Dictionary<LLUUID, TextureImage> Textures;
|
||||
|
||||
|
@ -61,14 +63,13 @@ namespace OpenSim.Framework.Communications.Cache
|
|||
private readonly IAssetServer m_assetServer;
|
||||
|
||||
private readonly Thread m_assetCacheThread;
|
||||
private readonly LogBase m_log;
|
||||
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
public AssetCache(IAssetServer assetServer, LogBase log)
|
||||
public AssetCache(IAssetServer assetServer)
|
||||
{
|
||||
log.Verbose("ASSETSTORAGE", "Creating Asset cache");
|
||||
m_log.Info("[ASSETSTORAGE]: Creating Asset cache");
|
||||
m_assetServer = assetServer;
|
||||
m_assetServer.SetReceiver(this);
|
||||
Assets = new Dictionary<LLUUID, AssetInfo>();
|
||||
|
@ -76,8 +77,6 @@ namespace OpenSim.Framework.Communications.Cache
|
|||
m_assetCacheThread = new Thread(new ThreadStart(RunAssetManager));
|
||||
m_assetCacheThread.IsBackground = true;
|
||||
m_assetCacheThread.Start();
|
||||
|
||||
m_log = log;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
|
@ -94,7 +93,7 @@ namespace OpenSim.Framework.Communications.Cache
|
|||
}
|
||||
catch (Exception e)
|
||||
{
|
||||
m_log.Error("ASSETCACHE", e.ToString());
|
||||
m_log.Error("[ASSETCACHE]: " + e.ToString());
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -198,8 +197,8 @@ namespace OpenSim.Framework.Communications.Cache
|
|||
}
|
||||
} while (--maxPolls > 0);
|
||||
|
||||
MainLog.Instance.Warn(
|
||||
"ASSETCACHE", "Asset {0} was not received before the retrieval timeout was reached");
|
||||
m_log.Warn(
|
||||
String.Format("[ASSETCACHE]: Asset {0} was not received before the retrieval timeout was reached"));
|
||||
|
||||
return null;
|
||||
}
|
||||
|
@ -266,7 +265,7 @@ namespace OpenSim.Framework.Communications.Cache
|
|||
}
|
||||
}
|
||||
|
||||
m_log.Verbose("ASSETCACHE", "Adding {0} {1} [{2}]: {3}.", temporary, type, asset.FullID, result);
|
||||
m_log.Info(String.Format("[ASSETCACHE]: Adding {0} {1} [{2}]: {3}.", temporary, type, asset.FullID, result));
|
||||
}
|
||||
|
||||
public void DeleteAsset(LLUUID assetID)
|
||||
|
@ -362,7 +361,7 @@ namespace OpenSim.Framework.Communications.Cache
|
|||
{
|
||||
//if (this.RequestedTextures.ContainsKey(assetID))
|
||||
//{
|
||||
// MainLog.Instance.Warn("ASSET CACHE", "sending image not found for {0}", assetID);
|
||||
// m_log.Warn(String.Format("[ASSET CACHE]: sending image not found for {0}", assetID));
|
||||
// AssetRequest req = this.RequestedTextures[assetID];
|
||||
// ImageNotInDatabasePacket notFound = new ImageNotInDatabasePacket();
|
||||
// notFound.ImageID.ID = assetID;
|
||||
|
@ -371,7 +370,7 @@ namespace OpenSim.Framework.Communications.Cache
|
|||
//}
|
||||
//else
|
||||
//{
|
||||
// MainLog.Instance.Error("ASSET CACHE", "Cound not send image not found for {0}", assetID);
|
||||
// m_log.Error(String.Format("[ASSET CACHE]: Cound not send image not found for {0}", assetID));
|
||||
//}
|
||||
}
|
||||
|
||||
|
|
|
@ -35,6 +35,8 @@ namespace OpenSim.Framework.Communications.Cache
|
|||
{
|
||||
public class LocalAssetServer : AssetServerBase
|
||||
{
|
||||
private static readonly log4net.ILog m_log = log4net.LogManager.GetLogger(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType);
|
||||
|
||||
private IObjectContainer db;
|
||||
|
||||
public LocalAssetServer()
|
||||
|
@ -43,7 +45,7 @@ namespace OpenSim.Framework.Communications.Cache
|
|||
yapfile = File.Exists(Path.Combine(Util.dataDir(), "regionassets.yap"));
|
||||
|
||||
db = Db4oFactory.OpenFile(Path.Combine(Util.dataDir(), "regionassets.yap"));
|
||||
MainLog.Instance.Verbose("ASSETS", "Db4 Asset database creation");
|
||||
m_log.Info("[ASSETS]: Db4 Asset database creation");
|
||||
|
||||
if (!yapfile)
|
||||
{
|
||||
|
@ -67,7 +69,7 @@ namespace OpenSim.Framework.Communications.Cache
|
|||
|
||||
if (db != null)
|
||||
{
|
||||
MainLog.Instance.Verbose("ASSETSERVER", "Closing local asset server database");
|
||||
m_log.Info("[ASSETSERVER]: Closing local asset server database");
|
||||
db.Close();
|
||||
}
|
||||
}
|
||||
|
@ -120,7 +122,7 @@ namespace OpenSim.Framework.Communications.Cache
|
|||
|
||||
protected virtual void SetUpAssetDatabase()
|
||||
{
|
||||
MainLog.Instance.Verbose("LOCAL ASSET SERVER", "Setting up asset database");
|
||||
m_log.Info("[LOCAL ASSET SERVER]: Setting up asset database");
|
||||
|
||||
base.LoadDefaultAssets();
|
||||
}
|
||||
|
|
|
@ -37,6 +37,8 @@ namespace OpenSim.Framework.Communications.Cache
|
|||
{
|
||||
public abstract class AssetServerBase : IAssetServer
|
||||
{
|
||||
private static readonly log4net.ILog m_log = log4net.LogManager.GetLogger(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType);
|
||||
|
||||
protected IAssetReceiver m_receiver;
|
||||
protected BlockingQueue<AssetRequest> m_assetRequests;
|
||||
protected Thread m_localAssetServerThread;
|
||||
|
@ -68,15 +70,15 @@ namespace OpenSim.Framework.Communications.Cache
|
|||
|
||||
if (asset != null)
|
||||
{
|
||||
//MainLog.Instance.Verbose(
|
||||
// "ASSET", "Asset {0} received from asset server", req.AssetID);
|
||||
//m_log.Info(
|
||||
// String.Format("[ASSET]: Asset {0} received from asset server", req.AssetID));
|
||||
|
||||
m_receiver.AssetReceived(asset, req.IsTexture);
|
||||
}
|
||||
else
|
||||
{
|
||||
MainLog.Instance.Error(
|
||||
"ASSET", "Asset {0} not found by asset server", req.AssetID);
|
||||
m_log.Error(
|
||||
String.Format("[ASSET]: Asset {0} not found by asset server", req.AssetID));
|
||||
|
||||
m_receiver.AssetNotFound(req.AssetID);
|
||||
}
|
||||
|
@ -84,7 +86,7 @@ namespace OpenSim.Framework.Communications.Cache
|
|||
|
||||
public virtual void LoadDefaultAssets()
|
||||
{
|
||||
MainLog.Instance.Verbose("ASSETSERVER", "Setting up asset database");
|
||||
m_log.Info("[ASSETSERVER]: Setting up asset database");
|
||||
|
||||
assetLoader.ForEachDefaultXmlAsset(StoreAsset);
|
||||
|
||||
|
@ -94,7 +96,7 @@ namespace OpenSim.Framework.Communications.Cache
|
|||
|
||||
public AssetServerBase()
|
||||
{
|
||||
MainLog.Instance.Verbose("ASSETSERVER", "Starting asset storage system");
|
||||
m_log.Info("[ASSETSERVER]: Starting asset storage system");
|
||||
m_assetRequests = new BlockingQueue<AssetRequest>();
|
||||
|
||||
m_localAssetServerThread = new Thread(RunRequests);
|
||||
|
@ -114,7 +116,7 @@ namespace OpenSim.Framework.Communications.Cache
|
|||
}
|
||||
catch (Exception e)
|
||||
{
|
||||
MainLog.Instance.Error("ASSETSERVER", e.Message);
|
||||
m_log.Error("[ASSETSERVER]: " + e.Message);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -131,7 +133,7 @@ namespace OpenSim.Framework.Communications.Cache
|
|||
req.IsTexture = isTexture;
|
||||
m_assetRequests.Enqueue(req);
|
||||
|
||||
MainLog.Instance.Verbose("ASSET", "Added {0} to request queue", assetID);
|
||||
m_log.Info(String.Format("[ASSET]: Added {0} to request queue", assetID));
|
||||
}
|
||||
|
||||
public virtual void UpdateAsset(AssetBase asset)
|
||||
|
|
|
@ -36,6 +36,8 @@ namespace OpenSim.Framework.Communications.Cache
|
|||
{
|
||||
public class GridAssetClient : AssetServerBase
|
||||
{
|
||||
private static readonly log4net.ILog m_log = log4net.LogManager.GetLogger(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType);
|
||||
|
||||
private string _assetServerUrl;
|
||||
|
||||
public GridAssetClient(string serverUrl)
|
||||
|
@ -50,7 +52,7 @@ namespace OpenSim.Framework.Communications.Cache
|
|||
Stream s = null;
|
||||
try
|
||||
{
|
||||
MainLog.Instance.Debug("ASSETCACHE", "Querying for {0}", req.AssetID.ToString());
|
||||
m_log.Debug(String.Format("[ASSETCACHE]: Querying for {0}", req.AssetID.ToString()));
|
||||
|
||||
RestClient rc = new RestClient(_assetServerUrl);
|
||||
rc.AddResourcePath("assets");
|
||||
|
@ -70,9 +72,9 @@ namespace OpenSim.Framework.Communications.Cache
|
|||
}
|
||||
catch (Exception e)
|
||||
{
|
||||
MainLog.Instance.Error("ASSETCACHE", e.Message);
|
||||
MainLog.Instance.Debug("ASSETCACHE", "Getting asset {0}", req.AssetID.ToString());
|
||||
MainLog.Instance.Error("ASSETCACHE", e.StackTrace);
|
||||
m_log.Error("[ASSETCACHE]: " + e.Message);
|
||||
m_log.Debug(String.Format("[ASSETCACHE]: Getting asset {0}", req.AssetID.ToString()));
|
||||
m_log.Error("[ASSETCACHE]: " + e.StackTrace);
|
||||
}
|
||||
|
||||
return null;
|
||||
|
@ -93,19 +95,19 @@ namespace OpenSim.Framework.Communications.Cache
|
|||
// XmlSerializer xs = new XmlSerializer(typeof(AssetBase));
|
||||
// xs.Serialize(s, asset);
|
||||
// RestClient rc = new RestClient(_assetServerUrl);
|
||||
MainLog.Instance.Verbose("ASSET", "Storing asset");
|
||||
m_log.Info("[ASSET]: Storing asset");
|
||||
//rc.AddResourcePath("assets");
|
||||
|
||||
// rc.RequestMethod = "POST";
|
||||
// rc.Request(s);
|
||||
//MainLog.Instance.Verbose("ASSET", "Stored {0}", rc);
|
||||
MainLog.Instance.Verbose("ASSET", "Sending to " + _assetServerUrl + "/assets/");
|
||||
//m_log.Info(String.Format("[ASSET]: Stored {0}", rc));
|
||||
m_log.Info("[ASSET]: Sending to " + _assetServerUrl + "/assets/");
|
||||
RestObjectPoster.BeginPostObject<AssetBase>(_assetServerUrl + "/assets/", asset);
|
||||
|
||||
}
|
||||
catch (Exception e)
|
||||
{
|
||||
MainLog.Instance.Error("ASSETS", e.Message);
|
||||
m_log.Error("[ASSETS]: " + e.Message);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -26,12 +26,12 @@
|
|||
*
|
||||
*/
|
||||
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.IO;
|
||||
using System.Xml;
|
||||
using libsecondlife;
|
||||
using Nini.Config;
|
||||
|
||||
using OpenSim.Framework.Console;
|
||||
|
||||
namespace OpenSim.Framework.Communications.Cache
|
||||
|
@ -42,6 +42,8 @@ namespace OpenSim.Framework.Communications.Cache
|
|||
/// </summary>
|
||||
public class LibraryRootFolder : InventoryFolderImpl
|
||||
{
|
||||
private static readonly log4net.ILog m_log = log4net.LogManager.GetLogger(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType);
|
||||
|
||||
private LLUUID libOwner = new LLUUID("11111111-1111-0000-0000-000100bba000");
|
||||
|
||||
/// <summary>
|
||||
|
@ -53,7 +55,7 @@ namespace OpenSim.Framework.Communications.Cache
|
|||
|
||||
public LibraryRootFolder()
|
||||
{
|
||||
MainLog.Instance.Verbose("LIBRARYINVENTORY", "Loading library inventory");
|
||||
m_log.Info("[LIBRARYINVENTORY]: Loading library inventory");
|
||||
|
||||
agentID = libOwner;
|
||||
folderID = new LLUUID("00000112-000f-0000-0000-000100bba000");
|
||||
|
@ -138,8 +140,8 @@ namespace OpenSim.Framework.Communications.Cache
|
|||
/// <param name="assets"></param>
|
||||
protected void LoadLibraries(string librariesControlPath)
|
||||
{
|
||||
MainLog.Instance.Verbose(
|
||||
"LIBRARYINVENTORY", "Loading libraries control file {0}", librariesControlPath);
|
||||
m_log.Info(
|
||||
String.Format("LIBRARYINVENTORY", "Loading libraries control file {0}", librariesControlPath));
|
||||
|
||||
LoadFromFile(librariesControlPath, "Libraries control", ReadLibraryFromConfig);
|
||||
}
|
||||
|
@ -186,15 +188,15 @@ namespace OpenSim.Framework.Communications.Cache
|
|||
libraryFolders.Add(folderInfo.folderID, folderInfo);
|
||||
parentFolder.SubFolders.Add(folderInfo.folderID, folderInfo);
|
||||
|
||||
// MainLog.Instance.Verbose(
|
||||
// "LIBRARYINVENTORY", "Adding folder {0} ({1})", folderInfo.name, folderInfo.folderID);
|
||||
// m_log.Info(
|
||||
// String.Format("[LIBRARYINVENTORY]: Adding folder {0} ({1})", folderInfo.name, folderInfo.folderID));
|
||||
}
|
||||
else
|
||||
{
|
||||
MainLog.Instance.Warn(
|
||||
"LIBRARYINVENTORY",
|
||||
"Couldn't add folder {0} ({1}) since parent folder with ID {2} does not exist!",
|
||||
folderInfo.name, folderInfo.folderID, folderInfo.parentID);
|
||||
m_log.Warn(
|
||||
String.Format("[LIBRARYINVENTORY]: " +
|
||||
"Couldn't add folder {0} ({1}) since parent folder with ID {2} does not exist!",
|
||||
folderInfo.name, folderInfo.folderID, folderInfo.parentID));
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -227,10 +229,10 @@ namespace OpenSim.Framework.Communications.Cache
|
|||
}
|
||||
else
|
||||
{
|
||||
MainLog.Instance.Warn(
|
||||
"LIBRARYINVENTORY",
|
||||
"Couldn't add item {0} ({1}) since parent folder with ID {2} does not exist!",
|
||||
item.inventoryName, item.inventoryID, item.parentFolderID);
|
||||
m_log.Warn(
|
||||
String.Format("[LIBRARYINVENTORY]: " +
|
||||
"Couldn't add item {0} ({1}) since parent folder with ID {2} does not exist!",
|
||||
item.inventoryName, item.inventoryID, item.parentFolderID));
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -257,14 +259,14 @@ namespace OpenSim.Framework.Communications.Cache
|
|||
}
|
||||
catch (XmlException e)
|
||||
{
|
||||
MainLog.Instance.Error(
|
||||
"LIBRARYINVENTORY", "Error loading {0} : {1}", path, e);
|
||||
m_log.Error(
|
||||
String.Format("[LIBRARYINVENTORY]: Error loading {0} : {1}", path, e));
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
MainLog.Instance.Error(
|
||||
"LIBRARYINVENTORY", "{0} file {1} does not exist!", fileDescription, path);
|
||||
m_log.Error(
|
||||
String.Format("[LIBRARYINVENTORY]: {0} file {1} does not exist!", fileDescription, path));
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -33,6 +33,8 @@ namespace OpenSim.Framework.Communications.Cache
|
|||
{
|
||||
public class SQLAssetServer : AssetServerBase
|
||||
{
|
||||
private static readonly log4net.ILog m_log = log4net.LogManager.GetLogger(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType);
|
||||
|
||||
public SQLAssetServer(string pluginName)
|
||||
{
|
||||
AddPlugin(pluginName);
|
||||
|
@ -45,7 +47,7 @@ namespace OpenSim.Framework.Communications.Cache
|
|||
|
||||
public void AddPlugin(string FileName)
|
||||
{
|
||||
MainLog.Instance.Verbose("SQLAssetServer", "AssetStorage: Attempting to load " + FileName);
|
||||
m_log.Info("[SQLAssetServer]: AssetStorage: Attempting to load " + FileName);
|
||||
Assembly pluginAssembly = Assembly.LoadFrom(FileName);
|
||||
|
||||
foreach (Type pluginType in pluginAssembly.GetTypes())
|
||||
|
@ -61,15 +63,14 @@ namespace OpenSim.Framework.Communications.Cache
|
|||
m_assetProvider = plug;
|
||||
m_assetProvider.Initialise();
|
||||
|
||||
MainLog.Instance.Verbose("AssetStorage",
|
||||
"Added " + m_assetProvider.Name + " " +
|
||||
m_assetProvider.Version);
|
||||
m_log.Info("[AssetStorage]: " +
|
||||
"Added " + m_assetProvider.Name + " " +
|
||||
m_assetProvider.Version);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
public override void Close()
|
||||
{
|
||||
base.Close();
|
||||
|
@ -98,4 +99,4 @@ namespace OpenSim.Framework.Communications.Cache
|
|||
m_assetProvider.CommitAssets();
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -25,6 +25,8 @@
|
|||
* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
*
|
||||
*/
|
||||
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using libsecondlife;
|
||||
using OpenSim.Framework.Console;
|
||||
|
@ -33,6 +35,8 @@ namespace OpenSim.Framework.Communications.Cache
|
|||
{
|
||||
public class UserProfileCacheService
|
||||
{
|
||||
private static readonly log4net.ILog m_log = log4net.LogManager.GetLogger(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType);
|
||||
|
||||
// Fields
|
||||
private readonly CommunicationsManager m_parent;
|
||||
private readonly Dictionary<LLUUID, CachedUserInfo> m_userProfiles = new Dictionary<LLUUID, CachedUserInfo>();
|
||||
|
@ -69,7 +73,7 @@ namespace OpenSim.Framework.Communications.Cache
|
|||
}
|
||||
else
|
||||
{
|
||||
MainLog.Instance.Error("USERCACHE", "User profile for user {0} not found", userID);
|
||||
m_log.Error(String.Format("[USERCACHE]: User profile for user {0} not found", userID));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -229,28 +233,28 @@ namespace OpenSim.Framework.Communications.Cache
|
|||
}
|
||||
else
|
||||
{
|
||||
MainLog.Instance.Error(
|
||||
"INVENTORYCACHE", "Could not find root folder for user {0}", remoteClient.Name);
|
||||
m_log.Error(
|
||||
String.Format("[INVENTORYCACHE]: Could not find root folder for user {0}", remoteClient.Name));
|
||||
|
||||
return;
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
MainLog.Instance.Error(
|
||||
"INVENTORYCACHE",
|
||||
"Could not find user profile for {0} for folder {1}",
|
||||
remoteClient.Name, folderID);
|
||||
m_log.Error(
|
||||
String.Format("[INVENTORYCACHE]: " +
|
||||
"Could not find user profile for {0} for folder {1}",
|
||||
remoteClient.Name, folderID));
|
||||
|
||||
return;
|
||||
}
|
||||
|
||||
// If we've reached this point then we couldn't find the folder, even though the client thinks
|
||||
// it exists
|
||||
MainLog.Instance.Error(
|
||||
"INVENTORYCACHE",
|
||||
"Could not find folder {0} for user {1}",
|
||||
folderID, remoteClient.Name);
|
||||
m_log.Error(
|
||||
String.Format("[INVENTORYCACHE]: " +
|
||||
"Could not find folder {0} for user {1}",
|
||||
folderID, remoteClient.Name));
|
||||
}
|
||||
|
||||
public void HandlePurgeInventoryDescendents(IClientAPI remoteClient, LLUUID folderID)
|
||||
|
|
|
@ -54,6 +54,8 @@ namespace OpenSim.Region.Capabilities
|
|||
|
||||
public class Caps
|
||||
{
|
||||
private static readonly log4net.ILog m_log = log4net.LogManager.GetLogger(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType);
|
||||
|
||||
private string m_httpListenerHostName;
|
||||
private uint m_httpListenPort;
|
||||
|
||||
|
@ -96,7 +98,7 @@ namespace OpenSim.Region.Capabilities
|
|||
/// </summary>
|
||||
public void RegisterHandlers()
|
||||
{
|
||||
MainLog.Instance.Verbose("CAPS", "Registering CAPS handlers");
|
||||
m_log.Info("[CAPS]: Registering CAPS handlers");
|
||||
string capsBase = "/CAPS/" + m_capsObjectPath;
|
||||
try
|
||||
{
|
||||
|
@ -115,7 +117,7 @@ namespace OpenSim.Region.Capabilities
|
|||
}
|
||||
catch (Exception e)
|
||||
{
|
||||
MainLog.Instance.Error("CAPS", e.ToString());
|
||||
m_log.Error("[CAPS]: " + e.ToString());
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -275,7 +277,7 @@ namespace OpenSim.Region.Capabilities
|
|||
{
|
||||
try
|
||||
{
|
||||
// MainLog.Instance.Debug("CAPS", "request: {0}, path: {1}, param: {2}", request, path, param);
|
||||
// m_log.Debug(String.Format("[CAPS]: request: {0}, path: {1}, param: {2}", request, path, param));
|
||||
|
||||
Hashtable hash = (Hashtable) LLSD.LLSDDeserialize(Helpers.StringToField(request));
|
||||
LLSDTaskScriptUpdate llsdUpdateRequest = new LLSDTaskScriptUpdate();
|
||||
|
@ -303,16 +305,16 @@ namespace OpenSim.Region.Capabilities
|
|||
uploadResponse.uploader = uploaderURL;
|
||||
uploadResponse.state = "upload";
|
||||
|
||||
// MainLog.Instance.Verbose(
|
||||
// "CAPS",
|
||||
// "ScriptTaskInventory response: {0}",
|
||||
// LLSDHelpers.SerialiseLLSDReply(uploadResponse));
|
||||
// m_log.Info(
|
||||
// String.Format("[CAPS]: " +
|
||||
// "ScriptTaskInventory response: {0}",
|
||||
// LLSDHelpers.SerialiseLLSDReply(uploadResponse)));
|
||||
|
||||
return LLSDHelpers.SerialiseLLSDReply(uploadResponse);
|
||||
}
|
||||
catch (Exception e)
|
||||
{
|
||||
MainLog.Instance.Error("CAPS", e.ToString());
|
||||
m_log.Error("[CAPS]: " + e.ToString());
|
||||
}
|
||||
|
||||
return null;
|
||||
|
@ -349,10 +351,10 @@ namespace OpenSim.Region.Capabilities
|
|||
uploadResponse.uploader = uploaderURL;
|
||||
uploadResponse.state = "upload";
|
||||
|
||||
// MainLog.Instance.Verbose(
|
||||
// "CAPS",
|
||||
// "NoteCardAgentInventory response: {0}",
|
||||
// LLSDHelpers.SerialiseLLSDReply(uploadResponse));
|
||||
// m_log.Info(
|
||||
// String.Format("[CAPS]: " +
|
||||
// "NoteCardAgentInventory response: {0}",
|
||||
// LLSDHelpers.SerialiseLLSDReply(uploadResponse)));
|
||||
|
||||
return LLSDHelpers.SerialiseLLSDReply(uploadResponse);
|
||||
}
|
||||
|
@ -681,10 +683,10 @@ namespace OpenSim.Region.Capabilities
|
|||
{
|
||||
try
|
||||
{
|
||||
// MainLog.Instance.Verbose(
|
||||
// "CAPS",
|
||||
// "TaskInventoryScriptUpdater received data: {0}, path: {1}, param: {2}",
|
||||
// data, path, param);
|
||||
// m_log.Info(
|
||||
// String.Format("[CAPS]: " +
|
||||
// "TaskInventoryScriptUpdater received data: {0}, path: {1}, param: {2}",
|
||||
// data, path, param));
|
||||
|
||||
string res = String.Empty;
|
||||
LLSDTaskInventoryUploadComplete uploadComplete = new LLSDTaskInventoryUploadComplete();
|
||||
|
@ -707,13 +709,13 @@ namespace OpenSim.Region.Capabilities
|
|||
SaveAssetToFile("updatedtaskscript" + Util.RandomClass.Next(1, 1000) + ".dat", data);
|
||||
}
|
||||
|
||||
// MainLog.Instance.Verbose("CAPS", "TaskInventoryScriptUpdater.uploaderCaps res: {0}", res);
|
||||
// m_log.Info(String.Format("[CAPS]: TaskInventoryScriptUpdater.uploaderCaps res: {0}", res));
|
||||
|
||||
return res;
|
||||
}
|
||||
catch (Exception e)
|
||||
{
|
||||
MainLog.Instance.Error("CAPS", e.ToString());
|
||||
m_log.Error("[CAPS]: " + e.ToString());
|
||||
}
|
||||
|
||||
// XXX Maybe this should be some meaningful error packet
|
||||
|
|
|
@ -36,6 +36,8 @@ namespace OpenSim.Framework.Communications
|
|||
{
|
||||
public class CommunicationsManager
|
||||
{
|
||||
private static readonly log4net.ILog m_log = log4net.LogManager.GetLogger(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType);
|
||||
|
||||
protected IUserService m_userService;
|
||||
|
||||
public IUserService UserService
|
||||
|
@ -114,11 +116,11 @@ namespace OpenSim.Framework.Communications
|
|||
|
||||
if (cmmdParams.Length < 2)
|
||||
{
|
||||
firstName = MainLog.Instance.CmdPrompt("First name", "Default");
|
||||
lastName = MainLog.Instance.CmdPrompt("Last name", "User");
|
||||
password = MainLog.Instance.PasswdPrompt("Password");
|
||||
regX = Convert.ToUInt32(MainLog.Instance.CmdPrompt("Start Region X", "1000"));
|
||||
regY = Convert.ToUInt32(MainLog.Instance.CmdPrompt("Start Region Y", "1000"));
|
||||
firstName = MainConsole.Instance.CmdPrompt("First name", "Default");
|
||||
lastName = MainConsole.Instance.CmdPrompt("Last name", "User");
|
||||
password = MainConsole.Instance.PasswdPrompt("Password");
|
||||
regX = Convert.ToUInt32(MainConsole.Instance.CmdPrompt("Start Region X", "1000"));
|
||||
regY = Convert.ToUInt32(MainConsole.Instance.CmdPrompt("Start Region Y", "1000"));
|
||||
}
|
||||
else
|
||||
{
|
||||
|
|
|
@ -36,6 +36,8 @@ namespace OpenSim.Framework.Communications
|
|||
{
|
||||
public abstract class InventoryServiceBase : IInventoryServices
|
||||
{
|
||||
private static readonly log4net.ILog m_log = log4net.LogManager.GetLogger(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType);
|
||||
|
||||
protected Dictionary<string, IInventoryData> m_plugins = new Dictionary<string, IInventoryData>();
|
||||
//protected IAssetServer m_assetServer;
|
||||
|
||||
|
@ -52,7 +54,7 @@ namespace OpenSim.Framework.Communications
|
|||
{
|
||||
if (!String.IsNullOrEmpty(FileName))
|
||||
{
|
||||
MainLog.Instance.Verbose("AGENTINVENTORY", "Inventorystorage: Attempting to load " + FileName);
|
||||
m_log.Info("[AGENTINVENTORY]: Inventorystorage: Attempting to load " + FileName);
|
||||
Assembly pluginAssembly = Assembly.LoadFrom(FileName);
|
||||
|
||||
foreach (Type pluginType in pluginAssembly.GetTypes())
|
||||
|
@ -67,7 +69,7 @@ namespace OpenSim.Framework.Communications
|
|||
(IInventoryData) Activator.CreateInstance(pluginAssembly.GetType(pluginType.ToString()));
|
||||
plug.Initialise();
|
||||
m_plugins.Add(plug.getName(), plug);
|
||||
MainLog.Instance.Verbose("AGENTINVENTORY", "Added IInventoryData Interface");
|
||||
m_log.Info("[AGENTINVENTORY]: Added IInventoryData Interface");
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -95,9 +97,8 @@ namespace OpenSim.Framework.Communications
|
|||
rootFolder = plugin.Value.getUserRootFolder(userID);
|
||||
if (rootFolder != null)
|
||||
{
|
||||
MainLog.Instance.Verbose(
|
||||
"INVENTORY",
|
||||
"Found root folder for user with ID " + userID + ". Retrieving inventory contents.");
|
||||
m_log.Info(
|
||||
"[INVENTORY]: Found root folder for user with ID " + userID + ". Retrieving inventory contents.");
|
||||
|
||||
inventoryList = plugin.Value.getInventoryFolders(rootFolder.folderID);
|
||||
inventoryList.Insert(0, rootFolder);
|
||||
|
@ -105,8 +106,8 @@ namespace OpenSim.Framework.Communications
|
|||
}
|
||||
}
|
||||
|
||||
MainLog.Instance.Warn(
|
||||
"INVENTORY", "Could not find a root folder belonging to user with ID " + userID);
|
||||
m_log.Warn(
|
||||
"[INVENTORY]: Could not find a root folder belonging to user with ID " + userID);
|
||||
|
||||
return inventoryList;
|
||||
}
|
||||
|
@ -226,10 +227,10 @@ namespace OpenSim.Framework.Communications
|
|||
|
||||
if (null != existingRootFolder)
|
||||
{
|
||||
MainLog.Instance.Error(
|
||||
"AGENTINVENTORY",
|
||||
"Did not create a new inventory for user {0} since they already have "
|
||||
+ "a root inventory folder with id {1}", user, existingRootFolder);
|
||||
m_log.Error(
|
||||
String.Format("[AGENTINVENTORY]: " +
|
||||
"Did not create a new inventory for user {0} since they already have "
|
||||
+ "a root inventory folder with id {1}", user, existingRootFolder));
|
||||
}
|
||||
else
|
||||
{
|
||||
|
@ -251,6 +252,7 @@ namespace OpenSim.Framework.Communications
|
|||
public virtual void CreateNewInventorySet(LLUUID user)
|
||||
{
|
||||
InventoryFolderBase folder = new InventoryFolderBase();
|
||||
|
||||
folder.parentID = LLUUID.Zero;
|
||||
folder.agentID = user;
|
||||
folder.folderID = LLUUID.Random();
|
||||
|
|
|
@ -42,6 +42,8 @@ namespace OpenSim.Framework.UserManagement
|
|||
/// </summary>
|
||||
public class LoginResponse
|
||||
{
|
||||
private static readonly log4net.ILog m_log = log4net.LogManager.GetLogger(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType);
|
||||
|
||||
private Hashtable loginFlagsHash;
|
||||
private Hashtable globalTexturesHash;
|
||||
private Hashtable loginError;
|
||||
|
@ -362,10 +364,8 @@ namespace OpenSim.Framework.UserManagement
|
|||
}
|
||||
catch (Exception e)
|
||||
{
|
||||
MainLog.Instance.Warn(
|
||||
"CLIENT",
|
||||
"LoginResponse: Error creating XML-RPC Response: " + e.Message
|
||||
);
|
||||
m_log.Warn("[CLIENT]: LoginResponse: Error creating XML-RPC Response: " + e.Message);
|
||||
|
||||
return (GenerateFailureResponse("Internal Error", "Error generating Login Response", "false"));
|
||||
}
|
||||
} // ToXmlRpcResponse
|
||||
|
@ -461,10 +461,8 @@ namespace OpenSim.Framework.UserManagement
|
|||
}
|
||||
catch (Exception e)
|
||||
{
|
||||
MainLog.Instance.Warn(
|
||||
"CLIENT",
|
||||
"LoginResponse: Error creating XML-RPC Response: " + e.Message
|
||||
);
|
||||
m_log.Warn("[CLIENT]: LoginResponse: Error creating XML-RPC Response: " + e.Message);
|
||||
|
||||
return GenerateFailureResponseLLSD("Internal Error", "Error generating Login Response", "false");
|
||||
}
|
||||
}
|
||||
|
|
|
@ -44,6 +44,8 @@ namespace OpenSim.Framework.UserManagement
|
|||
{
|
||||
public class LoginService
|
||||
{
|
||||
private static readonly log4net.ILog m_log = log4net.LogManager.GetLogger(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType);
|
||||
|
||||
protected string m_welcomeMessage = "Welcome to OpenSim";
|
||||
protected UserManagerBase m_userManager = null;
|
||||
protected Mutex m_loginMutex = new Mutex(false);
|
||||
|
@ -83,7 +85,7 @@ namespace OpenSim.Framework.UserManagement
|
|||
try
|
||||
{
|
||||
//CFK: CustomizeResponse contains sufficient strings to alleviate the need for this.
|
||||
//CKF: MainLog.Instance.Verbose("LOGIN", "Attempting login now...");
|
||||
//CKF: m_log.Info("[LOGIN]: Attempting login now...");
|
||||
XmlRpcResponse response = new XmlRpcResponse();
|
||||
Hashtable requestData = (Hashtable) request.Params[0];
|
||||
|
||||
|
@ -102,16 +104,14 @@ namespace OpenSim.Framework.UserManagement
|
|||
if( requestData.Contains("version"))
|
||||
{
|
||||
string clientversion = (string)requestData["version"];
|
||||
MainLog.Instance.Verbose("LOGIN","Client Version " + clientversion + " for " + firstname + " " + lastname);
|
||||
m_log.Info("[LOGIN]: Client Version " + clientversion + " for " + firstname + " " + lastname);
|
||||
}
|
||||
|
||||
|
||||
userProfile = GetTheUser(firstname, lastname);
|
||||
if (userProfile == null)
|
||||
{
|
||||
MainLog.Instance.Verbose(
|
||||
"LOGIN",
|
||||
"Could not find a profile for " + firstname + " " + lastname);
|
||||
m_log.Info("[LOGIN]: Could not find a profile for " + firstname + " " + lastname);
|
||||
|
||||
return logResponse.CreateLoginFailedResponse();
|
||||
}
|
||||
|
@ -213,7 +213,7 @@ namespace OpenSim.Framework.UserManagement
|
|||
}
|
||||
catch (Exception e)
|
||||
{
|
||||
MainLog.Instance.Verbose("LOGIN", e.ToString());
|
||||
m_log.Info("[LOGIN]: " + e.ToString());
|
||||
return logResponse.CreateDeadRegionResponse();
|
||||
//return logResponse.ToXmlRpcResponse();
|
||||
}
|
||||
|
@ -225,10 +225,9 @@ namespace OpenSim.Framework.UserManagement
|
|||
|
||||
return logResponse.ToXmlRpcResponse();
|
||||
}
|
||||
|
||||
catch (Exception E)
|
||||
catch (Exception e)
|
||||
{
|
||||
MainLog.Instance.Verbose("LOGIN", E.ToString());
|
||||
m_log.Info("[LOGIN]: " + e.ToString());
|
||||
}
|
||||
//}
|
||||
}
|
||||
|
@ -265,9 +264,7 @@ namespace OpenSim.Framework.UserManagement
|
|||
userProfile = GetTheUser(firstname, lastname);
|
||||
if (userProfile == null)
|
||||
{
|
||||
MainLog.Instance.Verbose(
|
||||
"LOGIN",
|
||||
"Could not find a profile for " + firstname + " " + lastname);
|
||||
m_log.Info("[LOGIN]: Could not find a profile for " + firstname + " " + lastname);
|
||||
|
||||
return logResponse.CreateLoginFailedResponseLLSD();
|
||||
}
|
||||
|
@ -345,7 +342,7 @@ namespace OpenSim.Framework.UserManagement
|
|||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
MainLog.Instance.Verbose("LOGIN", ex.ToString());
|
||||
m_log.Info("[LOGIN]: " + ex.ToString());
|
||||
return logResponse.CreateDeadRegionResponseLLSD();
|
||||
}
|
||||
|
||||
|
@ -359,7 +356,7 @@ namespace OpenSim.Framework.UserManagement
|
|||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
MainLog.Instance.Verbose("LOGIN", ex.ToString());
|
||||
m_log.Info("[LOGIN]: " + ex.ToString());
|
||||
return logResponse.CreateFailedResponseLLSD();
|
||||
}
|
||||
}
|
||||
|
@ -458,7 +455,7 @@ namespace OpenSim.Framework.UserManagement
|
|||
string redirectURL = "about:blank?redirect-http-hack=" + System.Web.HttpUtility.UrlEncode("secondlife:///app/login?first_name=" + firstname + "&last_name=" +
|
||||
lastname +
|
||||
"&location=" + location + "&grid=Other&web_login_key=" + webloginkey.ToString());
|
||||
//MainLog.Instance.Verbose("WEB", "R:" + redirectURL);
|
||||
//m_log.Info("[WEB]: R:" + redirectURL);
|
||||
returnactions["int_response_code"] = statuscode;
|
||||
returnactions["str_redirect_location"] = redirectURL;
|
||||
returnactions["str_response_string"] = "<HTML><BODY>GoodLogin</BODY></HTML>";
|
||||
|
@ -604,27 +601,22 @@ namespace OpenSim.Framework.UserManagement
|
|||
public virtual bool AuthenticateUser(UserProfileData profile, string password)
|
||||
{
|
||||
bool passwordSuccess = false;
|
||||
MainLog.Instance.Verbose(
|
||||
"LOGIN", "Authenticating {0} {1} ({2})", profile.username, profile.surname, profile.UUID);
|
||||
m_log.Info(
|
||||
String.Format("[LOGIN]: Authenticating {0} {1} ({2})", profile.username, profile.surname, profile.UUID));
|
||||
|
||||
// Web Login method seems to also occasionally send the hashed password itself
|
||||
|
||||
|
||||
// we do this to get our hash in a form that the server password code can consume
|
||||
// when the web-login-form submits the password in the clear (supposed to be over SSL!)
|
||||
if (!password.StartsWith("$1$"))
|
||||
password = "$1$" + Util.Md5Hash(password);
|
||||
|
||||
|
||||
|
||||
password = password.Remove(0, 3); //remove $1$
|
||||
|
||||
|
||||
|
||||
string s = Util.Md5Hash(password + ":" + profile.passwordSalt);
|
||||
// Testing...
|
||||
//MainLog.Instance.Verbose("LOGIN", "SubHash:" + s + " userprofile:" + profile.passwordHash);
|
||||
//MainLog.Instance.Verbose("LOGIN", "userprofile:" + profile.passwordHash + " SubCT:" + password);
|
||||
//m_log.Info("[LOGIN]: SubHash:" + s + " userprofile:" + profile.passwordHash);
|
||||
//m_log.Info("[LOGIN]: userprofile:" + profile.passwordHash + " SubCT:" + password);
|
||||
|
||||
passwordSuccess = (profile.passwordHash.Equals(s.ToString(), StringComparison.InvariantCultureIgnoreCase)
|
||||
|| profile.passwordHash.Equals(password,StringComparison.InvariantCultureIgnoreCase));
|
||||
|
@ -635,8 +627,8 @@ namespace OpenSim.Framework.UserManagement
|
|||
public virtual bool AuthenticateUser(UserProfileData profile, LLUUID webloginkey)
|
||||
{
|
||||
bool passwordSuccess = false;
|
||||
MainLog.Instance.Verbose(
|
||||
"LOGIN", "Authenticating {0} {1} ({2})", profile.username, profile.surname, profile.UUID);
|
||||
m_log.Info(
|
||||
String.Format("[LOGIN]: Authenticating {0} {1} ({2})", profile.username, profile.surname, profile.UUID));
|
||||
|
||||
// Match web login key unless it's the default weblogin key LLUUID.Zero
|
||||
passwordSuccess = ((profile.webLoginKey==webloginkey) && profile.webLoginKey != LLUUID.Zero);
|
||||
|
|
|
@ -56,6 +56,8 @@ namespace OpenSim.Framework.Communications
|
|||
/// </remarks>
|
||||
public class RestClient
|
||||
{
|
||||
private static readonly log4net.ILog m_log = log4net.LogManager.GetLogger(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType);
|
||||
|
||||
private string realuri;
|
||||
|
||||
#region member variables
|
||||
|
@ -238,7 +240,7 @@ namespace OpenSim.Framework.Communications
|
|||
}
|
||||
}
|
||||
realuri = sb.ToString();
|
||||
MainLog.Instance.Verbose("REST", "RestURL: {0}", realuri);
|
||||
m_log.Info(String.Format("[REST]: RestURL: {0}", realuri));
|
||||
return new Uri(sb.ToString());
|
||||
}
|
||||
|
||||
|
@ -374,16 +376,16 @@ namespace OpenSim.Framework.Communications
|
|||
_asyncException = null;
|
||||
_request.ContentLength = src.Length;
|
||||
|
||||
MainLog.Instance.Verbose("REST", "Request Length {0}", _request.ContentLength);
|
||||
MainLog.Instance.Verbose("REST", "Sending Web Request {0}", buildUri());
|
||||
m_log.Info(String.Format("[REST]: Request Length {0}", _request.ContentLength));
|
||||
m_log.Info(String.Format("[REST]: Sending Web Request {0}", buildUri()));
|
||||
src.Seek(0, SeekOrigin.Begin);
|
||||
MainLog.Instance.Verbose("REST", "Seek is ok");
|
||||
m_log.Info("[REST]: Seek is ok");
|
||||
Stream dst = _request.GetRequestStream();
|
||||
MainLog.Instance.Verbose("REST", "GetRequestStream is ok");
|
||||
m_log.Info("[REST]: GetRequestStream is ok");
|
||||
|
||||
byte[] buf = new byte[1024];
|
||||
int length = src.Read(buf, 0, 1024);
|
||||
MainLog.Instance.Verbose("REST", "First Read is ok");
|
||||
m_log.Info("[REST]: First Read is ok");
|
||||
while (length > 0)
|
||||
{
|
||||
dst.Write(buf, 0, length);
|
||||
|
|
|
@ -43,6 +43,8 @@ namespace OpenSim.Framework.UserManagement
|
|||
/// </summary>
|
||||
public abstract class UserManagerBase : IUserService
|
||||
{
|
||||
private static readonly log4net.ILog m_log = log4net.LogManager.GetLogger(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType);
|
||||
|
||||
public UserConfig _config;
|
||||
private Dictionary<string, IUserData> _plugins = new Dictionary<string, IUserData>();
|
||||
|
||||
|
@ -54,10 +56,10 @@ namespace OpenSim.Framework.UserManagement
|
|||
{
|
||||
if (!String.IsNullOrEmpty(FileName))
|
||||
{
|
||||
MainLog.Instance.Verbose("USERSTORAGE", "Attempting to load " + FileName);
|
||||
m_log.Info("[USERSTORAGE]: Attempting to load " + FileName);
|
||||
Assembly pluginAssembly = Assembly.LoadFrom(FileName);
|
||||
|
||||
MainLog.Instance.Verbose("USERSTORAGE", "Found " + pluginAssembly.GetTypes().Length + " interfaces.");
|
||||
m_log.Info("[USERSTORAGE]: Found " + pluginAssembly.GetTypes().Length + " interfaces.");
|
||||
foreach (Type pluginType in pluginAssembly.GetTypes())
|
||||
{
|
||||
if (!pluginType.IsAbstract)
|
||||
|
@ -79,7 +81,7 @@ namespace OpenSim.Framework.UserManagement
|
|||
{
|
||||
plug.Initialise();
|
||||
_plugins.Add(plug.getName(), plug);
|
||||
MainLog.Instance.Verbose("USERSTORAGE", "Added IUserData Interface");
|
||||
m_log.Info("[USERSTORAGE]: Added IUserData Interface");
|
||||
}
|
||||
|
||||
#region Get UserProfile
|
||||
|
@ -116,8 +118,7 @@ namespace OpenSim.Framework.UserManagement
|
|||
}
|
||||
catch (Exception)
|
||||
{
|
||||
MainLog.Instance.Verbose("USERSTORAGE",
|
||||
"Unable to generate AgentPickerData via " + plugin.Key + "(" + query + ")");
|
||||
m_log.Info("[USERSTORAGE]: Unable to generate AgentPickerData via " + plugin.Key + "(" + query + ")");
|
||||
return new List<AvatarPickerAvatar>();
|
||||
}
|
||||
}
|
||||
|
@ -163,8 +164,7 @@ namespace OpenSim.Framework.UserManagement
|
|||
}
|
||||
catch (Exception e)
|
||||
{
|
||||
MainLog.Instance.Verbose("USERSTORAGE",
|
||||
"Unable to set user via " + plugin.Key + "(" + e.ToString() + ")");
|
||||
m_log.Info("[USERSTORAGE]: Unable to set user via " + plugin.Key + "(" + e.ToString() + ")");
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -190,8 +190,7 @@ namespace OpenSim.Framework.UserManagement
|
|||
}
|
||||
catch (Exception e)
|
||||
{
|
||||
MainLog.Instance.Verbose("USERSTORAGE",
|
||||
"Unable to find user via " + plugin.Key + "(" + e.ToString() + ")");
|
||||
m_log.Info("[USERSTORAGE]: Unable to find user via " + plugin.Key + "(" + e.ToString() + ")");
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -214,8 +213,7 @@ namespace OpenSim.Framework.UserManagement
|
|||
}
|
||||
catch (Exception e)
|
||||
{
|
||||
MainLog.Instance.Verbose("USERSTORAGE",
|
||||
"Unable to GetUserFriendList via " + plugin.Key + "(" + e.ToString() + ")");
|
||||
m_log.Info("[USERSTORAGE]: Unable to GetUserFriendList via " + plugin.Key + "(" + e.ToString() + ")");
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -234,8 +232,7 @@ namespace OpenSim.Framework.UserManagement
|
|||
}
|
||||
catch (Exception e)
|
||||
{
|
||||
MainLog.Instance.Verbose("USERSTORAGE",
|
||||
"Unable to Store WebLoginKey via " + plugin.Key + "(" + e.ToString() + ")");
|
||||
m_log.Info("[USERSTORAGE]: Unable to Store WebLoginKey via " + plugin.Key + "(" + e.ToString() + ")");
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -250,8 +247,7 @@ namespace OpenSim.Framework.UserManagement
|
|||
}
|
||||
catch (Exception e)
|
||||
{
|
||||
MainLog.Instance.Verbose("USERSTORAGE",
|
||||
"Unable to AddNewUserFriend via " + plugin.Key + "(" + e.ToString() + ")");
|
||||
m_log.Info("[USERSTORAGE]: Unable to AddNewUserFriend via " + plugin.Key + "(" + e.ToString() + ")");
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -268,8 +264,7 @@ namespace OpenSim.Framework.UserManagement
|
|||
}
|
||||
catch (Exception e)
|
||||
{
|
||||
MainLog.Instance.Verbose("USERSTORAGE",
|
||||
"Unable to RemoveUserFriend via " + plugin.Key + "(" + e.ToString() + ")");
|
||||
m_log.Info("[USERSTORAGE]: Unable to RemoveUserFriend via " + plugin.Key + "(" + e.ToString() + ")");
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -284,8 +279,7 @@ namespace OpenSim.Framework.UserManagement
|
|||
}
|
||||
catch (Exception e)
|
||||
{
|
||||
MainLog.Instance.Verbose("USERSTORAGE",
|
||||
"Unable to UpdateUserFriendPerms via " + plugin.Key + "(" + e.ToString() + ")");
|
||||
m_log.Info("[USERSTORAGE]: Unable to UpdateUserFriendPerms via " + plugin.Key + "(" + e.ToString() + ")");
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -304,8 +298,7 @@ namespace OpenSim.Framework.UserManagement
|
|||
}
|
||||
catch (Exception e)
|
||||
{
|
||||
MainLog.Instance.Verbose("USERSTORAGE",
|
||||
"Unable to find user via " + plugin.Key + "(" + e.ToString() + ")");
|
||||
m_log.Info("[USERSTORAGE]: Unable to find user via " + plugin.Key + "(" + e.ToString() + ")");
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -337,8 +330,7 @@ namespace OpenSim.Framework.UserManagement
|
|||
}
|
||||
catch (Exception e)
|
||||
{
|
||||
MainLog.Instance.Verbose("USERSTORAGE",
|
||||
"Unable to find user via " + plugin.Key + "(" + e.ToString() + ")");
|
||||
m_log.Info("[USERSTORAGE]: Unable to find user via " + plugin.Key + "(" + e.ToString() + ")");
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -454,14 +446,14 @@ namespace OpenSim.Framework.UserManagement
|
|||
}
|
||||
else
|
||||
{
|
||||
MainLog.Instance.Verbose("LOGOUT", "didn't save logout position, currentAgent is null *do Fix ");
|
||||
m_log.Info("[LOGOUT]: didn't save logout position, currentAgent is null *do Fix ");
|
||||
}
|
||||
MainLog.Instance.Verbose("LOGOUT", userProfile.username + " " + userProfile.surname + " from " + regionhandle + "(" + posx + "," + posy + "," + posz + ")" );
|
||||
MainLog.Instance.Verbose("LOGOUT", "userid: " + userid.ToString() + " regionid: " + regionid.ToString() );
|
||||
m_log.Info("[LOGOUT]: " + userProfile.username + " " + userProfile.surname + " from " + regionhandle + "(" + posx + "," + posy + "," + posz + ")" );
|
||||
m_log.Info("[LOGOUT]: userid: " + userid.ToString() + " regionid: " + regionid.ToString() );
|
||||
}
|
||||
else
|
||||
{
|
||||
MainLog.Instance.Warn("LOGOUT", "Unknown User logged out");
|
||||
m_log.Warn("[LOGOUT]: Unknown User logged out");
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -539,8 +531,7 @@ namespace OpenSim.Framework.UserManagement
|
|||
}
|
||||
catch (Exception e)
|
||||
{
|
||||
MainLog.Instance.Verbose("USERSTORAGE",
|
||||
"Unable to add user via " + plugin.Key + "(" + e.ToString() + ")");
|
||||
m_log.Info("[USERSTORAGE]: Unable to add user via " + plugin.Key + "(" + e.ToString() + ")");
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -35,6 +35,8 @@ namespace OpenSim.Framework.Configuration.HTTP
|
|||
{
|
||||
public class HTTPConfiguration : IGenericConfig
|
||||
{
|
||||
private static readonly log4net.ILog m_log = log4net.LogManager.GetLogger(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType);
|
||||
|
||||
private RemoteConfigSettings remoteConfigSettings;
|
||||
|
||||
private XmlConfiguration xmlConfig;
|
||||
|
@ -81,7 +83,7 @@ namespace OpenSim.Framework.Configuration.HTTP
|
|||
}
|
||||
catch (WebException)
|
||||
{
|
||||
MainLog.Instance.Warn("Unable to connect to remote configuration file (" +
|
||||
m_log.Warn("Unable to connect to remote configuration file (" +
|
||||
remoteConfigSettings.baseConfigURL + configFileName +
|
||||
"). Creating local file instead.");
|
||||
xmlConfig.SetFileName(configFileName);
|
||||
|
|
|
@ -39,6 +39,8 @@ namespace OpenSim.Framework
|
|||
{
|
||||
public class ConfigurationMember
|
||||
{
|
||||
private static readonly log4net.ILog m_log = log4net.LogManager.GetLogger(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType);
|
||||
|
||||
public delegate bool ConfigurationOptionResult(string configuration_key, object configuration_result);
|
||||
|
||||
public delegate void ConfigurationOptionsLoad();
|
||||
|
@ -110,7 +112,7 @@ namespace OpenSim.Framework
|
|||
}
|
||||
else
|
||||
{
|
||||
MainLog.Instance.Notice(
|
||||
m_log.Info(
|
||||
"Required fields for adding a configuration option is invalid. Will not add this option (" +
|
||||
option.configurationKey + ")");
|
||||
}
|
||||
|
@ -147,46 +149,44 @@ namespace OpenSim.Framework
|
|||
checkAndAddConfigOption(configOption);
|
||||
}
|
||||
|
||||
|
||||
// TEMP - REMOVE
|
||||
private int cE = 0;
|
||||
public void performConfigurationRetrieve()
|
||||
{
|
||||
if (cE > 1)
|
||||
MainLog.Instance.Error("READING CONFIGURATION COUT: " + cE.ToString());
|
||||
m_log.Error("READING CONFIGURATION COUT: " + cE.ToString());
|
||||
|
||||
|
||||
configurationPlugin = LoadConfigDll(configurationPluginFilename);
|
||||
configurationOptions.Clear();
|
||||
if (loadFunction == null)
|
||||
{
|
||||
MainLog.Instance.Error("Load Function for '" + configurationDescription +
|
||||
m_log.Error("Load Function for '" + configurationDescription +
|
||||
"' is null. Refusing to run configuration.");
|
||||
return;
|
||||
}
|
||||
|
||||
if (resultFunction == null)
|
||||
{
|
||||
MainLog.Instance.Error("Result Function for '" + configurationDescription +
|
||||
m_log.Error("Result Function for '" + configurationDescription +
|
||||
"' is null. Refusing to run configuration.");
|
||||
return;
|
||||
}
|
||||
|
||||
MainLog.Instance.Verbose("CONFIG", "Calling Configuration Load Function...");
|
||||
m_log.Info("[CONFIG]: Calling Configuration Load Function...");
|
||||
loadFunction();
|
||||
|
||||
if (configurationOptions.Count <= 0)
|
||||
{
|
||||
MainLog.Instance.Error("CONFIG",
|
||||
"No configuration options were specified for '" + configurationOptions +
|
||||
"'. Refusing to continue configuration.");
|
||||
m_log.Error("[CONFIG]: No configuration options were specified for '" + configurationOptions +
|
||||
"'. Refusing to continue configuration.");
|
||||
return;
|
||||
}
|
||||
|
||||
bool useFile = true;
|
||||
if (configurationPlugin == null)
|
||||
{
|
||||
MainLog.Instance.Error("CONFIG", "Configuration Plugin NOT LOADED!");
|
||||
m_log.Error("[CONFIG]: Configuration Plugin NOT LOADED!");
|
||||
return;
|
||||
}
|
||||
|
||||
|
@ -200,7 +200,7 @@ namespace OpenSim.Framework
|
|||
}
|
||||
catch (XmlException e)
|
||||
{
|
||||
MainLog.Instance.Error("Error loading " + configurationFilename + ": " + e.ToString());
|
||||
m_log.Error("Error loading " + configurationFilename + ": " + e.ToString());
|
||||
useFile = false;
|
||||
}
|
||||
}
|
||||
|
@ -208,11 +208,11 @@ namespace OpenSim.Framework
|
|||
{
|
||||
if (configurationFromXMLNode != null)
|
||||
{
|
||||
MainLog.Instance.Notice("Loading from XML Node, will not save to the file");
|
||||
m_log.Info("Loading from XML Node, will not save to the file");
|
||||
configurationPlugin.LoadDataFromString(configurationFromXMLNode.OuterXml);
|
||||
}
|
||||
|
||||
MainLog.Instance.Notice("XML Configuration Filename is not valid; will not save to the file.");
|
||||
m_log.Info("XML Configuration Filename is not valid; will not save to the file.");
|
||||
useFile = false;
|
||||
}
|
||||
|
||||
|
@ -253,15 +253,15 @@ namespace OpenSim.Framework
|
|||
if (configurationDescription.Trim() != String.Empty)
|
||||
{
|
||||
console_result =
|
||||
MainLog.Instance.CmdPrompt(
|
||||
MainConsole.Instance.CmdPrompt(
|
||||
configurationDescription + ": " + configOption.configurationQuestion,
|
||||
configOption.configurationDefault);
|
||||
}
|
||||
else
|
||||
{
|
||||
console_result =
|
||||
MainLog.Instance.CmdPrompt(configOption.configurationQuestion,
|
||||
configOption.configurationDefault);
|
||||
MainConsole.Instance.CmdPrompt(configOption.configurationQuestion,
|
||||
configOption.configurationDefault);
|
||||
}
|
||||
}
|
||||
else
|
||||
|
@ -431,7 +431,7 @@ namespace OpenSim.Framework
|
|||
|
||||
if (!resultFunction(configOption.configurationKey, return_result))
|
||||
{
|
||||
MainLog.Instance.Notice(
|
||||
m_log.Info(
|
||||
"The handler for the last configuration option denied that input, please try again.");
|
||||
convertSuccess = false;
|
||||
ignoreNextFromConfig = true;
|
||||
|
@ -441,20 +441,18 @@ namespace OpenSim.Framework
|
|||
{
|
||||
if (configOption.configurationUseDefaultNoPrompt)
|
||||
{
|
||||
MainLog.Instance.Error("CONFIG",
|
||||
string.Format(
|
||||
"[{3}]:[{1}] is not valid default for parameter [{0}].\nThe configuration result must be parsable to {2}.\n",
|
||||
configOption.configurationKey, console_result, errorMessage,
|
||||
configurationFilename));
|
||||
m_log.Error(string.Format(
|
||||
"[CONFIG]: [{3}]:[{1}] is not valid default for parameter [{0}].\nThe configuration result must be parsable to {2}.\n",
|
||||
configOption.configurationKey, console_result, errorMessage,
|
||||
configurationFilename));
|
||||
convertSuccess = true;
|
||||
}
|
||||
else
|
||||
{
|
||||
MainLog.Instance.Warn("CONFIG",
|
||||
string.Format(
|
||||
"[{3}]:[{1}] is not a valid value [{0}].\nThe configuration result must be parsable to {2}.\n",
|
||||
configOption.configurationKey, console_result, errorMessage,
|
||||
configurationFilename));
|
||||
m_log.Warn(string.Format(
|
||||
"[CONFIG]: [{3}]:[{1}] is not a valid value [{0}].\nThe configuration result must be parsable to {2}.\n",
|
||||
configOption.configurationKey, console_result, errorMessage,
|
||||
configurationFilename));
|
||||
ignoreNextFromConfig = true;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -33,61 +33,28 @@ using System.Net;
|
|||
|
||||
namespace OpenSim.Framework.Console
|
||||
{
|
||||
public enum LogPriority : int
|
||||
public class ConsoleBase
|
||||
{
|
||||
CRITICAL,
|
||||
HIGH,
|
||||
MEDIUM,
|
||||
NORMAL,
|
||||
LOW,
|
||||
VERBOSE,
|
||||
EXTRAVERBOSE
|
||||
}
|
||||
private static readonly log4net.ILog m_log = log4net.LogManager.GetLogger(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType);
|
||||
|
||||
public class LogBase
|
||||
{
|
||||
private object m_syncRoot = new object();
|
||||
|
||||
private StreamWriter Log;
|
||||
public conscmd_callback cmdparser;
|
||||
public string componentname;
|
||||
private bool m_verbose;
|
||||
public conscmd_callback m_cmdParser;
|
||||
public string m_componentName;
|
||||
|
||||
public LogBase(string LogFile, string componentname, conscmd_callback cmdparser, bool verbose)
|
||||
public ConsoleBase(string componentname, conscmd_callback cmdparser)
|
||||
{
|
||||
this.componentname = componentname;
|
||||
this.cmdparser = cmdparser;
|
||||
m_verbose = verbose;
|
||||
m_componentName = componentname;
|
||||
m_cmdParser = cmdparser;
|
||||
|
||||
System.Console.WriteLine("Creating new local console");
|
||||
|
||||
if (String.IsNullOrEmpty(LogFile))
|
||||
{
|
||||
LogFile = componentname + ".log";
|
||||
}
|
||||
|
||||
System.Console.WriteLine("Logs will be saved to current directory in " + LogFile);
|
||||
|
||||
try
|
||||
{
|
||||
Log = File.AppendText(LogFile);
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
System.Console.WriteLine("Unable to open log file. Do you already have another copy of OpenSim running? Permission problem?");
|
||||
System.Console.WriteLine(ex.Message);
|
||||
System.Console.WriteLine("");
|
||||
System.Console.WriteLine("Application is terminating.");
|
||||
System.Console.WriteLine("");
|
||||
System.Threading.Thread.CurrentThread.Abort();
|
||||
}
|
||||
Log.WriteLine("========================================================================");
|
||||
Log.WriteLine(componentname + " Started at " + DateTime.Now.ToString());
|
||||
m_log.Info("[" + m_componentName + "]: Started at " + DateTime.Now.ToString());
|
||||
}
|
||||
|
||||
public void Close()
|
||||
{
|
||||
Log.WriteLine("Shutdown at " + DateTime.Now.ToString());
|
||||
Log.Close();
|
||||
m_log.Info("[" + m_componentName + "]: Shutdown at " + DateTime.Now.ToString());
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
|
@ -99,23 +66,22 @@ namespace OpenSim.Framework.Console
|
|||
/// <returns>an ansii color</returns>
|
||||
private ConsoleColor DeriveColor(string input)
|
||||
{
|
||||
int colIdx = (input.ToUpper().GetHashCode()%6) + 9;
|
||||
int colIdx = (input.ToUpper().GetHashCode() % 6) + 9;
|
||||
return (ConsoleColor) colIdx;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Sends a warning to the current log output
|
||||
/// Sends a warning to the current console output
|
||||
/// </summary>
|
||||
/// <param name="format">The message to send</param>
|
||||
/// <param name="args">WriteLine-style message arguments</param>
|
||||
public void Warn(string format, params object[] args)
|
||||
{
|
||||
WriteNewLine(ConsoleColor.Yellow, format, args);
|
||||
return;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Sends a warning to the current log output
|
||||
/// Sends a warning to the current console output
|
||||
/// </summary>
|
||||
/// <param name="sender">The module that sent this message</param>
|
||||
/// <param name="format">The message to send</param>
|
||||
|
@ -124,22 +90,20 @@ namespace OpenSim.Framework.Console
|
|||
{
|
||||
WritePrefixLine(DeriveColor(sender), sender);
|
||||
WriteNewLine(ConsoleColor.Yellow, format, args);
|
||||
return;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Sends a notice to the current log output
|
||||
/// Sends a notice to the current console output
|
||||
/// </summary>
|
||||
/// <param name="format">The message to send</param>
|
||||
/// <param name="args">WriteLine-style message arguments</param>
|
||||
public void Notice(string format, params object[] args)
|
||||
{
|
||||
WriteNewLine(ConsoleColor.White, format, args);
|
||||
return;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Sends a notice to the current log output
|
||||
/// Sends a notice to the current console output
|
||||
/// </summary>
|
||||
/// <param name="sender">The module that sent this message</param>
|
||||
/// <param name="format">The message to send</param>
|
||||
|
@ -148,22 +112,20 @@ namespace OpenSim.Framework.Console
|
|||
{
|
||||
WritePrefixLine(DeriveColor(sender), sender);
|
||||
WriteNewLine(ConsoleColor.White, format, args);
|
||||
return;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Sends an error to the current log output
|
||||
/// Sends an error to the current console output
|
||||
/// </summary>
|
||||
/// <param name="format">The message to send</param>
|
||||
/// <param name="args">WriteLine-style message arguments</param>
|
||||
public void Error(string format, params object[] args)
|
||||
{
|
||||
WriteNewLine(ConsoleColor.Red, format, args);
|
||||
return;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Sends an error to the current log output
|
||||
/// Sends an error to the current console output
|
||||
/// </summary>
|
||||
/// <param name="sender">The module that sent this message</param>
|
||||
/// <param name="format">The message to send</param>
|
||||
|
@ -172,38 +134,20 @@ namespace OpenSim.Framework.Console
|
|||
{
|
||||
WritePrefixLine(DeriveColor(sender), sender);
|
||||
Error(format, args);
|
||||
return;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Sends an informational message to the current log output
|
||||
/// </summary>
|
||||
/// <param name="sender">The module that sent this message</param>
|
||||
/// <param name="format">The message to send</param>
|
||||
/// <param name="args">WriteLine-style message arguments</param>
|
||||
public void Verbose(string sender, string format, params object[] args)
|
||||
{
|
||||
if (m_verbose)
|
||||
{
|
||||
WritePrefixLine(DeriveColor(sender), sender);
|
||||
WriteNewLine(ConsoleColor.Gray, format, args);
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Sends a status message to the current log output
|
||||
/// Sends a status message to the current console output
|
||||
/// </summary>
|
||||
/// <param name="format">The message to send</param>
|
||||
/// <param name="args">WriteLine-style message arguments</param>
|
||||
public void Status(string format, params object[] args)
|
||||
{
|
||||
WriteNewLine(ConsoleColor.Blue, format, args);
|
||||
return;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Sends a status message to the current log output
|
||||
/// Sends a status message to the current console output
|
||||
/// </summary>
|
||||
/// <param name="sender">The module that sent this message</param>
|
||||
/// <param name="format">The message to send</param>
|
||||
|
@ -212,14 +156,12 @@ namespace OpenSim.Framework.Console
|
|||
{
|
||||
WritePrefixLine(DeriveColor(sender), sender);
|
||||
WriteNewLine(ConsoleColor.Blue, format, args);
|
||||
return;
|
||||
}
|
||||
|
||||
[Conditional("DEBUG")]
|
||||
public void Debug(string format, params object[] args)
|
||||
{
|
||||
WriteNewLine(ConsoleColor.Gray, format, args);
|
||||
return;
|
||||
}
|
||||
|
||||
[Conditional("DEBUG")]
|
||||
|
@ -227,7 +169,6 @@ namespace OpenSim.Framework.Console
|
|||
{
|
||||
WritePrefixLine(DeriveColor(sender), sender);
|
||||
WriteNewLine(ConsoleColor.Gray, format, args);
|
||||
return;
|
||||
}
|
||||
|
||||
private void WriteNewLine(ConsoleColor color, string format, params object[] args)
|
||||
|
@ -236,19 +177,16 @@ namespace OpenSim.Framework.Console
|
|||
{
|
||||
lock (m_syncRoot)
|
||||
{
|
||||
string now = DateTime.Now.ToString("[MM-dd HH:mm:ss] ");
|
||||
Log.Write(now);
|
||||
try
|
||||
{
|
||||
Log.WriteLine(format, args);
|
||||
Log.Flush();
|
||||
System.Console.WriteLine(format, args);
|
||||
}
|
||||
|
||||
catch (FormatException)
|
||||
{
|
||||
System.Console.WriteLine(args);
|
||||
}
|
||||
System.Console.Write(now);
|
||||
|
||||
try
|
||||
{
|
||||
if (color != ConsoleColor.White)
|
||||
|
@ -267,13 +205,10 @@ namespace OpenSim.Framework.Console
|
|||
// Some older systems dont support coloured text.
|
||||
System.Console.WriteLine(args);
|
||||
}
|
||||
|
||||
return;
|
||||
}
|
||||
}
|
||||
catch (ObjectDisposedException)
|
||||
{
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -285,10 +220,7 @@ namespace OpenSim.Framework.Console
|
|||
{
|
||||
sender = sender.ToUpper();
|
||||
|
||||
Log.WriteLine("[" + sender + "] ");
|
||||
|
||||
|
||||
Log.Flush();
|
||||
System.Console.WriteLine("[" + sender + "] ");
|
||||
|
||||
System.Console.Write("[");
|
||||
|
||||
|
@ -305,37 +237,29 @@ namespace OpenSim.Framework.Console
|
|||
}
|
||||
|
||||
System.Console.Write("] \t");
|
||||
|
||||
return;
|
||||
}
|
||||
}
|
||||
catch (ObjectDisposedException)
|
||||
{
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
public string ReadLine()
|
||||
{
|
||||
try
|
||||
{
|
||||
string TempStr = System.Console.ReadLine();
|
||||
Log.WriteLine(TempStr);
|
||||
return TempStr;
|
||||
return System.Console.ReadLine();
|
||||
}
|
||||
catch (Exception e)
|
||||
{
|
||||
MainLog.Instance.Error("Console", "System.Console.ReadLine exception " + e.ToString());
|
||||
m_log.Error("[Console]: System.Console.ReadLine exception " + e.ToString());
|
||||
return String.Empty;
|
||||
}
|
||||
}
|
||||
|
||||
public int Read()
|
||||
{
|
||||
int TempInt = System.Console.Read();
|
||||
Log.Write((char) TempInt);
|
||||
return TempInt;
|
||||
return System.Console.Read();
|
||||
}
|
||||
|
||||
public IPAddress CmdPromptIPAddress(string prompt, string defaultvalue)
|
||||
|
@ -345,14 +269,14 @@ namespace OpenSim.Framework.Console
|
|||
|
||||
while (true)
|
||||
{
|
||||
addressStr = MainLog.Instance.CmdPrompt(prompt, defaultvalue);
|
||||
addressStr = CmdPrompt(prompt, defaultvalue);
|
||||
if (IPAddress.TryParse(addressStr, out address))
|
||||
{
|
||||
break;
|
||||
}
|
||||
else
|
||||
{
|
||||
MainLog.Instance.Error("Illegal address. Please re-enter.");
|
||||
m_log.Error("Illegal address. Please re-enter.");
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -366,7 +290,7 @@ namespace OpenSim.Framework.Console
|
|||
|
||||
while (true)
|
||||
{
|
||||
portStr = MainLog.Instance.CmdPrompt(prompt, defaultvalue);
|
||||
portStr = CmdPrompt(prompt, defaultvalue);
|
||||
if (uint.TryParse(portStr, out port))
|
||||
{
|
||||
if (port >= IPEndPoint.MinPort && port <= IPEndPoint.MaxPort)
|
||||
|
@ -375,7 +299,7 @@ namespace OpenSim.Framework.Console
|
|||
}
|
||||
}
|
||||
|
||||
MainLog.Instance.Error("Illegal address. Please re-enter.");
|
||||
m_log.Error("Illegal address. Please re-enter.");
|
||||
}
|
||||
|
||||
return port;
|
||||
|
@ -386,8 +310,6 @@ namespace OpenSim.Framework.Console
|
|||
public string PasswdPrompt(string prompt)
|
||||
{
|
||||
// FIXME: Needs to be better abstracted
|
||||
Log.WriteLine(prompt);
|
||||
Notice(prompt);
|
||||
ConsoleColor oldfg = System.Console.ForegroundColor;
|
||||
System.Console.ForegroundColor = System.Console.BackgroundColor;
|
||||
string temp = System.Console.ReadLine();
|
||||
|
@ -398,7 +320,7 @@ namespace OpenSim.Framework.Console
|
|||
// Displays a command prompt and waits for the user to enter a string, then returns that string
|
||||
public string CmdPrompt(string prompt)
|
||||
{
|
||||
Notice(String.Format("{0}: ", prompt));
|
||||
System.Console.WriteLine(String.Format("{0}: ", prompt));
|
||||
return ReadLine();
|
||||
}
|
||||
|
||||
|
@ -429,7 +351,7 @@ namespace OpenSim.Framework.Console
|
|||
}
|
||||
else
|
||||
{
|
||||
Notice("Valid options are " + OptionA + " or " + OptionB);
|
||||
System.Console.WriteLine("Valid options are " + OptionA + " or " + OptionB);
|
||||
temp = CmdPrompt(prompt, defaultresponse);
|
||||
}
|
||||
}
|
||||
|
@ -439,23 +361,23 @@ namespace OpenSim.Framework.Console
|
|||
// Runs a command with a number of parameters
|
||||
public Object RunCmd(string Cmd, string[] cmdparams)
|
||||
{
|
||||
cmdparser.RunCmd(Cmd, cmdparams);
|
||||
m_cmdParser.RunCmd(Cmd, cmdparams);
|
||||
return null;
|
||||
}
|
||||
|
||||
// Shows data about something
|
||||
public void ShowCommands(string ShowWhat)
|
||||
{
|
||||
cmdparser.Show(ShowWhat);
|
||||
m_cmdParser.Show(ShowWhat);
|
||||
}
|
||||
|
||||
public void MainLogPrompt()
|
||||
public void Prompt()
|
||||
{
|
||||
string tempstr = CmdPrompt(componentname + "# ");
|
||||
MainLogRunCommand(tempstr);
|
||||
string tempstr = CmdPrompt(m_componentName + "# ");
|
||||
RunCommand(tempstr);
|
||||
}
|
||||
|
||||
public void MainLogRunCommand(string command)
|
||||
public void RunCommand(string command)
|
||||
{
|
||||
string[] tempstrarray;
|
||||
tempstrarray = command.Split(' ');
|
||||
|
@ -470,7 +392,7 @@ namespace OpenSim.Framework.Console
|
|||
}
|
||||
catch (Exception e)
|
||||
{
|
||||
MainLog.Instance.Error("Console", "Command failed with exception " + e.ToString());
|
||||
m_log.Error("[Console]: Command failed with exception " + e.ToString());
|
||||
}
|
||||
}
|
||||
|
|
@ -25,13 +25,14 @@
|
|||
* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
*
|
||||
*/
|
||||
|
||||
namespace OpenSim.Framework.Console
|
||||
{
|
||||
public class MainLog
|
||||
public class MainConsole
|
||||
{
|
||||
private static LogBase instance;
|
||||
private static ConsoleBase instance;
|
||||
|
||||
public static LogBase Instance
|
||||
public static ConsoleBase Instance
|
||||
{
|
||||
get { return instance; }
|
||||
set { instance = value; }
|
|
@ -37,6 +37,8 @@ namespace OpenSim.Framework.Data.DB4o
|
|||
/// </summary>
|
||||
public class DB4oUserData : IUserData
|
||||
{
|
||||
private static readonly log4net.ILog m_log = log4net.LogManager.GetLogger(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType);
|
||||
|
||||
/// <summary>
|
||||
/// The database manager
|
||||
/// </summary>
|
||||
|
@ -143,22 +145,22 @@ namespace OpenSim.Framework.Data.DB4o
|
|||
|
||||
public void AddNewUserFriend(LLUUID friendlistowner, LLUUID friend, uint perms)
|
||||
{
|
||||
//MainLog.Instance.Verbose("FRIEND", "Stub AddNewUserFriend called");
|
||||
//m_log.Info("[FRIEND]: Stub AddNewUserFriend called");
|
||||
}
|
||||
|
||||
public void RemoveUserFriend(LLUUID friendlistowner, LLUUID friend)
|
||||
{
|
||||
//MainLog.Instance.Verbose("FRIEND", "Stub RemoveUserFriend called");
|
||||
//m_log.Info("[FRIEND]: Stub RemoveUserFriend called");
|
||||
}
|
||||
public void UpdateUserFriendPerms(LLUUID friendlistowner, LLUUID friend, uint perms)
|
||||
{
|
||||
//MainLog.Instance.Verbose("FRIEND", "Stub UpdateUserFriendPerms called");
|
||||
//m_log.Info("[FRIEND]: Stub UpdateUserFriendPerms called");
|
||||
}
|
||||
|
||||
|
||||
public List<FriendListItem> GetUserFriendList(LLUUID friendlistowner)
|
||||
{
|
||||
//MainLog.Instance.Verbose("FRIEND", "Stub GetUserFriendList called");
|
||||
//m_log.Info("[FRIEND]: Stub GetUserFriendList called");
|
||||
return new List<FriendListItem>();
|
||||
}
|
||||
|
||||
|
@ -166,7 +168,7 @@ namespace OpenSim.Framework.Data.DB4o
|
|||
|
||||
public void UpdateUserCurrentRegion(LLUUID avatarid, LLUUID regionuuid)
|
||||
{
|
||||
//MainLog.Instance.Verbose("USER", "Stub UpdateUserCUrrentRegion called");
|
||||
//m_log.Info("[USER]: Stub UpdateUserCUrrentRegion called");
|
||||
}
|
||||
|
||||
|
||||
|
|
|
@ -37,6 +37,8 @@ namespace OpenSim.Framework.Data.MSSQL
|
|||
{
|
||||
internal class MSSQLAssetData : IAssetProvider
|
||||
{
|
||||
private static readonly log4net.ILog m_log = log4net.LogManager.GetLogger(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType);
|
||||
|
||||
private MSSQLManager database;
|
||||
|
||||
#region IAssetProvider Members
|
||||
|
@ -46,7 +48,7 @@ namespace OpenSim.Framework.Data.MSSQL
|
|||
// null as the version, indicates that the table didn't exist
|
||||
if (tableName == null)
|
||||
{
|
||||
MainLog.Instance.Notice("ASSETS", "Creating new database tables");
|
||||
m_log.Info("[ASSETS]: Creating new database tables");
|
||||
database.ExecuteResourceSql("CreateAssetsTable.sql");
|
||||
return;
|
||||
}
|
||||
|
@ -164,7 +166,7 @@ namespace OpenSim.Framework.Data.MSSQL
|
|||
}
|
||||
catch (Exception e)
|
||||
{
|
||||
MainLog.Instance.Error(e.ToString());
|
||||
m_log.Error(e.ToString());
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -40,6 +40,8 @@ namespace OpenSim.Framework.Data.MSSQL
|
|||
/// </summary>
|
||||
public class SqlGridData : IGridData
|
||||
{
|
||||
private static readonly log4net.ILog m_log = log4net.LogManager.GetLogger(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType);
|
||||
|
||||
/// <summary>
|
||||
/// Database manager
|
||||
/// </summary>
|
||||
|
@ -172,7 +174,7 @@ namespace OpenSim.Framework.Data.MSSQL
|
|||
catch (Exception e)
|
||||
{
|
||||
database.Reconnect();
|
||||
MainLog.Instance.Error(e.ToString());
|
||||
m_log.Error(e.ToString());
|
||||
return returnlist;
|
||||
}
|
||||
}
|
||||
|
@ -208,7 +210,7 @@ namespace OpenSim.Framework.Data.MSSQL
|
|||
catch (Exception e)
|
||||
{
|
||||
database.Reconnect();
|
||||
MainLog.Instance.Error(e.ToString());
|
||||
m_log.Error(e.ToString());
|
||||
return returnlist;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -39,6 +39,8 @@ namespace OpenSim.Framework.Data.MSSQL
|
|||
/// </summary>
|
||||
public class MSSQLInventoryData : IInventoryData
|
||||
{
|
||||
private static readonly log4net.ILog m_log = log4net.LogManager.GetLogger(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType);
|
||||
|
||||
/// <summary>
|
||||
/// The database manager
|
||||
/// </summary>
|
||||
|
@ -159,7 +161,7 @@ namespace OpenSim.Framework.Data.MSSQL
|
|||
catch (Exception e)
|
||||
{
|
||||
database.Reconnect();
|
||||
MainLog.Instance.Error(e.ToString());
|
||||
m_log.Error(e.ToString());
|
||||
return null;
|
||||
}
|
||||
}
|
||||
|
@ -198,7 +200,7 @@ namespace OpenSim.Framework.Data.MSSQL
|
|||
catch (Exception e)
|
||||
{
|
||||
database.Reconnect();
|
||||
MainLog.Instance.Error(e.ToString());
|
||||
m_log.Error(e.ToString());
|
||||
return null;
|
||||
}
|
||||
}
|
||||
|
@ -244,7 +246,7 @@ namespace OpenSim.Framework.Data.MSSQL
|
|||
catch (Exception e)
|
||||
{
|
||||
database.Reconnect();
|
||||
MainLog.Instance.Error(e.ToString());
|
||||
m_log.Error(e.ToString());
|
||||
return null;
|
||||
}
|
||||
}
|
||||
|
@ -282,7 +284,7 @@ namespace OpenSim.Framework.Data.MSSQL
|
|||
catch (Exception e)
|
||||
{
|
||||
database.Reconnect();
|
||||
MainLog.Instance.Error(e.ToString());
|
||||
m_log.Error(e.ToString());
|
||||
return null;
|
||||
}
|
||||
}
|
||||
|
@ -315,7 +317,7 @@ namespace OpenSim.Framework.Data.MSSQL
|
|||
}
|
||||
catch (SqlException e)
|
||||
{
|
||||
MainLog.Instance.Error(e.ToString());
|
||||
m_log.Error(e.ToString());
|
||||
}
|
||||
|
||||
return null;
|
||||
|
@ -352,7 +354,7 @@ namespace OpenSim.Framework.Data.MSSQL
|
|||
catch (Exception e)
|
||||
{
|
||||
database.Reconnect();
|
||||
MainLog.Instance.Error(e.ToString());
|
||||
m_log.Error(e.ToString());
|
||||
}
|
||||
return null;
|
||||
}
|
||||
|
@ -377,7 +379,7 @@ namespace OpenSim.Framework.Data.MSSQL
|
|||
}
|
||||
catch (Exception e)
|
||||
{
|
||||
MainLog.Instance.Error(e.ToString());
|
||||
m_log.Error(e.ToString());
|
||||
}
|
||||
|
||||
return null;
|
||||
|
@ -412,7 +414,7 @@ namespace OpenSim.Framework.Data.MSSQL
|
|||
catch (Exception e)
|
||||
{
|
||||
database.Reconnect();
|
||||
MainLog.Instance.Error(e.ToString());
|
||||
m_log.Error(e.ToString());
|
||||
return null;
|
||||
}
|
||||
}
|
||||
|
@ -452,7 +454,7 @@ namespace OpenSim.Framework.Data.MSSQL
|
|||
}
|
||||
catch (SqlException e)
|
||||
{
|
||||
MainLog.Instance.Error(e.ToString());
|
||||
m_log.Error(e.ToString());
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -511,7 +513,7 @@ namespace OpenSim.Framework.Data.MSSQL
|
|||
}
|
||||
catch (Exception e)
|
||||
{
|
||||
MainLog.Instance.Error(e.ToString());
|
||||
m_log.Error(e.ToString());
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -533,7 +535,7 @@ namespace OpenSim.Framework.Data.MSSQL
|
|||
catch (SqlException e)
|
||||
{
|
||||
database.Reconnect();
|
||||
MainLog.Instance.Error(e.ToString());
|
||||
m_log.Error(e.ToString());
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -564,7 +566,7 @@ namespace OpenSim.Framework.Data.MSSQL
|
|||
}
|
||||
catch (Exception e)
|
||||
{
|
||||
MainLog.Instance.Error(e.ToString());
|
||||
m_log.Error(e.ToString());
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -602,7 +604,7 @@ namespace OpenSim.Framework.Data.MSSQL
|
|||
}
|
||||
catch (Exception e)
|
||||
{
|
||||
MainLog.Instance.Error(e.ToString());
|
||||
m_log.Error(e.ToString());
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -628,7 +630,7 @@ namespace OpenSim.Framework.Data.MSSQL
|
|||
}
|
||||
catch (Exception e)
|
||||
{
|
||||
MainLog.Instance.Error(e.ToString());
|
||||
m_log.Error(e.ToString());
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -675,7 +677,7 @@ namespace OpenSim.Framework.Data.MSSQL
|
|||
catch (SqlException e)
|
||||
{
|
||||
database.Reconnect();
|
||||
MainLog.Instance.Error(e.ToString());
|
||||
m_log.Error(e.ToString());
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -695,7 +697,7 @@ namespace OpenSim.Framework.Data.MSSQL
|
|||
catch (SqlException e)
|
||||
{
|
||||
database.Reconnect();
|
||||
MainLog.Instance.Error(e.ToString());
|
||||
m_log.Error(e.ToString());
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -42,6 +42,8 @@ namespace OpenSim.Framework.Data.MSSQL
|
|||
/// </summary>
|
||||
internal class MSSQLManager
|
||||
{
|
||||
private static readonly log4net.ILog m_log = log4net.LogManager.GetLogger(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType);
|
||||
|
||||
/// <summary>
|
||||
/// The database connection object
|
||||
/// </summary>
|
||||
|
@ -92,7 +94,7 @@ namespace OpenSim.Framework.Data.MSSQL
|
|||
}
|
||||
catch (Exception)
|
||||
{
|
||||
MainLog.Instance.Verbose("DATASTORE", "MSSQL Database doesn't exist... creating");
|
||||
m_log.Info("[DATASTORE]: MSSQL Database doesn't exist... creating");
|
||||
InitDB(conn);
|
||||
}
|
||||
cmd = Query("select top 1 webLoginKey from users", new Dictionary<string, string>());
|
||||
|
@ -260,7 +262,7 @@ namespace OpenSim.Framework.Data.MSSQL
|
|||
}
|
||||
catch (Exception e)
|
||||
{
|
||||
MainLog.Instance.Error("Unable to reconnect to database " + e.ToString());
|
||||
m_log.Error("Unable to reconnect to database " + e.ToString());
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -529,7 +531,7 @@ namespace OpenSim.Framework.Data.MSSQL
|
|||
}
|
||||
catch (Exception e)
|
||||
{
|
||||
MainLog.Instance.Error("MSSQLManager : " + e.ToString());
|
||||
m_log.Error("MSSQLManager : " + e.ToString());
|
||||
}
|
||||
|
||||
return returnval;
|
||||
|
@ -573,7 +575,7 @@ namespace OpenSim.Framework.Data.MSSQL
|
|||
}
|
||||
catch (Exception e)
|
||||
{
|
||||
MainLog.Instance.Error(e.ToString());
|
||||
m_log.Error(e.ToString());
|
||||
return false;
|
||||
}
|
||||
|
||||
|
@ -667,7 +669,7 @@ namespace OpenSim.Framework.Data.MSSQL
|
|||
}
|
||||
catch (Exception e)
|
||||
{
|
||||
MainLog.Instance.Error(e.ToString());
|
||||
m_log.Error(e.ToString());
|
||||
return false;
|
||||
}
|
||||
|
||||
|
@ -688,7 +690,7 @@ namespace OpenSim.Framework.Data.MSSQL
|
|||
}
|
||||
catch (Exception e)
|
||||
{
|
||||
MainLog.Instance.Error("Unable to execute query " + e.ToString());
|
||||
m_log.Error("Unable to execute query " + e.ToString());
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -721,7 +723,7 @@ namespace OpenSim.Framework.Data.MSSQL
|
|||
}
|
||||
catch (Exception e)
|
||||
{
|
||||
MainLog.Instance.Error(e.ToString());
|
||||
m_log.Error(e.ToString());
|
||||
}
|
||||
}
|
||||
tables.Close();
|
||||
|
|
|
@ -39,6 +39,8 @@ namespace OpenSim.Framework.Data.MSSQL
|
|||
/// </summary>
|
||||
internal class MSSQLUserData : IUserData
|
||||
{
|
||||
private static readonly log4net.ILog m_log = log4net.LogManager.GetLogger(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType);
|
||||
|
||||
/// <summary>
|
||||
/// Database manager for MySQL
|
||||
/// </summary>
|
||||
|
@ -94,7 +96,7 @@ namespace OpenSim.Framework.Data.MSSQL
|
|||
catch (Exception e)
|
||||
{
|
||||
database.Reconnect();
|
||||
MainLog.Instance.Error(e.ToString());
|
||||
m_log.Error(e.ToString());
|
||||
return null;
|
||||
}
|
||||
}
|
||||
|
@ -103,22 +105,22 @@ namespace OpenSim.Framework.Data.MSSQL
|
|||
|
||||
public void AddNewUserFriend(LLUUID friendlistowner, LLUUID friend, uint perms)
|
||||
{
|
||||
MainLog.Instance.Verbose("FRIEND", "Stub AddNewUserFriend called");
|
||||
m_log.Info("[FRIEND]: Stub AddNewUserFriend called");
|
||||
}
|
||||
|
||||
public void RemoveUserFriend(LLUUID friendlistowner, LLUUID friend)
|
||||
{
|
||||
MainLog.Instance.Verbose("FRIEND", "Stub RemoveUserFriend called");
|
||||
m_log.Info("[FRIEND]: Stub RemoveUserFriend called");
|
||||
}
|
||||
public void UpdateUserFriendPerms(LLUUID friendlistowner, LLUUID friend, uint perms)
|
||||
{
|
||||
MainLog.Instance.Verbose("FRIEND", "Stub UpdateUserFriendPerms called");
|
||||
m_log.Info("[FRIEND]: Stub UpdateUserFriendPerms called");
|
||||
}
|
||||
|
||||
|
||||
public List<FriendListItem> GetUserFriendList(LLUUID friendlistowner)
|
||||
{
|
||||
MainLog.Instance.Verbose("FRIEND", "Stub GetUserFriendList called");
|
||||
m_log.Info("[FRIEND]: Stub GetUserFriendList called");
|
||||
return new List<FriendListItem>();
|
||||
}
|
||||
|
||||
|
@ -126,7 +128,7 @@ namespace OpenSim.Framework.Data.MSSQL
|
|||
|
||||
public void UpdateUserCurrentRegion(LLUUID avatarid, LLUUID regionuuid)
|
||||
{
|
||||
MainLog.Instance.Verbose("USER", "Stub UpdateUserCUrrentRegion called");
|
||||
m_log.Info("[USER]: Stub UpdateUserCUrrentRegion called");
|
||||
}
|
||||
|
||||
|
||||
|
@ -168,7 +170,7 @@ namespace OpenSim.Framework.Data.MSSQL
|
|||
catch (Exception e)
|
||||
{
|
||||
database.Reconnect();
|
||||
MainLog.Instance.Error(e.ToString());
|
||||
m_log.Error(e.ToString());
|
||||
return returnlist;
|
||||
}
|
||||
}
|
||||
|
@ -204,7 +206,7 @@ namespace OpenSim.Framework.Data.MSSQL
|
|||
catch (Exception e)
|
||||
{
|
||||
database.Reconnect();
|
||||
MainLog.Instance.Error(e.ToString());
|
||||
m_log.Error(e.ToString());
|
||||
return returnlist;
|
||||
}
|
||||
}
|
||||
|
@ -235,7 +237,7 @@ namespace OpenSim.Framework.Data.MSSQL
|
|||
catch (Exception e)
|
||||
{
|
||||
database.Reconnect();
|
||||
MainLog.Instance.Error(e.ToString());
|
||||
m_log.Error(e.ToString());
|
||||
return null;
|
||||
}
|
||||
}
|
||||
|
@ -290,7 +292,7 @@ namespace OpenSim.Framework.Data.MSSQL
|
|||
catch (Exception e)
|
||||
{
|
||||
database.Reconnect();
|
||||
MainLog.Instance.Error(e.ToString());
|
||||
m_log.Error(e.ToString());
|
||||
return null;
|
||||
}
|
||||
}
|
||||
|
@ -324,7 +326,7 @@ namespace OpenSim.Framework.Data.MSSQL
|
|||
catch (Exception e)
|
||||
{
|
||||
database.Reconnect();
|
||||
MainLog.Instance.Error(e.ToString());
|
||||
m_log.Error(e.ToString());
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -426,7 +428,7 @@ namespace OpenSim.Framework.Data.MSSQL
|
|||
}
|
||||
catch (Exception e)
|
||||
{
|
||||
MainLog.Instance.Error(e.ToString());
|
||||
m_log.Error(e.ToString());
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
|
|
@ -37,6 +37,8 @@ namespace OpenSim.Framework.Data.MySQL
|
|||
{
|
||||
internal class MySQLAssetData : IAssetProvider
|
||||
{
|
||||
private static readonly log4net.ILog m_log = log4net.LogManager.GetLogger(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType);
|
||||
|
||||
private MySQLManager _dbConnection;
|
||||
|
||||
#region IAssetProvider Members
|
||||
|
@ -46,7 +48,7 @@ namespace OpenSim.Framework.Data.MySQL
|
|||
// null as the version, indicates that the table didn't exist
|
||||
if (oldVersion == null)
|
||||
{
|
||||
MainLog.Instance.Notice("ASSETS", "Creating new database tables");
|
||||
m_log.Info("[ASSETS]: Creating new database tables");
|
||||
_dbConnection.ExecuteResourceSql("CreateAssetsTable.sql");
|
||||
return;
|
||||
}
|
||||
|
@ -98,9 +100,9 @@ namespace OpenSim.Framework.Data.MySQL
|
|||
}
|
||||
catch (Exception e)
|
||||
{
|
||||
MainLog.Instance.Error(
|
||||
"ASSETS", "MySql failure fetching asset {0}" + Environment.NewLine + e.ToString()
|
||||
+ Environment.NewLine + "Attempting reconnection", assetID);
|
||||
m_log.Error(String.Format(
|
||||
"[ASSETS]: MySql failure fetching asset {0}" + Environment.NewLine + e.ToString()
|
||||
+ Environment.NewLine + "Attempting reconnection", assetID));
|
||||
_dbConnection.Reconnect();
|
||||
}
|
||||
}
|
||||
|
@ -137,10 +139,10 @@ namespace OpenSim.Framework.Data.MySQL
|
|||
}
|
||||
catch (Exception e)
|
||||
{
|
||||
MainLog.Instance.Error(
|
||||
"ASSETS",
|
||||
"MySql failure creating asset {0} with name {1}" + Environment.NewLine + e.ToString()
|
||||
+ Environment.NewLine + "Attempting reconnection", asset.FullID, asset.Name);
|
||||
m_log.Error(String.Format(
|
||||
"[ASSETS]: " +
|
||||
"MySql failure creating asset {0} with name {1}" + Environment.NewLine + e.ToString()
|
||||
+ Environment.NewLine + "Attempting reconnection", asset.FullID, asset.Name));
|
||||
_dbConnection.Reconnect();
|
||||
}
|
||||
}
|
||||
|
|
|
@ -42,6 +42,8 @@ namespace OpenSim.Framework.Data.MySQL
|
|||
{
|
||||
public class MySQLDataStore : IRegionDataStore
|
||||
{
|
||||
private static readonly log4net.ILog m_log = log4net.LogManager.GetLogger(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType);
|
||||
|
||||
private const string m_primSelect = "select * from prims";
|
||||
private const string m_shapeSelect = "select * from primshapes";
|
||||
private const string m_itemsSelect = "select * from primitems";
|
||||
|
@ -80,7 +82,7 @@ namespace OpenSim.Framework.Data.MySQL
|
|||
m_dataSet = new DataSet();
|
||||
this.persistPrimInventories = persistPrimInventories;
|
||||
|
||||
MainLog.Instance.Verbose("DATASTORE", "MySql - connecting: " + connectionstring);
|
||||
m_log.Info("[DATASTORE]: MySql - connecting: " + connectionstring);
|
||||
m_connection = new MySqlConnection(connectionstring);
|
||||
|
||||
MySqlCommand primSelectCmd = new MySqlCommand(m_primSelect, m_connection);
|
||||
|
@ -148,12 +150,12 @@ namespace OpenSim.Framework.Data.MySQL
|
|||
{
|
||||
if ((prim.ObjectFlags & (uint) LLObject.ObjectFlags.Physics) == 0)
|
||||
{
|
||||
MainLog.Instance.Verbose("DATASTORE", "Adding obj: " + obj.UUID + " to region: " + regionUUID);
|
||||
m_log.Info("[DATASTORE]: Adding obj: " + obj.UUID + " to region: " + regionUUID);
|
||||
addPrim(prim, obj.UUID, regionUUID);
|
||||
}
|
||||
else
|
||||
{
|
||||
// MainLog.Instance.Verbose("DATASTORE", "Ignoring Physical obj: " + obj.UUID + " in region: " + regionUUID);
|
||||
// m_log.Info("[DATASTORE]: Ignoring Physical obj: " + obj.UUID + " in region: " + regionUUID);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -163,7 +165,7 @@ namespace OpenSim.Framework.Data.MySQL
|
|||
|
||||
public void RemoveObject(LLUUID obj, LLUUID regionUUID)
|
||||
{
|
||||
MainLog.Instance.Verbose("DATASTORE", "Removing obj: {0} from region: {1}", obj.UUID, regionUUID);
|
||||
m_log.Info(String.Format("[DATASTORE]: Removing obj: {0} from region: {1}", obj.UUID, regionUUID));
|
||||
|
||||
DataTable prims = m_primTable;
|
||||
DataTable shapes = m_shapeTable;
|
||||
|
@ -228,7 +230,7 @@ namespace OpenSim.Framework.Data.MySQL
|
|||
lock (m_dataSet)
|
||||
{
|
||||
DataRow[] primsForRegion = prims.Select(byRegion, orderByParent);
|
||||
MainLog.Instance.Verbose("DATASTORE",
|
||||
m_log.Info("[DATASTORE]: " +
|
||||
"Loaded " + primsForRegion.Length + " prims for region: " + regionUUID);
|
||||
|
||||
foreach (DataRow primRow in primsForRegion)
|
||||
|
@ -251,7 +253,7 @@ namespace OpenSim.Framework.Data.MySQL
|
|||
}
|
||||
else
|
||||
{
|
||||
MainLog.Instance.Notice(
|
||||
m_log.Info(
|
||||
"No shape found for prim in storage, so setting default box shape");
|
||||
prim.Shape = PrimitiveBaseShape.Default;
|
||||
}
|
||||
|
@ -270,7 +272,7 @@ namespace OpenSim.Framework.Data.MySQL
|
|||
}
|
||||
else
|
||||
{
|
||||
MainLog.Instance.Notice(
|
||||
m_log.Info(
|
||||
"No shape found for prim in storage, so setting default box shape");
|
||||
prim.Shape = PrimitiveBaseShape.Default;
|
||||
}
|
||||
|
@ -284,11 +286,11 @@ namespace OpenSim.Framework.Data.MySQL
|
|||
}
|
||||
catch (Exception e)
|
||||
{
|
||||
MainLog.Instance.Error("DATASTORE", "Failed create prim object, exception and data follows");
|
||||
MainLog.Instance.Verbose("DATASTORE", e.ToString());
|
||||
m_log.Error("[DATASTORE]: Failed create prim object, exception and data follows");
|
||||
m_log.Info("[DATASTORE]: " + e.ToString());
|
||||
foreach (DataColumn col in prims.Columns)
|
||||
{
|
||||
MainLog.Instance.Verbose("DATASTORE", "Col: " + col.ColumnName + " => " + primRow[col]);
|
||||
m_log.Info("[DATASTORE]: Col: " + col.ColumnName + " => " + primRow[col]);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -302,7 +304,7 @@ namespace OpenSim.Framework.Data.MySQL
|
|||
/// <param name="prim"></param>
|
||||
private void LoadItems(SceneObjectPart prim)
|
||||
{
|
||||
//MainLog.Instance.Verbose("DATASTORE", "Loading inventory for {0}, {1}", prim.Name, prim.UUID);
|
||||
//m_log.Info(String.Format("[DATASTORE]: Loading inventory for {0}, {1}", prim.Name, prim.UUID));
|
||||
|
||||
DataTable dbItems = m_itemsTable;
|
||||
|
||||
|
@ -316,7 +318,7 @@ namespace OpenSim.Framework.Data.MySQL
|
|||
TaskInventoryItem item = buildItem(row);
|
||||
inventory.Add(item);
|
||||
|
||||
MainLog.Instance.Verbose("DATASTORE", "Restored item {0}, {1}", item.Name, item.ItemID);
|
||||
m_log.Info(String.Format("[DATASTORE]: Restored item {0}, {1}", item.Name, item.ItemID));
|
||||
}
|
||||
|
||||
prim.RestoreInventoryItems(inventory);
|
||||
|
@ -332,7 +334,7 @@ namespace OpenSim.Framework.Data.MySQL
|
|||
public void StoreTerrain(double[,] ter, LLUUID regionID)
|
||||
{
|
||||
int revision = Util.UnixTimeSinceEpoch();
|
||||
MainLog.Instance.Verbose("DATASTORE", "Storing terrain revision r" + revision.ToString());
|
||||
m_log.Info("[DATASTORE]: Storing terrain revision r" + revision.ToString());
|
||||
|
||||
DataTable terrain = m_dataSet.Tables["terrain"];
|
||||
lock (m_dataSet)
|
||||
|
@ -384,11 +386,11 @@ namespace OpenSim.Framework.Data.MySQL
|
|||
}
|
||||
else
|
||||
{
|
||||
MainLog.Instance.Verbose("DATASTORE", "No terrain found for region");
|
||||
m_log.Info("[DATASTORE]: No terrain found for region");
|
||||
return null;
|
||||
}
|
||||
|
||||
MainLog.Instance.Verbose("DATASTORE", "Loaded terrain revision r" + rev.ToString());
|
||||
m_log.Info("[DATASTORE]: Loaded terrain revision r" + rev.ToString());
|
||||
}
|
||||
|
||||
return terret;
|
||||
|
@ -418,7 +420,7 @@ namespace OpenSim.Framework.Data.MySQL
|
|||
public void StoreLandObject(Land parcel, LLUUID regionUUID)
|
||||
{
|
||||
// Does the new locking fix it?
|
||||
MainLog.Instance.Verbose("DATASTORE", "Tedds temp fix: Waiting 3 seconds for stuff to catch up. (Someone please fix! :))");
|
||||
m_log.Info("[DATASTORE]: Tedds temp fix: Waiting 3 seconds for stuff to catch up. (Someone please fix! :))");
|
||||
System.Threading.Thread.Sleep(2500 + rnd.Next(300, 900));
|
||||
|
||||
lock (m_dataSet)
|
||||
|
@ -1214,7 +1216,7 @@ namespace OpenSim.Framework.Data.MySQL
|
|||
if (!persistPrimInventories)
|
||||
return;
|
||||
|
||||
MainLog.Instance.Verbose("DATASTORE", "Persisting Prim Inventory with prim ID {0}", primID);
|
||||
m_log.Info(String.Format("[DATASTORE]: Persisting Prim Inventory with prim ID {0}", primID));
|
||||
|
||||
// For now, we're just going to crudely remove all the previous inventory items
|
||||
// no matter whether they have changed or not, and replace them with the current set.
|
||||
|
@ -1225,10 +1227,10 @@ namespace OpenSim.Framework.Data.MySQL
|
|||
// repalce with current inventory details
|
||||
foreach (TaskInventoryItem newItem in items)
|
||||
{
|
||||
// MainLog.Instance.Verbose(
|
||||
// "DATASTORE",
|
||||
// "Adding item {0}, {1} to prim ID {2}",
|
||||
// newItem.Name, newItem.ItemID, newItem.ParentPartID);
|
||||
// m_log.Info(String.Format(
|
||||
// "[DATASTORE]: " +
|
||||
// "Adding item {0}, {1} to prim ID {2}",
|
||||
// newItem.Name, newItem.ItemID, newItem.ParentPartID));
|
||||
|
||||
DataRow newItemRow = m_itemsTable.NewRow();
|
||||
fillItemRow(newItemRow, newItem);
|
||||
|
@ -1332,7 +1334,7 @@ namespace OpenSim.Framework.Data.MySQL
|
|||
sql += subsql;
|
||||
sql += ")";
|
||||
|
||||
//MainLog.Instance.Verbose("DATASTORE", "defineTable() sql {0}", sql);
|
||||
//m_log.Info(String.Format("[DATASTORE]: defineTable() sql {0}", sql));
|
||||
|
||||
return sql;
|
||||
}
|
||||
|
@ -1463,8 +1465,8 @@ namespace OpenSim.Framework.Data.MySQL
|
|||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
MainLog.Instance.Error("MySql", "Error connecting to MySQL server: " + ex.Message);
|
||||
MainLog.Instance.Error("MySql", "Application is terminating!");
|
||||
m_log.Error("[MySql]: Error connecting to MySQL server: " + ex.Message);
|
||||
m_log.Error("[MySql]: Application is terminating!");
|
||||
System.Threading.Thread.CurrentThread.Abort();
|
||||
}
|
||||
}
|
||||
|
@ -1475,7 +1477,7 @@ namespace OpenSim.Framework.Data.MySQL
|
|||
}
|
||||
catch (MySqlException e)
|
||||
{
|
||||
MainLog.Instance.Warn("MySql", "Primitives Table Already Exists: {0}", e);
|
||||
m_log.Warn(String.Format("[MySql]: Primitives Table Already Exists: {0}", e));
|
||||
}
|
||||
|
||||
try
|
||||
|
@ -1484,7 +1486,7 @@ namespace OpenSim.Framework.Data.MySQL
|
|||
}
|
||||
catch (MySqlException e)
|
||||
{
|
||||
MainLog.Instance.Warn("MySql", "Shapes Table Already Exists: {0}", e);
|
||||
m_log.Warn(String.Format("[MySql]: Shapes Table Already Exists: {0}", e));
|
||||
}
|
||||
|
||||
try
|
||||
|
@ -1493,7 +1495,7 @@ namespace OpenSim.Framework.Data.MySQL
|
|||
}
|
||||
catch (MySqlException e)
|
||||
{
|
||||
MainLog.Instance.Warn("MySql", "Items Table Already Exists: {0}", e);
|
||||
m_log.Warn(String.Format("[MySql]: Items Table Already Exists: {0}", e));
|
||||
}
|
||||
|
||||
try
|
||||
|
@ -1502,7 +1504,7 @@ namespace OpenSim.Framework.Data.MySQL
|
|||
}
|
||||
catch (MySqlException e)
|
||||
{
|
||||
MainLog.Instance.Warn("MySql", "Terrain Table Already Exists: {0}", e);
|
||||
m_log.Warn(String.Format("[MySql]: Terrain Table Already Exists: {0}", e));
|
||||
}
|
||||
|
||||
try
|
||||
|
@ -1511,7 +1513,7 @@ namespace OpenSim.Framework.Data.MySQL
|
|||
}
|
||||
catch (MySqlException e)
|
||||
{
|
||||
MainLog.Instance.Warn("MySql", "Land Table Already Exists: {0}", e);
|
||||
m_log.Warn(String.Format("[MySql]: Land Table Already Exists: {0}", e));
|
||||
}
|
||||
|
||||
try
|
||||
|
@ -1520,7 +1522,7 @@ namespace OpenSim.Framework.Data.MySQL
|
|||
}
|
||||
catch (MySqlException e)
|
||||
{
|
||||
MainLog.Instance.Warn("MySql", "LandAccessList Table Already Exists: {0}", e);
|
||||
m_log.Warn(String.Format("[MySql]: LandAccessList Table Already Exists: {0}", e));
|
||||
}
|
||||
conn.Close();
|
||||
}
|
||||
|
@ -1555,7 +1557,7 @@ namespace OpenSim.Framework.Data.MySQL
|
|||
}
|
||||
catch (MySqlException)
|
||||
{
|
||||
MainLog.Instance.Verbose("DATASTORE", "MySql Database doesn't exist... creating");
|
||||
m_log.Info("[DATASTORE]: MySql Database doesn't exist... creating");
|
||||
InitDB(conn);
|
||||
}
|
||||
|
||||
|
@ -1573,7 +1575,7 @@ namespace OpenSim.Framework.Data.MySQL
|
|||
{
|
||||
if (!tmpDS.Tables["prims"].Columns.Contains(col.ColumnName))
|
||||
{
|
||||
MainLog.Instance.Verbose("DATASTORE", "Missing required column:" + col.ColumnName);
|
||||
m_log.Info("[DATASTORE]: Missing required column:" + col.ColumnName);
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
@ -1582,7 +1584,7 @@ namespace OpenSim.Framework.Data.MySQL
|
|||
{
|
||||
if (!tmpDS.Tables["primshapes"].Columns.Contains(col.ColumnName))
|
||||
{
|
||||
MainLog.Instance.Verbose("DATASTORE", "Missing required column:" + col.ColumnName);
|
||||
m_log.Info("[DATASTORE]: Missing required column:" + col.ColumnName);
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
@ -1593,7 +1595,7 @@ namespace OpenSim.Framework.Data.MySQL
|
|||
{
|
||||
if (!tmpDS.Tables["terrain"].Columns.Contains(col.ColumnName))
|
||||
{
|
||||
MainLog.Instance.Verbose("DATASTORE", "Missing require column:" + col.ColumnName);
|
||||
m_log.Info("[DATASTORE]: Missing require column:" + col.ColumnName);
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
@ -1602,7 +1604,7 @@ namespace OpenSim.Framework.Data.MySQL
|
|||
{
|
||||
if (!tmpDS.Tables["land"].Columns.Contains(col.ColumnName))
|
||||
{
|
||||
MainLog.Instance.Verbose("DATASTORE", "Missing require column:" + col.ColumnName);
|
||||
m_log.Info("[DATASTORE]: Missing require column:" + col.ColumnName);
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
@ -1611,7 +1613,7 @@ namespace OpenSim.Framework.Data.MySQL
|
|||
{
|
||||
if (!tmpDS.Tables["landaccesslist"].Columns.Contains(col.ColumnName))
|
||||
{
|
||||
MainLog.Instance.Verbose("DATASTORE", "Missing require column:" + col.ColumnName);
|
||||
m_log.Info("[DATASTORE]: Missing require column:" + col.ColumnName);
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -42,6 +42,8 @@ namespace OpenSim.Framework.Data.MySQL
|
|||
/// </summary>
|
||||
public class MySQLGridData : IGridData
|
||||
{
|
||||
private static readonly log4net.ILog m_log = log4net.LogManager.GetLogger(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType);
|
||||
|
||||
/// <summary>
|
||||
/// MySQL Database Manager
|
||||
/// </summary>
|
||||
|
@ -168,7 +170,7 @@ namespace OpenSim.Framework.Data.MySQL
|
|||
catch (Exception e)
|
||||
{
|
||||
database.Reconnect();
|
||||
MainLog.Instance.Error(e.ToString());
|
||||
m_log.Error(e.ToString());
|
||||
return null;
|
||||
}
|
||||
}
|
||||
|
@ -200,7 +202,7 @@ namespace OpenSim.Framework.Data.MySQL
|
|||
catch (Exception e)
|
||||
{
|
||||
database.Reconnect();
|
||||
MainLog.Instance.Error(e.ToString());
|
||||
m_log.Error(e.ToString());
|
||||
return null;
|
||||
}
|
||||
}
|
||||
|
@ -247,7 +249,7 @@ namespace OpenSim.Framework.Data.MySQL
|
|||
catch (Exception e)
|
||||
{
|
||||
database.Reconnect();
|
||||
MainLog.Instance.Error(e.ToString());
|
||||
m_log.Error(e.ToString());
|
||||
return returnlist;
|
||||
}
|
||||
}
|
||||
|
@ -282,7 +284,7 @@ namespace OpenSim.Framework.Data.MySQL
|
|||
catch (Exception e)
|
||||
{
|
||||
database.Reconnect();
|
||||
MainLog.Instance.Error(e.ToString());
|
||||
m_log.Error(e.ToString());
|
||||
return returnlist;
|
||||
}
|
||||
}
|
||||
|
@ -316,7 +318,7 @@ namespace OpenSim.Framework.Data.MySQL
|
|||
catch (Exception e)
|
||||
{
|
||||
database.Reconnect();
|
||||
MainLog.Instance.Error(e.ToString());
|
||||
m_log.Error(e.ToString());
|
||||
return null;
|
||||
}
|
||||
}
|
||||
|
@ -405,7 +407,7 @@ namespace OpenSim.Framework.Data.MySQL
|
|||
catch (Exception e)
|
||||
{
|
||||
database.Reconnect();
|
||||
MainLog.Instance.Error(e.ToString());
|
||||
m_log.Error(e.ToString());
|
||||
return null;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -38,6 +38,8 @@ namespace OpenSim.Framework.Data.MySQL
|
|||
/// </summary>
|
||||
public class MySQLInventoryData : IInventoryData
|
||||
{
|
||||
private static readonly log4net.ILog m_log = log4net.LogManager.GetLogger(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType);
|
||||
|
||||
/// <summary>
|
||||
/// The database manager
|
||||
/// </summary>
|
||||
|
@ -104,8 +106,8 @@ namespace OpenSim.Framework.Data.MySQL
|
|||
tableList["inventoryitems"] = null;
|
||||
|
||||
database.GetTableVersion(tableList);
|
||||
MainLog.Instance.Verbose("MYSQL", "Inventory Folder Version: " + tableList["inventoryfolders"]);
|
||||
MainLog.Instance.Verbose("MYSQL", "Inventory Items Version: " + tableList["inventoryitems"]);
|
||||
m_log.Info("[MYSQL]: Inventory Folder Version: " + tableList["inventoryfolders"]);
|
||||
m_log.Info("[MYSQL]: Inventory Items Version: " + tableList["inventoryitems"]);
|
||||
|
||||
UpgradeFoldersTable(tableList["inventoryfolders"]);
|
||||
UpgradeItemsTable(tableList["inventoryitems"]);
|
||||
|
@ -170,7 +172,7 @@ namespace OpenSim.Framework.Data.MySQL
|
|||
catch (Exception e)
|
||||
{
|
||||
database.Reconnect();
|
||||
MainLog.Instance.Error(e.ToString());
|
||||
m_log.Error(e.ToString());
|
||||
return null;
|
||||
}
|
||||
}
|
||||
|
@ -208,7 +210,7 @@ namespace OpenSim.Framework.Data.MySQL
|
|||
catch (Exception e)
|
||||
{
|
||||
database.Reconnect();
|
||||
MainLog.Instance.Error(e.ToString());
|
||||
m_log.Error(e.ToString());
|
||||
return null;
|
||||
}
|
||||
}
|
||||
|
@ -254,7 +256,7 @@ namespace OpenSim.Framework.Data.MySQL
|
|||
catch (Exception e)
|
||||
{
|
||||
database.Reconnect();
|
||||
MainLog.Instance.Error(e.ToString());
|
||||
m_log.Error(e.ToString());
|
||||
return null;
|
||||
}
|
||||
}
|
||||
|
@ -292,7 +294,7 @@ namespace OpenSim.Framework.Data.MySQL
|
|||
catch (Exception e)
|
||||
{
|
||||
database.Reconnect();
|
||||
MainLog.Instance.Error(e.ToString());
|
||||
m_log.Error(e.ToString());
|
||||
return null;
|
||||
}
|
||||
}
|
||||
|
@ -325,7 +327,7 @@ namespace OpenSim.Framework.Data.MySQL
|
|||
}
|
||||
catch (MySqlException e)
|
||||
{
|
||||
MainLog.Instance.Error(e.ToString());
|
||||
m_log.Error(e.ToString());
|
||||
}
|
||||
|
||||
return null;
|
||||
|
@ -362,7 +364,7 @@ namespace OpenSim.Framework.Data.MySQL
|
|||
catch (Exception e)
|
||||
{
|
||||
database.Reconnect();
|
||||
MainLog.Instance.Error(e.ToString());
|
||||
m_log.Error(e.ToString());
|
||||
}
|
||||
return null;
|
||||
}
|
||||
|
@ -387,7 +389,7 @@ namespace OpenSim.Framework.Data.MySQL
|
|||
}
|
||||
catch (Exception e)
|
||||
{
|
||||
MainLog.Instance.Error(e.ToString());
|
||||
m_log.Error(e.ToString());
|
||||
}
|
||||
|
||||
return null;
|
||||
|
@ -421,7 +423,7 @@ namespace OpenSim.Framework.Data.MySQL
|
|||
catch (Exception e)
|
||||
{
|
||||
database.Reconnect();
|
||||
MainLog.Instance.Error(e.ToString());
|
||||
m_log.Error(e.ToString());
|
||||
return null;
|
||||
}
|
||||
}
|
||||
|
@ -459,7 +461,7 @@ namespace OpenSim.Framework.Data.MySQL
|
|||
}
|
||||
catch (MySqlException e)
|
||||
{
|
||||
MainLog.Instance.Error(e.ToString());
|
||||
m_log.Error(e.ToString());
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -488,7 +490,7 @@ namespace OpenSim.Framework.Data.MySQL
|
|||
catch (MySqlException e)
|
||||
{
|
||||
database.Reconnect();
|
||||
MainLog.Instance.Error(e.ToString());
|
||||
m_log.Error(e.ToString());
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -516,7 +518,7 @@ namespace OpenSim.Framework.Data.MySQL
|
|||
}
|
||||
catch (Exception e)
|
||||
{
|
||||
MainLog.Instance.Error(e.ToString());
|
||||
m_log.Error(e.ToString());
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -548,7 +550,7 @@ namespace OpenSim.Framework.Data.MySQL
|
|||
}
|
||||
catch (Exception e)
|
||||
{
|
||||
MainLog.Instance.Error(e.ToString());
|
||||
m_log.Error(e.ToString());
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -593,7 +595,7 @@ namespace OpenSim.Framework.Data.MySQL
|
|||
catch (MySqlException e)
|
||||
{
|
||||
database.Reconnect();
|
||||
MainLog.Instance.Error(e.ToString());
|
||||
m_log.Error(e.ToString());
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -609,7 +611,7 @@ namespace OpenSim.Framework.Data.MySQL
|
|||
catch (MySqlException e)
|
||||
{
|
||||
database.Reconnect();
|
||||
MainLog.Instance.Error(e.ToString());
|
||||
m_log.Error(e.ToString());
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -42,6 +42,8 @@ namespace OpenSim.Framework.Data.MySQL
|
|||
/// </summary>
|
||||
internal class MySQLManager
|
||||
{
|
||||
private static readonly log4net.ILog m_log = log4net.LogManager.GetLogger(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType);
|
||||
|
||||
/// <summary>
|
||||
/// The database connection object
|
||||
/// </summary>
|
||||
|
@ -71,7 +73,7 @@ namespace OpenSim.Framework.Data.MySQL
|
|||
|
||||
dbcon.Open();
|
||||
|
||||
MainLog.Instance.Verbose("MYSQL", "Connection established");
|
||||
m_log.Info("[MYSQL]: Connection established");
|
||||
}
|
||||
catch (Exception e)
|
||||
{
|
||||
|
@ -113,7 +115,7 @@ namespace OpenSim.Framework.Data.MySQL
|
|||
}
|
||||
catch (Exception e)
|
||||
{
|
||||
MainLog.Instance.Error("Unable to reconnect to database " + e.ToString());
|
||||
m_log.Error("Unable to reconnect to database " + e.ToString());
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -194,7 +196,7 @@ namespace OpenSim.Framework.Data.MySQL
|
|||
}
|
||||
catch (Exception e)
|
||||
{
|
||||
MainLog.Instance.Error(e.ToString());
|
||||
m_log.Error(e.ToString());
|
||||
}
|
||||
}
|
||||
tables.Close();
|
||||
|
@ -245,7 +247,7 @@ namespace OpenSim.Framework.Data.MySQL
|
|||
}
|
||||
catch (Exception e)
|
||||
{
|
||||
MainLog.Instance.Error("Unable to reconnect to database " + e.ToString());
|
||||
m_log.Error("Unable to reconnect to database " + e.ToString());
|
||||
}
|
||||
|
||||
// Run the query again
|
||||
|
@ -263,7 +265,7 @@ namespace OpenSim.Framework.Data.MySQL
|
|||
catch (Exception e)
|
||||
{
|
||||
// Return null if it fails.
|
||||
MainLog.Instance.Error("Failed during Query generation: " + e.ToString());
|
||||
m_log.Error("Failed during Query generation: " + e.ToString());
|
||||
return null;
|
||||
}
|
||||
}
|
||||
|
@ -523,7 +525,7 @@ namespace OpenSim.Framework.Data.MySQL
|
|||
}
|
||||
catch (Exception e)
|
||||
{
|
||||
MainLog.Instance.Error(e.ToString());
|
||||
m_log.Error(e.ToString());
|
||||
return false;
|
||||
}
|
||||
|
||||
|
@ -617,7 +619,7 @@ namespace OpenSim.Framework.Data.MySQL
|
|||
}
|
||||
catch (Exception e)
|
||||
{
|
||||
MainLog.Instance.Error(e.ToString());
|
||||
m_log.Error(e.ToString());
|
||||
return false;
|
||||
}
|
||||
|
||||
|
@ -726,7 +728,7 @@ namespace OpenSim.Framework.Data.MySQL
|
|||
}
|
||||
catch (Exception e)
|
||||
{
|
||||
MainLog.Instance.Error(e.ToString());
|
||||
m_log.Error(e.ToString());
|
||||
return false;
|
||||
}
|
||||
|
||||
|
|
|
@ -39,6 +39,8 @@ namespace OpenSim.Framework.Data.MySQL
|
|||
/// </summary>
|
||||
internal class MySQLUserData : IUserData
|
||||
{
|
||||
private static readonly log4net.ILog m_log = log4net.LogManager.GetLogger(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType);
|
||||
|
||||
/// <summary>
|
||||
/// Database manager for MySQL
|
||||
/// </summary>
|
||||
|
@ -119,7 +121,7 @@ namespace OpenSim.Framework.Data.MySQL
|
|||
database.ExecuteResourceSql("UpgradeUsersTableToVersion2.sql");
|
||||
return;
|
||||
}
|
||||
//MainLog.Instance.Verbose("DB","DBVers:" + oldVersion);
|
||||
//m_log.Info("[DB]: DBVers:" + oldVersion);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
|
@ -164,7 +166,7 @@ namespace OpenSim.Framework.Data.MySQL
|
|||
catch (Exception e)
|
||||
{
|
||||
database.Reconnect();
|
||||
MainLog.Instance.Error(e.ToString());
|
||||
m_log.Error(e.ToString());
|
||||
return null;
|
||||
}
|
||||
}
|
||||
|
@ -208,7 +210,7 @@ namespace OpenSim.Framework.Data.MySQL
|
|||
catch (Exception e)
|
||||
{
|
||||
database.Reconnect();
|
||||
MainLog.Instance.Error(e.ToString());
|
||||
m_log.Error(e.ToString());
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
@ -243,7 +245,7 @@ namespace OpenSim.Framework.Data.MySQL
|
|||
catch (Exception e)
|
||||
{
|
||||
database.Reconnect();
|
||||
MainLog.Instance.Error(e.ToString());
|
||||
m_log.Error(e.ToString());
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
@ -272,7 +274,7 @@ namespace OpenSim.Framework.Data.MySQL
|
|||
catch (Exception e)
|
||||
{
|
||||
database.Reconnect();
|
||||
MainLog.Instance.Error(e.ToString());
|
||||
m_log.Error(e.ToString());
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
@ -317,7 +319,7 @@ namespace OpenSim.Framework.Data.MySQL
|
|||
catch (Exception e)
|
||||
{
|
||||
database.Reconnect();
|
||||
MainLog.Instance.Error(e.ToString());
|
||||
m_log.Error(e.ToString());
|
||||
return Lfli;
|
||||
}
|
||||
|
||||
|
@ -328,7 +330,7 @@ namespace OpenSim.Framework.Data.MySQL
|
|||
|
||||
public void UpdateUserCurrentRegion(LLUUID avatarid, LLUUID regionuuid)
|
||||
{
|
||||
MainLog.Instance.Verbose("USER", "Stub UpdateUserCUrrentRegion called");
|
||||
m_log.Info("[USER]: Stub UpdateUserCUrrentRegion called");
|
||||
}
|
||||
|
||||
|
||||
|
@ -371,7 +373,7 @@ namespace OpenSim.Framework.Data.MySQL
|
|||
catch (Exception e)
|
||||
{
|
||||
database.Reconnect();
|
||||
MainLog.Instance.Error(e.ToString());
|
||||
m_log.Error(e.ToString());
|
||||
return returnlist;
|
||||
}
|
||||
}
|
||||
|
@ -406,7 +408,7 @@ namespace OpenSim.Framework.Data.MySQL
|
|||
catch (Exception e)
|
||||
{
|
||||
database.Reconnect();
|
||||
MainLog.Instance.Error(e.ToString());
|
||||
m_log.Error(e.ToString());
|
||||
return returnlist;
|
||||
}
|
||||
}
|
||||
|
@ -437,7 +439,7 @@ namespace OpenSim.Framework.Data.MySQL
|
|||
catch (Exception e)
|
||||
{
|
||||
database.Reconnect();
|
||||
MainLog.Instance.Error(e.ToString());
|
||||
m_log.Error(e.ToString());
|
||||
return null;
|
||||
}
|
||||
}
|
||||
|
@ -488,7 +490,7 @@ namespace OpenSim.Framework.Data.MySQL
|
|||
catch (Exception e)
|
||||
{
|
||||
database.Reconnect();
|
||||
MainLog.Instance.Error(e.ToString());
|
||||
m_log.Error(e.ToString());
|
||||
return;
|
||||
}
|
||||
|
||||
|
@ -525,7 +527,7 @@ namespace OpenSim.Framework.Data.MySQL
|
|||
catch (Exception e)
|
||||
{
|
||||
database.Reconnect();
|
||||
MainLog.Instance.Error(e.ToString());
|
||||
m_log.Error(e.ToString());
|
||||
return null;
|
||||
}
|
||||
}
|
||||
|
@ -553,7 +555,7 @@ namespace OpenSim.Framework.Data.MySQL
|
|||
catch (Exception e)
|
||||
{
|
||||
database.Reconnect();
|
||||
MainLog.Instance.Error(e.ToString());
|
||||
m_log.Error(e.ToString());
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -39,6 +39,8 @@ namespace OpenSim.Framework.Data.SQLite
|
|||
/// </summary>
|
||||
public class SQLiteAssetData : SQLiteBase, IAssetProvider
|
||||
{
|
||||
private static readonly log4net.ILog m_log = log4net.LogManager.GetLogger(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType);
|
||||
|
||||
/// <summary>
|
||||
/// The database manager
|
||||
/// </summary>
|
||||
|
@ -86,10 +88,10 @@ namespace OpenSim.Framework.Data.SQLite
|
|||
|
||||
public void CreateAsset(AssetBase asset)
|
||||
{
|
||||
MainLog.Instance.Verbose("SQLITE", "Creating Asset " + Util.ToRawUuidString(asset.FullID));
|
||||
m_log.Info("[SQLITE]: Creating Asset " + Util.ToRawUuidString(asset.FullID));
|
||||
if (ExistsAsset(asset.FullID))
|
||||
{
|
||||
MainLog.Instance.Verbose("SQLITE", "Asset exists, updating instead. You should fix the caller for this!");
|
||||
m_log.Info("[SQLITE]: Asset exists, updating instead. You should fix the caller for this!");
|
||||
UpdateAsset(asset);
|
||||
}
|
||||
else
|
||||
|
@ -135,7 +137,7 @@ namespace OpenSim.Framework.Data.SQLite
|
|||
string temporary = asset.Temporary ? "Temporary" : "Stored";
|
||||
string local = asset.Local ? "Local" : "Remote";
|
||||
|
||||
MainLog.Instance.Verbose("SQLITE",
|
||||
m_log.Info("[SQLITE]: " +
|
||||
string.Format("Loaded {6} {5} Asset: [{0}][{3}/{4}] \"{1}\":{2} ({7} bytes)",
|
||||
asset.FullID, asset.Name, asset.Description, asset.Type,
|
||||
asset.InvType, temporary, local, asset.Data.Length));
|
||||
|
@ -174,7 +176,7 @@ namespace OpenSim.Framework.Data.SQLite
|
|||
|
||||
public void CommitAssets() // force a sync to the database
|
||||
{
|
||||
MainLog.Instance.Verbose("SQLITE", "Attempting commit");
|
||||
m_log.Info("[SQLITE]: Attempting commit");
|
||||
// lock (ds)
|
||||
// {
|
||||
// da.Update(ds, "assets");
|
||||
|
@ -261,7 +263,7 @@ namespace OpenSim.Framework.Data.SQLite
|
|||
}
|
||||
catch (SqliteSyntaxException)
|
||||
{
|
||||
MainLog.Instance.Verbose("SQLITE", "SQLite Database doesn't exist... creating");
|
||||
m_log.Info("[SQLITE]: SQLite Database doesn't exist... creating");
|
||||
InitDB(conn);
|
||||
}
|
||||
return true;
|
||||
|
|
|
@ -38,6 +38,8 @@ namespace OpenSim.Framework.Data.SQLite
|
|||
{
|
||||
public class SQLiteInventoryStore : SQLiteBase, IInventoryData
|
||||
{
|
||||
private static readonly log4net.ILog m_log = log4net.LogManager.GetLogger(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType);
|
||||
|
||||
private const string invItemsSelect = "select * from inventoryitems";
|
||||
private const string invFoldersSelect = "select * from inventoryfolders";
|
||||
|
||||
|
@ -57,7 +59,7 @@ namespace OpenSim.Framework.Data.SQLite
|
|||
{
|
||||
string connectionString = "URI=file:" + dbfile + ",version=3";
|
||||
|
||||
MainLog.Instance.Verbose("Inventory", "Sqlite - connecting: " + dbfile);
|
||||
m_log.Info("[Inventory]: Sqlite - connecting: " + dbfile);
|
||||
SqliteConnection conn = new SqliteConnection(connectionString);
|
||||
|
||||
TestTables(conn);
|
||||
|
@ -74,12 +76,12 @@ namespace OpenSim.Framework.Data.SQLite
|
|||
ds.Tables.Add(createInventoryFoldersTable());
|
||||
invFoldersDa.Fill(ds.Tables["inventoryfolders"]);
|
||||
setupFoldersCommands(invFoldersDa, conn);
|
||||
MainLog.Instance.Verbose("DATASTORE", "Populated Intentory Folders Definitions");
|
||||
m_log.Info("[DATASTORE]: Populated Intentory Folders Definitions");
|
||||
|
||||
ds.Tables.Add(createInventoryItemsTable());
|
||||
invItemsDa.Fill(ds.Tables["inventoryitems"]);
|
||||
setupItemsCommands(invItemsDa, conn);
|
||||
MainLog.Instance.Verbose("DATASTORE", "Populated Intentory Items Definitions");
|
||||
m_log.Info("[DATASTORE]: Populated Intentory Items Definitions");
|
||||
|
||||
ds.AcceptChanges();
|
||||
}
|
||||
|
@ -603,7 +605,7 @@ namespace OpenSim.Framework.Data.SQLite
|
|||
}
|
||||
catch (SqliteSyntaxException)
|
||||
{
|
||||
MainLog.Instance.Verbose("DATASTORE", "SQLite Database doesn't exist... creating");
|
||||
m_log.Info("[DATASTORE]: SQLite Database doesn't exist... creating");
|
||||
InitDB(conn);
|
||||
}
|
||||
|
||||
|
@ -614,7 +616,7 @@ namespace OpenSim.Framework.Data.SQLite
|
|||
{
|
||||
if (! tmpDS.Tables["inventoryitems"].Columns.Contains(col.ColumnName))
|
||||
{
|
||||
MainLog.Instance.Verbose("DATASTORE", "Missing required column:" + col.ColumnName);
|
||||
m_log.Info("[DATASTORE]: Missing required column:" + col.ColumnName);
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
@ -622,7 +624,7 @@ namespace OpenSim.Framework.Data.SQLite
|
|||
{
|
||||
if (! tmpDS.Tables["inventoryfolders"].Columns.Contains(col.ColumnName))
|
||||
{
|
||||
MainLog.Instance.Verbose("DATASTORE", "Missing required column:" + col.ColumnName);
|
||||
m_log.Info("[DATASTORE]: Missing required column:" + col.ColumnName);
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -37,6 +37,8 @@ namespace OpenSim.Framework.Data.SQLite
|
|||
{
|
||||
internal class SQLiteManager : SQLiteBase
|
||||
{
|
||||
private static readonly log4net.ILog m_log = log4net.LogManager.GetLogger(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType);
|
||||
|
||||
private IDbConnection dbcon;
|
||||
|
||||
/// <summary>
|
||||
|
@ -101,7 +103,7 @@ namespace OpenSim.Framework.Data.SQLite
|
|||
}
|
||||
catch (SqliteSyntaxException)
|
||||
{
|
||||
MainLog.Instance.Verbose("DATASTORE", "SQLite Database doesn't exist... creating");
|
||||
m_log.Info("[DATASTORE]: SQLite Database doesn't exist... creating");
|
||||
InitDB(conn);
|
||||
}
|
||||
return true;
|
||||
|
|
|
@ -42,6 +42,8 @@ namespace OpenSim.Framework.Data.SQLite
|
|||
{
|
||||
public class SQLiteRegionData : IRegionDataStore
|
||||
{
|
||||
private static readonly log4net.ILog m_log = log4net.LogManager.GetLogger(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType);
|
||||
|
||||
private const string primSelect = "select * from prims";
|
||||
private const string shapeSelect = "select * from primshapes";
|
||||
private const string itemsSelect = "select * from primitems";
|
||||
|
@ -78,7 +80,7 @@ namespace OpenSim.Framework.Data.SQLite
|
|||
|
||||
ds = new DataSet();
|
||||
|
||||
MainLog.Instance.Verbose("DATASTORE", "Sqlite - connecting: " + connectionString);
|
||||
m_log.Info("[DATASTORE]: Sqlite - connecting: " + connectionString);
|
||||
m_conn = new SqliteConnection(m_connectionString);
|
||||
m_conn.Open();
|
||||
|
||||
|
@ -142,7 +144,7 @@ namespace OpenSim.Framework.Data.SQLite
|
|||
}
|
||||
catch (Exception)
|
||||
{
|
||||
MainLog.Instance.Verbose("DATASTORE", "Caught fill error on primshapes table");
|
||||
m_log.Info("[DATASTORE]: Caught fill error on primshapes table");
|
||||
}
|
||||
|
||||
try
|
||||
|
@ -151,7 +153,7 @@ namespace OpenSim.Framework.Data.SQLite
|
|||
}
|
||||
catch (Exception)
|
||||
{
|
||||
MainLog.Instance.Verbose("DATASTORE", "Caught fill error on terrain table");
|
||||
m_log.Info("[DATASTORE]: Caught fill error on terrain table");
|
||||
}
|
||||
|
||||
try
|
||||
|
@ -160,7 +162,7 @@ namespace OpenSim.Framework.Data.SQLite
|
|||
}
|
||||
catch (Exception)
|
||||
{
|
||||
MainLog.Instance.Verbose("DATASTORE", "Caught fill error on land table");
|
||||
m_log.Info("[DATASTORE]: Caught fill error on land table");
|
||||
}
|
||||
|
||||
try
|
||||
|
@ -169,7 +171,7 @@ namespace OpenSim.Framework.Data.SQLite
|
|||
}
|
||||
catch (Exception)
|
||||
{
|
||||
MainLog.Instance.Verbose("DATASTORE", "Caught fill error on landaccesslist table");
|
||||
m_log.Info("[DATASTORE]: Caught fill error on landaccesslist table");
|
||||
}
|
||||
return;
|
||||
}
|
||||
|
@ -183,29 +185,29 @@ namespace OpenSim.Framework.Data.SQLite
|
|||
{
|
||||
if ((prim.ObjectFlags & (uint) LLObject.ObjectFlags.Physics) == 0)
|
||||
{
|
||||
MainLog.Instance.Verbose("DATASTORE", "Adding obj: " + obj.UUID + " to region: " + regionUUID);
|
||||
m_log.Info("[DATASTORE]: Adding obj: " + obj.UUID + " to region: " + regionUUID);
|
||||
addPrim(prim, Util.ToRawUuidString(obj.UUID), Util.ToRawUuidString(regionUUID));
|
||||
}
|
||||
else if (prim.Stopped)
|
||||
{
|
||||
//MainLog.Instance.Verbose("DATASTORE",
|
||||
//m_log.Info("[DATASTORE]: " +
|
||||
//"Adding stopped obj: " + obj.UUID + " to region: " + regionUUID);
|
||||
//addPrim(prim, Util.ToRawUuidString(obj.UUID), Util.ToRawUuidString(regionUUID));
|
||||
}
|
||||
else
|
||||
{
|
||||
// MainLog.Instance.Verbose("DATASTORE", "Ignoring Physical obj: " + obj.UUID + " in region: " + regionUUID);
|
||||
// m_log.Info("[DATASTORE]: Ignoring Physical obj: " + obj.UUID + " in region: " + regionUUID);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Commit();
|
||||
// MainLog.Instance.Verbose("Dump of prims:", ds.GetXml());
|
||||
// m_log.Info("[Dump of prims]: " + ds.GetXml());
|
||||
}
|
||||
|
||||
public void RemoveObject(LLUUID obj, LLUUID regionUUID)
|
||||
{
|
||||
MainLog.Instance.Verbose("DATASTORE", "Removing obj: {0} from region: {1}", obj.UUID, regionUUID);
|
||||
m_log.Info(String.Format("[DATASTORE]: Removing obj: {0} from region: {1}", obj.UUID, regionUUID));
|
||||
|
||||
DataTable prims = ds.Tables["prims"];
|
||||
DataTable shapes = ds.Tables["primshapes"];
|
||||
|
@ -274,7 +276,7 @@ namespace OpenSim.Framework.Data.SQLite
|
|||
lock (ds)
|
||||
{
|
||||
DataRow[] primsForRegion = prims.Select(byRegion, orderByParent);
|
||||
MainLog.Instance.Verbose("DATASTORE",
|
||||
m_log.Info("[DATASTORE]: " +
|
||||
"Loaded " + primsForRegion.Length + " prims for region: " + regionUUID);
|
||||
|
||||
foreach (DataRow primRow in primsForRegion)
|
||||
|
@ -296,7 +298,7 @@ namespace OpenSim.Framework.Data.SQLite
|
|||
}
|
||||
else
|
||||
{
|
||||
MainLog.Instance.Notice(
|
||||
m_log.Info(
|
||||
"No shape found for prim in storage, so setting default box shape");
|
||||
prim.Shape = PrimitiveBaseShape.Default;
|
||||
}
|
||||
|
@ -316,7 +318,7 @@ namespace OpenSim.Framework.Data.SQLite
|
|||
}
|
||||
else
|
||||
{
|
||||
MainLog.Instance.Notice(
|
||||
m_log.Info(
|
||||
"No shape found for prim in storage, so setting default box shape");
|
||||
prim.Shape = PrimitiveBaseShape.Default;
|
||||
}
|
||||
|
@ -330,11 +332,11 @@ namespace OpenSim.Framework.Data.SQLite
|
|||
}
|
||||
catch (Exception e)
|
||||
{
|
||||
MainLog.Instance.Error("DATASTORE", "Failed create prim object, exception and data follows");
|
||||
MainLog.Instance.Verbose("DATASTORE", e.ToString());
|
||||
m_log.Error("[DATASTORE]: Failed create prim object, exception and data follows");
|
||||
m_log.Info("[DATASTORE]: " + e.ToString());
|
||||
foreach (DataColumn col in prims.Columns)
|
||||
{
|
||||
MainLog.Instance.Verbose("DATASTORE", "Col: " + col.ColumnName + " => " + primRow[col]);
|
||||
m_log.Info("[DATASTORE]: Col: " + col.ColumnName + " => " + primRow[col]);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -348,7 +350,7 @@ namespace OpenSim.Framework.Data.SQLite
|
|||
/// <param name="prim"></param>
|
||||
private void LoadItems(SceneObjectPart prim)
|
||||
{
|
||||
MainLog.Instance.Verbose("DATASTORE", "Loading inventory for {0}, {1}", prim.Name, prim.UUID);
|
||||
m_log.Info(String.Format("[DATASTORE]: Loading inventory for {0}, {1}", prim.Name, prim.UUID));
|
||||
|
||||
DataTable dbItems = ds.Tables["primitems"];
|
||||
|
||||
|
@ -362,7 +364,7 @@ namespace OpenSim.Framework.Data.SQLite
|
|||
TaskInventoryItem item = buildItem(row);
|
||||
inventory.Add(item);
|
||||
|
||||
MainLog.Instance.Verbose("DATASTORE", "Restored item {0}, {1}", item.Name, item.ItemID);
|
||||
m_log.Info(String.Format("[DATASTORE]: Restored item {0}, {1}", item.Name, item.ItemID));
|
||||
}
|
||||
|
||||
prim.RestoreInventoryItems(inventory);
|
||||
|
@ -383,7 +385,7 @@ namespace OpenSim.Framework.Data.SQLite
|
|||
|
||||
// the following is an work around for .NET. The perf
|
||||
// issues associated with it aren't as bad as you think.
|
||||
MainLog.Instance.Verbose("DATASTORE", "Storing terrain revision r" + revision.ToString());
|
||||
m_log.Info("[DATASTORE]: Storing terrain revision r" + revision.ToString());
|
||||
String sql = "insert into terrain(RegionUUID, Revision, Heightfield)" +
|
||||
" values(:RegionUUID, :Revision, :Heightfield)";
|
||||
|
||||
|
@ -446,11 +448,11 @@ namespace OpenSim.Framework.Data.SQLite
|
|||
}
|
||||
else
|
||||
{
|
||||
MainLog.Instance.Verbose("DATASTORE", "No terrain found for region");
|
||||
m_log.Info("[DATASTORE]: No terrain found for region");
|
||||
return null;
|
||||
}
|
||||
|
||||
MainLog.Instance.Verbose("DATASTORE", "Loaded terrain revision r" + rev.ToString());
|
||||
m_log.Info("[DATASTORE]: Loaded terrain revision r" + rev.ToString());
|
||||
}
|
||||
}
|
||||
return terret;
|
||||
|
@ -1265,7 +1267,7 @@ namespace OpenSim.Framework.Data.SQLite
|
|||
if (!persistPrimInventories)
|
||||
return;
|
||||
|
||||
MainLog.Instance.Verbose("DATASTORE", "Entered StorePrimInventory with prim ID {0}", primID);
|
||||
m_log.Info(String.Format("[DATASTORE]: Entered StorePrimInventory with prim ID {0}", primID));
|
||||
|
||||
DataTable dbItems = ds.Tables["primitems"];
|
||||
|
||||
|
@ -1278,10 +1280,10 @@ namespace OpenSim.Framework.Data.SQLite
|
|||
// repalce with current inventory details
|
||||
foreach (TaskInventoryItem newItem in items)
|
||||
{
|
||||
// MainLog.Instance.Verbose(
|
||||
// "DATASTORE",
|
||||
// "Adding item {0}, {1} to prim ID {2}",
|
||||
// newItem.Name, newItem.ItemID, newItem.ParentPartID);
|
||||
// m_log.Info(String.Format(
|
||||
// "[DATASTORE]: ",
|
||||
// "Adding item {0}, {1} to prim ID {2}",
|
||||
// newItem.Name, newItem.ItemID, newItem.ParentPartID));
|
||||
|
||||
DataRow newItemRow = dbItems.NewRow();
|
||||
fillItemRow(newItemRow, newItem);
|
||||
|
@ -1508,7 +1510,7 @@ namespace OpenSim.Framework.Data.SQLite
|
|||
}
|
||||
catch (SqliteSyntaxException)
|
||||
{
|
||||
MainLog.Instance.Warn("SQLITE", "Primitives Table Already Exists");
|
||||
m_log.Warn("[SQLITE]: Primitives Table Already Exists");
|
||||
}
|
||||
|
||||
try
|
||||
|
@ -1517,7 +1519,7 @@ namespace OpenSim.Framework.Data.SQLite
|
|||
}
|
||||
catch (SqliteSyntaxException)
|
||||
{
|
||||
MainLog.Instance.Warn("SQLITE", "Shapes Table Already Exists");
|
||||
m_log.Warn("[SQLITE]: Shapes Table Already Exists");
|
||||
}
|
||||
|
||||
if (persistPrimInventories)
|
||||
|
@ -1528,7 +1530,7 @@ namespace OpenSim.Framework.Data.SQLite
|
|||
}
|
||||
catch (SqliteSyntaxException)
|
||||
{
|
||||
MainLog.Instance.Warn("SQLITE", "Primitives Inventory Table Already Exists");
|
||||
m_log.Warn("[SQLITE]: Primitives Inventory Table Already Exists");
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -1538,7 +1540,7 @@ namespace OpenSim.Framework.Data.SQLite
|
|||
}
|
||||
catch (SqliteSyntaxException)
|
||||
{
|
||||
MainLog.Instance.Warn("SQLITE", "Terrain Table Already Exists");
|
||||
m_log.Warn("[SQLITE]: Terrain Table Already Exists");
|
||||
}
|
||||
|
||||
try
|
||||
|
@ -1547,7 +1549,7 @@ namespace OpenSim.Framework.Data.SQLite
|
|||
}
|
||||
catch (SqliteSyntaxException)
|
||||
{
|
||||
MainLog.Instance.Warn("SQLITE", "Land Table Already Exists");
|
||||
m_log.Warn("[SQLITE]: Land Table Already Exists");
|
||||
}
|
||||
|
||||
try
|
||||
|
@ -1556,7 +1558,7 @@ namespace OpenSim.Framework.Data.SQLite
|
|||
}
|
||||
catch (SqliteSyntaxException)
|
||||
{
|
||||
MainLog.Instance.Warn("SQLITE", "LandAccessList Table Already Exists");
|
||||
m_log.Warn("[SQLITE]: LandAccessList Table Already Exists");
|
||||
}
|
||||
conn.Close();
|
||||
}
|
||||
|
@ -1596,7 +1598,7 @@ namespace OpenSim.Framework.Data.SQLite
|
|||
}
|
||||
catch (SqliteSyntaxException)
|
||||
{
|
||||
MainLog.Instance.Verbose("DATASTORE", "SQLite Database doesn't exist... creating");
|
||||
m_log.Info("[DATASTORE]: SQLite Database doesn't exist... creating");
|
||||
InitDB(conn);
|
||||
}
|
||||
|
||||
|
@ -1614,7 +1616,7 @@ namespace OpenSim.Framework.Data.SQLite
|
|||
{
|
||||
if (!tmpDS.Tables["prims"].Columns.Contains(col.ColumnName))
|
||||
{
|
||||
MainLog.Instance.Verbose("DATASTORE", "Missing required column:" + col.ColumnName);
|
||||
m_log.Info("[DATASTORE]: Missing required column:" + col.ColumnName);
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
@ -1623,7 +1625,7 @@ namespace OpenSim.Framework.Data.SQLite
|
|||
{
|
||||
if (!tmpDS.Tables["primshapes"].Columns.Contains(col.ColumnName))
|
||||
{
|
||||
MainLog.Instance.Verbose("DATASTORE", "Missing required column:" + col.ColumnName);
|
||||
m_log.Info("[DATASTORE]: Missing required column:" + col.ColumnName);
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
@ -1634,7 +1636,7 @@ namespace OpenSim.Framework.Data.SQLite
|
|||
{
|
||||
if (!tmpDS.Tables["terrain"].Columns.Contains(col.ColumnName))
|
||||
{
|
||||
MainLog.Instance.Verbose("DATASTORE", "Missing require column:" + col.ColumnName);
|
||||
m_log.Info("[DATASTORE]: Missing require column:" + col.ColumnName);
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
@ -1643,7 +1645,7 @@ namespace OpenSim.Framework.Data.SQLite
|
|||
{
|
||||
if (!tmpDS.Tables["land"].Columns.Contains(col.ColumnName))
|
||||
{
|
||||
MainLog.Instance.Verbose("DATASTORE", "Missing require column:" + col.ColumnName);
|
||||
m_log.Info("[DATASTORE]: Missing require column:" + col.ColumnName);
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
@ -1652,7 +1654,7 @@ namespace OpenSim.Framework.Data.SQLite
|
|||
{
|
||||
if (!tmpDS.Tables["landaccesslist"].Columns.Contains(col.ColumnName))
|
||||
{
|
||||
MainLog.Instance.Verbose("DATASTORE", "Missing require column:" + col.ColumnName);
|
||||
m_log.Info("[DATASTORE]: Missing require column:" + col.ColumnName);
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -39,6 +39,8 @@ namespace OpenSim.Framework.Data.SQLite
|
|||
/// </summary>
|
||||
public class SQLiteUserData : SQLiteBase, IUserData
|
||||
{
|
||||
private static readonly log4net.ILog m_log = log4net.LogManager.GetLogger(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType);
|
||||
|
||||
/// <summary>
|
||||
/// The database manager
|
||||
/// </summary>
|
||||
|
@ -89,7 +91,7 @@ namespace OpenSim.Framework.Data.SQLite
|
|||
}
|
||||
catch (SqliteSyntaxException)
|
||||
{
|
||||
MainLog.Instance.Verbose("SQLITE", "userfriends table not found, creating.... ");
|
||||
m_log.Info("[SQLITE]: userfriends table not found, creating.... ");
|
||||
InitDB(conn);
|
||||
daf.Fill(ds.Tables["userfriends"]);
|
||||
}
|
||||
|
@ -217,7 +219,7 @@ namespace OpenSim.Framework.Data.SQLite
|
|||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
MainLog.Instance.Error("USER", "Exception getting friends list for user: " + ex.ToString());
|
||||
m_log.Error("[USER]: Exception getting friends list for user: " + ex.ToString());
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -231,7 +233,7 @@ namespace OpenSim.Framework.Data.SQLite
|
|||
|
||||
public void UpdateUserCurrentRegion(LLUUID avatarid, LLUUID regionuuid)
|
||||
{
|
||||
MainLog.Instance.Verbose("USER", "Stub UpdateUserCUrrentRegion called");
|
||||
m_log.Info("[USER]: Stub UpdateUserCUrrentRegion called");
|
||||
}
|
||||
|
||||
|
||||
|
@ -339,7 +341,7 @@ namespace OpenSim.Framework.Data.SQLite
|
|||
DataRow row = users.Rows.Find(Util.ToRawUuidString(AgentID));
|
||||
if (row == null)
|
||||
{
|
||||
MainLog.Instance.Warn("WEBLOGIN", "Unable to store new web login key for non-existant user");
|
||||
m_log.Warn("[WEBLOGIN]: Unable to store new web login key for non-existant user");
|
||||
}
|
||||
else
|
||||
{
|
||||
|
@ -411,7 +413,7 @@ namespace OpenSim.Framework.Data.SQLite
|
|||
}
|
||||
}
|
||||
|
||||
MainLog.Instance.Verbose("SQLITE",
|
||||
m_log.Info("[SQLITE]: " +
|
||||
"Syncing user database: " + ds.Tables["users"].Rows.Count + " users stored");
|
||||
// save changes off to disk
|
||||
da.Update(ds, "users");
|
||||
|
@ -775,7 +777,7 @@ namespace OpenSim.Framework.Data.SQLite
|
|||
}
|
||||
catch (System.Exception)
|
||||
{
|
||||
MainLog.Instance.Verbose("USERS", "users table already exists");
|
||||
m_log.Info("[USERS]: users table already exists");
|
||||
}
|
||||
|
||||
try
|
||||
|
@ -784,7 +786,7 @@ namespace OpenSim.Framework.Data.SQLite
|
|||
}
|
||||
catch (System.Exception)
|
||||
{
|
||||
MainLog.Instance.Verbose("USERS", "userfriends table already exists");
|
||||
m_log.Info("[USERS]: userfriends table already exists");
|
||||
}
|
||||
|
||||
conn.Close();
|
||||
|
@ -807,7 +809,7 @@ namespace OpenSim.Framework.Data.SQLite
|
|||
}
|
||||
catch (SqliteSyntaxException)
|
||||
{
|
||||
MainLog.Instance.Verbose("DATASTORE", "SQLite Database doesn't exist... creating");
|
||||
m_log.Info("[DATASTORE]: SQLite Database doesn't exist... creating");
|
||||
InitDB(conn);
|
||||
}
|
||||
conn.Open();
|
||||
|
|
|
@ -63,4 +63,4 @@ using System.Runtime.InteropServices;
|
|||
// by using the '*' as shown below:
|
||||
|
||||
[assembly : AssemblyVersion("1.0.0.0")]
|
||||
[assembly : AssemblyFileVersion("1.0.0.0")]
|
||||
[assembly : AssemblyFileVersion("1.0.0.0")]
|
||||
|
|
|
@ -28,11 +28,14 @@
|
|||
using System;
|
||||
using System.IO;
|
||||
using libsecondlife;
|
||||
using OpenSim.Framework.Console;
|
||||
|
||||
namespace OpenSim.Framework
|
||||
{
|
||||
public class EstateSettings
|
||||
{
|
||||
private static readonly log4net.ILog m_log = log4net.LogManager.GetLogger(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType);
|
||||
|
||||
//Settings to this island
|
||||
private float m_billableFactor;
|
||||
|
||||
|
@ -734,7 +737,7 @@ namespace OpenSim.Framework
|
|||
}
|
||||
else
|
||||
{
|
||||
OpenSim.Framework.Console.MainLog.Instance.Error("ESTATESETTINGS", "Unable to locate estate manager : " + avatarID.ToString() + " for removal");
|
||||
m_log.Error("[ESTATESETTINGS]: Unable to locate estate manager : " + avatarID.ToString() + " for removal");
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -749,7 +752,7 @@ namespace OpenSim.Framework
|
|||
{
|
||||
configMember =
|
||||
new ConfigurationMember(Path.Combine(Util.configDir(), "estate_settings.xml"), "ESTATE SETTINGS",
|
||||
loadConfigurationOptions, handleIncomingConfiguration,true);
|
||||
loadConfigurationOptions, handleIncomingConfiguration, true);
|
||||
configMember.performConfigurationRetrieve();
|
||||
}
|
||||
}
|
||||
|
|
|
@ -27,6 +27,7 @@
|
|||
*/
|
||||
|
||||
using System;
|
||||
using OpenSim.Framework.Console;
|
||||
|
||||
namespace OpenSim.Framework
|
||||
{
|
||||
|
|
|
@ -26,6 +26,8 @@
|
|||
*
|
||||
*/
|
||||
|
||||
using OpenSim.Framework.Console;
|
||||
|
||||
namespace OpenSim.Framework
|
||||
{
|
||||
/// <summary>
|
||||
|
|
|
@ -28,6 +28,7 @@
|
|||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Text;
|
||||
using OpenSim.Framework.Console;
|
||||
|
||||
namespace OpenSim.Framework
|
||||
{
|
||||
|
|
|
@ -31,6 +31,7 @@ using System.Net.Sockets;
|
|||
using System.Xml;
|
||||
using libsecondlife;
|
||||
using Nini.Config;
|
||||
using OpenSim.Framework.Console;
|
||||
|
||||
namespace OpenSim.Framework
|
||||
{
|
||||
|
@ -176,7 +177,7 @@ namespace OpenSim.Framework
|
|||
public string MasterAvatarSandboxPassword = String.Empty;
|
||||
|
||||
// Apparently, we're applying the same estatesettings regardless of whether it's local or remote.
|
||||
private static EstateSettings m_estateSettings;
|
||||
private EstateSettings m_estateSettings;
|
||||
|
||||
public EstateSettings EstateSettings
|
||||
{
|
||||
|
@ -196,7 +197,7 @@ namespace OpenSim.Framework
|
|||
public RegionInfo(string description, string filename, bool skipConsoleConfig)
|
||||
{
|
||||
configMember =
|
||||
new ConfigurationMember(filename, description, loadConfigurationOptions, handleIncomingConfiguration,!skipConsoleConfig);
|
||||
new ConfigurationMember(filename, description, loadConfigurationOptions, handleIncomingConfiguration, !skipConsoleConfig);
|
||||
configMember.performConfigurationRetrieve();
|
||||
}
|
||||
|
||||
|
|
|
@ -35,6 +35,8 @@ namespace OpenSim.Framework.RegionLoader.Web
|
|||
{
|
||||
public class RegionLoaderWebServer : IRegionLoader
|
||||
{
|
||||
private static readonly log4net.ILog m_log = log4net.LogManager.GetLogger(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType);
|
||||
|
||||
private IniConfigSource m_configSouce;
|
||||
|
||||
public void SetIniConfigSource(IniConfigSource configSource)
|
||||
|
@ -46,7 +48,7 @@ namespace OpenSim.Framework.RegionLoader.Web
|
|||
{
|
||||
if (m_configSouce == null)
|
||||
{
|
||||
MainLog.Instance.Error("WEBLOADER", "Unable to load configuration source!");
|
||||
m_log.Error("[WEBLOADER]: Unable to load configuration source!");
|
||||
return null;
|
||||
}
|
||||
else
|
||||
|
@ -55,16 +57,16 @@ namespace OpenSim.Framework.RegionLoader.Web
|
|||
string url = startupConfig.GetString("regionload_webserver_url", System.String.Empty).Trim();
|
||||
if (url == System.String.Empty)
|
||||
{
|
||||
MainLog.Instance.Error("WEBLOADER", "Unable to load webserver URL - URL was empty.");
|
||||
m_log.Error("[WEBLOADER]: Unable to load webserver URL - URL was empty.");
|
||||
return null;
|
||||
}
|
||||
else
|
||||
{
|
||||
HttpWebRequest webRequest = (HttpWebRequest) WebRequest.Create(url);
|
||||
webRequest.Timeout = 30000; //30 Second Timeout
|
||||
MainLog.Instance.Debug("WEBLOADER", "Sending Download Request...");
|
||||
m_log.Debug("[WEBLOADER]: Sending Download Request...");
|
||||
HttpWebResponse webResponse = (HttpWebResponse) webRequest.GetResponse();
|
||||
MainLog.Instance.Debug("WEBLOADER", "Downloading Region Information From Remote Server...");
|
||||
m_log.Debug("[WEBLOADER]: Downloading Region Information From Remote Server...");
|
||||
StreamReader reader = new StreamReader(webResponse.GetResponseStream());
|
||||
string xmlSource = System.String.Empty;
|
||||
string tempStr = reader.ReadLine();
|
||||
|
@ -73,9 +75,8 @@ namespace OpenSim.Framework.RegionLoader.Web
|
|||
xmlSource = xmlSource + tempStr;
|
||||
tempStr = reader.ReadLine();
|
||||
}
|
||||
MainLog.Instance.Debug("WEBLOADER",
|
||||
"Done downloading region information from server. Total Bytes: " +
|
||||
xmlSource.Length);
|
||||
m_log.Debug("[WEBLOADER]: Done downloading region information from server. Total Bytes: " +
|
||||
xmlSource.Length);
|
||||
XmlDocument xmlDoc = new XmlDocument();
|
||||
xmlDoc.LoadXml(xmlSource);
|
||||
if (xmlDoc.FirstChild.Name == "Regions")
|
||||
|
@ -84,7 +85,7 @@ namespace OpenSim.Framework.RegionLoader.Web
|
|||
int i;
|
||||
for (i = 0; i < xmlDoc.FirstChild.ChildNodes.Count; i++)
|
||||
{
|
||||
MainLog.Instance.Debug(xmlDoc.FirstChild.ChildNodes[i].OuterXml);
|
||||
m_log.Debug(xmlDoc.FirstChild.ChildNodes[i].OuterXml);
|
||||
regionInfos[i] =
|
||||
new RegionInfo("REGION CONFIG #" + (i + 1), xmlDoc.FirstChild.ChildNodes[i],false);
|
||||
}
|
||||
|
|
|
@ -41,6 +41,8 @@ namespace OpenSim.Framework.Servers
|
|||
{
|
||||
public class BaseHttpServer
|
||||
{
|
||||
private static readonly log4net.ILog m_log = log4net.LogManager.GetLogger(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType);
|
||||
|
||||
protected Thread m_workerThread;
|
||||
protected HttpListener m_httpListener;
|
||||
protected Dictionary<string, XmlRpcMethod> m_rpcHandlers = new Dictionary<string, XmlRpcMethod>();
|
||||
|
@ -296,7 +298,7 @@ namespace OpenSim.Framework.Servers
|
|||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
MainLog.Instance.Warn("HTTPD", "Error - " + ex.Message);
|
||||
m_log.Warn("[HTTPD]: Error - " + ex.Message);
|
||||
}
|
||||
finally
|
||||
{
|
||||
|
@ -319,7 +321,7 @@ namespace OpenSim.Framework.Servers
|
|||
LLSD llsdResponse = null;
|
||||
|
||||
try { llsdRequest = LLSDParser.DeserializeXml(requestBody); }
|
||||
catch (Exception ex) { MainLog.Instance.Warn("HTTPD", "Error - " + ex.Message); }
|
||||
catch (Exception ex) { m_log.Warn("[HTTPD]: Error - " + ex.Message); }
|
||||
|
||||
if (llsdRequest != null && m_llsdHandler != null)
|
||||
{
|
||||
|
@ -348,7 +350,7 @@ namespace OpenSim.Framework.Servers
|
|||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
MainLog.Instance.Warn("HTTPD", "Error - " + ex.Message);
|
||||
m_log.Warn("[HTTPD]: Error - " + ex.Message);
|
||||
}
|
||||
finally
|
||||
{
|
||||
|
@ -396,7 +398,7 @@ namespace OpenSim.Framework.Servers
|
|||
|
||||
foreach (string headername in rHeaders)
|
||||
{
|
||||
//MainLog.Instance.Warn("HEADER", headername + "=" + request.Headers[headername]);
|
||||
//m_log.Warn("[HEADER]: " + headername + "=" + request.Headers[headername]);
|
||||
headervals[headername] = request.Headers[headername];
|
||||
}
|
||||
|
||||
|
@ -407,9 +409,9 @@ namespace OpenSim.Framework.Servers
|
|||
|
||||
if (keysvals.Contains("method"))
|
||||
{
|
||||
//MainLog.Instance.Warn("HTTP", "Contains Method");
|
||||
//m_log.Warn("[HTTP]: Contains Method");
|
||||
string method = (string) keysvals["method"];
|
||||
//MainLog.Instance.Warn("HTTP", requestBody);
|
||||
//m_log.Warn("[HTTP]: " + requestBody);
|
||||
GenericHTTPMethod requestprocessor;
|
||||
bool foundHandler = TryGetHTTPHandler(method, out requestprocessor);
|
||||
if (foundHandler)
|
||||
|
@ -422,13 +424,13 @@ namespace OpenSim.Framework.Servers
|
|||
}
|
||||
else
|
||||
{
|
||||
//MainLog.Instance.Warn("HTTP", "Handler Not Found");
|
||||
//m_log.Warn("[HTTP]: Handler Not Found");
|
||||
SendHTML404(response, host);
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
//MainLog.Instance.Warn("HTTP", "No Method specified");
|
||||
//m_log.Warn("[HTTP]: No Method specified");
|
||||
SendHTML404(response, host);
|
||||
}
|
||||
}
|
||||
|
@ -461,7 +463,7 @@ namespace OpenSim.Framework.Servers
|
|||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
MainLog.Instance.Warn("HTTPD", "Error - " + ex.Message);
|
||||
m_log.Warn("[HTTPD]: Error - " + ex.Message);
|
||||
}
|
||||
finally
|
||||
{
|
||||
|
@ -488,7 +490,7 @@ namespace OpenSim.Framework.Servers
|
|||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
MainLog.Instance.Warn("HTTPD", "Error - " + ex.Message);
|
||||
m_log.Warn("[HTTPD]: Error - " + ex.Message);
|
||||
}
|
||||
finally
|
||||
{
|
||||
|
@ -513,7 +515,7 @@ namespace OpenSim.Framework.Servers
|
|||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
MainLog.Instance.Warn("HTTPD", "Error - " + ex.Message);
|
||||
m_log.Warn("[HTTPD]: Error - " + ex.Message);
|
||||
}
|
||||
finally
|
||||
{
|
||||
|
@ -523,7 +525,7 @@ namespace OpenSim.Framework.Servers
|
|||
|
||||
public void Start()
|
||||
{
|
||||
MainLog.Instance.Verbose("HTTPD", "Starting up HTTP Server");
|
||||
m_log.Info("[HTTPD]: Starting up HTTP Server");
|
||||
|
||||
m_workerThread = new Thread(new ThreadStart(StartHTTP));
|
||||
m_workerThread.IsBackground = true;
|
||||
|
@ -534,7 +536,7 @@ namespace OpenSim.Framework.Servers
|
|||
{
|
||||
try
|
||||
{
|
||||
MainLog.Instance.Verbose("HTTPD", "Spawned main thread OK");
|
||||
m_log.Info("[HTTPD]: Spawned main thread OK");
|
||||
m_httpListener = new HttpListener();
|
||||
|
||||
if (!m_ssl)
|
||||
|
@ -556,7 +558,7 @@ namespace OpenSim.Framework.Servers
|
|||
}
|
||||
catch (Exception e)
|
||||
{
|
||||
MainLog.Instance.Warn("HTTPD", "Error - " + e.Message);
|
||||
m_log.Warn("[HTTPD]: Error - " + e.Message);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
/*
|
||||
/*
|
||||
* Copyright (c) Contributors, http://opensimulator.org/
|
||||
* See CONTRIBUTORS.TXT for a full list of copyright holders.
|
||||
*
|
||||
|
@ -27,7 +27,6 @@
|
|||
*/
|
||||
|
||||
using System;
|
||||
|
||||
using OpenSim.Framework.Console;
|
||||
|
||||
namespace OpenSim.Framework.Servers
|
||||
|
@ -37,8 +36,7 @@ namespace OpenSim.Framework.Servers
|
|||
/// </summary>
|
||||
public abstract class BaseOpenSimServer
|
||||
{
|
||||
protected LogBase m_log;
|
||||
|
||||
protected ConsoleBase m_console;
|
||||
protected DateTime m_startuptime;
|
||||
|
||||
public BaseOpenSimServer()
|
||||
|
@ -56,7 +54,7 @@ namespace OpenSim.Framework.Servers
|
|||
switch (command)
|
||||
{
|
||||
case "help":
|
||||
m_log.Notice("show uptime - show server startup and uptime.");
|
||||
m_console.Notice("show uptime - show server startup and uptime.");
|
||||
break;
|
||||
|
||||
case "show":
|
||||
|
@ -77,8 +75,8 @@ namespace OpenSim.Framework.Servers
|
|||
switch (ShowWhat)
|
||||
{
|
||||
case "uptime":
|
||||
m_log.Notice("Server has been running since " + m_startuptime.ToString());
|
||||
m_log.Notice("That is " + (DateTime.Now - m_startuptime).ToString());
|
||||
m_console.Notice("Server has been running since " + m_startuptime.ToString());
|
||||
m_console.Notice("That is " + (DateTime.Now - m_startuptime).ToString());
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -31,7 +31,7 @@ namespace OpenSim.Framework.Servers
|
|||
/*
|
||||
public class CheckSumServer : UDPServerBase
|
||||
{
|
||||
//protected ConsoleBase m_log;
|
||||
private static readonly log4net.ILog m_log = log4net.LogManager.GetLogger(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType);
|
||||
|
||||
public CheckSumServer(int port)
|
||||
: base(port)
|
||||
|
@ -114,7 +114,7 @@ namespace OpenSim.Framework.Servers
|
|||
}
|
||||
catch (Exception)
|
||||
{
|
||||
MainLog.Instance.Warn("CheckSumServer.cs:ProcessOutPacket() - WARNING: Socket exception occurred on connection ");
|
||||
m_log.Warn("CheckSumServer.cs:ProcessOutPacket() - WARNING: Socket exception occurred on connection ");
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -27,6 +27,7 @@
|
|||
*/
|
||||
|
||||
using System;
|
||||
using OpenSim.Framework.Console;
|
||||
|
||||
namespace OpenSim.Framework
|
||||
{
|
||||
|
|
|
@ -43,6 +43,8 @@ namespace OpenSim.Grid.AssetServer
|
|||
/// </summary>
|
||||
public class OpenAsset_Main : BaseOpenSimServer, conscmd_callback
|
||||
{
|
||||
private static readonly log4net.ILog m_log = log4net.LogManager.GetLogger(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType);
|
||||
|
||||
public AssetConfig m_config;
|
||||
|
||||
public static OpenAsset_Main assetserver;
|
||||
|
@ -55,7 +57,9 @@ namespace OpenSim.Grid.AssetServer
|
|||
[STAThread]
|
||||
public static void Main(string[] args)
|
||||
{
|
||||
Console.WriteLine("Starting...\n");
|
||||
log4net.Config.XmlConfigurator.Configure();
|
||||
|
||||
m_log.Info("Starting...\n");
|
||||
|
||||
assetserver = new OpenAsset_Main();
|
||||
assetserver.Startup();
|
||||
|
@ -65,42 +69,32 @@ namespace OpenSim.Grid.AssetServer
|
|||
|
||||
private void Work()
|
||||
{
|
||||
m_log.Notice("Enter help for a list of commands");
|
||||
m_console.Notice("Enter help for a list of commands");
|
||||
|
||||
while (true)
|
||||
{
|
||||
m_log.MainLogPrompt();
|
||||
m_console.Prompt();
|
||||
}
|
||||
}
|
||||
|
||||
private OpenAsset_Main()
|
||||
{
|
||||
if (!Directory.Exists(Util.logDir()))
|
||||
{
|
||||
Directory.CreateDirectory(Util.logDir());
|
||||
}
|
||||
m_console = new ConsoleBase("OpenAsset", this);
|
||||
|
||||
m_log =
|
||||
new LogBase(
|
||||
(Path.Combine(Util.logDir(), "opengrid-AssetServer-console.log")),
|
||||
"OpenAsset",
|
||||
this,
|
||||
true);
|
||||
|
||||
MainLog.Instance = m_log;
|
||||
MainConsole.Instance = m_console;
|
||||
}
|
||||
|
||||
public void Startup()
|
||||
{
|
||||
m_config = new AssetConfig("ASSET SERVER", (Path.Combine(Util.configDir(), "AssetServer_Config.xml")));
|
||||
|
||||
m_log.Verbose("ASSET", "Setting up asset DB");
|
||||
m_log.Info("[ASSET]: Setting up asset DB");
|
||||
setupDB(m_config);
|
||||
|
||||
m_log.Verbose("ASSET", "Loading default asset set..");
|
||||
m_log.Info("[ASSET]: Loading default asset set..");
|
||||
LoadDefaultAssets();
|
||||
|
||||
m_log.Verbose("ASSET", "Starting HTTP process");
|
||||
m_log.Info("[ASSET]: Starting HTTP process");
|
||||
BaseHttpServer httpServer = new BaseHttpServer(m_config.HttpPort);
|
||||
|
||||
StatsManager.StartCollectingAssetStats();
|
||||
|
@ -118,7 +112,7 @@ namespace OpenSim.Grid.AssetServer
|
|||
|
||||
public IAssetProvider LoadDatabasePlugin(string FileName)
|
||||
{
|
||||
MainLog.Instance.Verbose("ASSET SERVER", "LoadDatabasePlugin: Attempting to load " + FileName);
|
||||
m_log.Info("[ASSET SERVER]: LoadDatabasePlugin: Attempting to load " + FileName);
|
||||
Assembly pluginAssembly = Assembly.LoadFrom(FileName);
|
||||
IAssetProvider assetPlugin = null;
|
||||
foreach (Type pluginType in pluginAssembly.GetTypes())
|
||||
|
@ -134,7 +128,7 @@ namespace OpenSim.Grid.AssetServer
|
|||
assetPlugin = plug;
|
||||
assetPlugin.Initialise();
|
||||
|
||||
MainLog.Instance.Verbose("ASSET SERVER", "Added " + assetPlugin.Name + " " + assetPlugin.Version);
|
||||
m_log.Info("[ASSET SERVER]: Added " + assetPlugin.Name + " " + assetPlugin.Version);
|
||||
break;
|
||||
}
|
||||
|
||||
|
@ -153,14 +147,14 @@ namespace OpenSim.Grid.AssetServer
|
|||
m_assetProvider = LoadDatabasePlugin(config.DatabaseProvider);
|
||||
if (m_assetProvider == null)
|
||||
{
|
||||
MainLog.Instance.Error("ASSET", "Failed to load a database plugin, server halting");
|
||||
m_log.Error("[ASSET]: Failed to load a database plugin, server halting");
|
||||
Environment.Exit(-1);
|
||||
}
|
||||
}
|
||||
catch (Exception e)
|
||||
{
|
||||
MainLog.Instance.Warn("ASSET", "setupDB() - Exception occured");
|
||||
MainLog.Instance.Warn("ASSET", e.ToString());
|
||||
m_log.Warn("[ASSET]: setupDB() - Exception occured");
|
||||
m_log.Warn("[ASSET]: " + e.ToString());
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -181,18 +175,18 @@ namespace OpenSim.Grid.AssetServer
|
|||
switch (cmd)
|
||||
{
|
||||
case "help":
|
||||
m_log.Notice(
|
||||
m_console.Notice(
|
||||
@"shutdown - shutdown this asset server (USE CAUTION!)
|
||||
stats - statistical information for this server");
|
||||
|
||||
break;
|
||||
|
||||
case "stats":
|
||||
m_log.Notice("STATS", Environment.NewLine + StatsManager.AssetStats.Report());
|
||||
m_console.Notice("STATS", Environment.NewLine + StatsManager.AssetStats.Report());
|
||||
break;
|
||||
|
||||
case "shutdown":
|
||||
m_log.Close();
|
||||
m_console.Close();
|
||||
Environment.Exit(0);
|
||||
break;
|
||||
}
|
||||
|
|
|
@ -41,6 +41,8 @@ namespace OpenSim.Grid.AssetServer
|
|||
{
|
||||
public class GetAssetStreamHandler : BaseStreamHandler
|
||||
{
|
||||
private static readonly log4net.ILog m_log = log4net.LogManager.GetLogger(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType);
|
||||
|
||||
private OpenAsset_Main m_assetManager;
|
||||
private IAssetProvider m_assetProvider;
|
||||
|
||||
|
@ -52,7 +54,7 @@ namespace OpenSim.Grid.AssetServer
|
|||
public GetAssetStreamHandler(OpenAsset_Main assetManager, IAssetProvider assetProvider)
|
||||
: base("GET", "/assets")
|
||||
{
|
||||
MainLog.Instance.Verbose("REST", "In Get Request");
|
||||
m_log.Info("[REST]: In Get Request");
|
||||
m_assetManager = assetManager;
|
||||
m_assetProvider = assetProvider;
|
||||
}
|
||||
|
@ -71,8 +73,8 @@ namespace OpenSim.Grid.AssetServer
|
|||
|
||||
if (!LLUUID.TryParse(p[0], out assetID))
|
||||
{
|
||||
MainLog.Instance.Verbose(
|
||||
"REST", "GET:/asset ignoring request with malformed UUID {0}", p[0]);
|
||||
m_log.Info(String.Format(
|
||||
"[REST]: GET:/asset ignoring request with malformed UUID {0}", p[0]));
|
||||
return result;
|
||||
}
|
||||
|
||||
|
@ -94,10 +96,9 @@ namespace OpenSim.Grid.AssetServer
|
|||
|
||||
result = ms.GetBuffer();
|
||||
|
||||
MainLog.Instance.Verbose(
|
||||
"REST",
|
||||
"GET:/asset found {0} with name {1}, size {2} bytes",
|
||||
assetID, asset.Name, result.Length);
|
||||
m_log.Info(String.Format(
|
||||
"[REST]: GET:/asset found {0} with name {1}, size {2} bytes",
|
||||
assetID, asset.Name, result.Length));
|
||||
|
||||
Array.Resize<byte>(ref result, (int) ms.Length);
|
||||
}
|
||||
|
@ -106,13 +107,13 @@ namespace OpenSim.Grid.AssetServer
|
|||
if (StatsManager.AssetStats != null)
|
||||
StatsManager.AssetStats.AddNotFoundRequest();
|
||||
|
||||
MainLog.Instance.Verbose("REST", "GET:/asset failed to find {0}", assetID);
|
||||
m_log.Info(String.Format("[REST]: GET:/asset failed to find {0}", assetID));
|
||||
}
|
||||
}
|
||||
}
|
||||
catch (Exception e)
|
||||
{
|
||||
MainLog.Instance.Error(e.ToString());
|
||||
m_log.Error(e.ToString());
|
||||
}
|
||||
return result;
|
||||
}
|
||||
|
@ -120,6 +121,8 @@ namespace OpenSim.Grid.AssetServer
|
|||
|
||||
public class PostAssetStreamHandler : BaseStreamHandler
|
||||
{
|
||||
private static readonly log4net.ILog m_log = log4net.LogManager.GetLogger(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType);
|
||||
|
||||
private OpenAsset_Main m_assetManager;
|
||||
private IAssetProvider m_assetProvider;
|
||||
|
||||
|
@ -135,7 +138,7 @@ namespace OpenSim.Grid.AssetServer
|
|||
XmlSerializer xs = new XmlSerializer(typeof (AssetBase));
|
||||
AssetBase asset = (AssetBase) xs.Deserialize(request);
|
||||
|
||||
MainLog.Instance.Verbose("REST", "StoreAndCommitAsset {0}", asset.FullID);
|
||||
m_log.Info(String.Format("[REST]: StoreAndCommitAsset {0}", asset.FullID));
|
||||
m_assetProvider.CreateAsset(asset);
|
||||
m_assetProvider.CommitAssets();
|
||||
|
||||
|
|
|
@ -38,13 +38,15 @@ namespace OpenGrid.Config.GridConfigDb4o
|
|||
/// </summary>
|
||||
public class Db40ConfigPlugin: IGridConfig
|
||||
{
|
||||
private static readonly log4net.ILog m_log = log4net.LogManager.GetLogger(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType);
|
||||
|
||||
/// <summary>
|
||||
/// Loads and returns a configuration objeect
|
||||
/// </summary>
|
||||
/// <returns>A grid configuration object</returns>
|
||||
public GridConfig GetConfigObject()
|
||||
{
|
||||
MainLog.Instance.Verbose("DBGRIDCONFIG", "Loading Db40Config dll");
|
||||
m_log.Info("[DBGRIDCONFIG]: Loading Db40Config dll");
|
||||
return new DbGridConfig();
|
||||
}
|
||||
}
|
||||
|
@ -64,24 +66,24 @@ namespace OpenGrid.Config.GridConfigDb4o
|
|||
/// </summary>
|
||||
public void LoadDefaults()
|
||||
{
|
||||
MainLog.Instance.Notice("DbGridConfig.cs:LoadDefaults() - Please press enter to retain default or enter new settings");
|
||||
MainConsole.Instance.Info("DbGridConfig.cs:LoadDefaults() - Please press enter to retain default or enter new settings");
|
||||
|
||||
// About the grid options
|
||||
this.GridOwner = MainLog.Instance.CmdPrompt("Grid owner", "OGS development team");
|
||||
this.GridOwner = MainConsole.Instance.CmdPrompt("Grid owner", "OGS development team");
|
||||
|
||||
// Asset Options
|
||||
this.DefaultAssetServer = MainLog.Instance.CmdPrompt("Default asset server","http://127.0.0.1:" + AssetConfig.DefaultHttpPort.ToString() + "/");
|
||||
this.AssetSendKey = MainLog.Instance.CmdPrompt("Key to send to asset server","null");
|
||||
this.AssetRecvKey = MainLog.Instance.CmdPrompt("Key to expect from asset server","null");
|
||||
this.DefaultAssetServer = MainConsole.Instance.CmdPrompt("Default asset server","http://127.0.0.1:" + AssetConfig.DefaultHttpPort.ToString() + "/");
|
||||
this.AssetSendKey = MainConsole.Instance.CmdPrompt("Key to send to asset server","null");
|
||||
this.AssetRecvKey = MainConsole.Instance.CmdPrompt("Key to expect from asset server","null");
|
||||
|
||||
// User Server Options
|
||||
this.DefaultUserServer = MainLog.Instance.CmdPrompt("Default user server","http://127.0.0.1:" + UserConfig.DefaultHttpPort.ToString() + "/");
|
||||
this.UserSendKey = MainLog.Instance.CmdPrompt("Key to send to user server","null");
|
||||
this.UserRecvKey = MainLog.Instance.CmdPrompt("Key to expect from user server","null");
|
||||
this.DefaultUserServer = MainConsole.Instance.CmdPrompt("Default user server","http://127.0.0.1:" + UserConfig.DefaultHttpPort.ToString() + "/");
|
||||
this.UserSendKey = MainConsole.Instance.CmdPrompt("Key to send to user server","null");
|
||||
this.UserRecvKey = MainConsole.Instance.CmdPrompt("Key to expect from user server","null");
|
||||
|
||||
// Region Server Options
|
||||
this.SimSendKey = MainLog.Instance.CmdPrompt("Key to send to sims","null");
|
||||
this.SimRecvKey = MainLog.Instance.CmdPrompt("Key to expect from sims","null");
|
||||
this.SimSendKey = MainConsole.Instance.CmdPrompt("Key to send to sims","null");
|
||||
this.SimRecvKey = MainConsole.Instance.CmdPrompt("Key to expect from sims","null");
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
|
@ -99,7 +101,7 @@ namespace OpenGrid.Config.GridConfigDb4o
|
|||
// Found?
|
||||
if (result.Count==1)
|
||||
{
|
||||
MainLog.Instance.Verbose("DBGRIDCONFIG", "Found a GridConfig object in the local database, loading");
|
||||
m_log.Info("[DBGRIDCONFIG]: Found a GridConfig object in the local database, loading");
|
||||
foreach (DbGridConfig cfg in result)
|
||||
{
|
||||
// Import each setting into this class
|
||||
|
@ -121,13 +123,13 @@ namespace OpenGrid.Config.GridConfigDb4o
|
|||
}
|
||||
else
|
||||
{
|
||||
MainLog.Instance.Verbose("DBGRIDCONFIG", "Could not find object in database, loading precompiled defaults");
|
||||
m_log.Info("[DBGRIDCONFIG]: Could not find object in database, loading precompiled defaults");
|
||||
|
||||
// Load default settings into this class
|
||||
LoadDefaults();
|
||||
|
||||
// Saves to the database file...
|
||||
MainLog.Instance.Verbose("DBGRIDCONFIG", "Writing out default settings to local database");
|
||||
m_log.Info("[DBGRIDCONFIG]: Writing out default settings to local database");
|
||||
db.Set(this);
|
||||
|
||||
// Closes file locks
|
||||
|
@ -136,27 +138,27 @@ namespace OpenGrid.Config.GridConfigDb4o
|
|||
}
|
||||
catch(Exception e)
|
||||
{
|
||||
MainLog.Instance.Warn("DbGridConfig.cs:InitConfig() - Exception occured");
|
||||
MainLog.Instance.Warn(e.ToString());
|
||||
m_log.Warn("DbGridConfig.cs:InitConfig() - Exception occured");
|
||||
m_log.Warn(e.ToString());
|
||||
}
|
||||
|
||||
// Grid Settings
|
||||
MainLog.Instance.Verbose("DBGRIDCONFIG", "Grid settings loaded:");
|
||||
MainLog.Instance.Verbose("DBGRIDCONFIG", "Grid owner: " + this.GridOwner);
|
||||
m_log.Info("[DBGRIDCONFIG]: Grid settings loaded:");
|
||||
m_log.Info("[DBGRIDCONFIG]: Grid owner: " + this.GridOwner);
|
||||
|
||||
// Asset Settings
|
||||
MainLog.Instance.Verbose("DBGRIDCONFIG", "Default asset server: " + this.DefaultAssetServer);
|
||||
MainLog.Instance.Verbose("DBGRIDCONFIG", "Key to send to asset server: " + this.AssetSendKey);
|
||||
MainLog.Instance.Verbose("DBGRIDCONFIG", "Key to expect from asset server: " + this.AssetRecvKey);
|
||||
m_log.Info("[DBGRIDCONFIG]: Default asset server: " + this.DefaultAssetServer);
|
||||
m_log.Info("[DBGRIDCONFIG]: Key to send to asset server: " + this.AssetSendKey);
|
||||
m_log.Info("[DBGRIDCONFIG]: Key to expect from asset server: " + this.AssetRecvKey);
|
||||
|
||||
// User Settings
|
||||
MainLog.Instance.Verbose("DBGRIDCONFIG", "Default user server: " + this.DefaultUserServer);
|
||||
MainLog.Instance.Verbose("DBGRIDCONFIG", "Key to send to user server: " + this.UserSendKey);
|
||||
MainLog.Instance.Verbose("DBGRIDCONFIG", "Key to expect from user server: " + this.UserRecvKey);
|
||||
m_log.Info("[DBGRIDCONFIG]: Default user server: " + this.DefaultUserServer);
|
||||
m_log.Info("[DBGRIDCONFIG]: Key to send to user server: " + this.UserSendKey);
|
||||
m_log.Info("[DBGRIDCONFIG]: Key to expect from user server: " + this.UserRecvKey);
|
||||
|
||||
// Region Settings
|
||||
MainLog.Instance.Verbose("DBGRIDCONFIG", "Key to send to sims: " + this.SimSendKey);
|
||||
MainLog.Instance.Verbose("DBGRIDCONFIG", "Key to expect from sims: " + this.SimRecvKey);
|
||||
m_log.Info("[DBGRIDCONFIG]: Key to send to sims: " + this.SimSendKey);
|
||||
m_log.Info("[DBGRIDCONFIG]: Key to expect from sims: " + this.SimRecvKey);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
|
|
|
@ -38,11 +38,12 @@ using OpenSim.Framework.Console;
|
|||
using OpenSim.Framework.Data;
|
||||
using OpenSim.Framework.Servers;
|
||||
|
||||
|
||||
namespace OpenSim.Grid.GridServer
|
||||
{
|
||||
internal class GridManager
|
||||
{
|
||||
private static readonly log4net.ILog m_log = log4net.LogManager.GetLogger(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType);
|
||||
|
||||
private Dictionary<string, IGridData> _plugins = new Dictionary<string, IGridData>();
|
||||
private Dictionary<string, ILogData> _logplugins = new Dictionary<string, ILogData>();
|
||||
|
||||
|
@ -57,10 +58,10 @@ namespace OpenSim.Grid.GridServer
|
|||
/// <param name="FileName">The filename to the grid server plugin DLL</param>
|
||||
public void AddPlugin(string FileName)
|
||||
{
|
||||
MainLog.Instance.Verbose("DATA", "Attempting to load " + FileName);
|
||||
m_log.Info("[DATA]: Attempting to load " + FileName);
|
||||
Assembly pluginAssembly = Assembly.LoadFrom(FileName);
|
||||
|
||||
MainLog.Instance.Verbose("DATA", "Found " + pluginAssembly.GetTypes().Length + " interfaces.");
|
||||
m_log.Info("[DATA]: Found " + pluginAssembly.GetTypes().Length + " interfaces.");
|
||||
foreach (Type pluginType in pluginAssembly.GetTypes())
|
||||
{
|
||||
if (!pluginType.IsAbstract)
|
||||
|
@ -74,7 +75,7 @@ namespace OpenSim.Grid.GridServer
|
|||
(IGridData) Activator.CreateInstance(pluginAssembly.GetType(pluginType.ToString()));
|
||||
plug.Initialise();
|
||||
_plugins.Add(plug.getName(), plug);
|
||||
MainLog.Instance.Verbose("DATA", "Added IGridData Interface");
|
||||
m_log.Info("[DATA]: Added IGridData Interface");
|
||||
}
|
||||
|
||||
typeInterface = null;
|
||||
|
@ -88,7 +89,7 @@ namespace OpenSim.Grid.GridServer
|
|||
(ILogData) Activator.CreateInstance(pluginAssembly.GetType(pluginType.ToString()));
|
||||
plug.Initialise();
|
||||
_logplugins.Add(plug.getName(), plug);
|
||||
MainLog.Instance.Verbose("DATA", "Added ILogData Interface");
|
||||
m_log.Info("[DATA]: Added ILogData Interface");
|
||||
}
|
||||
|
||||
typeInterface = null;
|
||||
|
@ -116,7 +117,7 @@ namespace OpenSim.Grid.GridServer
|
|||
}
|
||||
catch (Exception)
|
||||
{
|
||||
MainLog.Instance.Warn("storage", "Unable to write log via " + kvp.Key);
|
||||
m_log.Warn("[storage]: Unable to write log via " + kvp.Key);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -136,7 +137,7 @@ namespace OpenSim.Grid.GridServer
|
|||
}
|
||||
catch (Exception e)
|
||||
{
|
||||
MainLog.Instance.Warn("storage", "getRegion - " + e.Message);
|
||||
m_log.Warn("[storage]: getRegion - " + e.Message);
|
||||
}
|
||||
}
|
||||
return null;
|
||||
|
@ -157,7 +158,7 @@ namespace OpenSim.Grid.GridServer
|
|||
}
|
||||
catch
|
||||
{
|
||||
MainLog.Instance.Warn("storage", "Unable to find region " + handle.ToString() + " via " + kvp.Key);
|
||||
m_log.Warn("[storage]: Unable to find region " + handle.ToString() + " via " + kvp.Key);
|
||||
}
|
||||
}
|
||||
return null;
|
||||
|
@ -179,7 +180,7 @@ namespace OpenSim.Grid.GridServer
|
|||
}
|
||||
catch
|
||||
{
|
||||
MainLog.Instance.Warn("storage", "Unable to query regionblock via " + kvp.Key);
|
||||
m_log.Warn("[storage]: Unable to query regionblock via " + kvp.Key);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -245,14 +246,14 @@ namespace OpenSim.Grid.GridServer
|
|||
}
|
||||
else
|
||||
{
|
||||
MainLog.Instance.Verbose("GRID", "Region connected without a UUID, ignoring.");
|
||||
m_log.Info("[GRID]: Region connected without a UUID, ignoring.");
|
||||
responseData["error"] = "No UUID passed to grid server - unable to connect you";
|
||||
return response;
|
||||
}
|
||||
|
||||
if (TheSim == null) // Shouldnt this be in the REST Simulator Set method?
|
||||
{
|
||||
MainLog.Instance.Verbose("GRID", "New region connecting");
|
||||
m_log.Info("[GRID]: New region connecting");
|
||||
myword = "creation";
|
||||
}
|
||||
else
|
||||
|
@ -320,7 +321,7 @@ namespace OpenSim.Grid.GridServer
|
|||
(OldSim.regionRecvKey == TheSim.regionRecvKey &&
|
||||
OldSim.regionSendKey == TheSim.regionSendKey))
|
||||
{
|
||||
MainLog.Instance.Verbose("GRID", "Adding region " + TheSim.regionLocX + " , " + TheSim.regionLocY + " , " +
|
||||
m_log.Info("[GRID]: Adding region " + TheSim.regionLocX + " , " + TheSim.regionLocY + " , " +
|
||||
TheSim.serverURI);
|
||||
foreach (KeyValuePair<string, IGridData> kvp in _plugins)
|
||||
{
|
||||
|
@ -330,17 +331,17 @@ namespace OpenSim.Grid.GridServer
|
|||
switch (insertResponse)
|
||||
{
|
||||
case DataResponse.RESPONSE_OK:
|
||||
MainLog.Instance.Verbose("grid", "New sim " + myword + " successful: " + TheSim.regionName);
|
||||
m_log.Info("[grid]: New sim " + myword + " successful: " + TheSim.regionName);
|
||||
break;
|
||||
case DataResponse.RESPONSE_ERROR:
|
||||
MainLog.Instance.Warn("storage", "New sim creation failed (Error): " + TheSim.regionName);
|
||||
m_log.Warn("[storage]: New sim creation failed (Error): " + TheSim.regionName);
|
||||
break;
|
||||
case DataResponse.RESPONSE_INVALIDCREDENTIALS:
|
||||
MainLog.Instance.Warn("storage",
|
||||
m_log.Warn("[storage]: " +
|
||||
"New sim creation failed (Invalid Credentials): " + TheSim.regionName);
|
||||
break;
|
||||
case DataResponse.RESPONSE_AUTHREQUIRED:
|
||||
MainLog.Instance.Warn("storage",
|
||||
m_log.Warn("[storage]: " +
|
||||
"New sim creation failed (Authentication Required): " +
|
||||
TheSim.regionName);
|
||||
break;
|
||||
|
@ -348,9 +349,9 @@ namespace OpenSim.Grid.GridServer
|
|||
}
|
||||
catch (Exception e)
|
||||
{
|
||||
MainLog.Instance.Warn("storage",
|
||||
m_log.Warn("[storage]: " +
|
||||
"Unable to add region " + TheSim.UUID.ToString() + " via " + kvp.Key);
|
||||
MainLog.Instance.Warn("storage", e.ToString());
|
||||
m_log.Warn("[storage]: " + e.ToString());
|
||||
}
|
||||
|
||||
|
||||
|
@ -458,14 +459,14 @@ namespace OpenSim.Grid.GridServer
|
|||
}
|
||||
else
|
||||
{
|
||||
MainLog.Instance.Warn("grid", "Authentication failed when trying to add new region " + TheSim.regionName + " at location " + TheSim.regionLocX + " " + TheSim.regionLocY + " currently occupied by " + OldSim.regionName);
|
||||
m_log.Warn("[grid]: Authentication failed when trying to add new region " + TheSim.regionName + " at location " + TheSim.regionLocX + " " + TheSim.regionLocY + " currently occupied by " + OldSim.regionName);
|
||||
responseData["error"] = "The key required to connect to your region did not match. Please check your send and recieve keys.";
|
||||
return response;
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
MainLog.Instance.Warn("grid", "Failed to add new region " + TheSim.regionName + " at location " + TheSim.regionLocX + " " + TheSim.regionLocY + " currently occupied by " + OldSim.regionName);
|
||||
m_log.Warn("[grid]: Failed to add new region " + TheSim.regionName + " at location " + TheSim.regionLocX + " " + TheSim.regionLocY + " currently occupied by " + OldSim.regionName);
|
||||
responseData["error"] = "Another region already exists at that location. Try another";
|
||||
return response;
|
||||
}
|
||||
|
@ -496,7 +497,7 @@ namespace OpenSim.Grid.GridServer
|
|||
}
|
||||
else
|
||||
{
|
||||
MainLog.Instance.Verbose("DATA", "found " + (string) simData.regionName + " regionHandle = " +
|
||||
m_log.Info("[DATA]: found " + (string) simData.regionName + " regionHandle = " +
|
||||
(string) requestData["region_handle"]);
|
||||
responseData["sim_ip"] = Util.GetHostFromDNS(simData.serverIP).ToString();
|
||||
responseData["sim_port"] = simData.serverPort.ToString();
|
||||
|
@ -535,8 +536,8 @@ namespace OpenSim.Grid.GridServer
|
|||
{
|
||||
ymax = (Int32) requestData["ymax"];
|
||||
}
|
||||
//CFK: The second MainLog is more meaningful and either standard or fast generally occurs.
|
||||
//CFK: MainLog.Instance.Verbose("MAP", "World map request for range (" + xmin + "," + ymin + ")..(" + xmax + "," + ymax + ")");
|
||||
//CFK: The second log is more meaningful and either standard or fast generally occurs.
|
||||
//CFK: m_log.Info("[MAP]: World map request for range (" + xmin + "," + ymin + ")..(" + xmax + "," + ymax + ")");
|
||||
|
||||
XmlRpcResponse response = new XmlRpcResponse();
|
||||
Hashtable responseData = new Hashtable();
|
||||
|
@ -575,7 +576,7 @@ namespace OpenSim.Grid.GridServer
|
|||
|
||||
simProfileList.Add(simProfileBlock);
|
||||
}
|
||||
MainLog.Instance.Verbose("MAP", "Fast map " + simProfileList.Count.ToString() +
|
||||
m_log.Info("[MAP]: Fast map " + simProfileList.Count.ToString() +
|
||||
" regions @ (" + xmin + "," + ymin + ")..(" + xmax + "," + ymax + ")");
|
||||
}
|
||||
else
|
||||
|
@ -610,7 +611,7 @@ namespace OpenSim.Grid.GridServer
|
|||
}
|
||||
}
|
||||
}
|
||||
MainLog.Instance.Verbose("MAP", "Std map " + simProfileList.Count.ToString() +
|
||||
m_log.Info("[MAP]: Std map " + simProfileList.Count.ToString() +
|
||||
" regions @ (" + xmin + "," + ymin + ")..(" + xmax + "," + ymax + ")");
|
||||
}
|
||||
|
||||
|
@ -776,7 +777,7 @@ namespace OpenSim.Grid.GridServer
|
|||
|
||||
try
|
||||
{
|
||||
MainLog.Instance.Verbose("DATA",
|
||||
m_log.Info("[DATA]: " +
|
||||
"Updating / adding via " + _plugins.Count + " storage provider(s) registered.");
|
||||
foreach (KeyValuePair<string, IGridData> kvp in _plugins)
|
||||
{
|
||||
|
@ -789,13 +790,13 @@ namespace OpenSim.Grid.GridServer
|
|||
(reserveData == null && authkeynode.InnerText != TheSim.regionRecvKey))
|
||||
{
|
||||
kvp.Value.AddProfile(TheSim);
|
||||
MainLog.Instance.Verbose("grid", "New sim added to grid (" + TheSim.regionName + ")");
|
||||
m_log.Info("[grid]: New sim added to grid (" + TheSim.regionName + ")");
|
||||
logToDB(TheSim.UUID.ToString(), "RestSetSimMethod", String.Empty, 5,
|
||||
"Region successfully updated and connected to grid.");
|
||||
}
|
||||
else
|
||||
{
|
||||
MainLog.Instance.Warn("grid",
|
||||
m_log.Warn("[grid]: " +
|
||||
"Unable to update region (RestSetSimMethod): Incorrect reservation auth key.");
|
||||
// Wanted: " + reserveData.gridRecvKey + ", Got: " + TheSim.regionRecvKey + ".");
|
||||
return "Unable to update region (RestSetSimMethod): Incorrect auth key.";
|
||||
|
@ -803,7 +804,7 @@ namespace OpenSim.Grid.GridServer
|
|||
}
|
||||
catch (Exception e)
|
||||
{
|
||||
MainLog.Instance.Warn("GRID", "getRegionPlugin Handle " + kvp.Key + " unable to add new sim: " +
|
||||
m_log.Warn("[GRID]: getRegionPlugin Handle " + kvp.Key + " unable to add new sim: " +
|
||||
e.ToString());
|
||||
}
|
||||
}
|
||||
|
|
|
@ -39,6 +39,8 @@ namespace OpenSim.Grid.GridServer
|
|||
/// </summary>
|
||||
public class OpenGrid_Main : BaseOpenSimServer, conscmd_callback
|
||||
{
|
||||
private static readonly log4net.ILog m_log = log4net.LogManager.GetLogger(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType);
|
||||
|
||||
public GridConfig Cfg;
|
||||
|
||||
public static OpenGrid_Main thegrid;
|
||||
|
@ -54,11 +56,13 @@ namespace OpenSim.Grid.GridServer
|
|||
[STAThread]
|
||||
public static void Main(string[] args)
|
||||
{
|
||||
log4net.Config.XmlConfigurator.Configure();
|
||||
|
||||
if (args.Length > 0)
|
||||
{
|
||||
if (args[0] == "-setuponly") setuponly = true;
|
||||
}
|
||||
Console.WriteLine("Starting...\n");
|
||||
m_log.Info("Starting...\n");
|
||||
|
||||
thegrid = new OpenGrid_Main();
|
||||
thegrid.Startup();
|
||||
|
@ -68,23 +72,18 @@ namespace OpenSim.Grid.GridServer
|
|||
|
||||
private void Work()
|
||||
{
|
||||
m_log.Notice("Enter help for a list of commands\n");
|
||||
m_console.Notice("Enter help for a list of commands\n");
|
||||
|
||||
while (true)
|
||||
{
|
||||
m_log.MainLogPrompt();
|
||||
m_console.Prompt();
|
||||
}
|
||||
}
|
||||
|
||||
private OpenGrid_Main()
|
||||
{
|
||||
if (!Directory.Exists(Util.logDir()))
|
||||
{
|
||||
Directory.CreateDirectory(Util.logDir());
|
||||
}
|
||||
m_log =
|
||||
new LogBase((Path.Combine(Util.logDir(), "opengrid-gridserver-console.log")), "OpenGrid", this, true);
|
||||
MainLog.Instance = m_log;
|
||||
m_console = new ConsoleBase("OpenGrid", this);
|
||||
MainConsole.Instance = m_console;
|
||||
}
|
||||
|
||||
public void managercallback(string cmd)
|
||||
|
@ -97,19 +96,18 @@ namespace OpenSim.Grid.GridServer
|
|||
}
|
||||
}
|
||||
|
||||
|
||||
public void Startup()
|
||||
{
|
||||
Cfg = new GridConfig("GRID SERVER", (Path.Combine(Util.configDir(), "GridServer_Config.xml")));
|
||||
//Yeah srsly, that's it.
|
||||
if (setuponly) Environment.Exit(0);
|
||||
|
||||
m_log.Verbose("GRID", "Connecting to Storage Server");
|
||||
m_log.Info("[GRID]: Connecting to Storage Server");
|
||||
m_gridManager = new GridManager();
|
||||
m_gridManager.AddPlugin(Cfg.DatabaseProvider); // Made of win
|
||||
m_gridManager.config = Cfg;
|
||||
|
||||
m_log.Verbose("GRID", "Starting HTTP process");
|
||||
m_log.Info("[GRID]: Starting HTTP process");
|
||||
BaseHttpServer httpServer = new BaseHttpServer(Cfg.HttpPort);
|
||||
//GridManagementAgent GridManagerAgent = new GridManagementAgent(httpServer, "gridserver", Cfg.SimSendKey, Cfg.SimRecvKey, managercallback);
|
||||
|
||||
|
@ -135,7 +133,7 @@ namespace OpenSim.Grid.GridServer
|
|||
|
||||
httpServer.Start();
|
||||
|
||||
m_log.Verbose("GRID", "Starting sim status checker");
|
||||
m_log.Info("[GRID]: Starting sim status checker");
|
||||
|
||||
Timer simCheckTimer = new Timer(3600000*3); // 3 Hours between updates.
|
||||
simCheckTimer.Elapsed += new ElapsedEventHandler(CheckSims);
|
||||
|
@ -186,11 +184,11 @@ namespace OpenSim.Grid.GridServer
|
|||
switch (cmd)
|
||||
{
|
||||
case "help":
|
||||
m_log.Notice("shutdown - shutdown the grid (USE CAUTION!)");
|
||||
m_console.Notice("shutdown - shutdown the grid (USE CAUTION!)");
|
||||
break;
|
||||
|
||||
case "shutdown":
|
||||
m_log.Close();
|
||||
m_console.Close();
|
||||
Environment.Exit(0);
|
||||
break;
|
||||
}
|
||||
|
|
|
@ -37,6 +37,8 @@ namespace OpenSim.Grid.InventoryServer
|
|||
{
|
||||
public class GridInventoryService : InventoryServiceBase
|
||||
{
|
||||
private static readonly log4net.ILog m_log = log4net.LogManager.GetLogger(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType);
|
||||
|
||||
public override void RequestInventoryForUser(LLUUID userID, InventoryFolderInfo folderCallBack,
|
||||
InventoryItemInfo itemCallBack)
|
||||
{
|
||||
|
@ -108,7 +110,7 @@ namespace OpenSim.Grid.InventoryServer
|
|||
LLUUID userID = new LLUUID(rawUserID);
|
||||
|
||||
// We get enough verbose messages later on for diagnostics
|
||||
//MainLog.Instance.Verbose("INVENTORY", "Request for inventory for " + userID.ToString());
|
||||
//m_log.Info("[INVENTORY]: Request for inventory for " + userID.ToString());
|
||||
|
||||
InventoryCollection invCollection = new InventoryCollection();
|
||||
List<InventoryFolderBase> folders;
|
||||
|
@ -126,8 +128,8 @@ namespace OpenSim.Grid.InventoryServer
|
|||
{
|
||||
LLUUID userID = new LLUUID(rawUserID);
|
||||
|
||||
MainLog.Instance.Verbose(
|
||||
"INVENTORY", "Creating new set of inventory folders for " + userID.ToString());
|
||||
m_log.Info(
|
||||
"[INVENTORY]: Creating new set of inventory folders for " + userID.ToString());
|
||||
|
||||
CreateNewUserInventory(userID);
|
||||
return true;
|
||||
|
@ -152,8 +154,8 @@ namespace OpenSim.Grid.InventoryServer
|
|||
public bool AddInventoryFolder(InventoryFolderBase folder)
|
||||
{
|
||||
// Right now, this actions act more like an update/insert combination than a simple create.
|
||||
MainLog.Instance.Verbose(
|
||||
"INVENTORY",
|
||||
m_log.Info(
|
||||
"[INVENTORY]: " +
|
||||
"Updating in " + folder.parentID.ToString()
|
||||
+ ", folder " + folder.name);
|
||||
|
||||
|
@ -163,8 +165,8 @@ namespace OpenSim.Grid.InventoryServer
|
|||
|
||||
public bool MoveInventoryFolder(InventoryFolderBase folder)
|
||||
{
|
||||
MainLog.Instance.Verbose(
|
||||
"INVENTORY",
|
||||
m_log.Info(
|
||||
"[INVENTORY]: " +
|
||||
"Moving folder " + folder.folderID
|
||||
+ " to " + folder.parentID.ToString());
|
||||
|
||||
|
@ -175,8 +177,8 @@ namespace OpenSim.Grid.InventoryServer
|
|||
public bool AddInventoryItem(InventoryItemBase item)
|
||||
{
|
||||
// Right now, this actions act more like an update/insert combination than a simple create.
|
||||
MainLog.Instance.Verbose(
|
||||
"INVENTORY",
|
||||
m_log.Info(
|
||||
"[INVENTORY]: " +
|
||||
"Updating in " + item.parentFolderID.ToString()
|
||||
+ ", item " + item.inventoryName);
|
||||
|
||||
|
@ -187,8 +189,8 @@ namespace OpenSim.Grid.InventoryServer
|
|||
public override void DeleteInventoryItem(LLUUID userID, InventoryItemBase item)
|
||||
{
|
||||
// extra spaces to align with other inventory messages
|
||||
MainLog.Instance.Verbose(
|
||||
"INVENTORY",
|
||||
m_log.Info(
|
||||
"[INVENTORY]: " +
|
||||
"Deleting in " + item.parentFolderID.ToString()
|
||||
+ ", item " + item.inventoryName);
|
||||
|
||||
|
|
|
@ -41,6 +41,8 @@ namespace OpenSim.Grid.InventoryServer
|
|||
{
|
||||
public class InventoryManager
|
||||
{
|
||||
private static readonly log4net.ILog m_log = log4net.LogManager.GetLogger(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType);
|
||||
|
||||
private IInventoryData _databasePlugin;
|
||||
|
||||
/// <summary>
|
||||
|
@ -49,10 +51,10 @@ namespace OpenSim.Grid.InventoryServer
|
|||
/// <param name="FileName">The filename to the inventory server plugin DLL</param>
|
||||
public void AddDatabasePlugin(string FileName)
|
||||
{
|
||||
MainLog.Instance.Verbose(OpenInventory_Main.LogName, "Invenstorage: Attempting to load " + FileName);
|
||||
m_log.Info("[" + OpenInventory_Main.LogName + "]: Invenstorage: Attempting to load " + FileName);
|
||||
Assembly pluginAssembly = Assembly.LoadFrom(FileName);
|
||||
|
||||
MainLog.Instance.Verbose(OpenInventory_Main.LogName,
|
||||
m_log.Info("[" + OpenInventory_Main.LogName + "]: " +
|
||||
"Invenstorage: Found " + pluginAssembly.GetTypes().Length + " interfaces.");
|
||||
foreach (Type pluginType in pluginAssembly.GetTypes())
|
||||
{
|
||||
|
@ -66,7 +68,7 @@ namespace OpenSim.Grid.InventoryServer
|
|||
(IInventoryData) Activator.CreateInstance(pluginAssembly.GetType(pluginType.ToString()));
|
||||
plug.Initialise();
|
||||
_databasePlugin = plug;
|
||||
MainLog.Instance.Verbose(OpenInventory_Main.LogName,
|
||||
m_log.Info("[" + OpenInventory_Main.LogName + "]: " +
|
||||
"Invenstorage: Added IInventoryData Interface");
|
||||
break;
|
||||
}
|
||||
|
@ -156,7 +158,7 @@ namespace OpenSim.Grid.InventoryServer
|
|||
saveInventoryToStream(_inventory, fs);
|
||||
fs.Flush();
|
||||
fs.Close();
|
||||
MainLog.Instance.Debug(OpenInventory_Main.LogName, "Modified");
|
||||
m_log.Debug("[" + OpenInventory_Main.LogName + "]: Modified");
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -166,14 +168,14 @@ namespace OpenSim.Grid.InventoryServer
|
|||
|
||||
private byte[] GetUserInventory(LLUUID userID)
|
||||
{
|
||||
MainLog.Instance.Notice(OpenInventory_Main.LogName, "Getting Inventory for user {0}", userID.ToString());
|
||||
m_log.Info(String.Format("[" + OpenInventory_Main.LogName + "]: Getting Inventory for user {0}", userID.ToString()));
|
||||
byte[] result = new byte[] {};
|
||||
|
||||
InventoryFolderBase fb = _manager._databasePlugin.getUserRootFolder(userID);
|
||||
if (fb == null)
|
||||
{
|
||||
MainLog.Instance.Notice(OpenInventory_Main.LogName, "Inventory not found for user {0}, creating new",
|
||||
userID.ToString());
|
||||
m_log.Info(String.Format("[" + OpenInventory_Main.LogName + "]: Inventory not found for user {0}, creating new",
|
||||
userID.ToString()));
|
||||
CreateDefaultInventory(userID);
|
||||
}
|
||||
|
||||
|
|
|
@ -38,6 +38,8 @@ namespace OpenSim.Grid.InventoryServer
|
|||
{
|
||||
public class OpenInventory_Main : BaseOpenSimServer, conscmd_callback
|
||||
{
|
||||
private static readonly log4net.ILog m_log = log4net.LogManager.GetLogger(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType);
|
||||
|
||||
private InventoryManager m_inventoryManager;
|
||||
private InventoryConfig m_config;
|
||||
private GridInventoryService m_inventoryService;
|
||||
|
@ -47,6 +49,8 @@ namespace OpenSim.Grid.InventoryServer
|
|||
[STAThread]
|
||||
public static void Main(string[] args)
|
||||
{
|
||||
log4net.Config.XmlConfigurator.Configure();
|
||||
|
||||
OpenInventory_Main theServer = new OpenInventory_Main();
|
||||
theServer.Startup();
|
||||
|
||||
|
@ -55,20 +59,20 @@ namespace OpenSim.Grid.InventoryServer
|
|||
|
||||
public OpenInventory_Main()
|
||||
{
|
||||
m_log = new LogBase("opengrid-inventory-console.log", LogName, this, true);
|
||||
MainLog.Instance = m_log;
|
||||
m_console = new ConsoleBase(LogName, this);
|
||||
MainConsole.Instance = m_console;
|
||||
}
|
||||
|
||||
public void Startup()
|
||||
{
|
||||
MainLog.Instance.Notice("Initialising inventory manager...");
|
||||
m_log.Info("Initialising inventory manager...");
|
||||
m_config = new InventoryConfig(LogName, (Path.Combine(Util.configDir(), "InventoryServer_Config.xml")));
|
||||
|
||||
m_inventoryService = new GridInventoryService();
|
||||
// m_inventoryManager = new InventoryManager();
|
||||
m_inventoryService.AddPlugin(m_config.DatabaseProvider);
|
||||
|
||||
MainLog.Instance.Notice(LogName, "Starting HTTP server ...");
|
||||
m_log.Info("[" + LogName + "]: Starting HTTP server ...");
|
||||
BaseHttpServer httpServer = new BaseHttpServer(m_config.HttpPort);
|
||||
httpServer.AddStreamHandler(
|
||||
new RestDeserialisehandler<Guid, InventoryCollection>("POST", "/GetInventory/",
|
||||
|
@ -95,19 +99,19 @@ namespace OpenSim.Grid.InventoryServer
|
|||
new RestDeserialisehandler<Guid, List<InventoryFolderBase>>("POST", "/RootFolders/",
|
||||
m_inventoryService.RequestFirstLevelFolders));
|
||||
|
||||
// httpServer.AddStreamHandler(new InventoryManager.GetInventory(m_inventoryManager));
|
||||
// httpServer.AddStreamHandler(new InventoryManager.GetInventory(m_inventoryManager));
|
||||
|
||||
httpServer.Start();
|
||||
MainLog.Instance.Notice(LogName, "Started HTTP server");
|
||||
m_log.Info("[" + LogName + "]: Started HTTP server");
|
||||
}
|
||||
|
||||
private void Work()
|
||||
{
|
||||
m_log.Notice("Enter help for a list of commands\n");
|
||||
m_console.Notice("Enter help for a list of commands\n");
|
||||
|
||||
while (true)
|
||||
{
|
||||
m_log.MainLogPrompt();
|
||||
m_console.Prompt();
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -122,7 +126,7 @@ namespace OpenSim.Grid.InventoryServer
|
|||
m_inventoryService.CreateUsersInventory(LLUUID.Random().UUID);
|
||||
break;
|
||||
case "shutdown":
|
||||
m_log.Close();
|
||||
m_console.Close();
|
||||
Environment.Exit(0);
|
||||
break;
|
||||
}
|
||||
|
|
|
@ -41,6 +41,8 @@ namespace OpenSim.Grid.MessagingServer
|
|||
/// </summary>
|
||||
public class OpenMessage_Main : BaseOpenSimServer, conscmd_callback
|
||||
{
|
||||
private static readonly log4net.ILog m_log = log4net.LogManager.GetLogger(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType);
|
||||
|
||||
private MessageServerConfig Cfg;
|
||||
|
||||
//public UserManager m_userManager;
|
||||
|
@ -51,7 +53,9 @@ namespace OpenSim.Grid.MessagingServer
|
|||
[STAThread]
|
||||
public static void Main(string[] args)
|
||||
{
|
||||
Console.WriteLine("Launching MessagingServer...");
|
||||
log4net.Config.XmlConfigurator.Configure();
|
||||
|
||||
m_log.Info("Launching MessagingServer...");
|
||||
|
||||
OpenMessage_Main messageserver = new OpenMessage_Main();
|
||||
|
||||
|
@ -61,22 +65,17 @@ namespace OpenSim.Grid.MessagingServer
|
|||
|
||||
private OpenMessage_Main()
|
||||
{
|
||||
if (!Directory.Exists(Util.logDir()))
|
||||
{
|
||||
Directory.CreateDirectory(Util.logDir());
|
||||
}
|
||||
m_log =
|
||||
new LogBase((Path.Combine(Util.logDir(), "opengrid-messagingserver-console.log")), "OpenMessage", this, true);
|
||||
MainLog.Instance = m_log;
|
||||
m_console = new ConsoleBase("OpenMessage", this);
|
||||
MainConsole.Instance = m_console;
|
||||
}
|
||||
|
||||
private void Work()
|
||||
{
|
||||
m_log.Notice("Enter help for a list of commands\n");
|
||||
m_console.Notice("Enter help for a list of commands\n");
|
||||
|
||||
while (true)
|
||||
{
|
||||
m_log.MainLogPrompt();
|
||||
m_console.Prompt();
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -84,9 +83,7 @@ namespace OpenSim.Grid.MessagingServer
|
|||
{
|
||||
Cfg = new MessageServerConfig("MESSAGING SERVER", (Path.Combine(Util.configDir(), "MessagingServer_Config.xml")));
|
||||
|
||||
|
||||
|
||||
MainLog.Instance.Verbose("REGION", "Starting HTTP process");
|
||||
m_log.Info("[REGION]: Starting HTTP process");
|
||||
BaseHttpServer httpServer = new BaseHttpServer(Cfg.HttpPort);
|
||||
|
||||
//httpServer.AddXmlRPCHandler("login_to_simulator", m_loginService.XmlRpcLoginMethod);
|
||||
|
@ -104,10 +101,9 @@ namespace OpenSim.Grid.MessagingServer
|
|||
//new RestStreamHandler("DELETE", "/usersessions/", m_userManager.RestDeleteUserSessionMethod));
|
||||
|
||||
httpServer.Start();
|
||||
m_log.Status("SERVER", "Messageserver 0.4 - Startup complete");
|
||||
m_log.Info("[SERVER]: Messageserver 0.4 - Startup complete");
|
||||
}
|
||||
|
||||
|
||||
public void do_create(string what)
|
||||
{
|
||||
switch (what)
|
||||
|
@ -120,7 +116,7 @@ namespace OpenSim.Grid.MessagingServer
|
|||
//m_userManager.AddUserProfile(tempfirstname, templastname, tempMD5Passwd, regX, regY);
|
||||
} catch (Exception ex)
|
||||
{
|
||||
m_log.Error("SERVER", "Error creating user: {0}", ex.ToString());
|
||||
m_console.Error("[SERVER]: Error creating user: {0}", ex.ToString());
|
||||
}
|
||||
|
||||
try
|
||||
|
@ -130,9 +126,9 @@ namespace OpenSim.Grid.MessagingServer
|
|||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
m_log.Error("SERVER", "Error creating inventory for user: {0}", ex.ToString());
|
||||
m_console.Error("[SERVER]: Error creating inventory for user: {0}", ex.ToString());
|
||||
}
|
||||
// m_lastCreatedUser = userID;
|
||||
// m_lastCreatedUser = userID;
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
@ -144,11 +140,11 @@ namespace OpenSim.Grid.MessagingServer
|
|||
switch (cmd)
|
||||
{
|
||||
case "help":
|
||||
m_log.Notice("shutdown - shutdown the message server (USE CAUTION!)");
|
||||
m_console.Notice("shutdown - shutdown the message server (USE CAUTION!)");
|
||||
break;
|
||||
|
||||
case "shutdown":
|
||||
m_log.Close();
|
||||
m_console.Close();
|
||||
Environment.Exit(0);
|
||||
break;
|
||||
}
|
||||
|
|
|
@ -43,7 +43,8 @@ namespace OpenSim.Grid.MessagingServer
|
|||
{
|
||||
public class MessageService
|
||||
{
|
||||
private LogBase m_log;
|
||||
private static readonly log4net.ILog m_log = log4net.LogManager.GetLogger(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType);
|
||||
|
||||
private MessageServerConfig m_cfg;
|
||||
|
||||
//A hashtable of all current presences this server knows about
|
||||
|
@ -58,13 +59,10 @@ namespace OpenSim.Grid.MessagingServer
|
|||
// Hashtable containing work units that need to be processed
|
||||
private Hashtable m_unProcessedWorkUnits = new Hashtable();
|
||||
|
||||
|
||||
public MessageService(LogBase log, MessageServerConfig cfg)
|
||||
public MessageService(MessageServerConfig cfg)
|
||||
{
|
||||
m_log = log;
|
||||
m_cfg = cfg;
|
||||
}
|
||||
|
||||
|
||||
#region RegionComms Methods
|
||||
|
||||
|
@ -84,7 +82,7 @@ namespace OpenSim.Grid.MessagingServer
|
|||
ArrayList SendParams = new ArrayList();
|
||||
SendParams.Add(PresenceParams);
|
||||
|
||||
MainLog.Instance.Verbose("PRESENCE", "Informing " + whichRegion.regionName + " at " + whichRegion.httpServerURI);
|
||||
m_log.Info("[PRESENCE]: Informing " + whichRegion.regionName + " at " + whichRegion.httpServerURI);
|
||||
// Send
|
||||
XmlRpcRequest RegionReq = new XmlRpcRequest("presence_update", SendParams);
|
||||
XmlRpcResponse RegionResp = RegionReq.Send(whichRegion.httpServerURI, 6000);
|
||||
|
@ -292,7 +290,7 @@ namespace OpenSim.Grid.MessagingServer
|
|||
}
|
||||
catch (WebException e)
|
||||
{
|
||||
MainLog.Instance.Warn("Error when trying to fetch Avatar's friends list: " +
|
||||
m_log.Warn("Error when trying to fetch Avatar's friends list: " +
|
||||
e.Message);
|
||||
// Return Empty list (no friends)
|
||||
}
|
||||
|
@ -439,7 +437,7 @@ namespace OpenSim.Grid.MessagingServer
|
|||
|
||||
if (responseData.ContainsKey("error"))
|
||||
{
|
||||
m_log.Error("GRID","error received from grid server" + responseData["error"]);
|
||||
m_log.Error("[GRID]: error received from grid server" + responseData["error"]);
|
||||
return null;
|
||||
}
|
||||
|
||||
|
@ -465,7 +463,7 @@ namespace OpenSim.Grid.MessagingServer
|
|||
}
|
||||
catch (WebException)
|
||||
{
|
||||
MainLog.Instance.Error("GRID",
|
||||
m_log.Error("[GRID]: " +
|
||||
"Region lookup failed for: " + regionHandle.ToString() +
|
||||
" - Is the GridServer down?");
|
||||
return null;
|
||||
|
|
|
@ -26,10 +26,13 @@
|
|||
*
|
||||
*/
|
||||
/* Original code: Tedd Hansen */
|
||||
|
||||
namespace OpenSim.Grid.ScriptEngine.DotNetEngine
|
||||
{
|
||||
public static class Common
|
||||
{
|
||||
private static readonly log4net.ILog m_log = log4net.LogManager.GetLogger(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType);
|
||||
|
||||
public static bool debug = true;
|
||||
public static ScriptEngine mySE;
|
||||
|
||||
|
@ -41,14 +44,14 @@ namespace OpenSim.Grid.ScriptEngine.DotNetEngine
|
|||
public static void SendToDebug(string Message)
|
||||
{
|
||||
//if (Debug == true)
|
||||
mySE.Log.Verbose("ScriptEngine", "Debug: " + Message);
|
||||
mySE.m_log.Info("[ScriptEngine]: Debug: " + Message);
|
||||
//SendToDebugEvent("\r\n" + DateTime.Now.ToString("[HH:mm:ss] ") + Message);
|
||||
}
|
||||
|
||||
public static void SendToLog(string Message)
|
||||
{
|
||||
//if (Debug == true)
|
||||
mySE.Log.Verbose("ScriptEngine", "LOG: " + Message);
|
||||
mySE.m_log.Info("[ScriptEngine]: LOG: " + Message);
|
||||
//SendToLogEvent("\r\n" + DateTime.Now.ToString("[HH:mm:ss] ") + Message);
|
||||
}
|
||||
}
|
||||
|
|
|
@ -41,6 +41,8 @@ namespace OpenSim.Grid.ScriptEngine.DotNetEngine.Compiler.LSL
|
|||
//[Serializable]
|
||||
public class LSL_BaseClass : MarshalByRefObject, LSL_BuiltIn_Commands_Interface, IScript
|
||||
{
|
||||
private static readonly log4net.ILog m_log = log4net.LogManager.GetLogger(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType);
|
||||
|
||||
// Object never expires
|
||||
public override Object InitializeLifetimeService()
|
||||
{
|
||||
|
@ -87,7 +89,7 @@ namespace OpenSim.Grid.ScriptEngine.DotNetEngine.Compiler.LSL
|
|||
{
|
||||
m_LSL_Functions = LSL_Functions;
|
||||
|
||||
//MainLog.Instance.Notice("ScriptEngine", "LSL_BaseClass.Start() called.");
|
||||
//m_log.Info("[ScriptEngine]: LSL_BaseClass.Start() called.");
|
||||
|
||||
// Get this AppDomain's settings and display some of them.
|
||||
AppDomainSetup ads = AppDomain.CurrentDomain.SetupInformation;
|
||||
|
|
|
@ -52,6 +52,8 @@ namespace OpenSim.Grid.ScriptEngine.DotNetEngine.Compiler
|
|||
/// </summary>
|
||||
public class LSL_BuiltIn_Commands : MarshalByRefObject, LSL_BuiltIn_Commands_Interface
|
||||
{
|
||||
private static readonly log4net.ILog m_log = log4net.LogManager.GetLogger(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType);
|
||||
|
||||
private ASCIIEncoding enc = new ASCIIEncoding();
|
||||
private ScriptEngine m_ScriptEngine;
|
||||
private SceneObjectPart m_host;
|
||||
|
@ -68,7 +70,7 @@ namespace OpenSim.Grid.ScriptEngine.DotNetEngine.Compiler
|
|||
m_itemID = itemID;
|
||||
|
||||
|
||||
//MainLog.Instance.Notice("ScriptEngine", "LSL_BaseClass.Start() called. Hosted by [" + m_host.Name + ":" + m_host.UUID + "@" + m_host.AbsolutePosition + "]");
|
||||
//m_log.Info("[ScriptEngine]: LSL_BaseClass.Start() called. Hosted by [" + m_host.Name + ":" + m_host.UUID + "@" + m_host.AbsolutePosition + "]");
|
||||
}
|
||||
|
||||
|
||||
|
|
|
@ -38,17 +38,19 @@ namespace OpenSim.Grid.ScriptEngine.DotNetEngine
|
|||
[Serializable]
|
||||
internal class EventManager
|
||||
{
|
||||
private static readonly log4net.ILog m_log = log4net.LogManager.GetLogger(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType);
|
||||
|
||||
private ScriptEngine myScriptEngine;
|
||||
//public IScriptHost TEMP_OBJECT_ID;
|
||||
public EventManager(ScriptEngine _ScriptEngine)
|
||||
{
|
||||
myScriptEngine = _ScriptEngine;
|
||||
// TODO: HOOK EVENTS UP TO SERVER!
|
||||
//myScriptEngine.m_logger.Verbose("ScriptEngine", "EventManager Start");
|
||||
//myScriptEngine.m_log.Info("[ScriptEngine]: EventManager Start");
|
||||
// TODO: ADD SERVER HOOK TO LOAD A SCRIPT THROUGH myScriptEngine.ScriptManager
|
||||
|
||||
// Hook up a test event to our test form
|
||||
myScriptEngine.Log.Verbose("ScriptEngine", "Hooking up to server events");
|
||||
myScriptEngine.m_log.Info("[ScriptEngine]: Hooking up to server events");
|
||||
myScriptEngine.World.EventManager.OnObjectGrab += touch_start;
|
||||
myScriptEngine.World.EventManager.OnRezScript += OnRezScript;
|
||||
myScriptEngine.World.EventManager.OnRemoveScript += OnRemoveScript;
|
||||
|
@ -57,7 +59,7 @@ namespace OpenSim.Grid.ScriptEngine.DotNetEngine
|
|||
public void touch_start(uint localID, LLVector3 offsetPos, IClientAPI remoteClient)
|
||||
{
|
||||
// Add to queue for all scripts in ObjectID object
|
||||
//myScriptEngine.m_logger.Verbose("ScriptEngine", "EventManager Event: touch_start");
|
||||
//myScriptEngine.m_log.Info("[ScriptEngine]: EventManager Event: touch_start");
|
||||
//Console.WriteLine("touch_start localID: " + localID);
|
||||
myScriptEngine.m_EventQueueManager.AddToObjectQueue(localID, "touch_start", new object[] {(int) 1});
|
||||
}
|
||||
|
|
|
@ -44,6 +44,8 @@ namespace OpenSim.Grid.ScriptEngine.DotNetEngine
|
|||
[Serializable]
|
||||
internal class EventQueueManager
|
||||
{
|
||||
private static readonly log4net.ILog m_log = log4net.LogManager.GetLogger(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType);
|
||||
|
||||
/// <summary>
|
||||
/// List of threads processing event queue
|
||||
/// </summary>
|
||||
|
@ -118,7 +120,7 @@ namespace OpenSim.Grid.ScriptEngine.DotNetEngine
|
|||
}
|
||||
catch (Exception)
|
||||
{
|
||||
//myScriptEngine.Log.Verbose("ScriptEngine", "EventQueueManager Exception killing worker thread: " + e.ToString());
|
||||
//myScriptEngine.m_log.Info("[ScriptEngine]: EventQueueManager Exception killing worker thread: " + e.ToString());
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -132,7 +134,7 @@ namespace OpenSim.Grid.ScriptEngine.DotNetEngine
|
|||
/// </summary>
|
||||
private void EventQueueThreadLoop()
|
||||
{
|
||||
//myScriptEngine.m_logger.Verbose("ScriptEngine", "EventQueueManager Worker thread spawned");
|
||||
//myScriptEngine.m_log.Info("[ScriptEngine]: EventQueueManager Worker thread spawned");
|
||||
try
|
||||
{
|
||||
QueueItemStruct BlankQIS = new QueueItemStruct();
|
||||
|
@ -151,7 +153,7 @@ namespace OpenSim.Grid.ScriptEngine.DotNetEngine
|
|||
else
|
||||
{
|
||||
// Something in queue, process
|
||||
//myScriptEngine.m_logger.Verbose("ScriptEngine", "Processing event for localID: " + QIS.localID + ", itemID: " + QIS.itemID + ", FunctionName: " + QIS.FunctionName);
|
||||
//myScriptEngine.m_log.Info("[ScriptEngine]: Processing event for localID: " + QIS.localID + ", itemID: " + QIS.itemID + ", FunctionName: " + QIS.FunctionName);
|
||||
|
||||
// OBJECT BASED LOCK - TWO THREADS WORKING ON SAME OBJECT IS NOT GOOD
|
||||
lock (queueLock)
|
||||
|
@ -237,7 +239,7 @@ namespace OpenSim.Grid.ScriptEngine.DotNetEngine
|
|||
} // try
|
||||
catch (ThreadAbortException)
|
||||
{
|
||||
//myScriptEngine.Log.Verbose("ScriptEngine", "EventQueueManager Worker thread killed: " + tae.Message);
|
||||
//myScriptEngine.m_log.Info("[ScriptEngine]: EventQueueManager Worker thread killed: " + tae.Message);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -287,7 +289,7 @@ namespace OpenSim.Grid.ScriptEngine.DotNetEngine
|
|||
public void AddToObjectQueue(uint localID, string FunctionName, object[] param)
|
||||
{
|
||||
// Determine all scripts in Object and add to their queue
|
||||
//myScriptEngine.m_logger.Verbose("ScriptEngine", "EventQueueManager Adding localID: " + localID + ", FunctionName: " + FunctionName);
|
||||
//myScriptEngine.m_log.Info("[ScriptEngine]: EventQueueManager Adding localID: " + localID + ", FunctionName: " + FunctionName);
|
||||
|
||||
|
||||
// Do we have any scripts in this object at all? If not, return
|
||||
|
|
|
@ -40,6 +40,8 @@ namespace OpenSim.Grid.ScriptEngine.DotNetEngine
|
|||
[Serializable]
|
||||
public class ScriptEngine : IRegionModule
|
||||
{
|
||||
private static readonly log4net.ILog m_log = log4net.LogManager.GetLogger(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType);
|
||||
|
||||
internal Scene World;
|
||||
internal EventManager m_EventManager; // Handles and queues incoming events from OpenSim
|
||||
internal EventQueueManager m_EventQueueManager; // Executes events
|
||||
|
@ -47,7 +49,6 @@ namespace OpenSim.Grid.ScriptEngine.DotNetEngine
|
|||
internal AppDomainManager m_AppDomainManager;
|
||||
internal LSLLongCmdHandler m_LSLLongCmdHandler;
|
||||
|
||||
private LogBase m_log;
|
||||
|
||||
public ScriptEngine()
|
||||
{
|
||||
|
@ -55,19 +56,13 @@ namespace OpenSim.Grid.ScriptEngine.DotNetEngine
|
|||
Common.mySE = this;
|
||||
}
|
||||
|
||||
public LogBase Log
|
||||
{
|
||||
get { return m_log; }
|
||||
}
|
||||
|
||||
public void InitializeEngine(Scene Sceneworld, LogBase logger)
|
||||
public void InitializeEngine(Scene Sceneworld)
|
||||
{
|
||||
World = Sceneworld;
|
||||
m_log = logger;
|
||||
|
||||
Log.Verbose("ScriptEngine", "DotNet & LSL ScriptEngine initializing");
|
||||
m_log.Info("[ScriptEngine]: DotNet & LSL ScriptEngine initializing");
|
||||
|
||||
//m_logger.Status("ScriptEngine", "InitializeEngine");
|
||||
//m_log.Info("[ScriptEngine]: InitializeEngine");
|
||||
|
||||
// Create all objects we'll be using
|
||||
m_EventQueueManager = new EventQueueManager(this);
|
||||
|
@ -90,7 +85,7 @@ namespace OpenSim.Grid.ScriptEngine.DotNetEngine
|
|||
//public void StartScript(string ScriptID, IScriptHost ObjectID)
|
||||
//{
|
||||
// this.myEventManager.TEMP_OBJECT_ID = ObjectID;
|
||||
// Log.Status("ScriptEngine", "DEBUG FUNCTION: StartScript: " + ScriptID);
|
||||
// m_log.Info("[ScriptEngine]: DEBUG FUNCTION: StartScript: " + ScriptID);
|
||||
// myScriptManager.StartScript(ScriptID, ObjectID);
|
||||
//}
|
||||
|
||||
|
@ -98,7 +93,7 @@ namespace OpenSim.Grid.ScriptEngine.DotNetEngine
|
|||
|
||||
public void Initialise(Scene scene, IConfigSource config)
|
||||
{
|
||||
InitializeEngine(scene, MainLog.Instance);
|
||||
InitializeEngine(scene);
|
||||
}
|
||||
|
||||
public void PostInitialise()
|
||||
|
|
|
@ -48,6 +48,8 @@ namespace OpenSim.Grid.ScriptEngine.DotNetEngine
|
|||
[Serializable]
|
||||
public class ScriptManager
|
||||
{
|
||||
private static readonly log4net.ILog m_log = log4net.LogManager.GetLogger(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType);
|
||||
|
||||
#region Declares
|
||||
|
||||
private Thread scriptLoadUnloadThread;
|
||||
|
@ -312,7 +314,7 @@ namespace OpenSim.Grid.ScriptEngine.DotNetEngine
|
|||
}
|
||||
catch (Exception e)
|
||||
{
|
||||
//m_scriptEngine.Log.Error("ScriptEngine", "Error compiling script: " + e.ToString());
|
||||
//m_scriptEngine.m_log.Error("[ScriptEngine]: Error compiling script: " + e.ToString());
|
||||
try
|
||||
{
|
||||
// DISPLAY ERROR INWORLD
|
||||
|
@ -323,7 +325,7 @@ namespace OpenSim.Grid.ScriptEngine.DotNetEngine
|
|||
}
|
||||
catch (Exception e2)
|
||||
{
|
||||
m_scriptEngine.Log.Error("ScriptEngine", "Error displaying error in-world: " + e2.ToString());
|
||||
m_scriptEngine.m_log.Error("[ScriptEngine]: Error displaying error in-world: " + e2.ToString());
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -384,7 +386,7 @@ namespace OpenSim.Grid.ScriptEngine.DotNetEngine
|
|||
internal void ExecuteEvent(uint localID, LLUUID itemID, string FunctionName, object[] args)
|
||||
{
|
||||
// Execute a function in the script
|
||||
//m_scriptEngine.Log.Verbose("ScriptEngine", "Executing Function localID: " + localID + ", itemID: " + itemID + ", FunctionName: " + FunctionName);
|
||||
//m_scriptEngine.m_log.Info("[ScriptEngine]: Executing Function localID: " + localID + ", itemID: " + itemID + ", FunctionName: " + FunctionName);
|
||||
LSL_BaseClass Script = m_scriptEngine.m_ScriptManager.GetScript(localID, itemID);
|
||||
if (Script == null)
|
||||
return;
|
||||
|
|
|
@ -37,6 +37,8 @@ namespace OpenSim.Grid.ScriptServer
|
|||
|
||||
private static void Main(string[] args)
|
||||
{
|
||||
log4net.Config.XmlConfigurator.Configure();
|
||||
|
||||
AppDomain.CurrentDomain.UnhandledException +=
|
||||
new UnhandledExceptionEventHandler(CurrentDomain_UnhandledException);
|
||||
|
||||
|
|
|
@ -33,14 +33,12 @@ namespace OpenSim.Grid.ScriptServer
|
|||
// Maintains connection and communication to a region
|
||||
public class RegionConnectionManager : RegionBase
|
||||
{
|
||||
private LogBase m_log;
|
||||
private ScriptServerMain m_ScriptServerMain;
|
||||
private object m_Connection;
|
||||
|
||||
public RegionConnectionManager(ScriptServerMain scm, LogBase logger, object Connection)
|
||||
public RegionConnectionManager(ScriptServerMain scm, object Connection)
|
||||
{
|
||||
m_ScriptServerMain = scm;
|
||||
m_log = logger;
|
||||
m_Connection = Connection;
|
||||
}
|
||||
|
||||
|
|
|
@ -38,13 +38,11 @@ namespace OpenSim.Grid.ScriptServer
|
|||
|
||||
private List<RegionConnectionManager> Regions = new List<RegionConnectionManager>();
|
||||
|
||||
private LogBase m_log;
|
||||
private ScriptServerMain m_ScriptServerMain;
|
||||
|
||||
public RegionCommManager(ScriptServerMain scm, LogBase logger)
|
||||
public RegionCommManager(ScriptServerMain scm)
|
||||
{
|
||||
m_ScriptServerMain = scm;
|
||||
m_log = logger;
|
||||
}
|
||||
|
||||
~RegionCommManager()
|
||||
|
@ -96,9 +94,8 @@ namespace OpenSim.Grid.ScriptServer
|
|||
// ~ ask scriptengines if they will accept script?
|
||||
// - Add script to shared communication channel towards that region
|
||||
|
||||
|
||||
// TODO: FAKING A CONNECTION
|
||||
Regions.Add(new RegionConnectionManager(m_ScriptServerMain, m_log, null));
|
||||
Regions.Add(new RegionConnectionManager(m_ScriptServerMain, null));
|
||||
}
|
||||
}
|
||||
}
|
|
@ -35,13 +35,7 @@ namespace OpenSim.Grid.ScriptServer.ScriptServer
|
|||
{
|
||||
internal class ScriptEngineLoader
|
||||
{
|
||||
private LogBase m_log;
|
||||
|
||||
|
||||
public ScriptEngineLoader(LogBase logger)
|
||||
{
|
||||
m_log = logger;
|
||||
}
|
||||
private static readonly log4net.ILog m_log = log4net.LogManager.GetLogger(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType);
|
||||
|
||||
public ScriptServerInterfaces.ScriptEngine LoadScriptEngine(string EngineName)
|
||||
{
|
||||
|
@ -55,7 +49,7 @@ namespace OpenSim.Grid.ScriptServer.ScriptServer
|
|||
}
|
||||
catch (Exception e)
|
||||
{
|
||||
m_log.Error("ScriptEngine",
|
||||
m_log.Error("[ScriptEngine]: " +
|
||||
"Error loading assembly \"" + EngineName + "\": " + e.Message + ", " +
|
||||
e.StackTrace.ToString());
|
||||
}
|
||||
|
@ -87,7 +81,7 @@ namespace OpenSim.Grid.ScriptServer.ScriptServer
|
|||
//}
|
||||
//catch (Exception e)
|
||||
//{
|
||||
// m_log.Error("ScriptEngine", "Error loading assembly \String.Empty + FileName + "\": " + e.ToString());
|
||||
// m_log.Error("[ScriptEngine]: Error loading assembly \String.Empty + FileName + "\": " + e.ToString());
|
||||
//}
|
||||
|
||||
|
||||
|
@ -104,7 +98,7 @@ namespace OpenSim.Grid.ScriptServer.ScriptServer
|
|||
//}
|
||||
//catch (Exception e)
|
||||
//{
|
||||
// m_log.Error("ScriptEngine", "Error initializing type \String.Empty + NameSpace + "\" from \String.Empty + FileName + "\": " + e.ToString());
|
||||
// m_log.Error("[ScriptEngine]: Error initializing type \String.Empty + NameSpace + "\" from \String.Empty + FileName + "\": " + e.ToString());
|
||||
//}
|
||||
|
||||
ScriptServerInterfaces.ScriptEngine ret;
|
||||
|
@ -114,7 +108,7 @@ namespace OpenSim.Grid.ScriptServer.ScriptServer
|
|||
//}
|
||||
//catch (Exception e)
|
||||
//{
|
||||
// m_log.Error("ScriptEngine", "Error initializing type \String.Empty + NameSpace + "\" from \String.Empty + FileName + "\": " + e.ToString());
|
||||
// m_log.Error("[ScriptEngine]: Error initializing type \String.Empty + NameSpace + "\" from \String.Empty + FileName + "\": " + e.ToString());
|
||||
//}
|
||||
|
||||
return ret;
|
||||
|
|
|
@ -34,17 +34,15 @@ namespace OpenSim.Grid.ScriptServer.ScriptServer
|
|||
{
|
||||
internal class ScriptEngineManager
|
||||
{
|
||||
private LogBase m_log;
|
||||
private ScriptEngineLoader ScriptEngineLoader;
|
||||
private List<ScriptServerInterfaces.ScriptEngine> scriptEngines = new List<ScriptServerInterfaces.ScriptEngine>();
|
||||
private ScriptServerMain m_ScriptServerMain;
|
||||
|
||||
// Initialize
|
||||
public ScriptEngineManager(ScriptServerMain scm, LogBase logger)
|
||||
public ScriptEngineManager(ScriptServerMain scm)
|
||||
{
|
||||
m_ScriptServerMain = scm;
|
||||
m_log = logger;
|
||||
ScriptEngineLoader = new ScriptEngineLoader(m_log);
|
||||
ScriptEngineLoader = new ScriptEngineLoader();
|
||||
}
|
||||
|
||||
~ScriptEngineManager()
|
||||
|
|
|
@ -40,11 +40,12 @@ namespace OpenSim.Grid.ScriptServer
|
|||
{
|
||||
public class ScriptServerMain : BaseOpenSimServer, conscmd_callback
|
||||
{
|
||||
private static readonly log4net.ILog m_log = log4net.LogManager.GetLogger(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType);
|
||||
|
||||
//
|
||||
// Root object. Creates objects used.
|
||||
//
|
||||
private int listenPort = 8010;
|
||||
private readonly string m_logFilename = ("scriptserver.log");
|
||||
|
||||
// TEMP
|
||||
public static ScriptServerInterfaces.ScriptEngine Engine;
|
||||
|
@ -59,16 +60,15 @@ namespace OpenSim.Grid.ScriptServer
|
|||
|
||||
public ScriptServerMain()
|
||||
{
|
||||
m_log = CreateLog();
|
||||
|
||||
m_console = CreateConsole();
|
||||
|
||||
// Set up script engine mananger
|
||||
ScriptEngines = new ScriptEngineManager(this, m_log);
|
||||
ScriptEngines = new ScriptEngineManager(this);
|
||||
|
||||
// Load DotNetEngine
|
||||
Engine = ScriptEngines.LoadEngine("DotNetEngine");
|
||||
IConfigSource config = null;
|
||||
Engine.InitializeEngine(null, null, m_log, false, Engine.GetScriptManager());
|
||||
Engine.InitializeEngine(null, null, false, Engine.GetScriptManager());
|
||||
|
||||
|
||||
// Set up server
|
||||
|
@ -83,12 +83,12 @@ namespace OpenSim.Grid.ScriptServer
|
|||
|
||||
private void RPC_ReceiveCommand(int ID, string Command, object[] p)
|
||||
{
|
||||
m_log.Notice("SERVER", "Received command: '" + Command + "'");
|
||||
m_log.Info("[SERVER]: Received command: '" + Command + "'");
|
||||
if (p != null)
|
||||
{
|
||||
for (int i = 0; i < p.Length; i++)
|
||||
{
|
||||
m_log.Notice("SERVER", "Param " + i + ": " + p[i].ToString());
|
||||
m_log.Info("[SERVER]: Param " + i + ": " + p[i].ToString());
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -102,14 +102,9 @@ namespace OpenSim.Grid.ScriptServer
|
|||
{
|
||||
}
|
||||
|
||||
protected LogBase CreateLog()
|
||||
protected ConsoleBase CreateConsole()
|
||||
{
|
||||
if (!Directory.Exists(Util.logDir()))
|
||||
{
|
||||
Directory.CreateDirectory(Util.logDir());
|
||||
}
|
||||
|
||||
return new LogBase((Path.Combine(Util.logDir(), m_logFilename)), "ScriptServer", this, true);
|
||||
return new ConsoleBase("ScriptServer", this);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -35,9 +35,11 @@ namespace OpenUser.Config.UserConfigDb4o
|
|||
{
|
||||
public class Db4oConfigPlugin: IUserConfig
|
||||
{
|
||||
private static readonly log4net.ILog m_log = log4net.LogManager.GetLogger(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType);
|
||||
|
||||
public UserConfig GetConfigObject()
|
||||
{
|
||||
MainLog.Instance.Verbose("DBUSERCONFIG", "Loading Db40Config dll");
|
||||
m_log.Info("[DBUSERCONFIG]: Loading Db40Config dll");
|
||||
return ( new DbUserConfig());
|
||||
}
|
||||
}
|
||||
|
@ -48,13 +50,13 @@ namespace OpenUser.Config.UserConfigDb4o
|
|||
|
||||
public void LoadDefaults()
|
||||
{
|
||||
MainLog.Instance.Notice("DbUserConfig.cs:LoadDefaults() - Please press enter to retain default or enter new settings");
|
||||
m_log.Info("DbUserConfig.cs:LoadDefaults() - Please press enter to retain default or enter new settings");
|
||||
|
||||
this.DefaultStartupMsg = MainLog.Instance.CmdPrompt("Default startup message", "Welcome to OGS");
|
||||
this.DefaultStartupMsg = m_log.CmdPrompt("Default startup message", "Welcome to OGS");
|
||||
|
||||
this.GridServerURL = MainLog.Instance.CmdPrompt("Grid server URL","http://127.0.0.1:" + GridConfig.DefaultHttpPort.ToString() + "/");
|
||||
this.GridSendKey = MainLog.Instance.CmdPrompt("Key to send to grid server","null");
|
||||
this.GridRecvKey = MainLog.Instance.CmdPrompt("Key to expect from grid server","null");
|
||||
this.GridServerURL = m_log.CmdPrompt("Grid server URL","http://127.0.0.1:" + GridConfig.DefaultHttpPort.ToString() + "/");
|
||||
this.GridSendKey = m_log.CmdPrompt("Key to send to grid server","null");
|
||||
this.GridRecvKey = m_log.CmdPrompt("Key to expect from grid server","null");
|
||||
}
|
||||
|
||||
public override void InitConfig()
|
||||
|
@ -65,7 +67,7 @@ namespace OpenUser.Config.UserConfigDb4o
|
|||
IObjectSet result = db.Get(typeof(DbUserConfig));
|
||||
if(result.Count==1)
|
||||
{
|
||||
MainLog.Instance.Verbose("DBUSERCONFIG", "DbUserConfig.cs:InitConfig() - Found a UserConfig object in the local database, loading");
|
||||
m_log.Info("[DBUSERCONFIG]: DbUserConfig.cs:InitConfig() - Found a UserConfig object in the local database, loading");
|
||||
foreach (DbUserConfig cfg in result)
|
||||
{
|
||||
this.GridServerURL=cfg.GridServerURL;
|
||||
|
@ -76,24 +78,24 @@ namespace OpenUser.Config.UserConfigDb4o
|
|||
}
|
||||
else
|
||||
{
|
||||
MainLog.Instance.Verbose("DBUSERCONFIG", "DbUserConfig.cs:InitConfig() - Could not find object in database, loading precompiled defaults");
|
||||
m_log.Info("[DBUSERCONFIG]: DbUserConfig.cs:InitConfig() - Could not find object in database, loading precompiled defaults");
|
||||
LoadDefaults();
|
||||
MainLog.Instance.Verbose("DBUSERCONFIG", "Writing out default settings to local database");
|
||||
m_log.Info("[DBUSERCONFIG]: Writing out default settings to local database");
|
||||
db.Set(this);
|
||||
db.Close();
|
||||
}
|
||||
}
|
||||
catch(Exception e)
|
||||
{
|
||||
MainLog.Instance.Warn("DbUserConfig.cs:InitConfig() - Exception occured");
|
||||
MainLog.Instance.Warn(e.ToString());
|
||||
m_log.Warn("DbUserConfig.cs:InitConfig() - Exception occured");
|
||||
m_log.Warn(e.ToString());
|
||||
}
|
||||
|
||||
MainLog.Instance.Verbose("DBUSERCONFIG", "User settings loaded:");
|
||||
MainLog.Instance.Verbose("DBUSERCONFIG", "Default startup message: " + this.DefaultStartupMsg);
|
||||
MainLog.Instance.Verbose("DBUSERCONFIG", "Grid server URL: " + this.GridServerURL);
|
||||
MainLog.Instance.Verbose("DBUSERCONFIG", "Key to send to grid: " + this.GridSendKey);
|
||||
MainLog.Instance.Verbose("DBUSERCONFIG", "Key to expect from grid: " + this.GridRecvKey);
|
||||
m_log.Info("[DBUSERCONFIG]: User settings loaded:");
|
||||
m_log.Info("[DBUSERCONFIG]: Default startup message: " + this.DefaultStartupMsg);
|
||||
m_log.Info("[DBUSERCONFIG]: Grid server URL: " + this.GridServerURL);
|
||||
m_log.Info("[DBUSERCONFIG]: Key to send to grid: " + this.GridSendKey);
|
||||
m_log.Info("[DBUSERCONFIG]: Key to expect from grid: " + this.GridRecvKey);
|
||||
}
|
||||
|
||||
public void Shutdown()
|
||||
|
|
|
@ -42,6 +42,8 @@ namespace OpenSim.Grid.UserServer
|
|||
/// </summary>
|
||||
public class OpenUser_Main : BaseOpenSimServer, conscmd_callback
|
||||
{
|
||||
private static readonly log4net.ILog m_log = log4net.LogManager.GetLogger(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType);
|
||||
|
||||
private UserConfig Cfg;
|
||||
|
||||
public UserManager m_userManager;
|
||||
|
@ -53,7 +55,9 @@ namespace OpenSim.Grid.UserServer
|
|||
[STAThread]
|
||||
public static void Main(string[] args)
|
||||
{
|
||||
Console.WriteLine("Launching UserServer...");
|
||||
log4net.Config.XmlConfigurator.Configure();
|
||||
|
||||
m_log.Info("Launching UserServer...");
|
||||
|
||||
OpenUser_Main userserver = new OpenUser_Main();
|
||||
|
||||
|
@ -63,22 +67,17 @@ namespace OpenSim.Grid.UserServer
|
|||
|
||||
private OpenUser_Main()
|
||||
{
|
||||
if (!Directory.Exists(Util.logDir()))
|
||||
{
|
||||
Directory.CreateDirectory(Util.logDir());
|
||||
}
|
||||
m_log =
|
||||
new LogBase((Path.Combine(Util.logDir(), "opengrid-userserver-console.log")), "OpenUser", this, true);
|
||||
MainLog.Instance = m_log;
|
||||
m_console = new ConsoleBase("OpenUser", this);
|
||||
MainConsole.Instance = m_console;
|
||||
}
|
||||
|
||||
private void Work()
|
||||
{
|
||||
m_log.Notice("Enter help for a list of commands\n");
|
||||
m_console.Notice("Enter help for a list of commands\n");
|
||||
|
||||
while (true)
|
||||
{
|
||||
m_log.MainLogPrompt();
|
||||
m_console.Prompt();
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -88,7 +87,7 @@ namespace OpenSim.Grid.UserServer
|
|||
|
||||
StatsManager.StartCollectingUserStats();
|
||||
|
||||
MainLog.Instance.Verbose("REGION", "Establishing data connection");
|
||||
m_log.Info("[REGION]: Establishing data connection");
|
||||
m_userManager = new UserManager();
|
||||
m_userManager._config = Cfg;
|
||||
m_userManager.AddPlugin(Cfg.DatabaseProvider);
|
||||
|
@ -96,11 +95,11 @@ namespace OpenSim.Grid.UserServer
|
|||
m_loginService = new UserLoginService(
|
||||
m_userManager, new LibraryRootFolder(), Cfg, Cfg.DefaultStartupMsg);
|
||||
|
||||
m_messagesService = new MessageServersConnector(MainLog.Instance);
|
||||
m_messagesService = new MessageServersConnector();
|
||||
|
||||
m_loginService.OnUserLoggedInAtLocation += NotifyMessageServersUserLoggedInToLocation;
|
||||
|
||||
MainLog.Instance.Verbose("REGION", "Starting HTTP process");
|
||||
m_log.Info("[REGION]: Starting HTTP process");
|
||||
BaseHttpServer httpServer = new BaseHttpServer(Cfg.HttpPort);
|
||||
|
||||
httpServer.AddXmlRPCHandler("login_to_simulator", m_loginService.XmlRpcLoginMethod);
|
||||
|
@ -128,10 +127,9 @@ namespace OpenSim.Grid.UserServer
|
|||
new RestStreamHandler("DELETE", "/usersessions/", m_userManager.RestDeleteUserSessionMethod));
|
||||
|
||||
httpServer.Start();
|
||||
m_log.Status("SERVER", "Userserver 0.4 - Startup complete");
|
||||
m_log.Info("[SERVER]: Userserver 0.4 - Startup complete");
|
||||
}
|
||||
|
||||
|
||||
public void do_create(string what)
|
||||
{
|
||||
switch (what)
|
||||
|
@ -143,11 +141,11 @@ namespace OpenSim.Grid.UserServer
|
|||
uint regX = 1000;
|
||||
uint regY = 1000;
|
||||
|
||||
tempfirstname = m_log.CmdPrompt("First name");
|
||||
templastname = m_log.CmdPrompt("Last name");
|
||||
tempMD5Passwd = m_log.PasswdPrompt("Password");
|
||||
regX = Convert.ToUInt32(m_log.CmdPrompt("Start Region X"));
|
||||
regY = Convert.ToUInt32(m_log.CmdPrompt("Start Region Y"));
|
||||
tempfirstname = m_console.CmdPrompt("First name");
|
||||
templastname = m_console.CmdPrompt("Last name");
|
||||
tempMD5Passwd = m_console.PasswdPrompt("Password");
|
||||
regX = Convert.ToUInt32(m_console.CmdPrompt("Start Region X"));
|
||||
regY = Convert.ToUInt32(m_console.CmdPrompt("Start Region Y"));
|
||||
|
||||
tempMD5Passwd = Util.Md5Hash(Util.Md5Hash(tempMD5Passwd) + ":" + String.Empty);
|
||||
|
||||
|
@ -158,7 +156,7 @@ namespace OpenSim.Grid.UserServer
|
|||
m_userManager.AddUserProfile(tempfirstname, templastname, tempMD5Passwd, regX, regY);
|
||||
} catch (Exception ex)
|
||||
{
|
||||
m_log.Error("SERVER", "Error creating user: {0}", ex.ToString());
|
||||
m_log.Error(String.Format("[SERVER]: Error creating user: {0}", ex.ToString()));
|
||||
}
|
||||
|
||||
try
|
||||
|
@ -168,7 +166,7 @@ namespace OpenSim.Grid.UserServer
|
|||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
m_log.Error("SERVER", "Error creating inventory for user: {0}", ex.ToString());
|
||||
m_log.Error(String.Format("[SERVER]: Error creating inventory for user: {0}", ex.ToString()));
|
||||
}
|
||||
m_lastCreatedUser = userID;
|
||||
break;
|
||||
|
@ -182,9 +180,9 @@ namespace OpenSim.Grid.UserServer
|
|||
switch (cmd)
|
||||
{
|
||||
case "help":
|
||||
m_log.Notice("create user - create a new user");
|
||||
m_log.Notice("stats - statistical information for this server");
|
||||
m_log.Notice("shutdown - shutdown the grid (USE CAUTION!)");
|
||||
m_console.Notice("create user - create a new user");
|
||||
m_console.Notice("stats - statistical information for this server");
|
||||
m_console.Notice("shutdown - shutdown the grid (USE CAUTION!)");
|
||||
break;
|
||||
|
||||
case "create":
|
||||
|
@ -193,12 +191,12 @@ namespace OpenSim.Grid.UserServer
|
|||
|
||||
case "shutdown":
|
||||
m_loginService.OnUserLoggedInAtLocation -= NotifyMessageServersUserLoggedInToLocation;
|
||||
m_log.Close();
|
||||
m_console.Close();
|
||||
Environment.Exit(0);
|
||||
break;
|
||||
|
||||
case "stats":
|
||||
MainLog.Instance.Notice("STATS", Environment.NewLine + StatsManager.UserStats.Report());
|
||||
m_console.Notice(StatsManager.UserStats.Report());
|
||||
break;
|
||||
|
||||
case "test-inventory":
|
||||
|
@ -218,8 +216,9 @@ namespace OpenSim.Grid.UserServer
|
|||
|
||||
public void TestResponse(List<InventoryFolderBase> resp)
|
||||
{
|
||||
Console.WriteLine("response got");
|
||||
m_console.Notice("response got");
|
||||
}
|
||||
|
||||
public void NotifyMessageServersUserLoggedInToLocation(LLUUID agentID, LLUUID sessionID, LLUUID RegionID, ulong regionhandle, LLVector3 Position)
|
||||
{
|
||||
m_messagesService.TellMessageServersAboutUser(agentID, sessionID, RegionID, regionhandle, Position);
|
||||
|
|
|
@ -39,15 +39,14 @@ using OpenSim.Framework.Servers;
|
|||
|
||||
namespace OpenSim.Grid.UserServer
|
||||
{
|
||||
|
||||
public class MessageServersConnector
|
||||
{
|
||||
private LogBase m_log;
|
||||
private static readonly log4net.ILog m_log = log4net.LogManager.GetLogger(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType);
|
||||
|
||||
public Dictionary<string, MessageServerInfo> MessageServers;
|
||||
|
||||
public MessageServersConnector(LogBase log)
|
||||
public MessageServersConnector()
|
||||
{
|
||||
m_log=log;
|
||||
MessageServers = new Dictionary<string, MessageServerInfo>();
|
||||
}
|
||||
|
||||
|
@ -65,7 +64,7 @@ namespace OpenSim.Grid.UserServer
|
|||
{
|
||||
if (!MessageServers.ContainsKey(URI))
|
||||
{
|
||||
m_log.Warn("MSGSERVER", "Got addResponsibleRegion Request for a MessageServer that isn't registered");
|
||||
m_log.Warn("[MSGSERVER]: Got addResponsibleRegion Request for a MessageServer that isn't registered");
|
||||
}
|
||||
else
|
||||
{
|
||||
|
@ -78,7 +77,7 @@ namespace OpenSim.Grid.UserServer
|
|||
{
|
||||
if (!MessageServers.ContainsKey(URI))
|
||||
{
|
||||
m_log.Warn("MSGSERVER", "Got RemoveResponsibleRegion Request for a MessageServer that isn't registered");
|
||||
m_log.Warn("[MSGSERVER]: Got RemoveResponsibleRegion Request for a MessageServer that isn't registered");
|
||||
}
|
||||
else
|
||||
{
|
||||
|
@ -175,10 +174,7 @@ namespace OpenSim.Grid.UserServer
|
|||
|
||||
XmlRpcRequest GridReq = new XmlRpcRequest("login_to_simulator", SendParams);
|
||||
XmlRpcResponse GridResp = GridReq.Send(serv.URI, 6000);
|
||||
m_log.Verbose("LOGIN","Notified : " + serv.URI + " about user login");
|
||||
|
||||
m_log.Info("[LOGIN]: Notified : " + serv.URI + " about user login");
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
}
|
||||
|
|
|
@ -46,9 +46,10 @@ namespace OpenSim.Grid.UserServer
|
|||
{
|
||||
public delegate void UserLoggedInAtLocation(LLUUID agentID, LLUUID sessionID, LLUUID RegionID, ulong regionhandle, LLVector3 Position);
|
||||
|
||||
|
||||
public class UserLoginService : LoginService
|
||||
{
|
||||
private static readonly log4net.ILog m_log = log4net.LogManager.GetLogger(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType);
|
||||
|
||||
public event UserLoggedInAtLocation OnUserLoggedInAtLocation;
|
||||
|
||||
public UserConfig m_config;
|
||||
|
@ -70,7 +71,7 @@ namespace OpenSim.Grid.UserServer
|
|||
{
|
||||
bool tryDefault = false;
|
||||
//CFK: Since the try is always "tried", the "Home Location" message should always appear, so comment this one.
|
||||
//CFK: MainLog.Instance.Verbose("LOGIN", "Load information from the gridserver");
|
||||
//CFK: m_log.Info("[LOGIN]: Load information from the gridserver");
|
||||
RegionProfileData SimInfo = new RegionProfileData();
|
||||
try
|
||||
{
|
||||
|
@ -80,7 +81,7 @@ namespace OpenSim.Grid.UserServer
|
|||
|
||||
// Customise the response
|
||||
//CFK: This is redundant and the next message should always appear.
|
||||
//CFK: MainLog.Instance.Verbose("LOGIN", "Home Location");
|
||||
//CFK: m_log.Info("[LOGIN]: Home Location");
|
||||
response.Home = "{'region_handle':[r" + (SimInfo.regionLocX*256).ToString() + ",r" +
|
||||
(SimInfo.regionLocY*256).ToString() + "], " +
|
||||
"'position':[r" + theUser.homeLocation.X.ToString() + ",r" +
|
||||
|
@ -91,7 +92,7 @@ namespace OpenSim.Grid.UserServer
|
|||
// Destination
|
||||
//CFK: The "Notifying" message always seems to appear, so subsume the data from this message into
|
||||
//CFK: the next one for X & Y and comment this one.
|
||||
//CFK: MainLog.Instance.Verbose("LOGIN", "CUSTOMISERESPONSE: Region X: " + SimInfo.regionLocX +
|
||||
//CFK: m_log.Info("[LOGIN]: CUSTOMISERESPONSE: Region X: " + SimInfo.regionLocX +
|
||||
//CFK: "; Region Y: " + SimInfo.regionLocY);
|
||||
response.SimAddress = Util.GetHostFromDNS(SimInfo.serverIP).ToString();
|
||||
response.SimPort = (uint) SimInfo.serverPort;
|
||||
|
@ -105,7 +106,7 @@ namespace OpenSim.Grid.UserServer
|
|||
// Notify the target of an incoming user
|
||||
//CFK: The "Notifying" message always seems to appear, so subsume the data from this message into
|
||||
//CFK: the next one for X & Y and comment this one.
|
||||
//CFK: MainLog.Instance.Verbose("LOGIN", SimInfo.regionName + " (" + SimInfo.serverURI + ") " +
|
||||
//CFK: m_log.Info("[LOGIN]: " + SimInfo.regionName + " (" + SimInfo.serverURI + ") " +
|
||||
//CFK: SimInfo.regionLocX + "," + SimInfo.regionLocY);
|
||||
|
||||
// Prepare notification
|
||||
|
@ -128,7 +129,7 @@ namespace OpenSim.Grid.UserServer
|
|||
theUser.currentAgent.currentRegion = SimInfo.UUID;
|
||||
theUser.currentAgent.currentHandle = SimInfo.regionHandle;
|
||||
|
||||
MainLog.Instance.Verbose("LOGIN", SimInfo.regionName + " @ " + SimInfo.httpServerURI + " " +
|
||||
m_log.Info("[LOGIN]: " + SimInfo.regionName + " @ " + SimInfo.httpServerURI + " " +
|
||||
SimInfo.regionLocX + "," + SimInfo.regionLocY);
|
||||
|
||||
XmlRpcRequest GridReq = new XmlRpcRequest("expect_user", SendParams);
|
||||
|
@ -145,9 +146,8 @@ namespace OpenSim.Grid.UserServer
|
|||
|
||||
ulong defaultHandle = (((ulong) m_config.DefaultX*256) << 32) | ((ulong) m_config.DefaultY*256);
|
||||
|
||||
MainLog.Instance.Warn(
|
||||
"LOGIN",
|
||||
"Home region not available: sending to default " + defaultHandle.ToString());
|
||||
m_log.Warn(
|
||||
"[LOGIN]: Home region not available: sending to default " + defaultHandle.ToString());
|
||||
|
||||
SimInfo = new RegionProfileData();
|
||||
try
|
||||
|
@ -157,7 +157,7 @@ namespace OpenSim.Grid.UserServer
|
|||
m_config.GridSendKey, m_config.GridRecvKey);
|
||||
|
||||
// Customise the response
|
||||
MainLog.Instance.Verbose("LOGIN", "Home Location");
|
||||
m_log.Info("[LOGIN]: Home Location");
|
||||
response.Home = "{'region_handle':[r" + (SimInfo.regionLocX*256).ToString() + ",r" +
|
||||
(SimInfo.regionLocY*256).ToString() + "], " +
|
||||
"'position':[r" + theUser.homeLocation.X.ToString() + ",r" +
|
||||
|
@ -166,9 +166,9 @@ namespace OpenSim.Grid.UserServer
|
|||
theUser.homeLocation.Y.ToString() + ",r" + theUser.homeLocation.Z.ToString() + "]}";
|
||||
|
||||
// Destination
|
||||
MainLog.Instance.Verbose("LOGIN",
|
||||
"CUSTOMISERESPONSE: Region X: " + SimInfo.regionLocX + "; Region Y: " +
|
||||
SimInfo.regionLocY);
|
||||
m_log.Info("[LOGIN]: " +
|
||||
"CUSTOMISERESPONSE: Region X: " + SimInfo.regionLocX + "; Region Y: " +
|
||||
SimInfo.regionLocY);
|
||||
response.SimAddress = Util.GetHostFromDNS(SimInfo.serverIP).ToString();
|
||||
response.SimPort = (uint) SimInfo.serverPort;
|
||||
response.RegionX = SimInfo.regionLocX;
|
||||
|
@ -179,7 +179,7 @@ namespace OpenSim.Grid.UserServer
|
|||
response.SeedCapability = SimInfo.httpServerURI + "CAPS/" + capsPath + "0000/";
|
||||
|
||||
// Notify the target of an incoming user
|
||||
MainLog.Instance.Verbose("LOGIN", "Notifying " + SimInfo.regionName + " (" + SimInfo.serverURI + ")");
|
||||
m_log.Info("[LOGIN]: Notifying " + SimInfo.regionName + " (" + SimInfo.serverURI + ")");
|
||||
|
||||
// Update agent with target sim
|
||||
theUser.currentAgent.currentRegion = SimInfo.UUID;
|
||||
|
@ -201,7 +201,7 @@ namespace OpenSim.Grid.UserServer
|
|||
ArrayList SendParams = new ArrayList();
|
||||
SendParams.Add(SimParams);
|
||||
|
||||
MainLog.Instance.Verbose("LOGIN", "Informing region at " + SimInfo.httpServerURI);
|
||||
m_log.Info("[LOGIN]: Informing region at " + SimInfo.httpServerURI);
|
||||
// Send
|
||||
XmlRpcRequest GridReq = new XmlRpcRequest("expect_user", SendParams);
|
||||
XmlRpcResponse GridResp = GridReq.Send(SimInfo.httpServerURI, 6000);
|
||||
|
@ -213,8 +213,8 @@ namespace OpenSim.Grid.UserServer
|
|||
|
||||
catch (Exception e)
|
||||
{
|
||||
MainLog.Instance.Warn("LOGIN", "Default region also not available");
|
||||
MainLog.Instance.Warn("LOGIN", e.ToString());
|
||||
m_log.Warn("[LOGIN]: Default region also not available");
|
||||
m_log.Warn("[LOGIN]: " + e.ToString());
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -230,8 +230,8 @@ namespace OpenSim.Grid.UserServer
|
|||
// which does.
|
||||
if (null == folders | folders.Count == 0)
|
||||
{
|
||||
MainLog.Instance.Warn(
|
||||
"LOGIN",
|
||||
m_log.Warn(
|
||||
"[LOGIN]: " +
|
||||
"A root inventory folder for user ID " + userID + " was not found. A new set"
|
||||
+ " of empty inventory folders is being created.");
|
||||
|
||||
|
@ -269,8 +269,8 @@ namespace OpenSim.Grid.UserServer
|
|||
}
|
||||
else
|
||||
{
|
||||
MainLog.Instance.Warn("LOGIN", "The root inventory folder could still not be retrieved" +
|
||||
" for user ID " + userID);
|
||||
m_log.Warn("[LOGIN]: The root inventory folder could still not be retrieved" +
|
||||
" for user ID " + userID);
|
||||
|
||||
AgentInventory userInventory = new AgentInventory();
|
||||
userInventory.CreateRootFolder(userID, false);
|
||||
|
|
|
@ -39,6 +39,8 @@ namespace OpenSim.Grid.UserServer
|
|||
{
|
||||
public class UserManager : UserManagerBase
|
||||
{
|
||||
private static readonly log4net.ILog m_log = log4net.LogManager.GetLogger(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType);
|
||||
|
||||
/// <summary>
|
||||
/// Deletes an active agent session
|
||||
/// </summary>
|
||||
|
@ -106,6 +108,7 @@ namespace OpenSim.Grid.UserServer
|
|||
|
||||
return response;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Converts a user profile to an XML element which can be returned
|
||||
/// </summary>
|
||||
|
@ -202,7 +205,6 @@ namespace OpenSim.Grid.UserServer
|
|||
responseData["returnString"] = returnString;
|
||||
response.Value = responseData;
|
||||
return response;
|
||||
|
||||
}
|
||||
|
||||
public XmlRpcResponse XmlRpcResponseXmlRPCUpdateUserFriendPerms(XmlRpcRequest request)
|
||||
|
@ -212,8 +214,6 @@ namespace OpenSim.Grid.UserServer
|
|||
Hashtable responseData = new Hashtable();
|
||||
string returnString = "FALSE";
|
||||
|
||||
|
||||
|
||||
if (requestData.Contains("ownerID") && requestData.Contains("friendID") && requestData.Contains("friendPerms"))
|
||||
{
|
||||
UpdateUserFriendPerms(new LLUUID((string)requestData["ownerID"]), new LLUUID((string)requestData["friendID"]), (uint)Convert.ToInt32((string)requestData["friendPerms"]));
|
||||
|
@ -233,8 +233,6 @@ namespace OpenSim.Grid.UserServer
|
|||
|
||||
List<FriendListItem> returndata = new List<FriendListItem>();
|
||||
|
||||
|
||||
|
||||
if (requestData.Contains("ownerID"))
|
||||
{
|
||||
returndata = this.GetUserFriendList(new LLUUID((string)requestData["ownerID"]));
|
||||
|
@ -309,7 +307,6 @@ namespace OpenSim.Grid.UserServer
|
|||
return CreateUnknownUserErrorResponse();
|
||||
}
|
||||
|
||||
|
||||
return ProfileToXmlRPCResponse(userProfile);
|
||||
}
|
||||
|
||||
|
@ -318,7 +315,6 @@ namespace OpenSim.Grid.UserServer
|
|||
XmlRpcResponse response = new XmlRpcResponse();
|
||||
Hashtable requestData = (Hashtable)request.Params[0];
|
||||
|
||||
|
||||
UserProfileData userProfile;
|
||||
|
||||
if (requestData.Contains("avatar_uuid"))
|
||||
|
@ -336,17 +332,15 @@ namespace OpenSim.Grid.UserServer
|
|||
}
|
||||
catch (FormatException)
|
||||
{
|
||||
OpenSim.Framework.Console.MainLog.Instance.Warn("LOGOUT", "Error in Logout XMLRPC Params");
|
||||
m_log.Warn("[LOGOUT]: Error in Logout XMLRPC Params");
|
||||
return response;
|
||||
}
|
||||
|
||||
}
|
||||
else
|
||||
{
|
||||
return CreateUnknownUserErrorResponse();
|
||||
}
|
||||
|
||||
|
||||
return response;
|
||||
}
|
||||
|
||||
|
|
|
@ -35,17 +35,20 @@ namespace OpenSim
|
|||
{
|
||||
public class Application
|
||||
{
|
||||
private static readonly log4net.ILog m_log = log4net.LogManager.GetLogger(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType);
|
||||
|
||||
public static string iniFilePath = "";
|
||||
|
||||
//could move our main function into OpenSimMain and kill this class
|
||||
[STAThread]
|
||||
public static void Main(string[] args)
|
||||
{
|
||||
log4net.Config.XmlConfigurator.Configure();
|
||||
|
||||
AppDomain.CurrentDomain.UnhandledException += new UnhandledExceptionEventHandler(CurrentDomain_UnhandledException);
|
||||
|
||||
Console.WriteLine("OpenSim " + VersionInfo.Version + "\n");
|
||||
|
||||
|
||||
Console.Write("Performing compatibility checks... ");
|
||||
string supported = String.Empty;
|
||||
if (Util.IsEnvironmentSupported(ref supported))
|
||||
|
@ -75,11 +78,10 @@ namespace OpenSim
|
|||
OpenSimMain sim = new OpenSimMain(configSource);
|
||||
|
||||
sim.StartUp();
|
||||
|
||||
|
||||
while (true)
|
||||
{
|
||||
MainLog.Instance.MainLogPrompt();
|
||||
MainConsole.Instance.Prompt();
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -112,7 +114,7 @@ namespace OpenSim
|
|||
|
||||
// Do we not always want to see exception messages?
|
||||
// if (e.IsTerminating)
|
||||
MainLog.Instance.Error("APPLICATION", msg);
|
||||
MainConsole.Instance.Error("[APPLICATION]: " + msg);
|
||||
|
||||
// Try to post errormessage to an URL
|
||||
try
|
||||
|
@ -131,6 +133,5 @@ namespace OpenSim
|
|||
|
||||
_IsHandlingException=false;
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
|
|
@ -55,6 +55,8 @@ namespace OpenSim
|
|||
|
||||
public class OpenSimMain : RegionApplicationBase, conscmd_callback
|
||||
{
|
||||
private static readonly log4net.ILog m_log = log4net.LogManager.GetLogger(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType);
|
||||
|
||||
private const string DEFAULT_PRIM_BACKUP_FILENAME = "prim-backup.xml";
|
||||
|
||||
public string m_physicsEngine;
|
||||
|
@ -77,7 +79,6 @@ namespace OpenSim
|
|||
|
||||
private bool m_verbose;
|
||||
private bool m_physicalPrim;
|
||||
private readonly string m_logFilename = "region-console.log";
|
||||
private bool m_permissions = false;
|
||||
|
||||
private bool m_standaloneAuthenticate = false;
|
||||
|
@ -146,9 +147,7 @@ namespace OpenSim
|
|||
{
|
||||
// no default config files, so set default values, and save it
|
||||
m_config.Merge(DefaultConfig());
|
||||
|
||||
m_config.Merge(configSource);
|
||||
|
||||
m_config.Save(Application.iniFilePath);
|
||||
}
|
||||
}
|
||||
|
@ -233,6 +232,8 @@ namespace OpenSim
|
|||
m_sandbox = !startupConfig.GetBoolean("gridmode", false);
|
||||
m_physicsEngine = startupConfig.GetString("physics", "basicphysics");
|
||||
m_meshEngineName = startupConfig.GetString("meshing", "ZeroMesher");
|
||||
|
||||
// TODO: since log4net changes, verbose flag doesn't do anything
|
||||
m_verbose = startupConfig.GetBoolean("verbose", true);
|
||||
|
||||
m_physicalPrim = startupConfig.GetBoolean("physical_prim", true);
|
||||
|
@ -280,7 +281,6 @@ namespace OpenSim
|
|||
//if (!m_sandbox)
|
||||
//m_SendChildAgentTaskData = false;
|
||||
|
||||
|
||||
m_networkServersInfo.loadFromConfiguration(m_config);
|
||||
}
|
||||
|
||||
|
@ -293,16 +293,8 @@ namespace OpenSim
|
|||
// Called from app startup (OpenSim.Application)
|
||||
//
|
||||
|
||||
|
||||
// Create log directory if it doesn't exist
|
||||
if (!Directory.Exists(Util.logDir()))
|
||||
{
|
||||
Directory.CreateDirectory(Util.logDir());
|
||||
}
|
||||
|
||||
// Create a log instance
|
||||
m_log = CreateLog();
|
||||
MainLog.Instance = m_log;
|
||||
m_console = CreateConsole();
|
||||
MainConsole.Instance = m_console;
|
||||
|
||||
StatsManager.StartCollectingSimExtraStats();
|
||||
|
||||
|
@ -311,7 +303,6 @@ namespace OpenSim
|
|||
// This base will call abstract Initialize
|
||||
base.StartUp();
|
||||
|
||||
|
||||
// StandAlone mode? m_sandbox is determined by !startupConfig.GetBoolean("gridmode", false)
|
||||
if (m_sandbox)
|
||||
{
|
||||
|
@ -357,10 +348,10 @@ namespace OpenSim
|
|||
}
|
||||
|
||||
// Create a ModuleLoader instance
|
||||
m_moduleLoader = new ModuleLoader(m_log, m_config);
|
||||
m_moduleLoader = new ModuleLoader(m_config);
|
||||
|
||||
ExtensionNodeList nodes = AddinManager.GetExtensionNodes("/OpenSim/Startup");
|
||||
m_log.Verbose("PLUGINS", "Loading {0} OpenSim application plugins", nodes.Count);
|
||||
m_log.Info(String.Format("[PLUGINS]: Loading {0} OpenSim application plugins", nodes.Count));
|
||||
|
||||
foreach (TypeExtensionNode node in nodes)
|
||||
{
|
||||
|
@ -383,7 +374,7 @@ namespace OpenSim
|
|||
}
|
||||
else
|
||||
{
|
||||
m_log.Verbose("STARTUP", "No startup command script specified. Moving on...");
|
||||
m_log.Info("[STARTUP]: No startup command script specified. Moving on...");
|
||||
}
|
||||
|
||||
// Start timer script (run a script every xx seconds)
|
||||
|
@ -396,10 +387,7 @@ namespace OpenSim
|
|||
}
|
||||
|
||||
// We are done with startup
|
||||
m_log.Status("STARTUP",
|
||||
"Startup complete, serving " + m_udpServers.Count.ToString() + " region(s)");
|
||||
|
||||
// When we return now we will be in a wait for input command loop.
|
||||
m_log.Info("[STARTUP]: Startup complete, serving " + m_udpServers.Count.ToString() + " region(s)");
|
||||
}
|
||||
|
||||
protected override void Initialize()
|
||||
|
@ -433,8 +421,9 @@ namespace OpenSim
|
|||
assetServer = sqlAssetServer;
|
||||
}
|
||||
|
||||
m_assetCache = new AssetCache(assetServer, m_log);
|
||||
m_assetCache = new AssetCache(assetServer);
|
||||
// m_assetCache = new assetCache("OpenSim.Region.GridInterfaces.Local.dll", m_networkServersInfo.AssetURL, m_networkServersInfo.AssetSendKey);
|
||||
|
||||
m_sceneManager.OnRestartSim += handleRestartRegion;
|
||||
}
|
||||
|
||||
|
@ -448,23 +437,23 @@ namespace OpenSim
|
|||
UDPServer udpServer;
|
||||
Scene scene = SetupScene(regionInfo, out udpServer, m_permissions);
|
||||
|
||||
m_log.Verbose("MODULES", "Loading Region's modules");
|
||||
m_log.Info("[MODULES]: Loading Region's modules");
|
||||
|
||||
m_moduleLoader.PickupModules(scene, ".");
|
||||
//m_moduleLoader.PickupModules(scene, "ScriptEngines");
|
||||
//m_moduleLoader.LoadRegionModules(Path.Combine("ScriptEngines", m_scriptEngine), scene);
|
||||
m_log.Verbose("MODULES", "Loading scripting engine modules");
|
||||
m_log.Info("[MODULES]: Loading scripting engine modules");
|
||||
foreach (string module in m_scriptEngine.Split(','))
|
||||
{
|
||||
string mod = module.Trim(" \t".ToCharArray()); // Clean up name
|
||||
m_log.Verbose("MODULES", "Loading scripting engine: " + mod);
|
||||
m_log.Info("[MODULES]: Loading scripting engine: " + mod);
|
||||
try
|
||||
{
|
||||
m_moduleLoader.LoadRegionModules(Path.Combine("ScriptEngines", mod), scene);
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
m_log.Error("MODULES", "Failed to load script engine: " + ex.ToString());
|
||||
m_log.Error("[MODULES]: Failed to load script engine: " + ex.ToString());
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -503,8 +492,7 @@ namespace OpenSim
|
|||
SceneCommunicationService sceneGridService = new SceneCommunicationService(m_commsManager);
|
||||
if (m_SendChildAgentTaskData)
|
||||
{
|
||||
m_log.Error("WARNING",
|
||||
"Send Child Agent Task Updates is enabled. This is for testing only.");
|
||||
m_log.Error("[WARNING]: Send Child Agent Task Updates is enabled. This is for testing only.");
|
||||
//Thread.Sleep(12000);
|
||||
}
|
||||
return
|
||||
|
@ -516,7 +504,7 @@ namespace OpenSim
|
|||
|
||||
public void handleRestartRegion(RegionInfo whichRegion)
|
||||
{
|
||||
m_log.Error("MAIN", "Got restart signal from SceneManager");
|
||||
m_log.Error("[MAIN]: Got restart signal from SceneManager");
|
||||
// Shutting down the UDP server
|
||||
bool foundUDPServer = false;
|
||||
int UDPServerElement = 0;
|
||||
|
@ -557,14 +545,9 @@ namespace OpenSim
|
|||
//m_sceneManager.SendSimOnlineNotification(restartingRegion.RegionHandle);
|
||||
}
|
||||
|
||||
protected override LogBase CreateLog()
|
||||
protected override ConsoleBase CreateConsole()
|
||||
{
|
||||
if (!Directory.Exists(Util.logDir()))
|
||||
{
|
||||
Directory.CreateDirectory(Util.logDir());
|
||||
}
|
||||
|
||||
return new LogBase((Path.Combine(Util.logDir(), m_logFilename)), "Region", this, m_verbose);
|
||||
return new ConsoleBase("Region", this);
|
||||
}
|
||||
|
||||
# region Setup methods
|
||||
|
@ -609,15 +592,15 @@ namespace OpenSim
|
|||
RunCommandScript(m_shutdownCommandsFile);
|
||||
}
|
||||
|
||||
m_log.Verbose("SHUTDOWN", "Closing all threads");
|
||||
m_log.Verbose("SHUTDOWN", "Killing listener thread");
|
||||
m_log.Verbose("SHUTDOWN", "Killing clients");
|
||||
m_log.Info("[SHUTDOWN]: Closing all threads");
|
||||
m_log.Info("[SHUTDOWN]: Killing listener thread");
|
||||
m_log.Info("[SHUTDOWN]: Killing clients");
|
||||
// TODO: implement this
|
||||
m_log.Verbose("SHUTDOWN", "Closing console and terminating");
|
||||
m_log.Info("[SHUTDOWN]: Closing console and terminating");
|
||||
|
||||
m_sceneManager.Close();
|
||||
|
||||
m_log.Close();
|
||||
m_console.Close();
|
||||
Environment.Exit(0);
|
||||
}
|
||||
|
||||
|
@ -637,7 +620,7 @@ namespace OpenSim
|
|||
/// <param name="fileName"></param>
|
||||
private void RunCommandScript(string fileName)
|
||||
{
|
||||
m_log.Verbose("COMMANDFILE", "Running " + fileName);
|
||||
m_log.Info("[COMMANDFILE]: Running " + fileName);
|
||||
if (File.Exists(fileName))
|
||||
{
|
||||
StreamReader readFile = File.OpenText(fileName);
|
||||
|
@ -646,14 +629,14 @@ namespace OpenSim
|
|||
{
|
||||
if (currentCommand != String.Empty)
|
||||
{
|
||||
m_log.Verbose("COMMANDFILE", "Running '" + currentCommand + "'");
|
||||
m_log.MainLogRunCommand(currentCommand);
|
||||
m_log.Info("[COMMANDFILE]: Running '" + currentCommand + "'");
|
||||
m_console.RunCommand(currentCommand);
|
||||
}
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
m_log.Error("COMMANDFILE", "Command script missing. Can not run commands");
|
||||
m_log.Error("[COMMANDFILE]: Command script missing. Can not run commands");
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -673,7 +656,7 @@ namespace OpenSim
|
|||
break;
|
||||
|
||||
case "force-update":
|
||||
Console.WriteLine("Updating all clients");
|
||||
m_console.Notice("Updating all clients");
|
||||
m_sceneManager.ForceCurrentSceneClientUpdate();
|
||||
break;
|
||||
|
||||
|
@ -692,36 +675,36 @@ namespace OpenSim
|
|||
break;
|
||||
|
||||
case "help":
|
||||
m_log.Notice("alert - send alert to a designated user or all users.");
|
||||
m_log.Notice(" alert [First] [Last] [Message] - send an alert to a user. Case sensitive.");
|
||||
m_log.Notice(" alert general [Message] - send an alert to all users.");
|
||||
m_log.Notice("backup - trigger a simulator backup");
|
||||
m_log.Notice("create user - adds a new user");
|
||||
m_log.Notice("change-region [name] - sets the region that many of these commands affect.");
|
||||
m_log.Notice("command-script [filename] - Execute command in a file.");
|
||||
m_log.Notice("debug - debugging commands");
|
||||
m_log.Notice(" packet 0..255 - print incoming/outgoing packets (0=off)");
|
||||
m_log.Notice("edit-scale [prim name] [x] [y] [z] - resize given prim");
|
||||
m_log.Notice("export-map [filename] - save image of world map");
|
||||
m_log.Notice("force-update - force an update of prims in the scene");
|
||||
m_log.Notice("load-xml [filename] - load prims from XML");
|
||||
m_log.Notice("load-xml2 [filename] - load prims from XML using version 2 format");
|
||||
m_log.Notice("permissions [true/false] - turn on/off permissions on the scene");
|
||||
m_log.Notice("quit - equivalent to shutdown.");
|
||||
m_log.Notice("restart - disconnects all clients and restarts the sims in the instance.");
|
||||
m_log.Notice("remove-region [name] - remove a region");
|
||||
m_log.Notice("save-xml [filename] - save prims to XML");
|
||||
m_log.Notice("save-xml2 [filename] - save prims to XML using version 2 format");
|
||||
m_log.Notice("script - manually trigger scripts? or script commands?");
|
||||
m_log.Notice("set-time [x] - set the current scene time phase");
|
||||
m_log.Notice("show users - show info about connected users.");
|
||||
m_log.Notice("show modules - shows info aboutloaded modules.");
|
||||
m_log.Notice("show stats - statistical information for this server not displayed in the client");
|
||||
m_log.Notice("shutdown - disconnect all clients and shutdown.");
|
||||
m_log.Notice("config set section field value - set a config value");
|
||||
m_log.Notice("config get section field - get a config value");
|
||||
m_log.Notice("config save - save OpenSim.ini");
|
||||
m_log.Notice("terrain help - show help for terrain commands.");
|
||||
m_console.Notice("alert - send alert to a designated user or all users.");
|
||||
m_console.Notice(" alert [First] [Last] [Message] - send an alert to a user. Case sensitive.");
|
||||
m_console.Notice(" alert general [Message] - send an alert to all users.");
|
||||
m_console.Notice("backup - trigger a simulator backup");
|
||||
m_console.Notice("create user - adds a new user");
|
||||
m_console.Notice("change-region [name] - sets the region that many of these commands affect.");
|
||||
m_console.Notice("command-script [filename] - Execute command in a file.");
|
||||
m_console.Notice("debug - debugging commands");
|
||||
m_console.Notice(" packet 0..255 - print incoming/outgoing packets (0=off)");
|
||||
m_console.Notice("edit-scale [prim name] [x] [y] [z] - resize given prim");
|
||||
m_console.Notice("export-map [filename] - save image of world map");
|
||||
m_console.Notice("force-update - force an update of prims in the scene");
|
||||
m_console.Notice("load-xml [filename] - load prims from XML");
|
||||
m_console.Notice("load-xml2 [filename] - load prims from XML using version 2 format");
|
||||
m_console.Notice("permissions [true/false] - turn on/off permissions on the scene");
|
||||
m_console.Notice("quit - equivalent to shutdown.");
|
||||
m_console.Notice("restart - disconnects all clients and restarts the sims in the instance.");
|
||||
m_console.Notice("remove-region [name] - remove a region");
|
||||
m_console.Notice("save-xml [filename] - save prims to XML");
|
||||
m_console.Notice("save-xml2 [filename] - save prims to XML using version 2 format");
|
||||
m_console.Notice("script - manually trigger scripts? or script commands?");
|
||||
m_console.Notice("set-time [x] - set the current scene time phase");
|
||||
m_console.Notice("show users - show info about connected users.");
|
||||
m_console.Notice("show modules - shows info aboutloaded modules.");
|
||||
m_console.Notice("show stats - statistical information for this server not displayed in the client");
|
||||
m_console.Notice("shutdown - disconnect all clients and shutdown.");
|
||||
m_console.Notice("config set section field value - set a config value");
|
||||
m_console.Notice("config get section field - get a config value");
|
||||
m_console.Notice("config save - save OpenSim.ini");
|
||||
m_console.Notice("terrain help - show help for terrain commands.");
|
||||
break;
|
||||
|
||||
case "save-xml":
|
||||
|
@ -757,8 +740,8 @@ namespace OpenSim
|
|||
{
|
||||
loadOffset.Z = (float) Convert.ToDecimal(cmdparams[4]);
|
||||
}
|
||||
m_log.Error("loadOffsets <X,Y,Z> = <" + loadOffset.X + "," + loadOffset.Y + "," +
|
||||
loadOffset.Z + ">");
|
||||
m_console.Error("loadOffsets <X,Y,Z> = <" + loadOffset.X + "," + loadOffset.Y + "," +
|
||||
loadOffset.Z + ">");
|
||||
}
|
||||
}
|
||||
m_sceneManager.LoadCurrentSceneFromXml(cmdparams[0], generateNewIDS, loadOffset);
|
||||
|
@ -796,7 +779,7 @@ namespace OpenSim
|
|||
|
||||
if (!m_sceneManager.RunTerrainCmdOnCurrentScene(cmdparams, ref result))
|
||||
{
|
||||
m_log.Error(result);
|
||||
m_console.Error(result);
|
||||
}
|
||||
break;
|
||||
|
||||
|
@ -867,20 +850,18 @@ namespace OpenSim
|
|||
|
||||
if (!m_sceneManager.TrySetCurrentScene(regionName))
|
||||
{
|
||||
m_log.Error("Couldn't set current region to: " + regionName);
|
||||
m_console.Error("Couldn't set current region to: " + regionName);
|
||||
}
|
||||
}
|
||||
|
||||
if (m_sceneManager.CurrentScene == null)
|
||||
{
|
||||
m_log.Notice("CONSOLE",
|
||||
"Currently at Root level. To change region please use 'change-region <regioname>'");
|
||||
m_console.Error("CONSOLE", "Currently at Root level. To change region please use 'change-region <regioname>'");
|
||||
}
|
||||
else
|
||||
{
|
||||
m_log.Notice("CONSOLE",
|
||||
"Current Region: " + m_sceneManager.CurrentScene.RegionInfo.RegionName +
|
||||
". To change region please use 'change-region <regioname>'");
|
||||
m_console.Error("CONSOLE", "Current Region: " + m_sceneManager.CurrentScene.RegionInfo.RegionName +
|
||||
". To change region please use 'change-region <regioname>'");
|
||||
}
|
||||
|
||||
break;
|
||||
|
@ -905,8 +886,8 @@ namespace OpenSim
|
|||
case "set":
|
||||
if (cmdparams.Length < 4)
|
||||
{
|
||||
m_log.Notice(n, "SYNTAX: " + n + " SET SECTION KEY VALUE");
|
||||
m_log.Notice(n, "EXAMPLE: " + n + " SET ScriptEngine.DotNetEngine NumberOfScriptThreads 5");
|
||||
m_console.Error(n, "SYNTAX: " + n + " SET SECTION KEY VALUE");
|
||||
m_console.Error(n, "EXAMPLE: " + n + " SET ScriptEngine.DotNetEngine NumberOfScriptThreads 5");
|
||||
}
|
||||
else
|
||||
{
|
||||
|
@ -916,37 +897,35 @@ namespace OpenSim
|
|||
string _value = String.Join(" ", cmdparams, 3, cmdparams.Length - 3);
|
||||
c.Set(cmdparams[2], _value);
|
||||
m_config.Merge(c.ConfigSource);
|
||||
|
||||
m_log.Notice(n,
|
||||
n + " " + n + " " + cmdparams[1] + " " + cmdparams[2] + " " +
|
||||
_value);
|
||||
|
||||
m_console.Error(n, n + " " + n + " " + cmdparams[1] + " " + cmdparams[2] + " " +
|
||||
_value);
|
||||
}
|
||||
break;
|
||||
case "get":
|
||||
if (cmdparams.Length < 3)
|
||||
{
|
||||
m_log.Notice(n, "SYNTAX: " + n + " GET SECTION KEY");
|
||||
m_log.Notice(n, "EXAMPLE: " + n + " GET ScriptEngine.DotNetEngine NumberOfScriptThreads");
|
||||
m_console.Error(n, "SYNTAX: " + n + " GET SECTION KEY");
|
||||
m_console.Error(n, "EXAMPLE: " + n + " GET ScriptEngine.DotNetEngine NumberOfScriptThreads");
|
||||
}
|
||||
else
|
||||
{
|
||||
IConfig c = DefaultConfig().Configs[cmdparams[1]];
|
||||
if (c == null)
|
||||
{
|
||||
m_log.Notice(n, "Section \"" + cmdparams[1] + "\" does not exist.");
|
||||
m_console.Notice(n, "Section \"" + cmdparams[1] + "\" does not exist.");
|
||||
break;
|
||||
}
|
||||
else
|
||||
{
|
||||
m_log.Notice(n,
|
||||
n + " GET " + cmdparams[1] + " " + cmdparams[2] + ": " +
|
||||
c.GetString(cmdparams[2]));
|
||||
m_console.Notice(n + " GET " + cmdparams[1] + " " + cmdparams[2] + ": " +
|
||||
c.GetString(cmdparams[2]));
|
||||
}
|
||||
}
|
||||
|
||||
break;
|
||||
case "save":
|
||||
m_log.Notice(n, "Saving configuration file: " + Application.iniFilePath);
|
||||
m_console.Notice("Saving configuration file: " + Application.iniFilePath);
|
||||
m_config.Save(Application.iniFilePath);
|
||||
break;
|
||||
}
|
||||
|
@ -957,7 +936,7 @@ namespace OpenSim
|
|||
* Temporarily disabled but it would be good to have this - needs to be levered
|
||||
* in to BaseOpenSimServer (which requires a RunCmd method restrcuture probably)
|
||||
default:
|
||||
m_log.Error("Unknown command");
|
||||
m_console.Error("Unknown command");
|
||||
break;
|
||||
*/
|
||||
}
|
||||
|
@ -973,18 +952,18 @@ namespace OpenSim
|
|||
int newDebug;
|
||||
if (int.TryParse(args[1], out newDebug))
|
||||
{
|
||||
m_sceneManager.SetDebugPacketOnCurrentScene(m_log, newDebug);
|
||||
m_sceneManager.SetDebugPacketOnCurrentScene(newDebug);
|
||||
}
|
||||
else
|
||||
{
|
||||
m_log.Error("packet debug should be 0..2");
|
||||
m_console.Error("packet debug should be 0..2");
|
||||
}
|
||||
Console.WriteLine("New packet debug: " + newDebug.ToString());
|
||||
m_console.Notice("New packet debug: " + newDebug.ToString());
|
||||
}
|
||||
|
||||
break;
|
||||
default:
|
||||
m_log.Error("Unknown debug");
|
||||
m_console.Error("Unknown debug");
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
@ -997,7 +976,7 @@ namespace OpenSim
|
|||
switch (ShowWhat)
|
||||
{
|
||||
case "users":
|
||||
m_log.Notice(
|
||||
m_console.Notice(
|
||||
String.Format("{0,-16}{1,-16}{2,-37}{3,-16}{4,-22}{5,-16}", "Firstname", "Lastname",
|
||||
"Agent ID", "Circuit", "IP", "Region"));
|
||||
|
||||
|
@ -1015,6 +994,7 @@ namespace OpenSim
|
|||
{
|
||||
regionName = regionInfo.RegionName;
|
||||
}
|
||||
|
||||
for (int i = 0; i < m_udpServers.Count; i++)
|
||||
{
|
||||
if (m_udpServers[i].RegionHandle == presence.RegionHandle)
|
||||
|
@ -1023,7 +1003,8 @@ namespace OpenSim
|
|||
m_udpServers[i].clientCircuits_reverse.TryGetValue(presence.ControllingClient.CircuitCode, out ep);
|
||||
}
|
||||
}
|
||||
m_log.Notice(
|
||||
|
||||
m_console.Notice(
|
||||
String.Format("{0,-16}{1,-16}{2,-37}{3,-16}{4,-22}{5,-16}",
|
||||
presence.Firstname,
|
||||
presence.Lastname,
|
||||
|
@ -1035,10 +1016,10 @@ namespace OpenSim
|
|||
|
||||
break;
|
||||
case "modules":
|
||||
m_log.Notice("The currently loaded shared modules are:");
|
||||
m_console.Notice("The currently loaded shared modules are:");
|
||||
foreach (IRegionModule module in m_moduleLoader.GetLoadedSharedModules)
|
||||
{
|
||||
m_log.Notice("Shared Module: " + module.Name);
|
||||
m_console.Notice("Shared Module: " + module.Name);
|
||||
}
|
||||
break;
|
||||
|
||||
|
@ -1046,21 +1027,21 @@ namespace OpenSim
|
|||
m_sceneManager.ForEachScene(
|
||||
delegate(Scene scene)
|
||||
{
|
||||
m_log.Notice("Region Name: " + scene.RegionInfo.RegionName + " , Region XLoc: " +
|
||||
scene.RegionInfo.RegionLocX + " , Region YLoc: " +
|
||||
scene.RegionInfo.RegionLocY);
|
||||
m_console.Notice("Region Name: " + scene.RegionInfo.RegionName + " , Region XLoc: " +
|
||||
scene.RegionInfo.RegionLocX + " , Region YLoc: " +
|
||||
scene.RegionInfo.RegionLocY);
|
||||
});
|
||||
break;
|
||||
|
||||
case "stats":
|
||||
if (StatsManager.SimExtraStats != null)
|
||||
{
|
||||
m_log.Notice(
|
||||
m_console.Notice(
|
||||
"STATS", Environment.NewLine + StatsManager.SimExtraStats.Report());
|
||||
}
|
||||
else
|
||||
{
|
||||
m_log.Notice("STATS", "Extra sim statistics collection has not been enabled");
|
||||
m_console.Notice("Extra sim statistics collection has not been enabled");
|
||||
}
|
||||
break;
|
||||
}
|
||||
|
|
|
@ -51,6 +51,8 @@ namespace OpenSim.Region.ClientStack
|
|||
/// </summary>
|
||||
public class ClientView : IClientAPI
|
||||
{
|
||||
private static readonly log4net.ILog m_log = log4net.LogManager.GetLogger(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType);
|
||||
|
||||
/* static variables */
|
||||
public static TerrainManager TerrainManager;
|
||||
|
||||
|
@ -196,7 +198,7 @@ namespace OpenSim.Region.ClientStack
|
|||
// m_inventoryCache = inventoryCache;
|
||||
m_authenticateSessionsHandler = authenSessions;
|
||||
|
||||
MainLog.Instance.Verbose("CLIENT", "Started up new client thread to handle incoming request");
|
||||
m_log.Info("[CLIENT]: Started up new client thread to handle incoming request");
|
||||
|
||||
m_agentId = agentId;
|
||||
m_sessionId = sessionId;
|
||||
|
@ -260,7 +262,7 @@ namespace OpenSim.Region.ClientStack
|
|||
public void Close(bool ShutdownCircult)
|
||||
{
|
||||
// Pull Client out of Region
|
||||
MainLog.Instance.Verbose("CLIENT", "Close has been called");
|
||||
m_log.Info("[CLIENT]: Close has been called");
|
||||
|
||||
//raiseevent on the packet server to Shutdown the circuit
|
||||
if (ShutdownCircult)
|
||||
|
@ -286,7 +288,7 @@ namespace OpenSim.Region.ClientStack
|
|||
|
||||
public void Stop()
|
||||
{
|
||||
MainLog.Instance.Verbose("BUG", "Stop called, please find out where and remove it");
|
||||
m_log.Info("[BUG]: Stop called, please find out where and remove it");
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
@ -378,7 +380,7 @@ namespace OpenSim.Region.ClientStack
|
|||
|
||||
protected virtual void ClientLoop()
|
||||
{
|
||||
MainLog.Instance.Verbose("CLIENT", "Entered loop");
|
||||
m_log.Info("[CLIENT]: Entered loop");
|
||||
while (true)
|
||||
{
|
||||
QueItem nextPacket = m_packetQueue.Dequeue();
|
||||
|
@ -445,7 +447,7 @@ namespace OpenSim.Region.ClientStack
|
|||
m_clientPingTimer.Elapsed += new ElapsedEventHandler(CheckClientConnectivity);
|
||||
m_clientPingTimer.Enabled = true;
|
||||
|
||||
MainLog.Instance.Verbose("CLIENT", "Adding viewer agent to scene");
|
||||
m_log.Info("[CLIENT]: Adding viewer agent to scene");
|
||||
m_scene.AddNewClient(this, true);
|
||||
}
|
||||
|
||||
|
@ -458,13 +460,13 @@ namespace OpenSim.Region.ClientStack
|
|||
if (!sessionInfo.Authorised)
|
||||
{
|
||||
//session/circuit not authorised
|
||||
MainLog.Instance.Notice("CLIENT", "New user request denied to " + m_userEndPoint.ToString());
|
||||
m_log.Info("[CLIENT]: New user request denied to " + m_userEndPoint.ToString());
|
||||
m_packetQueue.Close();
|
||||
m_clientThread.Abort();
|
||||
}
|
||||
else
|
||||
{
|
||||
MainLog.Instance.Notice("CLIENT", "Got authenticated connection from " + m_userEndPoint.ToString());
|
||||
m_log.Info("[CLIENT]: Got authenticated connection from " + m_userEndPoint.ToString());
|
||||
//session is authorised
|
||||
m_firstName = sessionInfo.LoginInfo.First;
|
||||
m_lastName = sessionInfo.LoginInfo.Last;
|
||||
|
@ -731,7 +733,7 @@ namespace OpenSim.Region.ClientStack
|
|||
}
|
||||
catch (Exception e)
|
||||
{
|
||||
MainLog.Instance.Warn("client",
|
||||
m_log.Warn("[client]: " +
|
||||
"ClientView.API.cs: SendLayerData() - Failed with exception " + e.ToString());
|
||||
}
|
||||
}
|
||||
|
@ -758,7 +760,7 @@ namespace OpenSim.Region.ClientStack
|
|||
}
|
||||
catch (Exception e)
|
||||
{
|
||||
MainLog.Instance.Warn("client",
|
||||
m_log.Warn("[client]: " +
|
||||
"ClientView.API.cs: SendLayerData() - Failed with exception " + e.ToString());
|
||||
}
|
||||
}
|
||||
|
@ -2102,7 +2104,7 @@ namespace OpenSim.Region.ClientStack
|
|||
|
||||
protected virtual bool Logout(IClientAPI client, Packet packet)
|
||||
{
|
||||
MainLog.Instance.Verbose("CLIENT", "Got a logout request");
|
||||
m_log.Info("[CLIENT]: Got a logout request");
|
||||
|
||||
if (OnLogout != null)
|
||||
{
|
||||
|
@ -2431,10 +2433,10 @@ namespace OpenSim.Region.ClientStack
|
|||
}
|
||||
catch (Exception e)
|
||||
{
|
||||
MainLog.Instance.Warn("client",
|
||||
m_log.Warn("[client]: " +
|
||||
"ClientView.m_packetQueue.cs:ProcessOutPacket() - WARNING: Socket exception occurred on connection " +
|
||||
m_userEndPoint.ToString() + " - killing thread");
|
||||
MainLog.Instance.Error(e.ToString());
|
||||
m_log.Error(e.ToString());
|
||||
Close(true);
|
||||
}
|
||||
}
|
||||
|
@ -2545,7 +2547,7 @@ namespace OpenSim.Region.ClientStack
|
|||
{
|
||||
if ((now - packet.TickCount > RESEND_TIMEOUT) && (!packet.Header.Resent))
|
||||
{
|
||||
MainLog.Instance.Verbose("NETWORK", "Resending " + packet.Type.ToString() + " packet, " +
|
||||
m_log.Info("[NETWORK]: Resending " + packet.Type.ToString() + " packet, " +
|
||||
(now - packet.TickCount) + "ms have passed");
|
||||
|
||||
packet.Header.Resent = true;
|
||||
|
@ -2564,11 +2566,11 @@ namespace OpenSim.Region.ClientStack
|
|||
if (m_pendingAcks.Count > 250)
|
||||
{
|
||||
// FIXME: Handle the odd case where we have too many pending ACKs queued up
|
||||
MainLog.Instance.Verbose("NETWORK", "Too many ACKs queued up!");
|
||||
m_log.Info("[NETWORK]: Too many ACKs queued up!");
|
||||
return;
|
||||
}
|
||||
|
||||
//MainLog.Instance.Verbose("NETWORK", "Sending PacketAck");
|
||||
//m_log.Info("[NETWORK]: Sending PacketAck");
|
||||
|
||||
int i = 0;
|
||||
PacketAckPacket acks = (PacketAckPacket)PacketPool.Instance.GetPacket(PacketType.PacketAck);
|
||||
|
@ -2754,7 +2756,7 @@ namespace OpenSim.Region.ClientStack
|
|||
//rezPacket.RezData.RemoveItem;
|
||||
//rezPacket.RezData.RezSelected;
|
||||
//rezPacket.RezData.FromTaskID;
|
||||
//MainLog.Instance.Verbose("REZData", rezPacket.ToString());
|
||||
//m_log.Info("[REZData]: " + rezPacket.ToString());
|
||||
OnRezObject(this, rezPacket.InventoryData.ItemID, rezPacket.RezData.RayEnd,
|
||||
rezPacket.RezData.RayStart, rezPacket.RezData.RayTargetID,
|
||||
rezPacket.RezData.BypassRaycast, rezPacket.RezData.RayEndIsIntersection,
|
||||
|
@ -2772,7 +2774,7 @@ namespace OpenSim.Region.ClientStack
|
|||
break;
|
||||
case PacketType.ModifyLand:
|
||||
ModifyLandPacket modify = (ModifyLandPacket)Pack;
|
||||
//MainLog.Instance.Verbose("LAND", "LAND:" + modify.ToString());
|
||||
//m_log.Info("[LAND]: LAND:" + modify.ToString());
|
||||
if (modify.ParcelData.Length > 0)
|
||||
{
|
||||
if (OnModifyTerrain != null)
|
||||
|
@ -2941,7 +2943,7 @@ namespace OpenSim.Region.ClientStack
|
|||
{
|
||||
ObjectAddPacket addPacket = (ObjectAddPacket)Pack;
|
||||
PrimitiveBaseShape shape = GetShapeFromAddPacket(addPacket);
|
||||
// MainLog.Instance.Verbose("REZData", addPacket.ToString());
|
||||
// m_log.Info("[REZData]: " + addPacket.ToString());
|
||||
//BypassRaycast: 1
|
||||
//RayStart: <69.79469, 158.2652, 98.40343>
|
||||
//RayEnd: <61.97724, 141.995, 92.58341>
|
||||
|
@ -3068,7 +3070,7 @@ namespace OpenSim.Region.ClientStack
|
|||
}
|
||||
break;
|
||||
case PacketType.ObjectPermissions:
|
||||
MainLog.Instance.Warn("CLIENT", "unhandled packet " + PacketType.ObjectPermissions.ToString());
|
||||
m_log.Warn("[CLIENT]: unhandled packet " + PacketType.ObjectPermissions.ToString());
|
||||
ObjectPermissionsPacket newobjPerms = (ObjectPermissionsPacket)Pack;
|
||||
|
||||
List<ObjectPermissionsPacket.ObjectDataBlock> permChanges =
|
||||
|
@ -3344,7 +3346,7 @@ namespace OpenSim.Region.ClientStack
|
|||
}
|
||||
break;
|
||||
case PacketType.MoveTaskInventory:
|
||||
MainLog.Instance.Warn("CLIENT", "unhandled MoveTaskInventory packet");
|
||||
m_log.Warn("[CLIENT]: unhandled MoveTaskInventory packet");
|
||||
break;
|
||||
case PacketType.RezScript:
|
||||
//Console.WriteLine(Pack.ToString());
|
||||
|
@ -3594,7 +3596,7 @@ namespace OpenSim.Region.ClientStack
|
|||
|
||||
break;
|
||||
case PacketType.GodKickUser:
|
||||
MainLog.Instance.Warn("CLIENT", "unhandled GodKickUser packet");
|
||||
m_log.Warn("[CLIENT]: unhandled GodKickUser packet");
|
||||
|
||||
GodKickUserPacket gkupack = (GodKickUserPacket)Pack;
|
||||
|
||||
|
@ -3624,88 +3626,88 @@ namespace OpenSim.Region.ClientStack
|
|||
// Send the client the ping response back
|
||||
// Pass the same PingID in the matching packet
|
||||
// Handled In the packet processing
|
||||
//MainLog.Instance.Debug("CLIENT", "possibly unhandled StartPingCheck packet");
|
||||
//m_log.Debug("[CLIENT]: possibly unhandled StartPingCheck packet");
|
||||
break;
|
||||
case PacketType.CompletePingCheck:
|
||||
// TODO: Perhaps this should be processed on the Sim to determine whether or not to drop a dead client
|
||||
//MainLog.Instance.Warn("CLIENT", "unhandled CompletePingCheck packet");
|
||||
//m_log.Warn("[CLIENT]: unhandled CompletePingCheck packet");
|
||||
break;
|
||||
case PacketType.ObjectScale:
|
||||
// TODO: handle this packet
|
||||
MainLog.Instance.Warn("CLIENT", "unhandled ObjectScale packet");
|
||||
m_log.Warn("[CLIENT]: unhandled ObjectScale packet");
|
||||
break;
|
||||
case PacketType.ViewerStats:
|
||||
// TODO: handle this packet
|
||||
MainLog.Instance.Warn("CLIENT", "unhandled ViewerStats packet");
|
||||
m_log.Warn("[CLIENT]: unhandled ViewerStats packet");
|
||||
break;
|
||||
|
||||
case PacketType.CreateGroupRequest:
|
||||
// TODO: handle this packet
|
||||
MainLog.Instance.Warn("CLIENT", "unhandled CreateGroupRequest packet");
|
||||
m_log.Warn("[CLIENT]: unhandled CreateGroupRequest packet");
|
||||
break;
|
||||
case PacketType.GenericMessage:
|
||||
// TODO: handle this packet
|
||||
MainLog.Instance.Warn("CLIENT", "unhandled GenericMessage packet");
|
||||
m_log.Warn("[CLIENT]: unhandled GenericMessage packet");
|
||||
break;
|
||||
case PacketType.MapItemRequest:
|
||||
// TODO: handle this packet
|
||||
MainLog.Instance.Warn("CLIENT", "unhandled MapItemRequest packet");
|
||||
m_log.Warn("[CLIENT]: unhandled MapItemRequest packet");
|
||||
break;
|
||||
case PacketType.AgentResume:
|
||||
// TODO: handle this packet
|
||||
MainLog.Instance.Warn("CLIENT", "unhandled AgentResume packet");
|
||||
m_log.Warn("[CLIENT]: unhandled AgentResume packet");
|
||||
break;
|
||||
case PacketType.AgentPause:
|
||||
// TODO: handle this packet
|
||||
MainLog.Instance.Warn("CLIENT", "unhandled AgentPause packet");
|
||||
m_log.Warn("[CLIENT]: unhandled AgentPause packet");
|
||||
break;
|
||||
case PacketType.TransferAbort:
|
||||
// TODO: handle this packet
|
||||
MainLog.Instance.Warn("CLIENT", "unhandled TransferAbort packet");
|
||||
m_log.Warn("[CLIENT]: unhandled TransferAbort packet");
|
||||
break;
|
||||
case PacketType.MuteListRequest:
|
||||
// TODO: handle this packet
|
||||
MainLog.Instance.Warn("CLIENT", "unhandled MuteListRequest packet");
|
||||
m_log.Warn("[CLIENT]: unhandled MuteListRequest packet");
|
||||
break;
|
||||
case PacketType.AgentDataUpdateRequest:
|
||||
// TODO: handle this packet
|
||||
MainLog.Instance.Warn("CLIENT", "unhandled AgentDataUpdateRequest packet");
|
||||
m_log.Warn("[CLIENT]: unhandled AgentDataUpdateRequest packet");
|
||||
break;
|
||||
|
||||
case PacketType.ParcelDwellRequest:
|
||||
// TODO: handle this packet
|
||||
MainLog.Instance.Warn("CLIENT", "unhandled ParcelDwellRequest packet");
|
||||
m_log.Warn("[CLIENT]: unhandled ParcelDwellRequest packet");
|
||||
break;
|
||||
case PacketType.UseCircuitCode:
|
||||
// TODO: handle this packet
|
||||
//MainLog.Instance.Warn("CLIENT", "unhandled UseCircuitCode packet");
|
||||
//m_log.Warn("[CLIENT]: unhandled UseCircuitCode packet");
|
||||
break;
|
||||
case PacketType.EconomyDataRequest:
|
||||
// TODO: handle this packet
|
||||
MainLog.Instance.Warn("CLIENT", "unhandled EconomyDataRequest packet");
|
||||
m_log.Warn("[CLIENT]: unhandled EconomyDataRequest packet");
|
||||
break;
|
||||
case PacketType.AgentHeightWidth:
|
||||
// TODO: handle this packet
|
||||
MainLog.Instance.Warn("CLIENT", "unhandled AgentHeightWidth packet");
|
||||
m_log.Warn("[CLIENT]: unhandled AgentHeightWidth packet");
|
||||
break;
|
||||
case PacketType.ObjectSpinStop:
|
||||
// TODO: handle this packet
|
||||
MainLog.Instance.Warn("CLIENT", "unhandled ObjectSpinStop packet");
|
||||
m_log.Warn("[CLIENT]: unhandled ObjectSpinStop packet");
|
||||
break;
|
||||
case PacketType.SoundTrigger:
|
||||
// TODO: handle this packet
|
||||
MainLog.Instance.Warn("CLIENT", "unhandled SoundTrigger packet");
|
||||
m_log.Warn("[CLIENT]: unhandled SoundTrigger packet");
|
||||
break;
|
||||
case PacketType.UserInfoRequest:
|
||||
// TODO: handle this packet
|
||||
MainLog.Instance.Warn("CLIENT", "unhandled UserInfoRequest packet");
|
||||
m_log.Warn("[CLIENT]: unhandled UserInfoRequest packet");
|
||||
break;
|
||||
case PacketType.InventoryDescendents:
|
||||
// TODO: handle this packet
|
||||
MainLog.Instance.Warn("CLIENT", "unhandled InventoryDescent packet");
|
||||
m_log.Warn("[CLIENT]: unhandled InventoryDescent packet");
|
||||
break;
|
||||
default:
|
||||
MainLog.Instance.Warn("CLIENT", "unhandled packet " + Pack.ToString());
|
||||
m_log.Warn("[CLIENT]: unhandled packet " + Pack.ToString());
|
||||
break;
|
||||
|
||||
#endregion
|
||||
|
|
|
@ -37,6 +37,8 @@ namespace OpenSim.Region.ClientStack
|
|||
{
|
||||
public class PacketQueue
|
||||
{
|
||||
private static readonly log4net.ILog m_log = log4net.LogManager.GetLogger(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType);
|
||||
|
||||
private bool m_enabled = true;
|
||||
|
||||
private BlockingQueue<QueItem> SendQueue;
|
||||
|
@ -204,7 +206,7 @@ namespace OpenSim.Region.ClientStack
|
|||
SendQueue.Enqueue(AssetOutgoingPacketQueue.Dequeue());
|
||||
}
|
||||
}
|
||||
// MainLog.Instance.Verbose("THROTTLE", "Processed " + throttleLoops + " packets");
|
||||
// m_log.Info("[THROTTLE]: Processed " + throttleLoops + " packets");
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -253,7 +255,7 @@ namespace OpenSim.Region.ClientStack
|
|||
lock (this)
|
||||
{
|
||||
ResetCounters();
|
||||
// MainLog.Instance.Verbose("THROTTLE", "Entering Throttle");
|
||||
// m_log.Info("[THROTTLE]: Entering Throttle");
|
||||
while (TotalThrottle.UnderLimit() && PacketsWaiting() &&
|
||||
(throttleLoops <= MaxThrottleLoops))
|
||||
{
|
||||
|
@ -316,7 +318,7 @@ namespace OpenSim.Region.ClientStack
|
|||
AssetThrottle.Add(qpack.Packet.ToBytes().Length);
|
||||
}
|
||||
}
|
||||
// MainLog.Instance.Verbose("THROTTLE", "Processed " + throttleLoops + " packets");
|
||||
// m_log.Info("[THROTTLE]: Processed " + throttleLoops + " packets");
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -426,7 +428,7 @@ namespace OpenSim.Region.ClientStack
|
|||
|
||||
tall = tResend + tLand + tWind + tCloud + tTask + tTexture + tAsset;
|
||||
/*
|
||||
MainLog.Instance.Verbose("CLIENT", "Client AgentThrottle - Got throttle:resendbytes=" + tResend +
|
||||
m_log.Info("[CLIENT]: Client AgentThrottle - Got throttle:resendbytes=" + tResend +
|
||||
" landbytes=" + tLand +
|
||||
" windbytes=" + tWind +
|
||||
" cloudbytes=" + tCloud +
|
||||
|
|
|
@ -42,6 +42,8 @@ namespace OpenSim.Region.ClientStack
|
|||
{
|
||||
public abstract class RegionApplicationBase : BaseOpenSimServer
|
||||
{
|
||||
private static readonly log4net.ILog m_log = log4net.LogManager.GetLogger(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType);
|
||||
|
||||
protected AssetCache m_assetCache;
|
||||
protected Dictionary<EndPoint, uint> m_clientCircuits = new Dictionary<EndPoint, uint>();
|
||||
protected NetworkServersInfo m_networkServersInfo;
|
||||
|
@ -75,19 +77,20 @@ namespace OpenSim.Region.ClientStack
|
|||
|
||||
m_httpServer = new BaseHttpServer(m_httpServerPort);
|
||||
|
||||
m_log.Status("REGION", "Starting HTTP server");
|
||||
m_log.Info("[REGION]: Starting HTTP server");
|
||||
|
||||
m_httpServer.Start();
|
||||
}
|
||||
|
||||
protected abstract void Initialize();
|
||||
|
||||
protected void StartLog()
|
||||
protected void StartConsole()
|
||||
{
|
||||
m_log = CreateLog();
|
||||
MainLog.Instance = m_log;
|
||||
m_console = CreateConsole();
|
||||
MainConsole.Instance = m_console;
|
||||
}
|
||||
|
||||
protected abstract LogBase CreateLog();
|
||||
protected abstract ConsoleBase CreateConsole();
|
||||
protected abstract PhysicsScene GetPhysicsScene();
|
||||
protected abstract StorageManager CreateStorageManager(string connectionstring);
|
||||
|
||||
|
@ -107,7 +110,7 @@ namespace OpenSim.Region.ClientStack
|
|||
// listenIP = IPAddress.Parse("0.0.0.0");
|
||||
|
||||
uint port = (uint) regionInfo.InternalEndPoint.Port;
|
||||
udpServer = new UDPServer(listenIP, ref port, regionInfo.m_allow_alternate_ports, m_assetCache, m_log, circuitManager);
|
||||
udpServer = new UDPServer(listenIP, ref port, regionInfo.m_allow_alternate_ports, m_assetCache, circuitManager);
|
||||
regionInfo.InternalEndPoint.Port = (int)port;
|
||||
|
||||
Scene scene = CreateScene(regionInfo, m_storageManager, circuitManager);
|
||||
|
@ -136,12 +139,12 @@ namespace OpenSim.Region.ClientStack
|
|||
|
||||
if (masterAvatar != null)
|
||||
{
|
||||
m_log.Verbose("PARCEL", "Found master avatar [" + masterAvatar.UUID.ToString() + "]");
|
||||
m_log.Info("[PARCEL]: Found master avatar [" + masterAvatar.UUID.ToString() + "]");
|
||||
scene.RegionInfo.MasterAvatarAssignedUUID = masterAvatar.UUID;
|
||||
}
|
||||
else
|
||||
{
|
||||
m_log.Verbose("PARCEL", "No master avatar found, using null.");
|
||||
m_log.Info("[PARCEL]: No master avatar found, using null.");
|
||||
scene.RegionInfo.MasterAvatarAssignedUUID = LLUUID.Zero;
|
||||
}
|
||||
|
||||
|
|
|
@ -39,6 +39,8 @@ namespace OpenSim.Region.ClientStack
|
|||
{
|
||||
public class UDPServer : ClientStackNetworkHandler
|
||||
{
|
||||
private static readonly log4net.ILog m_log = log4net.LogManager.GetLogger(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType);
|
||||
|
||||
protected Dictionary<EndPoint, uint> clientCircuits = new Dictionary<EndPoint, uint>();
|
||||
public Dictionary<uint, EndPoint> clientCircuits_reverse = new Dictionary<uint, EndPoint>();
|
||||
public Socket Server;
|
||||
|
@ -56,7 +58,6 @@ namespace OpenSim.Region.ClientStack
|
|||
protected IPAddress listenIP = IPAddress.Parse("0.0.0.0");
|
||||
protected IScene m_localScene;
|
||||
protected AssetCache m_assetCache;
|
||||
protected LogBase m_log;
|
||||
protected AgentCircuitManager m_authenticateSessionsClass;
|
||||
|
||||
public PacketServer PacketServer
|
||||
|
@ -84,13 +85,12 @@ namespace OpenSim.Region.ClientStack
|
|||
{
|
||||
}
|
||||
|
||||
public UDPServer(IPAddress _listenIP, ref uint port, bool allow_alternate_port, AssetCache assetCache, LogBase console, AgentCircuitManager authenticateClass)
|
||||
public UDPServer(IPAddress _listenIP, ref uint port, bool allow_alternate_port, AssetCache assetCache, AgentCircuitManager authenticateClass)
|
||||
{
|
||||
listenIP = _listenIP;
|
||||
listenPort = port;
|
||||
Allow_Alternate_Port = allow_alternate_port;
|
||||
m_assetCache = assetCache;
|
||||
m_log = console;
|
||||
m_authenticateSessionsClass = authenticateClass;
|
||||
CreatePacketServer();
|
||||
|
||||
|
@ -121,7 +121,7 @@ namespace OpenSim.Region.ClientStack
|
|||
{
|
||||
// TODO : Actually only handle those states that we have control over, re-throw everything else,
|
||||
// TODO: implement cases as we encounter them.
|
||||
//m_log.Error("UDPSERVER", "Connection Error! - " + e.ToString());
|
||||
//m_log.Error("[UDPSERVER]: Connection Error! - " + e.ToString());
|
||||
switch (e.SocketErrorCode)
|
||||
{
|
||||
case SocketError.AlreadyInProgress:
|
||||
|
@ -134,7 +134,7 @@ namespace OpenSim.Region.ClientStack
|
|||
}
|
||||
catch (Exception a)
|
||||
{
|
||||
MainLog.Instance.Verbose("UDPSERVER", a.ToString());
|
||||
m_log.Info("[UDPSERVER]: " + a.ToString());
|
||||
}
|
||||
try
|
||||
{
|
||||
|
@ -159,7 +159,7 @@ namespace OpenSim.Region.ClientStack
|
|||
}
|
||||
catch (Exception)
|
||||
{
|
||||
//MainLog.Instance.Verbose("UDPSERVER", a.ToString());
|
||||
//m_log.Info("[UDPSERVER]" + a.ToString());
|
||||
}
|
||||
try
|
||||
{
|
||||
|
@ -191,8 +191,7 @@ namespace OpenSim.Region.ClientStack
|
|||
}
|
||||
catch (ObjectDisposedException)
|
||||
{
|
||||
|
||||
//MainLog.Instance.Debug("UDPSERVER", e.ToString());
|
||||
//m_log.Debug("[UDPSERVER]: " + e.ToString());
|
||||
return;
|
||||
}
|
||||
|
||||
|
@ -214,20 +213,20 @@ namespace OpenSim.Region.ClientStack
|
|||
if (clientCircuits.TryGetValue(epSender, out circuit))
|
||||
{
|
||||
//if so then send packet to the packetserver
|
||||
//MainLog.Instance.Warn("UDPSERVER", "ALREADY HAVE Circuit!");
|
||||
//m_log.Warn("[UDPSERVER]: ALREADY HAVE Circuit!");
|
||||
m_packetServer.InPacket(circuit, packet);
|
||||
}
|
||||
else if (packet.Type == PacketType.UseCircuitCode)
|
||||
{
|
||||
// new client
|
||||
MainLog.Instance.Debug("UDPSERVER", "Adding New Client");
|
||||
m_log.Debug("[UDPSERVER]: Adding New Client");
|
||||
AddNewClient(packet);
|
||||
}
|
||||
else
|
||||
{
|
||||
// invalid client
|
||||
//CFK: This message seems to have served its usefullness as of 12-15 so I am commenting it out for now
|
||||
//m_log.Warn("UDPSERVER", "Got a packet from an invalid client - " + packet.ToString());
|
||||
//m_log.Warn("[UDPSERVER]: Got a packet from an invalid client - " + packet.ToString());
|
||||
|
||||
}
|
||||
}
|
||||
|
@ -255,12 +254,11 @@ namespace OpenSim.Region.ClientStack
|
|||
|
||||
public void ServerListener()
|
||||
{
|
||||
|
||||
uint newPort = listenPort;
|
||||
for (uint i = 0; i < 20; i++)
|
||||
{
|
||||
newPort = listenPort + i;
|
||||
m_log.Verbose("SERVER", "Opening UDP socket on " + listenIP.ToString() + " " + newPort + ".");// Allow alternate ports: " + Allow_Alternate_Port.ToString());
|
||||
m_log.Info("[SERVER]: Opening UDP socket on " + listenIP.ToString() + " " + newPort + ".");// Allow alternate ports: " + Allow_Alternate_Port.ToString());
|
||||
try
|
||||
{
|
||||
ServerIncoming = new IPEndPoint(listenIP, (int) newPort);
|
||||
|
@ -276,19 +274,19 @@ namespace OpenSim.Region.ClientStack
|
|||
throw (ex);
|
||||
|
||||
// We are looking for alternate ports!
|
||||
m_log.Verbose("SERVER", "UDP socket on " + listenIP.ToString() + " " + listenPort.ToString() + " is not available, trying next.");
|
||||
m_log.Info("[SERVER]: UDP socket on " + listenIP.ToString() + " " + listenPort.ToString() + " is not available, trying next.");
|
||||
}
|
||||
System.Threading.Thread.Sleep(100); // Wait before we retry socket
|
||||
}
|
||||
|
||||
m_log.Verbose("SERVER", "UDP socket bound, getting ready to listen");
|
||||
m_log.Info("[SERVER]: UDP socket bound, getting ready to listen");
|
||||
|
||||
ipeSender = new IPEndPoint(listenIP, 0);
|
||||
epSender = (EndPoint) ipeSender;
|
||||
ReceivedData = new AsyncCallback(OnReceivedData);
|
||||
Server.BeginReceiveFrom(RecvBuffer, 0, RecvBuffer.Length, SocketFlags.None, ref epSender, ReceivedData, null);
|
||||
|
||||
m_log.Status("SERVER", "Listening on port " + newPort);
|
||||
m_log.Info("[SERVER]: Listening on port " + newPort);
|
||||
}
|
||||
|
||||
public virtual void RegisterPacketServer(PacketServer server)
|
||||
|
|
|
@ -36,6 +36,8 @@ namespace OpenSim.Region.Communications.Local
|
|||
{
|
||||
public class LocalBackEndServices : IGridServices, IInterRegionCommunications
|
||||
{
|
||||
private static readonly log4net.ILog m_log = log4net.LogManager.GetLogger(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType);
|
||||
|
||||
protected Dictionary<ulong, RegionInfo> m_regions = new Dictionary<ulong, RegionInfo>();
|
||||
|
||||
protected Dictionary<ulong, RegionCommsListener> m_regionListeners =
|
||||
|
@ -93,8 +95,9 @@ namespace OpenSim.Region.Communications.Local
|
|||
RegionCommsListener regionHost = new RegionCommsListener();
|
||||
if (m_regionListeners.ContainsKey(regionInfo.RegionHandle))
|
||||
{
|
||||
MainLog.Instance.Error("INTERREGION",
|
||||
"Error:Region registered twice as an Events listener for Interregion Communications but not as a listed region. In Standalone mode this will cause BIG issues. In grid mode, it means a region went down and came back up.");
|
||||
m_log.Error("[INTERREGION]: " +
|
||||
"Error:Region registered twice as an Events listener for Interregion Communications but not as a listed region. " +
|
||||
"In Standalone mode this will cause BIG issues. In grid mode, it means a region went down and came back up.");
|
||||
m_regionListeners.Remove(regionInfo.RegionHandle);
|
||||
}
|
||||
m_regionListeners.Add(regionInfo.RegionHandle, regionHost);
|
||||
|
@ -105,7 +108,7 @@ namespace OpenSim.Region.Communications.Local
|
|||
{
|
||||
// Already in our list, so the region went dead and restarted.
|
||||
m_regions.Remove(regionInfo.RegionHandle);
|
||||
MainLog.Instance.Warn("INTERREGION", "Region registered twice. Region went down and came back up.");
|
||||
m_log.Warn("[INTERREGION]: Region registered twice. Region went down and came back up.");
|
||||
|
||||
RegionCommsListener regionHost = new RegionCommsListener();
|
||||
if (m_regionListeners.ContainsKey(regionInfo.RegionHandle))
|
||||
|
@ -229,7 +232,7 @@ namespace OpenSim.Region.Communications.Local
|
|||
{
|
||||
// Console.WriteLine("CommsManager- Informing a region to expect child agent");
|
||||
m_regionListeners[regionHandle].TriggerChildAgentUpdate(regionHandle, cAgentData);
|
||||
//MainLog.Instance.Verbose("INTER", rdebugRegionName + ":Local BackEnd: Got Listener trigginering local event: " + agentData.firstname + " " + agentData.lastname);
|
||||
//m_log.Info("[INTER]: " + rdebugRegionName + ":Local BackEnd: Got Listener trigginering local event: " + agentData.firstname + " " + agentData.lastname);
|
||||
|
||||
return true;
|
||||
}
|
||||
|
@ -292,13 +295,13 @@ namespace OpenSim.Region.Communications.Local
|
|||
//should change from agentCircuitData
|
||||
{
|
||||
//Console.WriteLine("CommsManager- Trying to Inform a region to expect child agent");
|
||||
//MainLog.Instance.Verbose("INTER", rdebugRegionName + ":Local BackEnd: Trying to inform region of child agent: " + agentData.firstname + " " + agentData.lastname);
|
||||
//m_log.Info("[INTER]: " + rdebugRegionName + ":Local BackEnd: Trying to inform region of child agent: " + agentData.firstname + " " + agentData.lastname);
|
||||
|
||||
if (m_regionListeners.ContainsKey(regionHandle))
|
||||
{
|
||||
// Console.WriteLine("CommsManager- Informing a region to expect child agent");
|
||||
m_regionListeners[regionHandle].TriggerExpectUser(regionHandle, agentData);
|
||||
//MainLog.Instance.Verbose("INTER", rdebugRegionName + ":Local BackEnd: Got Listener trigginering local event: " + agentData.firstname + " " + agentData.lastname);
|
||||
//m_log.Info("[INTER]: " + rdebugRegionName + ":Local BackEnd: Got Listener trigginering local event: " + agentData.firstname + " " + agentData.lastname);
|
||||
|
||||
return true;
|
||||
}
|
||||
|
@ -389,11 +392,11 @@ namespace OpenSim.Region.Communications.Local
|
|||
|
||||
public void TriggerExpectUser(ulong regionHandle, AgentCircuitData agent)
|
||||
{
|
||||
//MainLog.Instance.Verbose("INTER", rdebugRegionName + ":Local BackEnd: Other region is sending child agent our way: " + agent.firstname + " " + agent.lastname);
|
||||
//m_log.Info("[INTER]: " + rdebugRegionName + ":Local BackEnd: Other region is sending child agent our way: " + agent.firstname + " " + agent.lastname);
|
||||
|
||||
if (m_regionListeners.ContainsKey(regionHandle))
|
||||
{
|
||||
//MainLog.Instance.Verbose("INTER", rdebugRegionName + ":Local BackEnd: FoundLocalRegion To send it to: " + agent.firstname + " " + agent.lastname);
|
||||
//m_log.Info("[INTER]: " + rdebugRegionName + ":Local BackEnd: FoundLocalRegion To send it to: " + agent.firstname + " " + agent.lastname);
|
||||
|
||||
m_regionListeners[regionHandle].TriggerExpectUser(regionHandle, agent);
|
||||
}
|
||||
|
@ -443,11 +446,11 @@ namespace OpenSim.Region.Communications.Local
|
|||
|
||||
public bool IncomingChildAgent(ulong regionHandle, AgentCircuitData agentData)
|
||||
{
|
||||
// MainLog.Instance.Verbose("INTER", rdebugRegionName + ":Local BackEnd: Other local region is sending child agent our way: " + agentData.firstname + " " + agentData.lastname);
|
||||
// m_log.Info("[INTER]: " + rdebugRegionName + ":Local BackEnd: Other local region is sending child agent our way: " + agentData.firstname + " " + agentData.lastname);
|
||||
|
||||
if (m_regionListeners.ContainsKey(regionHandle))
|
||||
{
|
||||
//MainLog.Instance.Verbose("INTER", rdebugRegionName + ":Local BackEnd: found local region to trigger event on: " + agentData.firstname + " " + agentData.lastname);
|
||||
//m_log.Info("[INTER]: " + rdebugRegionName + ":Local BackEnd: found local region to trigger event on: " + agentData.firstname + " " + agentData.lastname);
|
||||
|
||||
TriggerExpectUser(regionHandle, agentData);
|
||||
return true;
|
||||
|
|
|
@ -44,6 +44,8 @@ namespace OpenSim.Region.Communications.Local
|
|||
|
||||
public class LocalLoginService : LoginService
|
||||
{
|
||||
private static readonly log4net.ILog m_log = log4net.LogManager.GetLogger(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType);
|
||||
|
||||
private CommunicationsLocal m_Parent;
|
||||
|
||||
private NetworkServersInfo serversInfo;
|
||||
|
@ -77,7 +79,7 @@ namespace OpenSim.Region.Communications.Local
|
|||
if (!authUsers)
|
||||
{
|
||||
//no current user account so make one
|
||||
MainLog.Instance.Notice("LOGIN", "No user account found so creating a new one.");
|
||||
m_log.Info("[LOGIN]: No user account found so creating a new one.");
|
||||
|
||||
m_userManager.AddUserProfile(firstname, lastname, "test", defaultHomeX, defaultHomeY);
|
||||
|
||||
|
@ -97,14 +99,14 @@ namespace OpenSim.Region.Communications.Local
|
|||
if (!authUsers)
|
||||
{
|
||||
//for now we will accept any password in sandbox mode
|
||||
MainLog.Instance.Notice("LOGIN", "Authorising user (no actual password check)");
|
||||
m_log.Info("[LOGIN]: Authorising user (no actual password check)");
|
||||
|
||||
return true;
|
||||
}
|
||||
else
|
||||
{
|
||||
MainLog.Instance.Notice(
|
||||
"LOGIN", "Authenticating " + profile.username + " " + profile.surname);
|
||||
m_log.Info(
|
||||
"[LOGIN]: Authenticating " + profile.username + " " + profile.surname);
|
||||
|
||||
if (!password.StartsWith("$1$"))
|
||||
password = "$1$" + Util.Md5Hash(password);
|
||||
|
@ -166,7 +168,7 @@ namespace OpenSim.Region.Communications.Local
|
|||
}
|
||||
else
|
||||
{
|
||||
MainLog.Instance.Warn("LOGIN", "Not found region " + currentRegion);
|
||||
m_log.Warn("[LOGIN]: Not found region " + currentRegion);
|
||||
}
|
||||
}
|
||||
private LoginResponse.BuddyList ConvertFriendListItem(List<FriendListItem> LFL)
|
||||
|
|
|
@ -47,6 +47,8 @@ namespace OpenSim.Region.Communications.OGS1
|
|||
{
|
||||
public class OGS1GridServices : IGridServices, IInterRegionCommunications
|
||||
{
|
||||
private static readonly log4net.ILog m_log = log4net.LogManager.GetLogger(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType);
|
||||
|
||||
private LocalBackEndServices m_localBackend = new LocalBackEndServices();
|
||||
private Dictionary<ulong, RegionInfo> m_remoteRegionInfoCache = new Dictionary<ulong, RegionInfo>();
|
||||
private List<SimpleRegionInfo> m_knownRegions = new List<SimpleRegionInfo>();
|
||||
|
@ -138,7 +140,7 @@ namespace OpenSim.Region.Communications.OGS1
|
|||
GridResp = GridReq.Send(serversInfo.GridURL, 10000);
|
||||
} catch (Exception ex)
|
||||
{
|
||||
MainLog.Instance.Error("Unable to connect to grid. Grid server not running?");
|
||||
m_log.Error("Unable to connect to grid. Grid server not running?");
|
||||
throw(ex);
|
||||
}
|
||||
Hashtable GridRespData = (Hashtable)GridResp.Value;
|
||||
|
@ -148,7 +150,7 @@ namespace OpenSim.Region.Communications.OGS1
|
|||
if (GridRespData.ContainsKey("error"))
|
||||
{
|
||||
string errorstring = (string) GridRespData["error"];
|
||||
MainLog.Instance.Error("Unable to connect to grid: " + errorstring);
|
||||
m_log.Error("Unable to connect to grid: " + errorstring);
|
||||
return null;
|
||||
}
|
||||
else
|
||||
|
@ -330,9 +332,9 @@ namespace OpenSim.Region.Communications.OGS1
|
|||
}
|
||||
catch (WebException)
|
||||
{
|
||||
MainLog.Instance.Error("GRID",
|
||||
"Region lookup failed for: " + regionHandle.ToString() +
|
||||
" - Is the GridServer down?");
|
||||
m_log.Error("[GRID]: " +
|
||||
"Region lookup failed for: " + regionHandle.ToString() +
|
||||
" - Is the GridServer down?");
|
||||
return null;
|
||||
}
|
||||
}
|
||||
|
@ -421,7 +423,7 @@ namespace OpenSim.Region.Communications.OGS1
|
|||
}
|
||||
catch (Exception e)
|
||||
{
|
||||
MainLog.Instance.Error("MapBlockQuery XMLRPC failure: " + e.ToString());
|
||||
m_log.Error("MapBlockQuery XMLRPC failure: " + e.ToString());
|
||||
return new Hashtable();
|
||||
}
|
||||
}
|
||||
|
@ -482,7 +484,7 @@ namespace OpenSim.Region.Communications.OGS1
|
|||
|
||||
m_localBackend.TriggerExpectUser(regionHandle, agentData);
|
||||
|
||||
MainLog.Instance.Verbose("GRID", "Welcoming new user...");
|
||||
m_log.Info("[GRID]: Welcoming new user...");
|
||||
|
||||
return new XmlRpcResponse();
|
||||
}
|
||||
|
@ -555,7 +557,7 @@ namespace OpenSim.Region.Communications.OGS1
|
|||
Console.WriteLine("remoting object not found");
|
||||
}
|
||||
remObject = null;
|
||||
//MainLog.Instance.Verbose("INTER",
|
||||
//m_log.Info("[INTER]: " +
|
||||
//gdebugRegionName +
|
||||
//": OGS1 tried to Update Child Agent data on outside region and got " +
|
||||
//retValue.ToString());
|
||||
|
@ -569,45 +571,45 @@ namespace OpenSim.Region.Communications.OGS1
|
|||
catch (RemotingException e)
|
||||
{
|
||||
NoteDeadRegion(regionHandle);
|
||||
MainLog.Instance.Warn("Remoting Error: Unable to connect to adjacent region: " +
|
||||
m_log.Warn("Remoting Error: Unable to connect to adjacent region: " +
|
||||
" " + regInfo.RegionLocX + "," + regInfo.RegionLocY);
|
||||
MainLog.Instance.Debug(e.ToString());
|
||||
m_log.Debug(e.ToString());
|
||||
return false;
|
||||
}
|
||||
catch (SocketException e)
|
||||
{
|
||||
NoteDeadRegion(regionHandle);
|
||||
MainLog.Instance.Warn("Socket Error: Unable to connect to adjacent region: " + " " +
|
||||
m_log.Warn("Socket Error: Unable to connect to adjacent region: " + " " +
|
||||
regInfo.RegionLocX + "," + regInfo.RegionLocY);
|
||||
MainLog.Instance.Debug(e.ToString());
|
||||
m_log.Debug(e.ToString());
|
||||
return false;
|
||||
}
|
||||
catch (InvalidCredentialException e)
|
||||
{
|
||||
NoteDeadRegion(regionHandle);
|
||||
MainLog.Instance.Warn("Invalid Credentials: Unable to connect to adjacent region: " +
|
||||
m_log.Warn("Invalid Credentials: Unable to connect to adjacent region: " +
|
||||
" " + regInfo.RegionLocX + "," + regInfo.RegionLocY);
|
||||
MainLog.Instance.Debug(e.ToString());
|
||||
m_log.Debug(e.ToString());
|
||||
return false;
|
||||
}
|
||||
catch (AuthenticationException e)
|
||||
{
|
||||
NoteDeadRegion(regionHandle);
|
||||
MainLog.Instance.Warn("Authentication exception: Unable to connect to adjacent region: " +
|
||||
m_log.Warn("Authentication exception: Unable to connect to adjacent region: " +
|
||||
" " + regInfo.RegionLocX + "," + regInfo.RegionLocY);
|
||||
MainLog.Instance.Debug(e.ToString());
|
||||
m_log.Debug(e.ToString());
|
||||
return false;
|
||||
}
|
||||
catch (Exception e)
|
||||
{
|
||||
NoteDeadRegion(regionHandle);
|
||||
MainLog.Instance.Debug(e.ToString());
|
||||
m_log.Debug(e.ToString());
|
||||
return false;
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
//MainLog.Instance.Verbose("INTERREGION", "Skipped Sending Child Update to a region because it failed too many times:" + regionHandle.ToString());
|
||||
//m_log.Info("[INTERREGION]: Skipped Sending Child Update to a region because it failed too many times:" + regionHandle.ToString());
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
@ -650,10 +652,10 @@ namespace OpenSim.Region.Communications.OGS1
|
|||
Console.WriteLine("remoting object not found");
|
||||
}
|
||||
remObject = null;
|
||||
MainLog.Instance.Verbose("INTER",
|
||||
gdebugRegionName + ": OGS1 tried to InformRegionOfChildAgent for " +
|
||||
agentData.firstname + " " + agentData.lastname + " and got " +
|
||||
retValue.ToString());
|
||||
m_log.Info("[INTER]: " +
|
||||
gdebugRegionName + ": OGS1 tried to InformRegionOfChildAgent for " +
|
||||
agentData.firstname + " " + agentData.lastname + " and got " +
|
||||
retValue.ToString());
|
||||
|
||||
return retValue;
|
||||
|
||||
|
@ -664,41 +666,41 @@ namespace OpenSim.Region.Communications.OGS1
|
|||
catch (RemotingException e)
|
||||
{
|
||||
NoteDeadRegion(regionHandle);
|
||||
MainLog.Instance.Warn("Remoting Error: Unable to connect to adjacent region: " + regInfo.RegionName +
|
||||
" " + regInfo.RegionLocX + "," + regInfo.RegionLocY);
|
||||
MainLog.Instance.Debug(e.ToString());
|
||||
m_log.Warn("Remoting Error: Unable to connect to adjacent region: " + regInfo.RegionName +
|
||||
" " + regInfo.RegionLocX + "," + regInfo.RegionLocY);
|
||||
m_log.Debug(e.ToString());
|
||||
return false;
|
||||
}
|
||||
catch (SocketException e)
|
||||
{
|
||||
NoteDeadRegion(regionHandle);
|
||||
MainLog.Instance.Warn("Socket Error: Unable to connect to adjacent region: " + regInfo.RegionName + " " +
|
||||
m_log.Warn("Socket Error: Unable to connect to adjacent region: " + regInfo.RegionName + " " +
|
||||
regInfo.RegionLocX + "," + regInfo.RegionLocY);
|
||||
MainLog.Instance.Debug(e.ToString());
|
||||
m_log.Debug(e.ToString());
|
||||
return false;
|
||||
}
|
||||
catch (InvalidCredentialException e)
|
||||
{
|
||||
NoteDeadRegion(regionHandle);
|
||||
MainLog.Instance.Warn("Invalid Credentials: Unable to connect to adjacent region: " + regInfo.RegionName +
|
||||
m_log.Warn("Invalid Credentials: Unable to connect to adjacent region: " + regInfo.RegionName +
|
||||
" " + regInfo.RegionLocX + "," + regInfo.RegionLocY);
|
||||
MainLog.Instance.Debug(e.ToString());
|
||||
m_log.Debug(e.ToString());
|
||||
return false;
|
||||
}
|
||||
catch (AuthenticationException e)
|
||||
{
|
||||
NoteDeadRegion(regionHandle);
|
||||
MainLog.Instance.Warn("Authentication exception: Unable to connect to adjacent region: " +
|
||||
m_log.Warn("Authentication exception: Unable to connect to adjacent region: " +
|
||||
regInfo.RegionName + " " + regInfo.RegionLocX + "," + regInfo.RegionLocY);
|
||||
MainLog.Instance.Debug(e.ToString());
|
||||
m_log.Debug(e.ToString());
|
||||
return false;
|
||||
}
|
||||
catch (Exception e)
|
||||
{
|
||||
NoteDeadRegion(regionHandle);
|
||||
MainLog.Instance.Warn("Unknown exception: Unable to connect to adjacent region: " + regInfo.RegionName +
|
||||
m_log.Warn("Unknown exception: Unable to connect to adjacent region: " + regInfo.RegionName +
|
||||
" " + regInfo.RegionLocX + "," + regInfo.RegionLocY);
|
||||
MainLog.Instance.Debug(e.ToString());
|
||||
m_log.Debug(e.ToString());
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
@ -748,7 +750,7 @@ namespace OpenSim.Region.Communications.OGS1
|
|||
Console.WriteLine("remoting object not found");
|
||||
}
|
||||
remObject = null;
|
||||
MainLog.Instance.Verbose("INTER", gdebugRegionName + ": OGS1 tried to inform region I'm up");
|
||||
m_log.Info("[INTER]: " + gdebugRegionName + ": OGS1 tried to inform region I'm up");
|
||||
|
||||
return retValue;
|
||||
}
|
||||
|
@ -765,49 +767,49 @@ namespace OpenSim.Region.Communications.OGS1
|
|||
}
|
||||
catch (RemotingException e)
|
||||
{
|
||||
MainLog.Instance.Warn("Remoting Error: Unable to connect to adjacent region using tcp://" +
|
||||
regInfo.RemotingAddress +
|
||||
":" + regInfo.RemotingPort +
|
||||
"/InterRegions - @ " + regInfo.RegionLocX + "," + regInfo.RegionLocY +
|
||||
" - Is this neighbor up?");
|
||||
MainLog.Instance.Debug(e.ToString());
|
||||
m_log.Warn("Remoting Error: Unable to connect to adjacent region using tcp://" +
|
||||
regInfo.RemotingAddress +
|
||||
":" + regInfo.RemotingPort +
|
||||
"/InterRegions - @ " + regInfo.RegionLocX + "," + regInfo.RegionLocY +
|
||||
" - Is this neighbor up?");
|
||||
m_log.Debug(e.ToString());
|
||||
return false;
|
||||
}
|
||||
catch (SocketException e)
|
||||
{
|
||||
MainLog.Instance.Warn("Socket Error: Unable to connect to adjacent region using tcp://" +
|
||||
regInfo.RemotingAddress +
|
||||
":" + regInfo.RemotingPort +
|
||||
"/InterRegions - @ " + regInfo.RegionLocX + "," + regInfo.RegionLocY +
|
||||
" - Is this neighbor up?");
|
||||
MainLog.Instance.Debug(e.ToString());
|
||||
m_log.Warn("Socket Error: Unable to connect to adjacent region using tcp://" +
|
||||
regInfo.RemotingAddress +
|
||||
":" + regInfo.RemotingPort +
|
||||
"/InterRegions - @ " + regInfo.RegionLocX + "," + regInfo.RegionLocY +
|
||||
" - Is this neighbor up?");
|
||||
m_log.Debug(e.ToString());
|
||||
return false;
|
||||
}
|
||||
catch (InvalidCredentialException e)
|
||||
{
|
||||
MainLog.Instance.Warn("Invalid Credentials: Unable to connect to adjacent region using tcp://" +
|
||||
regInfo.RemotingAddress +
|
||||
":" + regInfo.RemotingPort +
|
||||
"/InterRegions - @ " + regInfo.RegionLocX + "," + regInfo.RegionLocY);
|
||||
MainLog.Instance.Debug(e.ToString());
|
||||
m_log.Warn("Invalid Credentials: Unable to connect to adjacent region using tcp://" +
|
||||
regInfo.RemotingAddress +
|
||||
":" + regInfo.RemotingPort +
|
||||
"/InterRegions - @ " + regInfo.RegionLocX + "," + regInfo.RegionLocY);
|
||||
m_log.Debug(e.ToString());
|
||||
return false;
|
||||
}
|
||||
catch (AuthenticationException e)
|
||||
{
|
||||
MainLog.Instance.Warn("Authentication exception: Unable to connect to adjacent region using tcp://" +
|
||||
regInfo.RemotingAddress +
|
||||
":" + regInfo.RemotingPort +
|
||||
"/InterRegions - @ " + regInfo.RegionLocX + "," + regInfo.RegionLocY);
|
||||
MainLog.Instance.Debug(e.ToString());
|
||||
m_log.Warn("Authentication exception: Unable to connect to adjacent region using tcp://" +
|
||||
regInfo.RemotingAddress +
|
||||
":" + regInfo.RemotingPort +
|
||||
"/InterRegions - @ " + regInfo.RegionLocX + "," + regInfo.RegionLocY);
|
||||
m_log.Debug(e.ToString());
|
||||
return false;
|
||||
}
|
||||
catch (Exception e)
|
||||
{
|
||||
// This line errors with a Null Reference Exception.. Why? @.@
|
||||
//MainLog.Instance.Warn("Unknown exception: Unable to connect to adjacent region using tcp://" + regInfo.RemotingAddress +
|
||||
//m_log.Warn("Unknown exception: Unable to connect to adjacent region using tcp://" + regInfo.RemotingAddress +
|
||||
// ":" + regInfo.RemotingPort +
|
||||
//"/InterRegions - @ " + regInfo.RegionLocX + "," + regInfo.RegionLocY + " - This is likely caused by an incompatibility in the protocol between this sim and that one");
|
||||
MainLog.Instance.Debug(e.ToString());
|
||||
m_log.Debug(e.ToString());
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
@ -860,41 +862,41 @@ namespace OpenSim.Region.Communications.OGS1
|
|||
catch (RemotingException e)
|
||||
{
|
||||
NoteDeadRegion(regionHandle);
|
||||
MainLog.Instance.Warn("Remoting Error: Unable to connect to adjacent region: " + regInfo.RegionName +
|
||||
" " + regInfo.RegionLocX + "," + regInfo.RegionLocY);
|
||||
MainLog.Instance.Debug(e.ToString());
|
||||
m_log.Warn("Remoting Error: Unable to connect to adjacent region: " + regInfo.RegionName +
|
||||
" " + regInfo.RegionLocX + "," + regInfo.RegionLocY);
|
||||
m_log.Debug(e.ToString());
|
||||
return false;
|
||||
}
|
||||
catch (SocketException e)
|
||||
{
|
||||
NoteDeadRegion(regionHandle);
|
||||
MainLog.Instance.Warn("Socket Error: Unable to connect to adjacent region: " + regInfo.RegionName + " " +
|
||||
regInfo.RegionLocX + "," + regInfo.RegionLocY);
|
||||
MainLog.Instance.Debug(e.ToString());
|
||||
m_log.Warn("Socket Error: Unable to connect to adjacent region: " + regInfo.RegionName + " " +
|
||||
regInfo.RegionLocX + "," + regInfo.RegionLocY);
|
||||
m_log.Debug(e.ToString());
|
||||
return false;
|
||||
}
|
||||
catch (InvalidCredentialException e)
|
||||
{
|
||||
NoteDeadRegion(regionHandle);
|
||||
MainLog.Instance.Warn("Invalid Credentials: Unable to connect to adjacent region: " + regInfo.RegionName +
|
||||
" " + regInfo.RegionLocX + "," + regInfo.RegionLocY);
|
||||
MainLog.Instance.Debug(e.ToString());
|
||||
m_log.Warn("Invalid Credentials: Unable to connect to adjacent region: " + regInfo.RegionName +
|
||||
" " + regInfo.RegionLocX + "," + regInfo.RegionLocY);
|
||||
m_log.Debug(e.ToString());
|
||||
return false;
|
||||
}
|
||||
catch (AuthenticationException e)
|
||||
{
|
||||
NoteDeadRegion(regionHandle);
|
||||
MainLog.Instance.Warn("Authentication exception: Unable to connect to adjacent region: " +
|
||||
regInfo.RegionName + " " + regInfo.RegionLocX + "," + regInfo.RegionLocY);
|
||||
MainLog.Instance.Debug(e.ToString());
|
||||
m_log.Warn("Authentication exception: Unable to connect to adjacent region: " +
|
||||
regInfo.RegionName + " " + regInfo.RegionLocX + "," + regInfo.RegionLocY);
|
||||
m_log.Debug(e.ToString());
|
||||
return false;
|
||||
}
|
||||
catch (Exception e)
|
||||
{
|
||||
NoteDeadRegion(regionHandle);
|
||||
MainLog.Instance.Warn("Unknown exception: Unable to connect to adjacent region: " + regInfo.RegionName +
|
||||
" " + regInfo.RegionLocX + "," + regInfo.RegionLocY);
|
||||
MainLog.Instance.Debug(e.ToString());
|
||||
m_log.Warn("Unknown exception: Unable to connect to adjacent region: " + regInfo.RegionName +
|
||||
" " + regInfo.RegionLocX + "," + regInfo.RegionLocY);
|
||||
m_log.Debug(e.ToString());
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
@ -947,9 +949,9 @@ namespace OpenSim.Region.Communications.OGS1
|
|||
catch (RemotingException e)
|
||||
{
|
||||
NoteDeadRegion(regionHandle);
|
||||
MainLog.Instance.Warn("Remoting Error: Unable to connect to adjacent region: " + regInfo.RegionName +
|
||||
" " + regInfo.RegionLocX + "," + regInfo.RegionLocY);
|
||||
MainLog.Instance.Debug(e.ToString());
|
||||
m_log.Warn("Remoting Error: Unable to connect to adjacent region: " + regInfo.RegionName +
|
||||
" " + regInfo.RegionLocX + "," + regInfo.RegionLocY);
|
||||
m_log.Debug(e.ToString());
|
||||
return false;
|
||||
}
|
||||
catch
|
||||
|
@ -1000,9 +1002,9 @@ namespace OpenSim.Region.Communications.OGS1
|
|||
catch (RemotingException e)
|
||||
{
|
||||
NoteDeadRegion(regionHandle);
|
||||
MainLog.Instance.Warn("Remoting Error: Unable to connect to adjacent region: " + regInfo.RegionName +
|
||||
" " + regInfo.RegionLocX + "," + regInfo.RegionLocY);
|
||||
MainLog.Instance.Debug(e.ToString());
|
||||
m_log.Warn("Remoting Error: Unable to connect to adjacent region: " + regInfo.RegionName +
|
||||
" " + regInfo.RegionLocX + "," + regInfo.RegionLocY);
|
||||
m_log.Debug(e.ToString());
|
||||
return false;
|
||||
}
|
||||
catch
|
||||
|
@ -1052,61 +1054,61 @@ namespace OpenSim.Region.Communications.OGS1
|
|||
catch (RemotingException e)
|
||||
{
|
||||
NoteDeadRegion(regionHandle);
|
||||
MainLog.Instance.Warn("Remoting Error: Unable to connect to adjacent region to tell it to close child agents: " + regInfo.RegionName +
|
||||
m_log.Warn("Remoting Error: Unable to connect to adjacent region to tell it to close child agents: " + regInfo.RegionName +
|
||||
" " + regInfo.RegionLocX + "," + regInfo.RegionLocY);
|
||||
//MainLog.Instance.Debug(e.ToString());
|
||||
//m_log.Debug(e.ToString());
|
||||
return false;
|
||||
}
|
||||
|
||||
catch (SocketException e)
|
||||
{
|
||||
NoteDeadRegion(regionHandle);
|
||||
MainLog.Instance.Warn("Socket Error: Unable to connect to adjacent region using tcp://" +
|
||||
m_log.Warn("Socket Error: Unable to connect to adjacent region using tcp://" +
|
||||
regInfo.RemotingAddress +
|
||||
":" + regInfo.RemotingPort +
|
||||
"/InterRegions - @ " + regInfo.RegionLocX + "," + regInfo.RegionLocY +
|
||||
" - Is this neighbor up?");
|
||||
MainLog.Instance.Debug(e.ToString());
|
||||
m_log.Debug(e.ToString());
|
||||
return false;
|
||||
}
|
||||
catch (InvalidCredentialException e)
|
||||
{
|
||||
NoteDeadRegion(regionHandle);
|
||||
MainLog.Instance.Warn("Invalid Credentials: Unable to connect to adjacent region using tcp://" +
|
||||
m_log.Warn("Invalid Credentials: Unable to connect to adjacent region using tcp://" +
|
||||
regInfo.RemotingAddress +
|
||||
":" + regInfo.RemotingPort +
|
||||
"/InterRegions - @ " + regInfo.RegionLocX + "," + regInfo.RegionLocY);
|
||||
MainLog.Instance.Debug(e.ToString());
|
||||
m_log.Debug(e.ToString());
|
||||
return false;
|
||||
}
|
||||
catch (AuthenticationException e)
|
||||
{
|
||||
NoteDeadRegion(regionHandle);
|
||||
MainLog.Instance.Warn("Authentication exception: Unable to connect to adjacent region using tcp://" +
|
||||
m_log.Warn("Authentication exception: Unable to connect to adjacent region using tcp://" +
|
||||
regInfo.RemotingAddress +
|
||||
":" + regInfo.RemotingPort +
|
||||
"/InterRegions - @ " + regInfo.RegionLocX + "," + regInfo.RegionLocY);
|
||||
MainLog.Instance.Debug(e.ToString());
|
||||
m_log.Debug(e.ToString());
|
||||
return false;
|
||||
}
|
||||
catch (WebException e)
|
||||
{
|
||||
NoteDeadRegion(regionHandle);
|
||||
MainLog.Instance.Warn("WebException exception: Unable to connect to adjacent region using tcp://" +
|
||||
m_log.Warn("WebException exception: Unable to connect to adjacent region using tcp://" +
|
||||
regInfo.RemotingAddress +
|
||||
":" + regInfo.RemotingPort +
|
||||
"/InterRegions - @ " + regInfo.RegionLocX + "," + regInfo.RegionLocY);
|
||||
MainLog.Instance.Debug(e.ToString());
|
||||
m_log.Debug(e.ToString());
|
||||
return false;
|
||||
}
|
||||
catch (Exception e)
|
||||
{
|
||||
NoteDeadRegion(regionHandle);
|
||||
// This line errors with a Null Reference Exception.. Why? @.@
|
||||
//MainLog.Instance.Warn("Unknown exception: Unable to connect to adjacent region using tcp://" + regInfo.RemotingAddress +
|
||||
//m_log.Warn("Unknown exception: Unable to connect to adjacent region using tcp://" + regInfo.RemotingAddress +
|
||||
// ":" + regInfo.RemotingPort +
|
||||
//"/InterRegions - @ " + regInfo.RegionLocX + "," + regInfo.RegionLocY + " - This is likely caused by an incompatibility in the protocol between this sim and that one");
|
||||
MainLog.Instance.Debug(e.ToString());
|
||||
m_log.Debug(e.ToString());
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
@ -1133,7 +1135,7 @@ namespace OpenSim.Region.Communications.OGS1
|
|||
/// <returns></returns>
|
||||
public bool IncomingChildAgent(ulong regionHandle, AgentCircuitData agentData)
|
||||
{
|
||||
//MainLog.Instance.Verbose("INTER", gdebugRegionName + ": Incoming OGS1 Agent " + agentData.firstname + " " + agentData.lastname);
|
||||
//m_log.Info("[INTER]: " + gdebugRegionName + ": Incoming OGS1 Agent " + agentData.firstname + " " + agentData.lastname);
|
||||
|
||||
try
|
||||
{
|
||||
|
@ -1141,16 +1143,16 @@ namespace OpenSim.Region.Communications.OGS1
|
|||
}
|
||||
catch (RemotingException)
|
||||
{
|
||||
//MainLog.Instance.Error("Remoting Error: Unable to connect to adjacent region.\n" + e.ToString());
|
||||
//m_log.Error("Remoting Error: Unable to connect to adjacent region.\n" + e.ToString());
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
public bool TriggerRegionUp(SearializableRegionInfo regionData, ulong regionhandle)
|
||||
{
|
||||
MainLog.Instance.Verbose("INTER",
|
||||
gdebugRegionName + "Incoming OGS1 RegionUpReport: " + "(" + regionData.RegionLocX +
|
||||
"," + regionData.RegionLocY + "). Giving this region a fresh set of 'dead' tries");
|
||||
m_log.Info("[INTER]: " +
|
||||
gdebugRegionName + "Incoming OGS1 RegionUpReport: " + "(" + regionData.RegionLocX +
|
||||
"," + regionData.RegionLocY + "). Giving this region a fresh set of 'dead' tries");
|
||||
|
||||
try
|
||||
{
|
||||
|
@ -1169,14 +1171,14 @@ namespace OpenSim.Region.Communications.OGS1
|
|||
|
||||
catch (RemotingException e)
|
||||
{
|
||||
MainLog.Instance.Error("Remoting Error: Unable to connect to adjacent region.\n" + e.ToString());
|
||||
m_log.Error("Remoting Error: Unable to connect to adjacent region.\n" + e.ToString());
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
public bool TriggerChildAgentUpdate(ulong regionHandle, ChildAgentDataUpdate cAgentData)
|
||||
{
|
||||
//MainLog.Instance.Verbose("INTER", "Incoming OGS1 Child Agent Data Update");
|
||||
//m_log.Info("[INTER]: Incoming OGS1 Child Agent Data Update");
|
||||
|
||||
try
|
||||
{
|
||||
|
@ -1184,7 +1186,7 @@ namespace OpenSim.Region.Communications.OGS1
|
|||
}
|
||||
catch (RemotingException e)
|
||||
{
|
||||
MainLog.Instance.Error("Remoting Error: Unable to connect to adjacent region.\n" + e.ToString());
|
||||
m_log.Error("Remoting Error: Unable to connect to adjacent region.\n" + e.ToString());
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
@ -1206,7 +1208,7 @@ namespace OpenSim.Region.Communications.OGS1
|
|||
}
|
||||
catch (RemotingException e)
|
||||
{
|
||||
MainLog.Instance.Error("Remoting Error: Unable to connect to adjacent region.\n" + e.ToString());
|
||||
m_log.Error("Remoting Error: Unable to connect to adjacent region.\n" + e.ToString());
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
@ -1226,7 +1228,7 @@ namespace OpenSim.Region.Communications.OGS1
|
|||
}
|
||||
catch (RemotingException e)
|
||||
{
|
||||
MainLog.Instance.Error("Remoting Error: Unable to connect to adjacent region.\n" + e.ToString());
|
||||
m_log.Error("Remoting Error: Unable to connect to adjacent region.\n" + e.ToString());
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
@ -1239,7 +1241,7 @@ namespace OpenSim.Region.Communications.OGS1
|
|||
}
|
||||
catch (RemotingException e)
|
||||
{
|
||||
MainLog.Instance.Error("Remoting Error: Unable to connect to adjacent region.\n" + e.ToString());
|
||||
m_log.Error("Remoting Error: Unable to connect to adjacent region.\n" + e.ToString());
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
@ -1252,7 +1254,7 @@ namespace OpenSim.Region.Communications.OGS1
|
|||
}
|
||||
catch (RemotingException)
|
||||
{
|
||||
MainLog.Instance.Verbose("INTERREGION", "Remoting Error: Unable to connect to neighbour to tell it to close a child connection");
|
||||
m_log.Info("[INTERREGION]: Remoting Error: Unable to connect to neighbour to tell it to close a child connection");
|
||||
return false;
|
||||
}
|
||||
|
||||
|
|
|
@ -141,6 +141,8 @@ namespace OpenSim.Region.Communications.OGS1
|
|||
|
||||
public class OGS1InterRegionRemoting : MarshalByRefObject
|
||||
{
|
||||
private static readonly log4net.ILog m_log = log4net.LogManager.GetLogger(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType);
|
||||
|
||||
public OGS1InterRegionRemoting()
|
||||
{
|
||||
}
|
||||
|
@ -230,18 +232,18 @@ namespace OpenSim.Region.Communications.OGS1
|
|||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
public bool TellRegionToCloseChildConnection(ulong regionHandle, Guid agentID)
|
||||
{
|
||||
try
|
||||
{
|
||||
return InterRegionSingleton.Instance.TellRegionToCloseChildConnection(regionHandle, new LLUUID(agentID));
|
||||
|
||||
}
|
||||
catch (RemotingException)
|
||||
{
|
||||
OpenSim.Framework.Console.MainLog.Instance.Verbose("INTERREGION", "Remoting Error: Unable to connect to remote region: " + regionHandle.ToString());
|
||||
m_log.Info("[INTERREGION]: Remoting Error: Unable to connect to remote region: " + regionHandle.ToString());
|
||||
return false;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -38,6 +38,8 @@ namespace OpenSim.Region.Communications.OGS1
|
|||
{
|
||||
public class OGS1InventoryService : IInventoryServices
|
||||
{
|
||||
private static readonly log4net.ILog m_log = log4net.LogManager.GetLogger(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType);
|
||||
|
||||
private string _inventoryServerUrl;
|
||||
private Dictionary<LLUUID, InventoryRequest> m_RequestingInventory = new Dictionary<LLUUID, InventoryRequest>();
|
||||
|
||||
|
@ -71,9 +73,9 @@ namespace OpenSim.Region.Communications.OGS1
|
|||
{
|
||||
try
|
||||
{
|
||||
MainLog.Instance.Verbose(
|
||||
"INVENTORY", "Requesting inventory from {0}/GetInventory/ for user {1}",
|
||||
_inventoryServerUrl, userID);
|
||||
m_log.Info(
|
||||
String.Format("[INVENTORY]: Requesting inventory from {0}/GetInventory/ for user {1}",
|
||||
_inventoryServerUrl, userID));
|
||||
|
||||
RestObjectPosterResponse<InventoryCollection> requester
|
||||
= new RestObjectPosterResponse<InventoryCollection>();
|
||||
|
@ -83,7 +85,7 @@ namespace OpenSim.Region.Communications.OGS1
|
|||
}
|
||||
catch (Exception e)
|
||||
{
|
||||
MainLog.Instance.Error("INVENTORY", e.ToString());
|
||||
m_log.Error("[INVENTORY]: " + e.ToString());
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -96,9 +98,9 @@ namespace OpenSim.Region.Communications.OGS1
|
|||
LLUUID userID = response.UserID;
|
||||
if (m_RequestingInventory.ContainsKey(userID))
|
||||
{
|
||||
MainLog.Instance.Verbose("INVENTORY",
|
||||
m_log.Info(String.Format("[INVENTORY]: " +
|
||||
"Received inventory response for user {0} containing {1} folders and {2} items",
|
||||
userID, response.Folders.Count, response.AllItems.Count);
|
||||
userID, response.Folders.Count, response.AllItems.Count));
|
||||
|
||||
InventoryFolderImpl rootFolder = null;
|
||||
InventoryRequest request = m_RequestingInventory[userID];
|
||||
|
@ -132,10 +134,10 @@ namespace OpenSim.Region.Communications.OGS1
|
|||
}
|
||||
else
|
||||
{
|
||||
MainLog.Instance.Warn(
|
||||
"INVENTORY",
|
||||
"Received inventory response for {0} for which we do not have a record of requesting!",
|
||||
userID);
|
||||
m_log.Warn(
|
||||
String.Format("[INVENTORY]: " +
|
||||
"Received inventory response for {0} for which we do not have a record of requesting!",
|
||||
userID));
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -198,4 +200,4 @@ namespace OpenSim.Region.Communications.OGS1
|
|||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -40,6 +40,8 @@ namespace OpenSim.Region.Communications.OGS1
|
|||
{
|
||||
public class OGS1UserServices : IUserService
|
||||
{
|
||||
private static readonly log4net.ILog m_log = log4net.LogManager.GetLogger(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType);
|
||||
|
||||
private CommunicationsOGS1 m_parent;
|
||||
|
||||
public OGS1UserServices(CommunicationsOGS1 parent)
|
||||
|
@ -51,10 +53,10 @@ namespace OpenSim.Region.Communications.OGS1
|
|||
{
|
||||
if (data.Contains("error_type"))
|
||||
{
|
||||
MainLog.Instance.Warn("GRID",
|
||||
"Error sent by user server when trying to get user profile: (" +
|
||||
data["error_type"] +
|
||||
"): " + data["error_desc"]);
|
||||
m_log.Warn("[GRID]: " +
|
||||
"Error sent by user server when trying to get user profile: (" +
|
||||
data["error_type"] +
|
||||
"): " + data["error_desc"]);
|
||||
return null;
|
||||
}
|
||||
|
||||
|
@ -104,7 +106,7 @@ namespace OpenSim.Region.Communications.OGS1
|
|||
}
|
||||
else
|
||||
{
|
||||
MainLog.Instance.Warn("INTERGRID", "Got invalid queryID from userServer");
|
||||
m_log.Warn("[INTERGRID]: Got invalid queryID from userServer");
|
||||
}
|
||||
return pickerlist;
|
||||
}
|
||||
|
@ -158,7 +160,7 @@ namespace OpenSim.Region.Communications.OGS1
|
|||
}
|
||||
catch (System.Net.WebException)
|
||||
{
|
||||
MainLog.Instance.Warn("LOGOFF", "Unable to notify grid server of user logoff");
|
||||
m_log.Warn("[LOGOFF]: Unable to notify grid server of user logoff");
|
||||
}
|
||||
|
||||
|
||||
|
@ -186,8 +188,8 @@ namespace OpenSim.Region.Communications.OGS1
|
|||
}
|
||||
catch (WebException e)
|
||||
{
|
||||
MainLog.Instance.Warn("Error when trying to fetch Avatar Picker Response: " +
|
||||
e.Message);
|
||||
m_log.Warn("Error when trying to fetch Avatar Picker Response: " +
|
||||
e.Message);
|
||||
// Return Empty picker list (no results)
|
||||
}
|
||||
return pickerlist;
|
||||
|
@ -209,8 +211,8 @@ namespace OpenSim.Region.Communications.OGS1
|
|||
}
|
||||
catch (WebException e)
|
||||
{
|
||||
MainLog.Instance.Warn("Error when trying to fetch profile data by name from remote user server: " +
|
||||
e.Message);
|
||||
m_log.Warn("Error when trying to fetch profile data by name from remote user server: " +
|
||||
e.Message);
|
||||
}
|
||||
return null;
|
||||
}
|
||||
|
@ -299,24 +301,24 @@ namespace OpenSim.Region.Communications.OGS1
|
|||
}
|
||||
else
|
||||
{
|
||||
MainLog.Instance.Warn("GRID", "Unable to add new friend, User Server Reported an issue");
|
||||
m_log.Warn("[GRID]: Unable to add new friend, User Server Reported an issue");
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
MainLog.Instance.Warn("GRID", "Unable to add new friend, UserServer didn't understand me!");
|
||||
m_log.Warn("[GRID]: Unable to add new friend, UserServer didn't understand me!");
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
MainLog.Instance.Warn("GRID", "Unable to add new friend, UserServer didn't understand me!");
|
||||
m_log.Warn("[GRID]: Unable to add new friend, UserServer didn't understand me!");
|
||||
|
||||
}
|
||||
}
|
||||
catch (WebException e)
|
||||
{
|
||||
MainLog.Instance.Warn("GRID","Error when trying to AddNewUserFriend: " +
|
||||
e.Message);
|
||||
m_log.Warn("[GRID]: Error when trying to AddNewUserFriend: " +
|
||||
e.Message);
|
||||
|
||||
}
|
||||
|
||||
|
@ -352,24 +354,24 @@ namespace OpenSim.Region.Communications.OGS1
|
|||
}
|
||||
else
|
||||
{
|
||||
MainLog.Instance.Warn("GRID", "Unable to remove friend, User Server Reported an issue");
|
||||
m_log.Warn("[GRID]: Unable to remove friend, User Server Reported an issue");
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
MainLog.Instance.Warn("GRID", "Unable to remove friend, UserServer didn't understand me!");
|
||||
m_log.Warn("[GRID]: Unable to remove friend, UserServer didn't understand me!");
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
MainLog.Instance.Warn("GRID", "Unable to remove friend, UserServer didn't understand me!");
|
||||
m_log.Warn("[GRID]: Unable to remove friend, UserServer didn't understand me!");
|
||||
|
||||
}
|
||||
}
|
||||
catch (WebException e)
|
||||
{
|
||||
MainLog.Instance.Warn("GRID", "Error when trying to RemoveUserFriend: " +
|
||||
e.Message);
|
||||
m_log.Warn("[GRID]: Error when trying to RemoveUserFriend: " +
|
||||
e.Message);
|
||||
|
||||
}
|
||||
}
|
||||
|
@ -404,25 +406,24 @@ namespace OpenSim.Region.Communications.OGS1
|
|||
}
|
||||
else
|
||||
{
|
||||
MainLog.Instance.Warn("GRID", "Unable to update_user_friend_perms, User Server Reported an issue");
|
||||
m_log.Warn("[GRID]: Unable to update_user_friend_perms, User Server Reported an issue");
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
MainLog.Instance.Warn("GRID", "Unable to update_user_friend_perms, UserServer didn't understand me!");
|
||||
m_log.Warn("[GRID]: Unable to update_user_friend_perms, UserServer didn't understand me!");
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
MainLog.Instance.Warn("GRID", "Unable to update_user_friend_perms, UserServer didn't understand me!");
|
||||
m_log.Warn("[GRID]: Unable to update_user_friend_perms, UserServer didn't understand me!");
|
||||
|
||||
}
|
||||
}
|
||||
catch (WebException e)
|
||||
{
|
||||
MainLog.Instance.Warn("GRID", "Error when trying to update_user_friend_perms: " +
|
||||
e.Message);
|
||||
|
||||
m_log.Warn("[GRID]: Error when trying to update_user_friend_perms: " +
|
||||
e.Message);
|
||||
}
|
||||
}
|
||||
/// <summary>
|
||||
|
@ -452,14 +453,13 @@ namespace OpenSim.Region.Communications.OGS1
|
|||
}
|
||||
catch (WebException e)
|
||||
{
|
||||
MainLog.Instance.Warn("Error when trying to fetch Avatar's friends list: " +
|
||||
e.Message);
|
||||
m_log.Warn("Error when trying to fetch Avatar's friends list: " +
|
||||
e.Message);
|
||||
// Return Empty list (no friends)
|
||||
}
|
||||
return buddylist;
|
||||
|
||||
}
|
||||
|
||||
#endregion
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -41,6 +41,8 @@ namespace OpenSim.Region.Environment
|
|||
/// </summary>
|
||||
public class EstateManager
|
||||
{
|
||||
private static readonly log4net.ILog m_log = log4net.LogManager.GetLogger(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType);
|
||||
|
||||
private Scene m_scene;
|
||||
private RegionInfo m_regInfo;
|
||||
|
||||
|
@ -156,7 +158,7 @@ namespace OpenSim.Region.Environment
|
|||
{
|
||||
case "getinfo":
|
||||
|
||||
//MainLog.Instance.Verbose("ESTATE","CLIENT--->" + packet.ToString());
|
||||
//m_log.Info("[ESTATE]: CLIENT--->" + packet.ToString());
|
||||
sendRegionInfoPacketToAll();
|
||||
if (m_scene.PermissionsMngr.GenericEstatePermission(remote_client.AgentId))
|
||||
{
|
||||
|
@ -223,7 +225,7 @@ namespace OpenSim.Region.Environment
|
|||
}
|
||||
break;
|
||||
default:
|
||||
MainLog.Instance.Error("EstateOwnerMessage: Unknown method requested\n" + packet.ToString());
|
||||
m_log.Error("EstateOwnerMessage: Unknown method requested\n" + packet.ToString());
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
@ -283,7 +285,7 @@ namespace OpenSim.Region.Environment
|
|||
returnblock[8].Parameter = Helpers.StringToField("1");
|
||||
|
||||
packet.ParamList = returnblock;
|
||||
//MainLog.Instance.Verbose("ESTATE", "SIM--->" + packet.ToString());
|
||||
//m_log.Info("[ESTATE]: SIM--->" + packet.ToString());
|
||||
remote_client.OutPacket(packet, ThrottleOutPacketType.Task);
|
||||
|
||||
sendEstateManagerList(remote_client, packet);
|
||||
|
@ -322,7 +324,7 @@ namespace OpenSim.Region.Environment
|
|||
returnblock[j].Parameter = EstateManagers[i].GetBytes(); j++;
|
||||
}
|
||||
packet.ParamList = returnblock;
|
||||
//MainLog.Instance.Verbose("ESTATE", "SIM--->" + packet.ToString());
|
||||
//m_log.Info("[ESTATE]: SIM--->" + packet.ToString());
|
||||
remote_client.OutPacket(packet, ThrottleOutPacketType.Task);
|
||||
}
|
||||
|
||||
|
@ -364,10 +366,10 @@ namespace OpenSim.Region.Environment
|
|||
|
||||
default:
|
||||
|
||||
MainLog.Instance.Error("EstateOwnerMessage: Unknown EstateAccessType requested in estateAccessDelta\n" + packet.ToString());
|
||||
m_log.Error("EstateOwnerMessage: Unknown EstateAccessType requested in estateAccessDelta\n" + packet.ToString());
|
||||
break;
|
||||
}
|
||||
//MainLog.Instance.Error("EstateOwnerMessage: estateAccessDelta\n" + packet.ToString());
|
||||
//m_log.Error("EstateOwnerMessage: estateAccessDelta\n" + packet.ToString());
|
||||
|
||||
|
||||
}
|
||||
|
@ -375,7 +377,7 @@ namespace OpenSim.Region.Environment
|
|||
{
|
||||
if (packet.ParamList.Length != 9)
|
||||
{
|
||||
MainLog.Instance.Error("EstateOwnerMessage: SetRegionInfo method has a ParamList of invalid length");
|
||||
m_log.Error("EstateOwnerMessage: SetRegionInfo method has a ParamList of invalid length");
|
||||
}
|
||||
else
|
||||
{
|
||||
|
@ -438,7 +440,7 @@ namespace OpenSim.Region.Environment
|
|||
{
|
||||
if (packet.ParamList.Length != 9)
|
||||
{
|
||||
MainLog.Instance.Error("EstateOwnerMessage: SetRegionTerrain method has a ParamList of invalid length");
|
||||
m_log.Error("EstateOwnerMessage: SetRegionTerrain method has a ParamList of invalid length");
|
||||
}
|
||||
else
|
||||
{
|
||||
|
@ -463,7 +465,7 @@ namespace OpenSim.Region.Environment
|
|||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
MainLog.Instance.Error("EstateManager: Exception while setting terrain settings: \n" + packet.ToString() + "\n" + ex.ToString());
|
||||
m_log.Error("EstateManager: Exception while setting terrain settings: \n" + packet.ToString() + "\n" + ex.ToString());
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -25,6 +25,7 @@
|
|||
* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
*
|
||||
*/
|
||||
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using Axiom.Math;
|
||||
|
@ -38,7 +39,6 @@ using OpenSim.Region.Physics.Manager;
|
|||
|
||||
namespace OpenSim.Region.Environment.LandManagement
|
||||
{
|
||||
|
||||
#region LandManager Class
|
||||
|
||||
/// <summary>
|
||||
|
@ -46,6 +46,8 @@ namespace OpenSim.Region.Environment.LandManagement
|
|||
/// </summary>
|
||||
public class LandManager
|
||||
{
|
||||
private static readonly log4net.ILog m_log = log4net.LogManager.GetLogger(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType);
|
||||
|
||||
#region Constants
|
||||
|
||||
//Land types set with flags in ParcelOverlay.
|
||||
|
@ -57,7 +59,6 @@ namespace OpenSim.Region.Environment.LandManagement
|
|||
public const byte LAND_TYPE_IS_FOR_SALE = (byte) 4; //Equals 00000100
|
||||
public const byte LAND_TYPE_IS_BEING_AUCTIONED = (byte) 5; //Equals 00000101
|
||||
|
||||
|
||||
//Flags that when set, a border on the given side will be placed
|
||||
//NOTE: North and East is assumable by the west and south sides (if land to east has a west border, then I have an east border; etc)
|
||||
//This took forever to figure out -- jeesh. /blame LL for even having to send these
|
||||
|
@ -73,7 +74,6 @@ namespace OpenSim.Region.Environment.LandManagement
|
|||
public const int LAND_SELECT_OBJECTS_GROUP = 4;
|
||||
public const int LAND_SELECT_OBJECTS_OTHER = 8;
|
||||
|
||||
|
||||
//These are other constants. Yay!
|
||||
public const int START_LAND_LOCAL_ID = 1;
|
||||
|
||||
|
@ -127,7 +127,7 @@ namespace OpenSim.Region.Environment.LandManagement
|
|||
//}
|
||||
//catch (Exception ex)
|
||||
//{
|
||||
//MainLog.Instance.Error("LandManager", "IncomingLandObjectsFromStorage: Exception: " + ex.ToString());
|
||||
//m_log.Error("[LandManager]: IncomingLandObjectsFromStorage: Exception: " + ex.ToString());
|
||||
//throw ex;
|
||||
//}
|
||||
}
|
||||
|
@ -526,8 +526,7 @@ namespace OpenSim.Region.Environment.LandManagement
|
|||
}
|
||||
catch (Exception e)
|
||||
{
|
||||
MainLog.Instance.Debug("LAND",
|
||||
"Skipped Land checks because avatar is out of bounds: " + e.Message);
|
||||
m_log.Debug("[LAND]: Skipped Land checks because avatar is out of bounds: " + e.Message);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -40,16 +40,16 @@ namespace OpenSim.Region.Environment
|
|||
{
|
||||
public class ModuleLoader
|
||||
{
|
||||
private static readonly log4net.ILog m_log = log4net.LogManager.GetLogger(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType);
|
||||
|
||||
public Dictionary<string, Assembly> LoadedAssemblys = new Dictionary<string, Assembly>();
|
||||
|
||||
private readonly List<IRegionModule> m_loadedModules = new List<IRegionModule>();
|
||||
private readonly Dictionary<string, IRegionModule> m_loadedSharedModules = new Dictionary<string, IRegionModule>();
|
||||
private readonly LogBase m_log;
|
||||
private readonly IConfigSource m_config;
|
||||
|
||||
public ModuleLoader(LogBase log, IConfigSource config)
|
||||
public ModuleLoader(IConfigSource config)
|
||||
{
|
||||
m_log = log;
|
||||
m_config = config;
|
||||
}
|
||||
|
||||
|
@ -78,7 +78,7 @@ namespace OpenSim.Region.Environment
|
|||
DynamicTextureModule dynamicModule = new DynamicTextureModule();
|
||||
if (m_loadedSharedModules.ContainsKey(dynamicModule.Name))
|
||||
{
|
||||
m_log.Error("MODULES", "Module name \"{0}\" already exists in module list. Module type {1} not added!", dynamicModule.Name, "DynamicTextureModule");
|
||||
m_log.Error(String.Format("[MODULES]: Module name \"{0}\" already exists in module list. Module type {1} not added!", dynamicModule.Name, "DynamicTextureModule"));
|
||||
}
|
||||
else
|
||||
{
|
||||
|
@ -88,7 +88,7 @@ namespace OpenSim.Region.Environment
|
|||
ChatModule chat = new ChatModule();
|
||||
if (m_loadedSharedModules.ContainsKey(chat.Name))
|
||||
{
|
||||
m_log.Error("MODULES", "Module name \"{0}\" already exists in module list. Module type {1} not added!", chat.Name, "ChatModule");
|
||||
m_log.Error(String.Format("[MODULES]: Module name \"{0}\" already exists in module list. Module type {1} not added!", chat.Name, "ChatModule"));
|
||||
}
|
||||
else
|
||||
{
|
||||
|
@ -98,7 +98,7 @@ namespace OpenSim.Region.Environment
|
|||
InstantMessageModule imMod = new InstantMessageModule();
|
||||
if (m_loadedSharedModules.ContainsKey(imMod.Name))
|
||||
{
|
||||
m_log.Error("MODULES", "Module name \"{0}\" already exists in module list. Module type {1} not added!", imMod.Name, "InstantMessageModule");
|
||||
m_log.Error(String.Format("[MODULES]: Module name \"{0}\" already exists in module list. Module type {1} not added!", imMod.Name, "InstantMessageModule"));
|
||||
}
|
||||
else
|
||||
{
|
||||
|
@ -108,7 +108,7 @@ namespace OpenSim.Region.Environment
|
|||
LoadImageURLModule loadMod = new LoadImageURLModule();
|
||||
if (m_loadedSharedModules.ContainsKey(loadMod.Name))
|
||||
{
|
||||
m_log.Error("MODULES", "Module name \"{0}\" already exists in module list. Module type {1} not added!", loadMod.Name, "LoadImageURLModule");
|
||||
m_log.Error(String.Format("[MODULES]: Module name \"{0}\" already exists in module list. Module type {1} not added!", loadMod.Name, "LoadImageURLModule"));
|
||||
}
|
||||
else
|
||||
{
|
||||
|
@ -118,7 +118,7 @@ namespace OpenSim.Region.Environment
|
|||
AvatarFactoryModule avatarFactory = new AvatarFactoryModule();
|
||||
if (m_loadedSharedModules.ContainsKey(avatarFactory.Name))
|
||||
{
|
||||
m_log.Error("MODULES", "Module name \"{0}\" already exists in module list. Module type {1} not added!", avatarFactory.Name, "AvarFactoryModule");
|
||||
m_log.Error(String.Format("[MODULES]: Module name \"{0}\" already exists in module list. Module type {1} not added!", avatarFactory.Name, "AvarFactoryModule"));
|
||||
}
|
||||
else
|
||||
{
|
||||
|
@ -128,7 +128,7 @@ namespace OpenSim.Region.Environment
|
|||
XMLRPCModule xmlRpcMod = new XMLRPCModule();
|
||||
if (m_loadedSharedModules.ContainsKey(xmlRpcMod.Name))
|
||||
{
|
||||
m_log.Error("MODULES", "Module name \"{0}\" already exists in module list. Module type {1} not added!", xmlRpcMod.Name, "XMLRPCModule");
|
||||
m_log.Error(String.Format("[MODULES]: Module name \"{0}\" already exists in module list. Module type {1} not added!", xmlRpcMod.Name, "XMLRPCModule"));
|
||||
}
|
||||
else
|
||||
{
|
||||
|
@ -186,17 +186,17 @@ namespace OpenSim.Region.Environment
|
|||
|
||||
if (modules.Length > 0)
|
||||
{
|
||||
m_log.Verbose("MODULES", "Found Module Library [{0}]", dllName);
|
||||
m_log.Info(String.Format("[MODULES]: Found Module Library [{0}]", dllName));
|
||||
foreach (IRegionModule module in modules)
|
||||
{
|
||||
if (!module.IsSharedModule)
|
||||
{
|
||||
m_log.Verbose("MODULES", " [{0}]: Initializing.", module.Name);
|
||||
m_log.Info(String.Format("[MODULES]: [{0}]: Initializing.", module.Name));
|
||||
InitializeModule(module, scene);
|
||||
}
|
||||
else
|
||||
{
|
||||
m_log.Verbose("MODULES", " [{0}]: Loading Shared Module.", module.Name);
|
||||
m_log.Info(String.Format("[MODULES]: [{0}]: Loading Shared Module.", module.Name));
|
||||
LoadSharedModule(module);
|
||||
}
|
||||
}
|
||||
|
@ -246,7 +246,7 @@ namespace OpenSim.Region.Environment
|
|||
}
|
||||
catch (BadImageFormatException)
|
||||
{
|
||||
//m_log.Verbose("MODULES", "The file [{0}] is not a module assembly.", e.FileName);
|
||||
//m_log.Info(String.Format("[MODULES]: The file [{0}] is not a module assembly.", e.FileName));
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -270,7 +270,7 @@ namespace OpenSim.Region.Environment
|
|||
}
|
||||
catch (ReflectionTypeLoadException)
|
||||
{
|
||||
m_log.Verbose("MODULES", "Could not load types for [{0}].", pluginAssembly.FullName);
|
||||
m_log.Info(String.Format("[MODULES]: Could not load types for [{0}].", pluginAssembly.FullName));
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -41,8 +41,7 @@ namespace OpenSim.Region.Environment.Modules
|
|||
{
|
||||
public class BetaGridLikeMoneyModule: IRegionModule
|
||||
{
|
||||
|
||||
private LogBase m_log;
|
||||
private static readonly log4net.ILog m_log = log4net.LogManager.GetLogger(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType);
|
||||
|
||||
private Dictionary<ulong,Scene> m_scenel = new Dictionary<ulong,Scene>();
|
||||
|
||||
|
@ -66,8 +65,6 @@ namespace OpenSim.Region.Environment.Modules
|
|||
|
||||
public void Initialise(Scene scene, IConfigSource config)
|
||||
{
|
||||
m_log = MainLog.Instance;
|
||||
|
||||
m_gConfig = config;
|
||||
ReadConfigAndPopulate();
|
||||
|
||||
|
@ -160,11 +157,8 @@ namespace OpenSim.Region.Environment.Modules
|
|||
}
|
||||
else
|
||||
{
|
||||
MainLog.Instance.Warn("MONEY", "Potential Fraud Warning, got money transfer request for avatar that isn't in this simulator - Details; Sender:" + e.sender.ToString() + " Reciver: " + e.reciever.ToString() + " Amount: " + e.amount.ToString());
|
||||
m_log.Warn("[MONEY]: Potential Fraud Warning, got money transfer request for avatar that isn't in this simulator - Details; Sender:" + e.sender.ToString() + " Reciver: " + e.reciever.ToString() + " Amount: " + e.amount.ToString());
|
||||
}
|
||||
|
||||
|
||||
|
||||
}
|
||||
|
||||
private bool doMoneyTranfer(LLUUID Sender, LLUUID Receiver, int amount)
|
||||
|
|
|
@ -43,8 +43,9 @@ namespace OpenSim.Region.Environment.Modules
|
|||
{
|
||||
public class ChatModule : IRegionModule, ISimChat
|
||||
{
|
||||
private static readonly log4net.ILog m_log = log4net.LogManager.GetLogger(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType);
|
||||
|
||||
private List<Scene> m_scenes = new List<Scene>();
|
||||
private LogBase m_log;
|
||||
|
||||
private int m_whisperdistance = 10;
|
||||
private int m_saydistance = 30;
|
||||
|
@ -59,11 +60,6 @@ namespace OpenSim.Region.Environment.Modules
|
|||
internal object m_syncLogout = new object();
|
||||
private Thread m_irc_connector=null;
|
||||
|
||||
public ChatModule()
|
||||
{
|
||||
m_log = MainLog.Instance;
|
||||
}
|
||||
|
||||
public void Initialise(Scene scene, IConfigSource config)
|
||||
{
|
||||
lock (m_syncInit)
|
||||
|
@ -159,7 +155,7 @@ namespace OpenSim.Region.Environment.Modules
|
|||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
m_log.Error("IRC", "NewClient exception trap:" + ex.ToString());
|
||||
m_log.Error("[IRC]: NewClient exception trap:" + ex.ToString());
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -180,13 +176,13 @@ namespace OpenSim.Region.Environment.Modules
|
|||
{
|
||||
m_last_leaving_user = clientName;
|
||||
m_irc.PrivMsg(m_irc.Nick, "Sim", "notices " + clientName + " left " + clientRegion);
|
||||
m_log.Verbose("IRC", "IRC watcher notices " + clientName + " left " + clientRegion);
|
||||
m_log.Info("[IRC]: IRC watcher notices " + clientName + " left " + clientRegion);
|
||||
}
|
||||
}
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
m_log.Error("IRC", "ClientLoggedOut exception trap:" + ex.ToString());
|
||||
m_log.Error("[IRC]: ClientLoggedOut exception trap:" + ex.ToString());
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -319,6 +315,8 @@ namespace OpenSim.Region.Environment.Modules
|
|||
|
||||
internal class IRCChatModule
|
||||
{
|
||||
private static readonly log4net.ILog m_log = log4net.LogManager.GetLogger(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType);
|
||||
|
||||
private string m_server = null;
|
||||
private uint m_port = 6668;
|
||||
private string m_user = "USER OpenSimBot 8 * :I'm a OpenSim to irc bot";
|
||||
|
@ -341,7 +339,6 @@ namespace OpenSim.Region.Environment.Modules
|
|||
|
||||
private List<Scene> m_scenes = null;
|
||||
private List<Scene> m_last_scenes = null;
|
||||
private LogBase m_log;
|
||||
|
||||
public IRCChatModule(IConfigSource config)
|
||||
{
|
||||
|
@ -388,9 +385,8 @@ namespace OpenSim.Region.Environment.Modules
|
|||
}
|
||||
catch (Exception)
|
||||
{
|
||||
MainLog.Instance.Verbose("CHAT", "No IRC config information, skipping IRC bridge configuration");
|
||||
m_log.Info("[CHAT]: No IRC config information, skipping IRC bridge configuration");
|
||||
}
|
||||
m_log = MainLog.Instance;
|
||||
}
|
||||
|
||||
public bool Connect(List<Scene> scenes)
|
||||
|
@ -404,9 +400,9 @@ namespace OpenSim.Region.Environment.Modules
|
|||
if (m_last_scenes == null) { m_last_scenes = scenes; }
|
||||
|
||||
m_tcp = new TcpClient(m_server, (int)m_port);
|
||||
m_log.Verbose("IRC", "Connecting...");
|
||||
m_log.Info("[IRC]: Connecting...");
|
||||
m_stream = m_tcp.GetStream();
|
||||
m_log.Verbose("IRC", "Connected to " + m_server);
|
||||
m_log.Info("[IRC]: Connected to " + m_server);
|
||||
m_reader = new StreamReader(m_stream);
|
||||
m_writer = new StreamWriter(m_stream);
|
||||
|
||||
|
@ -422,7 +418,7 @@ namespace OpenSim.Region.Environment.Modules
|
|||
m_writer.Flush();
|
||||
m_writer.WriteLine("JOIN " + m_channel);
|
||||
m_writer.Flush();
|
||||
m_log.Verbose("IRC", "Connection fully established");
|
||||
m_log.Info("[IRC]: Connection fully established");
|
||||
m_connected = true;
|
||||
}
|
||||
catch (Exception e)
|
||||
|
@ -475,16 +471,16 @@ namespace OpenSim.Region.Environment.Modules
|
|||
m_writer.WriteLine(m_privmsgformat, m_channel, from, region, msg);
|
||||
}
|
||||
m_writer.Flush();
|
||||
m_log.Verbose("IRC", "PrivMsg " + from + " in " + region + " :" + msg);
|
||||
m_log.Info("[IRC]: PrivMsg " + from + " in " + region + " :" + msg);
|
||||
}
|
||||
catch (IOException)
|
||||
{
|
||||
m_log.Error("IRC", "Disconnected from IRC server.(PrivMsg)");
|
||||
m_log.Error("[IRC]: Disconnected from IRC server.(PrivMsg)");
|
||||
Reconnect();
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
m_log.Error("IRC", "PrivMsg exception trap:" + ex.ToString());
|
||||
m_log.Error("[IRC]: PrivMsg exception trap:" + ex.ToString());
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -493,7 +489,7 @@ namespace OpenSim.Region.Environment.Modules
|
|||
//examines IRC commands and extracts any private messages
|
||||
// which will then be reboadcast in the Sim
|
||||
|
||||
m_log.Verbose("IRC", "ExtractMsg: " + input);
|
||||
m_log.Info("[IRC]: ExtractMsg: " + input);
|
||||
Dictionary<string, string> result = null;
|
||||
//string regex = @":(?<nick>\w*)!~(?<user>\S*) PRIVMSG (?<channel>\S+) :(?<msg>.*)";
|
||||
string regex = @":(?<nick>\w*)!(?<user>\S*) PRIVMSG (?<channel>\S+) :(?<msg>.*)";
|
||||
|
@ -510,10 +506,10 @@ namespace OpenSim.Region.Environment.Modules
|
|||
}
|
||||
else
|
||||
{
|
||||
m_log.Verbose("IRC", "Number of matches: " + matches.Count);
|
||||
m_log.Info("[IRC]: Number of matches: " + matches.Count);
|
||||
if (matches.Count > 0)
|
||||
{
|
||||
m_log.Verbose("IRC", "Number of groups: " + matches[0].Groups.Count);
|
||||
m_log.Info("[IRC]: Number of groups: " + matches[0].Groups.Count);
|
||||
}
|
||||
}
|
||||
return result;
|
||||
|
@ -536,12 +532,12 @@ namespace OpenSim.Region.Environment.Modules
|
|||
}
|
||||
catch (IOException)
|
||||
{
|
||||
m_log.Error("IRC", "Disconnected from IRC server.(PingRun)");
|
||||
m_log.Error("[IRC]: Disconnected from IRC server.(PingRun)");
|
||||
Reconnect();
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
m_log.Error("IRC", "PingRun exception trap:" + ex.ToString() + "\n" + ex.StackTrace);
|
||||
m_log.Error("[IRC]: PingRun exception trap:" + ex.ToString() + "\n" + ex.StackTrace);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -552,29 +548,29 @@ namespace OpenSim.Region.Environment.Modules
|
|||
LLVector3 pos = new LLVector3(128, 128, 20);
|
||||
while (true)
|
||||
{
|
||||
try
|
||||
{
|
||||
while ((m_connected == true) && ((inputLine = m_reader.ReadLine()) != null))
|
||||
try
|
||||
{
|
||||
while ((m_connected == true) && ((inputLine = m_reader.ReadLine()) != null))
|
||||
{
|
||||
// Console.WriteLine(inputLine);
|
||||
if (inputLine.Contains(m_channel))
|
||||
{
|
||||
Dictionary<string, string> data = ExtractMsg(inputLine);
|
||||
Dictionary<string, string> data = ExtractMsg(inputLine);
|
||||
// Any chat ???
|
||||
if (data != null)
|
||||
{
|
||||
foreach (Scene m_scene in m_scenes)
|
||||
{
|
||||
m_scene.ForEachScenePresence(delegate(ScenePresence avatar)
|
||||
{
|
||||
if (!avatar.IsChildAgent)
|
||||
{
|
||||
if (!avatar.IsChildAgent)
|
||||
{
|
||||
avatar.ControllingClient.SendChatMessage(
|
||||
Helpers.StringToField(data["msg"]), 255,
|
||||
pos, data["nick"],
|
||||
LLUUID.Zero);
|
||||
}
|
||||
});
|
||||
avatar.ControllingClient.SendChatMessage(
|
||||
Helpers.StringToField(data["msg"]), 255,
|
||||
pos, data["nick"],
|
||||
LLUUID.Zero);
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
|
@ -584,24 +580,24 @@ namespace OpenSim.Region.Environment.Modules
|
|||
// Was an command from the IRC server
|
||||
ProcessIRCCommand(inputLine);
|
||||
}
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
// Was an command from the IRC server
|
||||
ProcessIRCCommand(inputLine);
|
||||
}
|
||||
Thread.Sleep(150);
|
||||
}
|
||||
}
|
||||
catch (IOException)
|
||||
{
|
||||
m_log.Error("IRC", "ListenerRun IOException. Disconnected from IRC server ??? (ListenerRun)");
|
||||
Reconnect();
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
m_log.Error("IRC", "ListenerRun exception trap:" + ex.ToString()+"\n"+ex.StackTrace);
|
||||
}
|
||||
}
|
||||
catch (IOException)
|
||||
{
|
||||
m_log.Error("[IRC]: ListenerRun IOException. Disconnected from IRC server ??? (ListenerRun)");
|
||||
Reconnect();
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
m_log.Error("[IRC]: ListenerRun exception trap:" + ex.ToString() + "\n" + ex.StackTrace);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -626,27 +622,27 @@ namespace OpenSim.Region.Environment.Modules
|
|||
}
|
||||
catch (Exception ex) // IRC gate should not crash Sim
|
||||
{
|
||||
m_log.Error("IRC", "BroadcastSim Exception Trap:" + ex.ToString() + "\n" + ex.StackTrace);
|
||||
m_log.Error("[IRC]: BroadcastSim Exception Trap:" + ex.ToString() + "\n" + ex.StackTrace);
|
||||
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
public enum ErrorReplies
|
||||
{
|
||||
NotRegistered = 451, // ":You have not registered"
|
||||
NicknameInUse = 433 // "<nick> :Nickname is already in use"
|
||||
}
|
||||
|
||||
public enum Replies
|
||||
{
|
||||
MotdStart = 375, // ":- <server> Message of the day - "
|
||||
Motd = 372, // ":- <text>"
|
||||
EndOfMotd = 376 // ":End of /MOTD command"
|
||||
|
||||
}
|
||||
|
||||
public void ProcessIRCCommand(string command)
|
||||
{
|
||||
//m_log.Verbose("IRC", "ProcessIRCCommand:"+command);
|
||||
//m_log.Info("[IRC]: ProcessIRCCommand:" + command);
|
||||
|
||||
string[] commArgs = new string[command.Split(' ').Length];
|
||||
string c_server = m_server;
|
||||
|
@ -656,6 +652,7 @@ namespace OpenSim.Region.Environment.Modules
|
|||
{
|
||||
commArgs[0] = commArgs[0].Remove(0, 1);
|
||||
}
|
||||
|
||||
if (commArgs[1] == "002")
|
||||
{
|
||||
// fetch the correct servername
|
||||
|
@ -668,7 +665,7 @@ namespace OpenSim.Region.Environment.Modules
|
|||
|
||||
if (commArgs[0] == "ERROR")
|
||||
{
|
||||
m_log.Error("IRC", "IRC SERVER ERROR:" + command);
|
||||
m_log.Error("[IRC]: IRC SERVER ERROR:" + command);
|
||||
}
|
||||
|
||||
if (commArgs[0] == "PING")
|
||||
|
@ -695,7 +692,7 @@ namespace OpenSim.Region.Environment.Modules
|
|||
case (int)ErrorReplies.NicknameInUse:
|
||||
// Gen a new name
|
||||
m_nick = m_basenick + Util.RandomClass.Next(1, 99);
|
||||
m_log.Error("IRC", "IRC SERVER reports NicknameInUse, trying " + m_nick);
|
||||
m_log.Error("[IRC]: IRC SERVER reports NicknameInUse, trying " + m_nick);
|
||||
// Retry
|
||||
m_writer.WriteLine("NICK " + m_nick);
|
||||
m_writer.Flush();
|
||||
|
|
|
@ -40,8 +40,7 @@ namespace OpenSim.Region.Environment.Modules
|
|||
{
|
||||
public class FriendsModule : IRegionModule
|
||||
{
|
||||
|
||||
private LogBase m_log;
|
||||
private static readonly log4net.ILog m_log = log4net.LogManager.GetLogger(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType);
|
||||
|
||||
private Scene m_scene;
|
||||
|
||||
|
@ -49,7 +48,6 @@ namespace OpenSim.Region.Environment.Modules
|
|||
|
||||
public void Initialise(Scene scene, IConfigSource config)
|
||||
{
|
||||
m_log = MainLog.Instance;
|
||||
m_scene = scene;
|
||||
scene.EventManager.OnNewClient += OnNewClient;
|
||||
scene.EventManager.OnGridInstantMessageToFriendsModule += OnGridInstantMessage;
|
||||
|
@ -72,6 +70,7 @@ namespace OpenSim.Region.Environment.Modules
|
|||
|
||||
|
||||
}
|
||||
|
||||
private void OnInstantMessage(IClientAPI client,LLUUID fromAgentID,
|
||||
LLUUID fromAgentSession, LLUUID toAgentID,
|
||||
LLUUID imSessionID, uint timestamp, string fromAgentName,
|
||||
|
@ -89,13 +88,13 @@ namespace OpenSim.Region.Environment.Modules
|
|||
|
||||
m_pendingFriendRequests.Add(friendTransactionID, fromAgentID);
|
||||
|
||||
m_log.Verbose("FRIEND", "38 - From:" + fromAgentID.ToString() + " To: " + toAgentID.ToString() + " Session:" + imSessionID.ToString() + " Message:" + message);
|
||||
m_log.Info("[FRIEND]: 38 - From:" + fromAgentID.ToString() + " To: " + toAgentID.ToString() + " Session:" + imSessionID.ToString() + " Message:" + message);
|
||||
GridInstantMessage msg = new GridInstantMessage();
|
||||
msg.fromAgentID = fromAgentID.UUID;
|
||||
msg.fromAgentSession = fromAgentSession.UUID;
|
||||
msg.toAgentID = toAgentID.UUID;
|
||||
msg.imSessionID = friendTransactionID.UUID; // This is the item we're mucking with here
|
||||
m_log.Verbose("FRIEND","Filling Session: " + msg.imSessionID.ToString());
|
||||
m_log.Info("[FRIEND]: Filling Session: " + msg.imSessionID.ToString());
|
||||
msg.timestamp = timestamp;
|
||||
if (client != null)
|
||||
{
|
||||
|
@ -115,20 +114,18 @@ namespace OpenSim.Region.Environment.Modules
|
|||
msg.binaryBucket = binaryBucket;
|
||||
m_scene.TriggerGridInstantMessage(msg, InstantMessageReceiver.IMModule);
|
||||
}
|
||||
if (dialog == (byte)39)
|
||||
{
|
||||
m_log.Verbose("FRIEND", "38 - From:" + fromAgentID.ToString() + " To: " + toAgentID.ToString() + " Session:" + imSessionID.ToString() + " Message:" + message);
|
||||
|
||||
}
|
||||
if (dialog == (byte)40)
|
||||
{
|
||||
m_log.Verbose("FRIEND", "38 - From:" + fromAgentID.ToString() + " To: " + toAgentID.ToString() + " Session:" + imSessionID.ToString() + " Message:" + message);
|
||||
}
|
||||
|
||||
// 39 == Accept Friendship
|
||||
if (dialog == (byte)39)
|
||||
{
|
||||
m_log.Info("[FRIEND]: 39 - From:" + fromAgentID.ToString() + " To: " + toAgentID.ToString() + " Session:" + imSessionID.ToString() + " Message:" + message);
|
||||
}
|
||||
|
||||
// 40 == Decline Friendship
|
||||
|
||||
if (dialog == (byte)40)
|
||||
{
|
||||
m_log.Info("[FRIEND]: 40 - From:" + fromAgentID.ToString() + " To: " + toAgentID.ToString() + " Session:" + imSessionID.ToString() + " Message:" + message);
|
||||
}
|
||||
}
|
||||
|
||||
private void OnApprovedFriendRequest(IClientAPI client, LLUUID agentID, LLUUID transactionID, List<LLUUID> callingCardFolders)
|
||||
|
@ -160,6 +157,7 @@ namespace OpenSim.Region.Environment.Modules
|
|||
// TODO: Inform agent that the friend is online
|
||||
}
|
||||
}
|
||||
|
||||
private void OnDenyFriendRequest(IClientAPI client, LLUUID agentID, LLUUID transactionID, List<LLUUID> callingCardFolders)
|
||||
{
|
||||
if (m_pendingFriendRequests.ContainsKey(transactionID))
|
||||
|
@ -184,20 +182,15 @@ namespace OpenSim.Region.Environment.Modules
|
|||
msg.binaryBucket = new byte[0];
|
||||
m_scene.TriggerGridInstantMessage(msg, InstantMessageReceiver.IMModule);
|
||||
m_pendingFriendRequests.Remove(transactionID);
|
||||
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
private void OnTerminateFriendship(IClientAPI client, LLUUID agent, LLUUID exfriendID)
|
||||
{
|
||||
m_scene.StoreRemoveFriendship(agent, exfriendID);
|
||||
// TODO: Inform the client that the ExFriend is offline
|
||||
|
||||
}
|
||||
|
||||
|
||||
private void OnGridInstantMessage(GridInstantMessage msg)
|
||||
{
|
||||
// Trigger the above event handler
|
||||
|
@ -206,16 +199,12 @@ namespace OpenSim.Region.Environment.Modules
|
|||
msg.message, msg.dialog, msg.fromGroup, msg.offline, msg.ParentEstateID,
|
||||
new LLVector3(msg.Position.x, msg.Position.y, msg.Position.z), new LLUUID(msg.RegionID),
|
||||
msg.binaryBucket);
|
||||
|
||||
}
|
||||
|
||||
|
||||
public void PostInitialise()
|
||||
{
|
||||
}
|
||||
|
||||
|
||||
|
||||
public void Close()
|
||||
{
|
||||
}
|
||||
|
@ -230,4 +219,4 @@ namespace OpenSim.Region.Environment.Modules
|
|||
get { return false; }
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -39,12 +39,6 @@ namespace OpenSim.Region.Environment.Modules
|
|||
public class InstantMessageModule : IRegionModule
|
||||
{
|
||||
private List<Scene> m_scenes = new List<Scene>();
|
||||
private LogBase m_log;
|
||||
|
||||
public InstantMessageModule()
|
||||
{
|
||||
m_log = MainLog.Instance;
|
||||
}
|
||||
|
||||
public void Initialise(Scene scene, IConfigSource config)
|
||||
{
|
||||
|
@ -68,7 +62,6 @@ namespace OpenSim.Region.Environment.Modules
|
|||
uint ParentEstateID, LLVector3 Position, LLUUID RegionID,
|
||||
byte[] binaryBucket)
|
||||
{
|
||||
|
||||
bool FriendDialog = ((dialog == (byte)38) || (dialog == (byte)39) || (dialog == (byte)40));
|
||||
|
||||
// IM dialogs need to be pre-processed and have their sessionID filled by the server
|
||||
|
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue