aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim
diff options
context:
space:
mode:
authorAdam Frisby2007-07-29 09:37:29 +0000
committerAdam Frisby2007-07-29 09:37:29 +0000
commit038774de30ce26120c91ccd8e1cda1b2a89e1841 (patch)
treef7f6e0c7027737b7ad77cbb4de09b734c436e903 /OpenSim
parent* Fixed an issue with Mono/UNIX filenames and DB4o storage engine. (diff)
downloadopensim-SC_OLD-038774de30ce26120c91ccd8e1cda1b2a89e1841.zip
opensim-SC_OLD-038774de30ce26120c91ccd8e1cda1b2a89e1841.tar.gz
opensim-SC_OLD-038774de30ce26120c91ccd8e1cda1b2a89e1841.tar.bz2
opensim-SC_OLD-038774de30ce26120c91ccd8e1cda1b2a89e1841.tar.xz
Commit 1/2
* DB4o no longer crashes the sim on Startup * DB4o now crashes the sim on shutdown. * Variety of console verbosity fixes.
Diffstat (limited to '')
-rw-r--r--OpenSim/Framework/Communications/Cache/UserProfileCache.cs2
-rw-r--r--OpenSim/Framework/Console/LogBase.cs4
-rw-r--r--OpenSim/Framework/Servers/BaseHttpServer.cs4
-rw-r--r--OpenSim/Grid/AssetServer/Main.cs4
-rw-r--r--OpenSim/Region/Application/OpenSimMain.cs8
-rw-r--r--OpenSim/Region/ClientStack/RegionApplicationBase.cs4
-rw-r--r--OpenSim/Region/ClientStack/UDPServer.cs8
-rw-r--r--OpenSim/Region/Environment/Scenes/Primitive.cs3
-rw-r--r--OpenSim/Region/Environment/StorageManager.cs3
-rw-r--r--OpenSim/Region/Storage/OpenSim.DataStore.DB4o/DB4oDataStore.cs10
10 files changed, 30 insertions, 20 deletions
diff --git a/OpenSim/Framework/Communications/Cache/UserProfileCache.cs b/OpenSim/Framework/Communications/Cache/UserProfileCache.cs
index 32c5db9..2f3691c 100644
--- a/OpenSim/Framework/Communications/Cache/UserProfileCache.cs
+++ b/OpenSim/Framework/Communications/Cache/UserProfileCache.cs
@@ -70,7 +70,7 @@ namespace OpenSim.Framework.Communications.Caches
70 } 70 }
71 else 71 else
72 { 72 {
73 Console.WriteLine("UserProfileCache.cs: user profile for user not found"); 73 Console.WriteLine("CACHE", "User profile for user not found");
74 } 74 }
75 } 75 }
76 } 76 }
diff --git a/OpenSim/Framework/Console/LogBase.cs b/OpenSim/Framework/Console/LogBase.cs
index 8b8d8df..0aa42d1 100644
--- a/OpenSim/Framework/Console/LogBase.cs
+++ b/OpenSim/Framework/Console/LogBase.cs
@@ -55,7 +55,7 @@ namespace OpenSim.Framework.Console
55 this.componentname = componentname; 55 this.componentname = componentname;
56 this.cmdparser = cmdparser; 56 this.cmdparser = cmdparser;
57 this.m_silent = silent; 57 this.m_silent = silent;
58 System.Console.WriteLine("ServerConsole.cs - creating new local console"); 58 System.Console.WriteLine("Creating new local console");
59 59
60 if (String.IsNullOrEmpty(LogFile)) 60 if (String.IsNullOrEmpty(LogFile))
61 { 61 {
@@ -280,7 +280,7 @@ namespace OpenSim.Framework.Console
280 } 280 }
281 } 281 }
282 282
283 System.Console.Write("] "); 283 System.Console.Write("] \t");
284 284
285 return; 285 return;
286 } 286 }
diff --git a/OpenSim/Framework/Servers/BaseHttpServer.cs b/OpenSim/Framework/Servers/BaseHttpServer.cs
index d0784f3..c514b96 100644
--- a/OpenSim/Framework/Servers/BaseHttpServer.cs
+++ b/OpenSim/Framework/Servers/BaseHttpServer.cs
@@ -185,7 +185,7 @@ namespace OpenSim.Framework.Servers
185 185
186 public void Start() 186 public void Start()
187 { 187 {
188 MainLog.Instance.Verbose("HTTPD", "BaseHttpServer.cs: Starting up HTTP Server"); 188 MainLog.Instance.Verbose("HTTPD", "Starting up HTTP Server");
189 189
190 m_workerThread = new Thread(new ThreadStart(StartHTTP)); 190 m_workerThread = new Thread(new ThreadStart(StartHTTP));
191 m_workerThread.IsBackground = true; 191 m_workerThread.IsBackground = true;
@@ -196,7 +196,7 @@ namespace OpenSim.Framework.Servers
196 { 196 {
197 try 197 try
198 { 198 {
199 MainLog.Instance.Status("HTTPD", "BaseHttpServer.cs: StartHTTP() - Spawned main thread OK"); 199 MainLog.Instance.Status("HTTPD", "Spawned main thread OK");
200 m_httpListener = new HttpListener(); 200 m_httpListener = new HttpListener();
201 201
202 m_httpListener.Prefixes.Add("http://+:" + m_port + "/"); 202 m_httpListener.Prefixes.Add("http://+:" + m_port + "/");
diff --git a/OpenSim/Grid/AssetServer/Main.cs b/OpenSim/Grid/AssetServer/Main.cs
index bd6341b..92d5490 100644
--- a/OpenSim/Grid/AssetServer/Main.cs
+++ b/OpenSim/Grid/AssetServer/Main.cs
@@ -77,10 +77,10 @@ namespace OpenSim.Grid.AssetServer
77 77
78 public void Startup() 78 public void Startup()
79 { 79 {
80 m_console.Verbose("Main.cs:Startup() - Setting up asset DB"); 80 m_console.Verbose("ASSET", "Setting up asset DB");
81 setupDB(); 81 setupDB();
82 82
83 m_console.Verbose("Main.cs:Startup() - Starting HTTP process"); 83 m_console.Verbose("ASSET", "Starting HTTP process");
84 BaseHttpServer httpServer = new BaseHttpServer(8003); 84 BaseHttpServer httpServer = new BaseHttpServer(8003);
85 85
86 httpServer.AddStreamHandler( new GetAssetStreamHandler(this)); 86 httpServer.AddStreamHandler( new GetAssetStreamHandler(this));
diff --git a/OpenSim/Region/Application/OpenSimMain.cs b/OpenSim/Region/Application/OpenSimMain.cs
index 476f9bc..c00dfdf 100644
--- a/OpenSim/Region/Application/OpenSimMain.cs
+++ b/OpenSim/Region/Application/OpenSimMain.cs
@@ -306,11 +306,11 @@ namespace OpenSim
306 /// </summary> 306 /// </summary>
307 public virtual void Shutdown() 307 public virtual void Shutdown()
308 { 308 {
309 m_log.Verbose("Main.cs:Shutdown() - Closing all threads"); 309 m_log.Verbose("Closing all threads");
310 m_log.Verbose("Main.cs:Shutdown() - Killing listener thread"); 310 m_log.Verbose("Killing listener thread");
311 m_log.Verbose("Main.cs:Shutdown() - Killing clients"); 311 m_log.Verbose("Killing clients");
312 // IMPLEMENT THIS 312 // IMPLEMENT THIS
313 m_log.Verbose("Main.cs:Shutdown() - Closing console and terminating"); 313 m_log.Verbose("Closing console and terminating");
314 for (int i = 0; i < m_localScenes.Count; i++) 314 for (int i = 0; i < m_localScenes.Count; i++)
315 { 315 {
316 ((Scene)m_localScenes[i]).Close(); 316 ((Scene)m_localScenes[i]).Close();
diff --git a/OpenSim/Region/ClientStack/RegionApplicationBase.cs b/OpenSim/Region/ClientStack/RegionApplicationBase.cs
index a61b9e3..bad7fec 100644
--- a/OpenSim/Region/ClientStack/RegionApplicationBase.cs
+++ b/OpenSim/Region/ClientStack/RegionApplicationBase.cs
@@ -120,13 +120,13 @@ namespace OpenSim.Region.ClientStack
120 UserProfileData masterAvatar = m_commsManager.UserServer.SetupMasterUser(scene.RegionInfo.MasterAvatarFirstName, scene.RegionInfo.MasterAvatarLastName, scene.RegionInfo.MasterAvatarSandboxPassword); 120 UserProfileData masterAvatar = m_commsManager.UserServer.SetupMasterUser(scene.RegionInfo.MasterAvatarFirstName, scene.RegionInfo.MasterAvatarLastName, scene.RegionInfo.MasterAvatarSandboxPassword);
121 if (masterAvatar != null) 121 if (masterAvatar != null)
122 { 122 {
123 m_log.Notice("Parcels - Found master avatar [" + masterAvatar.UUID.ToStringHyphenated() + "]"); 123 m_log.Verbose("PARCEL", "Found master avatar [" + masterAvatar.UUID.ToStringHyphenated() + "]");
124 scene.RegionInfo.MasterAvatarAssignedUUID = masterAvatar.UUID; 124 scene.RegionInfo.MasterAvatarAssignedUUID = masterAvatar.UUID;
125 //TODO: Load parcels from storageManager 125 //TODO: Load parcels from storageManager
126 } 126 }
127 else 127 else
128 { 128 {
129 m_log.Notice("Parcels - No master avatar found, using null."); 129 m_log.Verbose("PARCEL", "No master avatar found, using null.");
130 scene.RegionInfo.MasterAvatarAssignedUUID = libsecondlife.LLUUID.Zero; 130 scene.RegionInfo.MasterAvatarAssignedUUID = libsecondlife.LLUUID.Zero;
131 //TODO: Load parcels from storageManager 131 //TODO: Load parcels from storageManager
132 } 132 }
diff --git a/OpenSim/Region/ClientStack/UDPServer.cs b/OpenSim/Region/ClientStack/UDPServer.cs
index 705ced0..1e1801f 100644
--- a/OpenSim/Region/ClientStack/UDPServer.cs
+++ b/OpenSim/Region/ClientStack/UDPServer.cs
@@ -122,7 +122,7 @@ namespace OpenSim.Region.ClientStack
122 } 122 }
123 else 123 else
124 { // invalid client 124 { // invalid client
125 m_log.Warn("client", "UDPServer.cs:OnReceivedData() - WARNING: Got a packet from an invalid client - " + epSender.ToString()); 125 m_log.Warn("client", "Got a packet from an invalid client - " + epSender.ToString());
126 } 126 }
127 127
128 Server.BeginReceiveFrom(RecvBuffer, 0, RecvBuffer.Length, SocketFlags.None, ref epSender, ReceivedData, null); 128 Server.BeginReceiveFrom(RecvBuffer, 0, RecvBuffer.Length, SocketFlags.None, ref epSender, ReceivedData, null);
@@ -138,20 +138,20 @@ namespace OpenSim.Region.ClientStack
138 138
139 public void ServerListener() 139 public void ServerListener()
140 { 140 {
141 m_log.Status("SERVER", "UDPServer.cs:ServerListener() - Opening UDP socket on " + listenPort); 141 m_log.Verbose("SERVER", "Opening UDP socket on " + listenPort);
142 142
143 ServerIncoming = new IPEndPoint(IPAddress.Parse("0.0.0.0"), listenPort); 143 ServerIncoming = new IPEndPoint(IPAddress.Parse("0.0.0.0"), listenPort);
144 Server = new Socket(AddressFamily.InterNetwork, SocketType.Dgram, ProtocolType.Udp); 144 Server = new Socket(AddressFamily.InterNetwork, SocketType.Dgram, ProtocolType.Udp);
145 Server.Bind(ServerIncoming); 145 Server.Bind(ServerIncoming);
146 146
147 m_log.Verbose("SERVER", "UDPServer.cs:ServerListener() - UDP socket bound, getting ready to listen"); 147 m_log.Verbose("SERVER", "UDP socket bound, getting ready to listen");
148 148
149 ipeSender = new IPEndPoint(IPAddress.Parse("0.0.0.0"), 0); 149 ipeSender = new IPEndPoint(IPAddress.Parse("0.0.0.0"), 0);
150 epSender = (EndPoint)ipeSender; 150 epSender = (EndPoint)ipeSender;
151 ReceivedData = new AsyncCallback(this.OnReceivedData); 151 ReceivedData = new AsyncCallback(this.OnReceivedData);
152 Server.BeginReceiveFrom(RecvBuffer, 0, RecvBuffer.Length, SocketFlags.None, ref epSender, ReceivedData, null); 152 Server.BeginReceiveFrom(RecvBuffer, 0, RecvBuffer.Length, SocketFlags.None, ref epSender, ReceivedData, null);
153 153
154 m_log.Verbose("SERVER", "UDPServer.cs:ServerListener() - Listening..."); 154 m_log.Status("SERVER", "Listening...");
155 155
156 } 156 }
157 157
diff --git a/OpenSim/Region/Environment/Scenes/Primitive.cs b/OpenSim/Region/Environment/Scenes/Primitive.cs
index ce5c327..5f5113d 100644
--- a/OpenSim/Region/Environment/Scenes/Primitive.cs
+++ b/OpenSim/Region/Environment/Scenes/Primitive.cs
@@ -171,7 +171,8 @@ namespace OpenSim.Region.Environment.Scenes
171 171
172 ~Primitive() 172 ~Primitive()
173 { 173 {
174 OnPrimCountTainted(); 174 if (OnPrimCountTainted != null)
175 OnPrimCountTainted();
175 } 176 }
176 177
177 #endregion 178 #endregion
diff --git a/OpenSim/Region/Environment/StorageManager.cs b/OpenSim/Region/Environment/StorageManager.cs
index fb12c4d..a7d67d3 100644
--- a/OpenSim/Region/Environment/StorageManager.cs
+++ b/OpenSim/Region/Environment/StorageManager.cs
@@ -32,6 +32,7 @@ namespace OpenSim.Region.Environment
32 32
33 public StorageManager(string dllName, string dataStoreFile, string dataStoreDB) 33 public StorageManager(string dllName, string dataStoreFile, string dataStoreDB)
34 { 34 {
35 OpenSim.Framework.Console.MainLog.Instance.Verbose("DATASTORE", "Attempting to load " + dllName);
35 Assembly pluginAssembly = Assembly.LoadFrom(dllName); 36 Assembly pluginAssembly = Assembly.LoadFrom(dllName);
36 37
37 foreach (Type pluginType in pluginAssembly.GetTypes()) 38 foreach (Type pluginType in pluginAssembly.GetTypes())
@@ -46,6 +47,8 @@ namespace OpenSim.Region.Environment
46 plug.Initialise(dataStoreFile, dataStoreDB); 47 plug.Initialise(dataStoreFile, dataStoreDB);
47 48
48 m_dataStore = plug; 49 m_dataStore = plug;
50
51 OpenSim.Framework.Console.MainLog.Instance.Verbose("DATASTORE", "Added IRegionDataStore Interface");
49 } 52 }
50 53
51 typeInterface = null; 54 typeInterface = null;
diff --git a/OpenSim/Region/Storage/OpenSim.DataStore.DB4o/DB4oDataStore.cs b/OpenSim/Region/Storage/OpenSim.DataStore.DB4o/DB4oDataStore.cs
index 25a12a4..91dab04 100644
--- a/OpenSim/Region/Storage/OpenSim.DataStore.DB4o/DB4oDataStore.cs
+++ b/OpenSim/Region/Storage/OpenSim.DataStore.DB4o/DB4oDataStore.cs
@@ -37,6 +37,7 @@ namespace OpenSim.DataStore.DB4oStorage
37 37
38 public void Initialise(string dbfile, string dbname) 38 public void Initialise(string dbfile, string dbname)
39 { 39 {
40 MainLog.Instance.Verbose("DATASTORE", "DB4O - Opening " + dbfile);
40 db = Db4oFactory.OpenFile(dbfile); 41 db = Db4oFactory.OpenFile(dbfile);
41 42
42 return; 43 return;
@@ -62,6 +63,8 @@ namespace OpenSim.DataStore.DB4oStorage
62 IObjectSet result = db.Get(typeof(SceneObject)); 63 IObjectSet result = db.Get(typeof(SceneObject));
63 List<SceneObject> retvals = new List<SceneObject>(); 64 List<SceneObject> retvals = new List<SceneObject>();
64 65
66 MainLog.Instance.Verbose("DATASTORE", "DB4O - LoadObjects found " + result.Count.ToString() + " objects");
67
65 foreach (Object obj in result) 68 foreach (Object obj in result)
66 { 69 {
67 retvals.Add((SceneObject)obj); 70 retvals.Add((SceneObject)obj);
@@ -97,8 +100,11 @@ namespace OpenSim.DataStore.DB4oStorage
97 100
98 public void Shutdown() 101 public void Shutdown()
99 { 102 {
100 db.Commit(); 103 if (db != null)
101 db.Close(); 104 {
105 db.Commit();
106 db.Close();
107 }
102 } 108 }
103 } 109 }
104} 110}