aboutsummaryrefslogtreecommitdiffstatshomepage
diff options
context:
space:
mode:
authorJeff Ames2008-07-19 09:35:48 +0000
committerJeff Ames2008-07-19 09:35:48 +0000
commit19fd2230bfda7ff3419e97157be07adc49e933f5 (patch)
tree5e0a6468be81aa7626ca8018e900cdcaf5e5fc3e
parentQuick fix to make the estate ban list effective again, when the region (diff)
downloadopensim-SC_OLD-19fd2230bfda7ff3419e97157be07adc49e933f5.zip
opensim-SC_OLD-19fd2230bfda7ff3419e97157be07adc49e933f5.tar.gz
opensim-SC_OLD-19fd2230bfda7ff3419e97157be07adc49e933f5.tar.bz2
opensim-SC_OLD-19fd2230bfda7ff3419e97157be07adc49e933f5.tar.xz
Update svn properties. Fix some inconsistent newlines.
-rw-r--r--OpenSim/Data/MSSQL/AutoClosingSqlCommand.cs432
-rw-r--r--OpenSim/Data/MySQL/MySQLEstateData.cs46
-rw-r--r--OpenSim/Tests/OpenSim/Region/ScriptEngine/Common/LSL_TypesTestVector3.cs124
3 files changed, 301 insertions, 301 deletions
diff --git a/OpenSim/Data/MSSQL/AutoClosingSqlCommand.cs b/OpenSim/Data/MSSQL/AutoClosingSqlCommand.cs
index 6a7d787..cae864b 100644
--- a/OpenSim/Data/MSSQL/AutoClosingSqlCommand.cs
+++ b/OpenSim/Data/MSSQL/AutoClosingSqlCommand.cs
@@ -1,216 +1,216 @@
1/* 1/*
2 * Copyright (c) Contributors, http://opensimulator.org/ 2 * Copyright (c) Contributors, http://opensimulator.org/
3 * See CONTRIBUTORS.TXT for a full list of copyright holders. 3 * See CONTRIBUTORS.TXT for a full list of copyright holders.
4 * 4 *
5 * Redistribution and use in source and binary forms, with or without 5 * Redistribution and use in source and binary forms, with or without
6 * modification, are permitted provided that the following conditions are met: 6 * modification, are permitted provided that the following conditions are met:
7 * * Redistributions of source code must retain the above copyright 7 * * Redistributions of source code must retain the above copyright
8 * notice, this list of conditions and the following disclaimer. 8 * notice, this list of conditions and the following disclaimer.
9 * * Redistributions in binary form must reproduce the above copyright 9 * * Redistributions in binary form must reproduce the above copyright
10 * notice, this list of conditions and the following disclaimer in the 10 * notice, this list of conditions and the following disclaimer in the
11 * documentation and/or other materials provided with the distribution. 11 * documentation and/or other materials provided with the distribution.
12 * * Neither the name of the OpenSim Project nor the 12 * * Neither the name of the OpenSim Project nor the
13 * names of its contributors may be used to endorse or promote products 13 * names of its contributors may be used to endorse or promote products
14 * derived from this software without specific prior written permission. 14 * derived from this software without specific prior written permission.
15 * 15 *
16 * THIS SOFTWARE IS PROVIDED BY THE DEVELOPERS ``AS IS'' AND ANY 16 * THIS SOFTWARE IS PROVIDED BY THE DEVELOPERS ``AS IS'' AND ANY
17 * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED 17 * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
18 * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE 18 * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
19 * DISCLAIMED. IN NO EVENT SHALL THE CONTRIBUTORS BE LIABLE FOR ANY 19 * DISCLAIMED. IN NO EVENT SHALL THE CONTRIBUTORS BE LIABLE FOR ANY
20 * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES 20 * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
21 * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; 21 * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
22 * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND 22 * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
23 * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 23 * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
24 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS 24 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
25 * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 25 * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
26 */ 26 */
27 27
28using System; 28using System;
29using System.Collections.Generic; 29using System.Collections.Generic;
30using System.Text; 30using System.Text;
31using System.Data.SqlClient; 31using System.Data.SqlClient;
32using System.Data; 32using System.Data;
33 33
34namespace OpenSim.Data.MSSQL 34namespace OpenSim.Data.MSSQL
35{ 35{
36 /// <summary> 36 /// <summary>
37 /// Encapsulates a SqlCommand object but ensures that when it is disposed, its connection is closed and disposed also. 37 /// Encapsulates a SqlCommand object but ensures that when it is disposed, its connection is closed and disposed also.
38 /// </summary> 38 /// </summary>
39 internal class AutoClosingSqlCommand : IDbCommand 39 internal class AutoClosingSqlCommand : IDbCommand
40 { 40 {
41 private SqlCommand realCommand; 41 private SqlCommand realCommand;
42 42
43 public AutoClosingSqlCommand(SqlCommand cmd) 43 public AutoClosingSqlCommand(SqlCommand cmd)
44 { 44 {
45 realCommand = cmd; 45 realCommand = cmd;
46 } 46 }
47 47
48 #region IDbCommand Members 48 #region IDbCommand Members
49 49
50 public void Cancel() 50 public void Cancel()
51 { 51 {
52 realCommand.Cancel(); 52 realCommand.Cancel();
53 } 53 }
54 54
55 public string CommandText 55 public string CommandText
56 { 56 {
57 get 57 get
58 { 58 {
59 return realCommand.CommandText; 59 return realCommand.CommandText;
60 } 60 }
61 set 61 set
62 { 62 {
63 realCommand.CommandText = value; 63 realCommand.CommandText = value;
64 } 64 }
65 } 65 }
66 66
67 public int CommandTimeout 67 public int CommandTimeout
68 { 68 {
69 get 69 get
70 { 70 {
71 return realCommand.CommandTimeout; 71 return realCommand.CommandTimeout;
72 } 72 }
73 set 73 set
74 { 74 {
75 realCommand.CommandTimeout = value; 75 realCommand.CommandTimeout = value;
76 } 76 }
77 } 77 }
78 78
79 public CommandType CommandType 79 public CommandType CommandType
80 { 80 {
81 get 81 get
82 { 82 {
83 return realCommand.CommandType; 83 return realCommand.CommandType;
84 } 84 }
85 set 85 set
86 { 86 {
87 realCommand.CommandType = value; 87 realCommand.CommandType = value;
88 } 88 }
89 } 89 }
90 90
91 IDbConnection IDbCommand.Connection 91 IDbConnection IDbCommand.Connection
92 { 92 {
93 get 93 get
94 { 94 {
95 return realCommand.Connection; 95 return realCommand.Connection;
96 } 96 }
97 set 97 set
98 { 98 {
99 realCommand.Connection = (SqlConnection) value; 99 realCommand.Connection = (SqlConnection) value;
100 } 100 }
101 } 101 }
102 102
103 public SqlConnection Connection 103 public SqlConnection Connection
104 { 104 {
105 get 105 get
106 { 106 {
107 return realCommand.Connection; 107 return realCommand.Connection;
108 } 108 }
109 } 109 }
110 110
111 IDbDataParameter IDbCommand.CreateParameter() 111 IDbDataParameter IDbCommand.CreateParameter()
112 { 112 {
113 return realCommand.CreateParameter(); 113 return realCommand.CreateParameter();
114 } 114 }
115 115
116 public SqlParameter CreateParameter() 116 public SqlParameter CreateParameter()
117 { 117 {
118 return realCommand.CreateParameter(); 118 return realCommand.CreateParameter();
119 } 119 }
120 120
121 public int ExecuteNonQuery() 121 public int ExecuteNonQuery()
122 { 122 {
123 return realCommand.ExecuteNonQuery(); 123 return realCommand.ExecuteNonQuery();
124 } 124 }
125 125
126 IDataReader IDbCommand.ExecuteReader(CommandBehavior behavior) 126 IDataReader IDbCommand.ExecuteReader(CommandBehavior behavior)
127 { 127 {
128 return realCommand.ExecuteReader(behavior); 128 return realCommand.ExecuteReader(behavior);
129 } 129 }
130 130
131 public SqlDataReader ExecuteReader(CommandBehavior behavior) 131 public SqlDataReader ExecuteReader(CommandBehavior behavior)
132 { 132 {
133 return realCommand.ExecuteReader(behavior); 133 return realCommand.ExecuteReader(behavior);
134 } 134 }
135 135
136 IDataReader IDbCommand.ExecuteReader() 136 IDataReader IDbCommand.ExecuteReader()
137 { 137 {
138 return realCommand.ExecuteReader(); 138 return realCommand.ExecuteReader();
139 } 139 }
140 140
141 public SqlDataReader ExecuteReader() 141 public SqlDataReader ExecuteReader()
142 { 142 {
143 return realCommand.ExecuteReader(); 143 return realCommand.ExecuteReader();
144 } 144 }
145 145
146 public object ExecuteScalar() 146 public object ExecuteScalar()
147 { 147 {
148 return realCommand.ExecuteScalar(); 148 return realCommand.ExecuteScalar();
149 } 149 }
150 150
151 IDataParameterCollection IDbCommand.Parameters 151 IDataParameterCollection IDbCommand.Parameters
152 { 152 {
153 get { return realCommand.Parameters; } 153 get { return realCommand.Parameters; }
154 } 154 }
155 155
156 public SqlParameterCollection Parameters 156 public SqlParameterCollection Parameters
157 { 157 {
158 get { return realCommand.Parameters; } 158 get { return realCommand.Parameters; }
159 } 159 }
160 160
161 public void Prepare() 161 public void Prepare()
162 { 162 {
163 realCommand.Prepare(); 163 realCommand.Prepare();
164 } 164 }
165 165
166 IDbTransaction IDbCommand.Transaction 166 IDbTransaction IDbCommand.Transaction
167 { 167 {
168 get 168 get
169 { 169 {
170 return realCommand.Transaction; 170 return realCommand.Transaction;
171 } 171 }
172 set 172 set
173 { 173 {
174 realCommand.Transaction = (SqlTransaction) value; 174 realCommand.Transaction = (SqlTransaction) value;
175 } 175 }
176 } 176 }
177 177
178 UpdateRowSource IDbCommand.UpdatedRowSource 178 UpdateRowSource IDbCommand.UpdatedRowSource
179 { 179 {
180 get 180 get
181 { 181 {
182 return realCommand.UpdatedRowSource; 182 return realCommand.UpdatedRowSource;
183 } 183 }
184 set 184 set
185 { 185 {
186 realCommand.UpdatedRowSource = value; 186 realCommand.UpdatedRowSource = value;
187 } 187 }
188 } 188 }
189 189
190 #endregion 190 #endregion
191 191
192 #region IDisposable Members 192 #region IDisposable Members
193 193
194 public void Dispose() 194 public void Dispose()
195 { 195 {
196 SqlConnection conn = realCommand.Connection; 196 SqlConnection conn = realCommand.Connection;
197 try 197 try
198 { 198 {
199 realCommand.Dispose(); 199 realCommand.Dispose();
200 } 200 }
201 finally 201 finally
202 { 202 {
203 try 203 try
204 { 204 {
205 conn.Close(); 205 conn.Close();
206 } 206 }
207 finally 207 finally
208 { 208 {
209 conn.Dispose(); 209 conn.Dispose();
210 } 210 }
211 } 211 }
212 } 212 }
213 213
214 #endregion 214 #endregion
215 } 215 }
216} 216}
diff --git a/OpenSim/Data/MySQL/MySQLEstateData.cs b/OpenSim/Data/MySQL/MySQLEstateData.cs
index c0395a9..f8641bc 100644
--- a/OpenSim/Data/MySQL/MySQLEstateData.cs
+++ b/OpenSim/Data/MySQL/MySQLEstateData.cs
@@ -59,29 +59,29 @@ namespace OpenSim.Data.MySQL
59 59
60 public void Initialise(string connectionString) 60 public void Initialise(string connectionString)
61 { 61 {
62 m_connectionString = connectionString; 62 m_connectionString = connectionString;
63 63
64 int passPosition = 0; 64 int passPosition = 0;
65 int passEndPosition = 0; 65 int passEndPosition = 0;
66 string displayConnectionString = null; 66 string displayConnectionString = null;
67 67
68 try 68 try
69 { // hide the password in the connection string 69 { // hide the password in the connection string
70 passPosition = m_connectionString.IndexOf("password", StringComparison.OrdinalIgnoreCase); 70 passPosition = m_connectionString.IndexOf("password", StringComparison.OrdinalIgnoreCase);
71 passPosition = m_connectionString.IndexOf("=", passPosition); 71 passPosition = m_connectionString.IndexOf("=", passPosition);
72 if (passPosition < m_connectionString.Length) 72 if (passPosition < m_connectionString.Length)
73 passPosition += 1; 73 passPosition += 1;
74 passEndPosition = m_connectionString.IndexOf(";", passPosition); 74 passEndPosition = m_connectionString.IndexOf(";", passPosition);
75 75
76 displayConnectionString = m_connectionString.Substring(0, passPosition); 76 displayConnectionString = m_connectionString.Substring(0, passPosition);
77 displayConnectionString += "***"; 77 displayConnectionString += "***";
78 displayConnectionString += m_connectionString.Substring(passEndPosition, m_connectionString.Length - passEndPosition); 78 displayConnectionString += m_connectionString.Substring(passEndPosition, m_connectionString.Length - passEndPosition);
79 } 79 }
80 catch (Exception e) 80 catch (Exception e)
81 { 81 {
82 m_log.Debug("Exception: password not found in connection string\n" + e.ToString()); 82 m_log.Debug("Exception: password not found in connection string\n" + e.ToString());
83 } 83 }
84 84
85 m_log.Info("[REGION DB]: MySql - connecting: " + displayConnectionString); 85 m_log.Info("[REGION DB]: MySql - connecting: " + displayConnectionString);
86 86
87 //m_log.Info("[ESTATE DB]: MySql - connecting: "+m_connectionString); 87 //m_log.Info("[ESTATE DB]: MySql - connecting: "+m_connectionString);
diff --git a/OpenSim/Tests/OpenSim/Region/ScriptEngine/Common/LSL_TypesTestVector3.cs b/OpenSim/Tests/OpenSim/Region/ScriptEngine/Common/LSL_TypesTestVector3.cs
index 5631854..cadee93 100644
--- a/OpenSim/Tests/OpenSim/Region/ScriptEngine/Common/LSL_TypesTestVector3.cs
+++ b/OpenSim/Tests/OpenSim/Region/ScriptEngine/Common/LSL_TypesTestVector3.cs
@@ -1,62 +1,62 @@
1/* 1/*
2 * Copyright (c) Contributors, http://opensimulator.org/ 2 * Copyright (c) Contributors, http://opensimulator.org/
3 * See CONTRIBUTORS.TXT for a full list of copyright holders. 3 * See CONTRIBUTORS.TXT for a full list of copyright holders.
4 * 4 *
5 * Redistribution and use in source and binary forms, with or without 5 * Redistribution and use in source and binary forms, with or without
6 * modification, are permitted provided that the following conditions are met: 6 * modification, are permitted provided that the following conditions are met:
7 * * Redistributions of source code must retain the above copyright 7 * * Redistributions of source code must retain the above copyright
8 * notice, this list of conditions and the following disclaimer. 8 * notice, this list of conditions and the following disclaimer.
9 * * Redistributions in binary form must reproduce the above copyright 9 * * Redistributions in binary form must reproduce the above copyright
10 * notice, this list of conditions and the following disclaimer in the 10 * notice, this list of conditions and the following disclaimer in the
11 * documentation and/or other materials provided with the distribution. 11 * documentation and/or other materials provided with the distribution.
12 * * Neither the name of the OpenSim Project nor the 12 * * Neither the name of the OpenSim Project nor the
13 * names of its contributors may be used to endorse or promote products 13 * names of its contributors may be used to endorse or promote products
14 * derived from this software without specific prior written permission. 14 * derived from this software without specific prior written permission.
15 * 15 *
16 * THIS SOFTWARE IS PROVIDED BY THE DEVELOPERS ``AS IS'' AND ANY 16 * THIS SOFTWARE IS PROVIDED BY THE DEVELOPERS ``AS IS'' AND ANY
17 * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED 17 * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
18 * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE 18 * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
19 * DISCLAIMED. IN NO EVENT SHALL THE CONTRIBUTORS BE LIABLE FOR ANY 19 * DISCLAIMED. IN NO EVENT SHALL THE CONTRIBUTORS BE LIABLE FOR ANY
20 * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES 20 * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
21 * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; 21 * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
22 * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND 22 * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
23 * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 23 * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
24 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS 24 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
25 * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 25 * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
26 */ 26 */
27 27
28using System.Collections.Generic; 28using System.Collections.Generic;
29using NUnit.Framework; 29using NUnit.Framework;
30using OpenSim.Tests.Common; 30using OpenSim.Tests.Common;
31using OpenSim.Region.ScriptEngine.Common; 31using OpenSim.Region.ScriptEngine.Common;
32 32
33namespace OpenSim.Region.ScriptEngine.Common.Tests 33namespace OpenSim.Region.ScriptEngine.Common.Tests
34{ 34{
35 [TestFixture] 35 [TestFixture]
36 public class LSL_TypesTestVector3 36 public class LSL_TypesTestVector3
37 { 37 {
38 /// <summary> 38 /// <summary>
39 /// Tests for Vector3 39 /// Tests for Vector3
40 /// </summary> 40 /// </summary>
41 [Test] 41 [Test]
42 42
43 public void TestDotProduct() 43 public void TestDotProduct()
44 { 44 {
45 // The numbers we test for. 45 // The numbers we test for.
46 Dictionary<string, double> expectsSet = new Dictionary<string, double>(); 46 Dictionary<string, double> expectsSet = new Dictionary<string, double>();
47 expectsSet.Add("<1, 2, 3> * <2, 3, 4>", 20.0); 47 expectsSet.Add("<1, 2, 3> * <2, 3, 4>", 20.0);
48 expectsSet.Add("<1, 2, 3> * <0, 0, 0>", 0.0); 48 expectsSet.Add("<1, 2, 3> * <0, 0, 0>", 0.0);
49 49
50 double result; 50 double result;
51 string[] parts; 51 string[] parts;
52 string[] delim = { "*" }; 52 string[] delim = { "*" };
53 53
54 foreach (KeyValuePair<string, double> ex in expectsSet) 54 foreach (KeyValuePair<string, double> ex in expectsSet)
55 { 55 {
56 parts = ex.Key.Split(delim, System.StringSplitOptions.None); 56 parts = ex.Key.Split(delim, System.StringSplitOptions.None);
57 result = new LSL_Types.Vector3(parts[0]) * new LSL_Types.Vector3(parts[1]); 57 result = new LSL_Types.Vector3(parts[0]) * new LSL_Types.Vector3(parts[1]);
58 Assert.AreEqual(ex.Value, result); 58 Assert.AreEqual(ex.Value, result);
59 } 59 }
60 } 60 }
61 } 61 }
62} 62}