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
|
||||
{
|
||||
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.cmdparser = cmdparser;
|
||||
this.m_silent = silent;
|
||||
System.Console.WriteLine("ServerConsole.cs - creating new local console");
|
||||
System.Console.WriteLine("Creating new local console");
|
||||
|
||||
if (String.IsNullOrEmpty(LogFile))
|
||||
{
|
||||
|
@ -280,7 +280,7 @@ namespace OpenSim.Framework.Console
|
|||
}
|
||||
}
|
||||
|
||||
System.Console.Write("] ");
|
||||
System.Console.Write("] \t");
|
||||
|
||||
return;
|
||||
}
|
||||
|
|
|
@ -185,7 +185,7 @@ namespace OpenSim.Framework.Servers
|
|||
|
||||
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.IsBackground = true;
|
||||
|
@ -196,7 +196,7 @@ namespace OpenSim.Framework.Servers
|
|||
{
|
||||
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.Prefixes.Add("http://+:" + m_port + "/");
|
||||
|
|
|
@ -77,10 +77,10 @@ namespace OpenSim.Grid.AssetServer
|
|||
|
||||
public void Startup()
|
||||
{
|
||||
m_console.Verbose("Main.cs:Startup() - Setting up asset DB");
|
||||
m_console.Verbose("ASSET", "Setting up asset DB");
|
||||
setupDB();
|
||||
|
||||
m_console.Verbose("Main.cs:Startup() - Starting HTTP process");
|
||||
m_console.Verbose("ASSET", "Starting HTTP process");
|
||||
BaseHttpServer httpServer = new BaseHttpServer(8003);
|
||||
|
||||
httpServer.AddStreamHandler( new GetAssetStreamHandler(this));
|
||||
|
|
|
@ -306,11 +306,11 @@ namespace OpenSim
|
|||
/// </summary>
|
||||
public virtual void Shutdown()
|
||||
{
|
||||
m_log.Verbose("Main.cs:Shutdown() - Closing all threads");
|
||||
m_log.Verbose("Main.cs:Shutdown() - Killing listener thread");
|
||||
m_log.Verbose("Main.cs:Shutdown() - Killing clients");
|
||||
m_log.Verbose("Closing all threads");
|
||||
m_log.Verbose("Killing listener thread");
|
||||
m_log.Verbose("Killing clients");
|
||||
// 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++)
|
||||
{
|
||||
((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);
|
||||
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;
|
||||
//TODO: Load parcels from storageManager
|
||||
}
|
||||
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;
|
||||
//TODO: Load parcels from storageManager
|
||||
}
|
||||
|
|
|
@ -122,7 +122,7 @@ namespace OpenSim.Region.ClientStack
|
|||
}
|
||||
else
|
||||
{ // 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);
|
||||
|
@ -138,20 +138,20 @@ namespace OpenSim.Region.ClientStack
|
|||
|
||||
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);
|
||||
Server = new Socket(AddressFamily.InterNetwork, SocketType.Dgram, ProtocolType.Udp);
|
||||
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);
|
||||
epSender = (EndPoint)ipeSender;
|
||||
ReceivedData = new AsyncCallback(this.OnReceivedData);
|
||||
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()
|
||||
{
|
||||
OnPrimCountTainted();
|
||||
if (OnPrimCountTainted != null)
|
||||
OnPrimCountTainted();
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
|
|
@ -32,6 +32,7 @@ namespace OpenSim.Region.Environment
|
|||
|
||||
public StorageManager(string dllName, string dataStoreFile, string dataStoreDB)
|
||||
{
|
||||
OpenSim.Framework.Console.MainLog.Instance.Verbose("DATASTORE", "Attempting to load " + dllName);
|
||||
Assembly pluginAssembly = Assembly.LoadFrom(dllName);
|
||||
|
||||
foreach (Type pluginType in pluginAssembly.GetTypes())
|
||||
|
@ -46,6 +47,8 @@ namespace OpenSim.Region.Environment
|
|||
plug.Initialise(dataStoreFile, dataStoreDB);
|
||||
|
||||
m_dataStore = plug;
|
||||
|
||||
OpenSim.Framework.Console.MainLog.Instance.Verbose("DATASTORE", "Added IRegionDataStore Interface");
|
||||
}
|
||||
|
||||
typeInterface = null;
|
||||
|
|
|
@ -37,6 +37,7 @@ namespace OpenSim.DataStore.DB4oStorage
|
|||
|
||||
public void Initialise(string dbfile, string dbname)
|
||||
{
|
||||
MainLog.Instance.Verbose("DATASTORE", "DB4O - Opening " + dbfile);
|
||||
db = Db4oFactory.OpenFile(dbfile);
|
||||
|
||||
return;
|
||||
|
@ -62,6 +63,8 @@ namespace OpenSim.DataStore.DB4oStorage
|
|||
IObjectSet result = db.Get(typeof(SceneObject));
|
||||
List<SceneObject> retvals = new List<SceneObject>();
|
||||
|
||||
MainLog.Instance.Verbose("DATASTORE", "DB4O - LoadObjects found " + result.Count.ToString() + " objects");
|
||||
|
||||
foreach (Object obj in result)
|
||||
{
|
||||
retvals.Add((SceneObject)obj);
|
||||
|
@ -97,8 +100,11 @@ namespace OpenSim.DataStore.DB4oStorage
|
|||
|
||||
public void Shutdown()
|
||||
{
|
||||
db.Commit();
|
||||
db.Close();
|
||||
if (db != null)
|
||||
{
|
||||
db.Commit();
|
||||
db.Close();
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue