Commit 1/2
* DB4o no longer crashes the sim on Startup * DB4o now crashes the sim on shutdown. * Variety of console verbosity fixes.afrisby
parent
c518a9e141
commit
038774de30
|
@ -70,7 +70,7 @@ namespace OpenSim.Framework.Communications.Caches
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
Console.WriteLine("UserProfileCache.cs: user profile for user not found");
|
Console.WriteLine("CACHE", "User profile for user not found");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -55,7 +55,7 @@ namespace OpenSim.Framework.Console
|
||||||
this.componentname = componentname;
|
this.componentname = componentname;
|
||||||
this.cmdparser = cmdparser;
|
this.cmdparser = cmdparser;
|
||||||
this.m_silent = silent;
|
this.m_silent = silent;
|
||||||
System.Console.WriteLine("ServerConsole.cs - creating new local console");
|
System.Console.WriteLine("Creating new local console");
|
||||||
|
|
||||||
if (String.IsNullOrEmpty(LogFile))
|
if (String.IsNullOrEmpty(LogFile))
|
||||||
{
|
{
|
||||||
|
@ -280,7 +280,7 @@ namespace OpenSim.Framework.Console
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
System.Console.Write("] ");
|
System.Console.Write("] \t");
|
||||||
|
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
|
@ -185,7 +185,7 @@ namespace OpenSim.Framework.Servers
|
||||||
|
|
||||||
public void Start()
|
public void Start()
|
||||||
{
|
{
|
||||||
MainLog.Instance.Verbose("HTTPD", "BaseHttpServer.cs: Starting up HTTP Server");
|
MainLog.Instance.Verbose("HTTPD", "Starting up HTTP Server");
|
||||||
|
|
||||||
m_workerThread = new Thread(new ThreadStart(StartHTTP));
|
m_workerThread = new Thread(new ThreadStart(StartHTTP));
|
||||||
m_workerThread.IsBackground = true;
|
m_workerThread.IsBackground = true;
|
||||||
|
@ -196,7 +196,7 @@ namespace OpenSim.Framework.Servers
|
||||||
{
|
{
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
MainLog.Instance.Status("HTTPD", "BaseHttpServer.cs: StartHTTP() - Spawned main thread OK");
|
MainLog.Instance.Status("HTTPD", "Spawned main thread OK");
|
||||||
m_httpListener = new HttpListener();
|
m_httpListener = new HttpListener();
|
||||||
|
|
||||||
m_httpListener.Prefixes.Add("http://+:" + m_port + "/");
|
m_httpListener.Prefixes.Add("http://+:" + m_port + "/");
|
||||||
|
|
|
@ -77,10 +77,10 @@ namespace OpenSim.Grid.AssetServer
|
||||||
|
|
||||||
public void Startup()
|
public void Startup()
|
||||||
{
|
{
|
||||||
m_console.Verbose("Main.cs:Startup() - Setting up asset DB");
|
m_console.Verbose("ASSET", "Setting up asset DB");
|
||||||
setupDB();
|
setupDB();
|
||||||
|
|
||||||
m_console.Verbose("Main.cs:Startup() - Starting HTTP process");
|
m_console.Verbose("ASSET", "Starting HTTP process");
|
||||||
BaseHttpServer httpServer = new BaseHttpServer(8003);
|
BaseHttpServer httpServer = new BaseHttpServer(8003);
|
||||||
|
|
||||||
httpServer.AddStreamHandler( new GetAssetStreamHandler(this));
|
httpServer.AddStreamHandler( new GetAssetStreamHandler(this));
|
||||||
|
|
|
@ -306,11 +306,11 @@ namespace OpenSim
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public virtual void Shutdown()
|
public virtual void Shutdown()
|
||||||
{
|
{
|
||||||
m_log.Verbose("Main.cs:Shutdown() - Closing all threads");
|
m_log.Verbose("Closing all threads");
|
||||||
m_log.Verbose("Main.cs:Shutdown() - Killing listener thread");
|
m_log.Verbose("Killing listener thread");
|
||||||
m_log.Verbose("Main.cs:Shutdown() - Killing clients");
|
m_log.Verbose("Killing clients");
|
||||||
// IMPLEMENT THIS
|
// IMPLEMENT THIS
|
||||||
m_log.Verbose("Main.cs:Shutdown() - Closing console and terminating");
|
m_log.Verbose("Closing console and terminating");
|
||||||
for (int i = 0; i < m_localScenes.Count; i++)
|
for (int i = 0; i < m_localScenes.Count; i++)
|
||||||
{
|
{
|
||||||
((Scene)m_localScenes[i]).Close();
|
((Scene)m_localScenes[i]).Close();
|
||||||
|
|
|
@ -120,13 +120,13 @@ namespace OpenSim.Region.ClientStack
|
||||||
UserProfileData masterAvatar = m_commsManager.UserServer.SetupMasterUser(scene.RegionInfo.MasterAvatarFirstName, scene.RegionInfo.MasterAvatarLastName, scene.RegionInfo.MasterAvatarSandboxPassword);
|
UserProfileData masterAvatar = m_commsManager.UserServer.SetupMasterUser(scene.RegionInfo.MasterAvatarFirstName, scene.RegionInfo.MasterAvatarLastName, scene.RegionInfo.MasterAvatarSandboxPassword);
|
||||||
if (masterAvatar != null)
|
if (masterAvatar != null)
|
||||||
{
|
{
|
||||||
m_log.Notice("Parcels - Found master avatar [" + masterAvatar.UUID.ToStringHyphenated() + "]");
|
m_log.Verbose("PARCEL", "Found master avatar [" + masterAvatar.UUID.ToStringHyphenated() + "]");
|
||||||
scene.RegionInfo.MasterAvatarAssignedUUID = masterAvatar.UUID;
|
scene.RegionInfo.MasterAvatarAssignedUUID = masterAvatar.UUID;
|
||||||
//TODO: Load parcels from storageManager
|
//TODO: Load parcels from storageManager
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
m_log.Notice("Parcels - No master avatar found, using null.");
|
m_log.Verbose("PARCEL", "No master avatar found, using null.");
|
||||||
scene.RegionInfo.MasterAvatarAssignedUUID = libsecondlife.LLUUID.Zero;
|
scene.RegionInfo.MasterAvatarAssignedUUID = libsecondlife.LLUUID.Zero;
|
||||||
//TODO: Load parcels from storageManager
|
//TODO: Load parcels from storageManager
|
||||||
}
|
}
|
||||||
|
|
|
@ -122,7 +122,7 @@ namespace OpenSim.Region.ClientStack
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{ // invalid client
|
{ // invalid client
|
||||||
m_log.Warn("client", "UDPServer.cs:OnReceivedData() - WARNING: Got a packet from an invalid client - " + epSender.ToString());
|
m_log.Warn("client", "Got a packet from an invalid client - " + epSender.ToString());
|
||||||
}
|
}
|
||||||
|
|
||||||
Server.BeginReceiveFrom(RecvBuffer, 0, RecvBuffer.Length, SocketFlags.None, ref epSender, ReceivedData, null);
|
Server.BeginReceiveFrom(RecvBuffer, 0, RecvBuffer.Length, SocketFlags.None, ref epSender, ReceivedData, null);
|
||||||
|
@ -138,20 +138,20 @@ namespace OpenSim.Region.ClientStack
|
||||||
|
|
||||||
public void ServerListener()
|
public void ServerListener()
|
||||||
{
|
{
|
||||||
m_log.Status("SERVER", "UDPServer.cs:ServerListener() - Opening UDP socket on " + listenPort);
|
m_log.Verbose("SERVER", "Opening UDP socket on " + listenPort);
|
||||||
|
|
||||||
ServerIncoming = new IPEndPoint(IPAddress.Parse("0.0.0.0"), listenPort);
|
ServerIncoming = new IPEndPoint(IPAddress.Parse("0.0.0.0"), listenPort);
|
||||||
Server = new Socket(AddressFamily.InterNetwork, SocketType.Dgram, ProtocolType.Udp);
|
Server = new Socket(AddressFamily.InterNetwork, SocketType.Dgram, ProtocolType.Udp);
|
||||||
Server.Bind(ServerIncoming);
|
Server.Bind(ServerIncoming);
|
||||||
|
|
||||||
m_log.Verbose("SERVER", "UDPServer.cs:ServerListener() - UDP socket bound, getting ready to listen");
|
m_log.Verbose("SERVER", "UDP socket bound, getting ready to listen");
|
||||||
|
|
||||||
ipeSender = new IPEndPoint(IPAddress.Parse("0.0.0.0"), 0);
|
ipeSender = new IPEndPoint(IPAddress.Parse("0.0.0.0"), 0);
|
||||||
epSender = (EndPoint)ipeSender;
|
epSender = (EndPoint)ipeSender;
|
||||||
ReceivedData = new AsyncCallback(this.OnReceivedData);
|
ReceivedData = new AsyncCallback(this.OnReceivedData);
|
||||||
Server.BeginReceiveFrom(RecvBuffer, 0, RecvBuffer.Length, SocketFlags.None, ref epSender, ReceivedData, null);
|
Server.BeginReceiveFrom(RecvBuffer, 0, RecvBuffer.Length, SocketFlags.None, ref epSender, ReceivedData, null);
|
||||||
|
|
||||||
m_log.Verbose("SERVER", "UDPServer.cs:ServerListener() - Listening...");
|
m_log.Status("SERVER", "Listening...");
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -171,7 +171,8 @@ namespace OpenSim.Region.Environment.Scenes
|
||||||
|
|
||||||
~Primitive()
|
~Primitive()
|
||||||
{
|
{
|
||||||
OnPrimCountTainted();
|
if (OnPrimCountTainted != null)
|
||||||
|
OnPrimCountTainted();
|
||||||
}
|
}
|
||||||
|
|
||||||
#endregion
|
#endregion
|
||||||
|
|
|
@ -32,6 +32,7 @@ namespace OpenSim.Region.Environment
|
||||||
|
|
||||||
public StorageManager(string dllName, string dataStoreFile, string dataStoreDB)
|
public StorageManager(string dllName, string dataStoreFile, string dataStoreDB)
|
||||||
{
|
{
|
||||||
|
OpenSim.Framework.Console.MainLog.Instance.Verbose("DATASTORE", "Attempting to load " + dllName);
|
||||||
Assembly pluginAssembly = Assembly.LoadFrom(dllName);
|
Assembly pluginAssembly = Assembly.LoadFrom(dllName);
|
||||||
|
|
||||||
foreach (Type pluginType in pluginAssembly.GetTypes())
|
foreach (Type pluginType in pluginAssembly.GetTypes())
|
||||||
|
@ -46,6 +47,8 @@ namespace OpenSim.Region.Environment
|
||||||
plug.Initialise(dataStoreFile, dataStoreDB);
|
plug.Initialise(dataStoreFile, dataStoreDB);
|
||||||
|
|
||||||
m_dataStore = plug;
|
m_dataStore = plug;
|
||||||
|
|
||||||
|
OpenSim.Framework.Console.MainLog.Instance.Verbose("DATASTORE", "Added IRegionDataStore Interface");
|
||||||
}
|
}
|
||||||
|
|
||||||
typeInterface = null;
|
typeInterface = null;
|
||||||
|
|
|
@ -37,6 +37,7 @@ namespace OpenSim.DataStore.DB4oStorage
|
||||||
|
|
||||||
public void Initialise(string dbfile, string dbname)
|
public void Initialise(string dbfile, string dbname)
|
||||||
{
|
{
|
||||||
|
MainLog.Instance.Verbose("DATASTORE", "DB4O - Opening " + dbfile);
|
||||||
db = Db4oFactory.OpenFile(dbfile);
|
db = Db4oFactory.OpenFile(dbfile);
|
||||||
|
|
||||||
return;
|
return;
|
||||||
|
@ -62,6 +63,8 @@ namespace OpenSim.DataStore.DB4oStorage
|
||||||
IObjectSet result = db.Get(typeof(SceneObject));
|
IObjectSet result = db.Get(typeof(SceneObject));
|
||||||
List<SceneObject> retvals = new List<SceneObject>();
|
List<SceneObject> retvals = new List<SceneObject>();
|
||||||
|
|
||||||
|
MainLog.Instance.Verbose("DATASTORE", "DB4O - LoadObjects found " + result.Count.ToString() + " objects");
|
||||||
|
|
||||||
foreach (Object obj in result)
|
foreach (Object obj in result)
|
||||||
{
|
{
|
||||||
retvals.Add((SceneObject)obj);
|
retvals.Add((SceneObject)obj);
|
||||||
|
@ -97,8 +100,11 @@ namespace OpenSim.DataStore.DB4oStorage
|
||||||
|
|
||||||
public void Shutdown()
|
public void Shutdown()
|
||||||
{
|
{
|
||||||
db.Commit();
|
if (db != null)
|
||||||
db.Close();
|
{
|
||||||
|
db.Commit();
|
||||||
|
db.Close();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue