aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Region
diff options
context:
space:
mode:
authorMW2007-08-11 20:20:33 +0000
committerMW2007-08-11 20:20:33 +0000
commit822881eac543646af96a78b14f83fb326563a5e6 (patch)
tree04dbf3e2f3a357bd6c189df57e7d1245fab3c7fe /OpenSim/Region
parentA attempt to fix the user manager db4o crash bug (where you have to delete us... (diff)
downloadopensim-SC_OLD-822881eac543646af96a78b14f83fb326563a5e6.zip
opensim-SC_OLD-822881eac543646af96a78b14f83fb326563a5e6.tar.gz
opensim-SC_OLD-822881eac543646af96a78b14f83fb326563a5e6.tar.bz2
opensim-SC_OLD-822881eac543646af96a78b14f83fb326563a5e6.tar.xz
Added a new column (SceneGroupID) to sqlite3 table (sqlite3-prims.sql) so that we can tell what prims belong to the same SceneObjectGroup. If sdague has a different method in mind when he gets back then he can change it then.
Diffstat (limited to '')
-rw-r--r--OpenSim/Region/Application/OpenSimMain.cs18
-rw-r--r--OpenSim/Region/Communications/Local/CommunicationsLocal.cs2
-rw-r--r--OpenSim/Region/Storage/OpenSim.DataStore.MonoSqlite/MonoSqliteDataStore.cs13
3 files changed, 16 insertions, 17 deletions
diff --git a/OpenSim/Region/Application/OpenSimMain.cs b/OpenSim/Region/Application/OpenSimMain.cs
index 611041d..6c49817 100644
--- a/OpenSim/Region/Application/OpenSimMain.cs
+++ b/OpenSim/Region/Application/OpenSimMain.cs
@@ -121,23 +121,19 @@ namespace OpenSim
121 121
122 base.StartUp(); 122 base.StartUp();
123 123
124 if (!m_sandbox)
125 {
126 m_httpServer.AddStreamHandler(new SimStatusHandler());
127 }
128
129 if (m_sandbox) 124 if (m_sandbox)
130 { 125 {
131 CommunicationsLocal localComms = new CommunicationsLocal(m_networkServersInfo, m_httpServer, m_assetCache, standaloneAuthenticate); 126 CommunicationsLocal localComms = new CommunicationsLocal(m_networkServersInfo, m_httpServer, m_assetCache, standaloneAuthenticate);
132 m_commsManager = localComms; 127 m_commsManager = localComms;
133 if(standaloneAuthenticate) 128 if(standaloneAuthenticate)
134 { 129 {
135 this.CreateAccount = localComms.do_create; 130 this.CreateAccount = localComms.doCreate;
136 } 131 }
137 } 132 }
138 else 133 else
139 { 134 {
140 m_commsManager = new CommunicationsOGS1(m_networkServersInfo, m_httpServer, m_assetCache); 135 m_commsManager = new CommunicationsOGS1(m_networkServersInfo, m_httpServer, m_assetCache);
136 m_httpServer.AddStreamHandler(new SimStatusHandler());
141 } 137 }
142 138
143 string regionConfigPath = Path.Combine(Util.configDir(), "Regions"); 139 string regionConfigPath = Path.Combine(Util.configDir(), "Regions");
@@ -326,11 +322,6 @@ namespace OpenSim
326 } 322 }
327 break; 323 break;
328 324
329 case "quit":
330 case "shutdown":
331 Shutdown();
332 break;
333
334 case "create": 325 case "create":
335 if (CreateAccount != null) 326 if (CreateAccount != null)
336 { 327 {
@@ -338,6 +329,11 @@ namespace OpenSim
338 } 329 }
339 break; 330 break;
340 331
332 case "quit":
333 case "shutdown":
334 Shutdown();
335 break;
336
341 default: 337 default:
342 m_log.Error("Unknown command"); 338 m_log.Error("Unknown command");
343 break; 339 break;
diff --git a/OpenSim/Region/Communications/Local/CommunicationsLocal.cs b/OpenSim/Region/Communications/Local/CommunicationsLocal.cs
index 69352d1..5b66816 100644
--- a/OpenSim/Region/Communications/Local/CommunicationsLocal.cs
+++ b/OpenSim/Region/Communications/Local/CommunicationsLocal.cs
@@ -56,7 +56,7 @@ namespace OpenSim.Region.Communications.Local
56 this.SandBoxServices.AddNewSession(regionHandle, login); 56 this.SandBoxServices.AddNewSession(regionHandle, login);
57 } 57 }
58 58
59 public void do_create(string what) 59 public void doCreate(string what)
60 { 60 {
61 switch (what) 61 switch (what)
62 { 62 {
diff --git a/OpenSim/Region/Storage/OpenSim.DataStore.MonoSqlite/MonoSqliteDataStore.cs b/OpenSim/Region/Storage/OpenSim.DataStore.MonoSqlite/MonoSqliteDataStore.cs
index 45b19e6..5d1592c 100644
--- a/OpenSim/Region/Storage/OpenSim.DataStore.MonoSqlite/MonoSqliteDataStore.cs
+++ b/OpenSim/Region/Storage/OpenSim.DataStore.MonoSqlite/MonoSqliteDataStore.cs
@@ -81,6 +81,7 @@ namespace OpenSim.DataStore.MonoSqliteStorage
81 data.Add("ParentID", DbType.Int32); 81 data.Add("ParentID", DbType.Int32);
82 data.Add("CreationDate", DbType.Int32); 82 data.Add("CreationDate", DbType.Int32);
83 data.Add("Name", DbType.String); 83 data.Add("Name", DbType.String);
84 data.Add("SceneGroupID", DbType.String);
84 // various text fields 85 // various text fields
85 data.Add("Text", DbType.String); 86 data.Add("Text", DbType.String);
86 data.Add("Description", DbType.String); 87 data.Add("Description", DbType.String);
@@ -305,12 +306,14 @@ namespace OpenSim.DataStore.MonoSqliteStorage
305 return prim; 306 return prim;
306 } 307 }
307 308
308 private void fillPrimRow(DataRow row, SceneObjectPart prim) 309 private void fillPrimRow(DataRow row, SceneObjectPart prim, LLUUID sceneGroupID)
309 { 310 {
311 Console.WriteLine("scene Group for this prim is " + sceneGroupID);
310 row["UUID"] = prim.UUID; 312 row["UUID"] = prim.UUID;
311 row["ParentID"] = prim.ParentID; 313 row["ParentID"] = prim.ParentID;
312 row["CreationDate"] = prim.CreationDate; 314 row["CreationDate"] = prim.CreationDate;
313 row["Name"] = prim.PartName; 315 row["Name"] = prim.PartName;
316 row["SceneGroupID"] = sceneGroupID; // the UUID of the root part for this SceneObjectGroup
314 // various text fields 317 // various text fields
315 row["Text"] = prim.Text; 318 row["Text"] = prim.Text;
316 row["Description"] = prim.Description; 319 row["Description"] = prim.Description;
@@ -434,7 +437,7 @@ namespace OpenSim.DataStore.MonoSqliteStorage
434 437
435 } 438 }
436 439
437 private void addPrim(SceneObjectPart prim) 440 private void addPrim(SceneObjectPart prim, LLUUID sceneGroupID)
438 { 441 {
439 DataTable prims = ds.Tables["prims"]; 442 DataTable prims = ds.Tables["prims"];
440 DataTable shapes = ds.Tables["primshapes"]; 443 DataTable shapes = ds.Tables["primshapes"];
@@ -442,10 +445,10 @@ namespace OpenSim.DataStore.MonoSqliteStorage
442 DataRow primRow = prims.Rows.Find(prim.UUID); 445 DataRow primRow = prims.Rows.Find(prim.UUID);
443 if (primRow == null) { 446 if (primRow == null) {
444 primRow = prims.NewRow(); 447 primRow = prims.NewRow();
445 fillPrimRow(primRow, prim); 448 fillPrimRow(primRow, prim, sceneGroupID);
446 prims.Rows.Add(primRow); 449 prims.Rows.Add(primRow);
447 } else { 450 } else {
448 fillPrimRow(primRow, prim); 451 fillPrimRow(primRow, prim, sceneGroupID);
449 } 452 }
450 453
451 DataRow shapeRow = shapes.Rows.Find(prim.UUID); 454 DataRow shapeRow = shapes.Rows.Find(prim.UUID);
@@ -462,7 +465,7 @@ namespace OpenSim.DataStore.MonoSqliteStorage
462 { 465 {
463 foreach (SceneObjectPart prim in obj.Children.Values) 466 foreach (SceneObjectPart prim in obj.Children.Values)
464 { 467 {
465 addPrim(prim); 468 addPrim(prim, obj.UUID);
466 } 469 }
467 470
468 MainLog.Instance.Verbose("Attempting to do database update...."); 471 MainLog.Instance.Verbose("Attempting to do database update....");