aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Data
diff options
context:
space:
mode:
authorTeravus Ovares2008-06-20 18:46:43 +0000
committerTeravus Ovares2008-06-20 18:46:43 +0000
commit4448fd4b2f3fb85cd9262e8d8428bdf4c9ca8b2c (patch)
treeb8b74dce7a857331178e0170790a373ce05b0ec3 /OpenSim/Data
parent* Handle parcel telehub location corruption gracefully. DBNull (diff)
downloadopensim-SC_OLD-4448fd4b2f3fb85cd9262e8d8428bdf4c9ca8b2c.zip
opensim-SC_OLD-4448fd4b2f3fb85cd9262e8d8428bdf4c9ca8b2c.tar.gz
opensim-SC_OLD-4448fd4b2f3fb85cd9262e8d8428bdf4c9ca8b2c.tar.bz2
opensim-SC_OLD-4448fd4b2f3fb85cd9262e8d8428bdf4c9ca8b2c.tar.xz
* Handle parcel telehub location corruption gracefully. DBNull
* mySQL this time.
Diffstat (limited to 'OpenSim/Data')
-rw-r--r--OpenSim/Data/MySQL/MySQLDataStore.cs23
-rw-r--r--OpenSim/Data/SQLite/SQLiteRegionData.cs3
2 files changed, 18 insertions, 8 deletions
diff --git a/OpenSim/Data/MySQL/MySQLDataStore.cs b/OpenSim/Data/MySQL/MySQLDataStore.cs
index ff1b583..b0f02f0 100644
--- a/OpenSim/Data/MySQL/MySQLDataStore.cs
+++ b/OpenSim/Data/MySQL/MySQLDataStore.cs
@@ -1025,13 +1025,22 @@ namespace OpenSim.Data.MySQL
1025 1025
1026 newData.authBuyerID = authedbuyer; 1026 newData.authBuyerID = authedbuyer;
1027 newData.snapshotID = snapshotID; 1027 newData.snapshotID = snapshotID;
1028 1028 try
1029 newData.userLocation = 1029 {
1030 new LLVector3(Convert.ToSingle(row["UserLocationX"]), Convert.ToSingle(row["UserLocationY"]), 1030 newData.userLocation =
1031 Convert.ToSingle(row["UserLocationZ"])); 1031 new LLVector3(Convert.ToSingle(row["UserLocationX"]), Convert.ToSingle(row["UserLocationY"]),
1032 newData.userLookAt = 1032 Convert.ToSingle(row["UserLocationZ"]));
1033 new LLVector3(Convert.ToSingle(row["UserLookAtX"]), Convert.ToSingle(row["UserLookAtY"]), 1033 newData.userLookAt =
1034 Convert.ToSingle(row["UserLookAtZ"])); 1034 new LLVector3(Convert.ToSingle(row["UserLookAtX"]), Convert.ToSingle(row["UserLookAtY"]),
1035 Convert.ToSingle(row["UserLookAtZ"]));
1036 }
1037 catch (InvalidCastException)
1038 {
1039 newData.userLocation = LLVector3.Zero;
1040 newData.userLookAt = LLVector3.Zero;
1041 m_log.ErrorFormat("[PARCEL]: unable to get parcel telehub settings for {1}", newData.landName);
1042 }
1043
1035 newData.parcelAccessList = new List<ParcelManager.ParcelAccessEntry>(); 1044 newData.parcelAccessList = new List<ParcelManager.ParcelAccessEntry>();
1036 1045
1037 return newData; 1046 return newData;
diff --git a/OpenSim/Data/SQLite/SQLiteRegionData.cs b/OpenSim/Data/SQLite/SQLiteRegionData.cs
index 36202b9..b7086bd 100644
--- a/OpenSim/Data/SQLite/SQLiteRegionData.cs
+++ b/OpenSim/Data/SQLite/SQLiteRegionData.cs
@@ -981,10 +981,11 @@ namespace OpenSim.Data.SQLite
981 newData.userLookAt = 981 newData.userLookAt =
982 new LLVector3(Convert.ToSingle(row["UserLookAtX"]), Convert.ToSingle(row["UserLookAtY"]), 982 new LLVector3(Convert.ToSingle(row["UserLookAtX"]), Convert.ToSingle(row["UserLookAtY"]),
983 Convert.ToSingle(row["UserLookAtZ"])); 983 Convert.ToSingle(row["UserLookAtZ"]));
984 m_log.ErrorFormat("[PARCEL]: unable to get parcel telehub settings for {1}", newData.landName); 984
985 } 985 }
986 catch (InvalidCastException) 986 catch (InvalidCastException)
987 { 987 {
988 m_log.ErrorFormat("[PARCEL]: unable to get parcel telehub settings for {1}", newData.landName);
988 newData.userLocation = LLVector3.Zero; 989 newData.userLocation = LLVector3.Zero;
989 newData.userLookAt = LLVector3.Zero; 990 newData.userLookAt = LLVector3.Zero;
990 } 991 }