diff options
author | BlueWall | 2012-03-02 15:02:09 -0500 |
---|---|---|
committer | BlueWall | 2012-03-02 15:02:09 -0500 |
commit | 6fc350725da5132eefe14897644d672ce586c5db (patch) | |
tree | d73af5d1d9bc61143fbac24a4dd54256a1394c97 | |
parent | Merge branch 'master' of /home/opensim/src/opensim into v3_support (diff) | |
parent | Merge branch 'master' of ssh://opensimulator.org/var/git/opensim (diff) | |
download | opensim-SC-6fc350725da5132eefe14897644d672ce586c5db.zip opensim-SC-6fc350725da5132eefe14897644d672ce586c5db.tar.gz opensim-SC-6fc350725da5132eefe14897644d672ce586c5db.tar.bz2 opensim-SC-6fc350725da5132eefe14897644d672ce586c5db.tar.xz |
Merge branch 'master' into v3_support
28 files changed, 275 insertions, 317 deletions
diff --git a/.nant/local.include b/.nant/local.include index 7d16810..6d3e972 100644 --- a/.nant/local.include +++ b/.nant/local.include | |||
@@ -8,6 +8,24 @@ | |||
8 | <copy file="bin/OpenSim.ini.example" tofile="bin/OpenSim.ini"/> | 8 | <copy file="bin/OpenSim.ini.example" tofile="bin/OpenSim.ini"/> |
9 | <copy file="bin/config-include/StandaloneCommon.ini.example" tofile="bin/config-include/StandaloneCommon.ini"/> | 9 | <copy file="bin/config-include/StandaloneCommon.ini.example" tofile="bin/config-include/StandaloneCommon.ini"/> |
10 | <copy file="bin/config-include/FlotsamCache.ini.example" tofile="bin/config-include/FlotsamCache.ini"/> | 10 | <copy file="bin/config-include/FlotsamCache.ini.example" tofile="bin/config-include/FlotsamCache.ini"/> |
11 | <!-- delete files generated by runprebuild.sh which had to be run in order to generate the build file for this target--> | ||
12 | <delete> | ||
13 | <fileset basedir="OpenSim"> | ||
14 | <include name="**/*.build"/> | ||
15 | <include name="**/*.csproj*"/> | ||
16 | <include name="**/*.dll.build"/> | ||
17 | <include name="**/*.pidb"/> | ||
18 | <exclude name="Tools/OpenSim.32BitLaunch/**"/> | ||
19 | <exclude name="Tools/Robust.32BitLaunch/**"/> | ||
20 | <exclude name="Tools/LaunchSLClient/**"/> | ||
21 | </fileset> | ||
22 | </delete> | ||
23 | <delete> | ||
24 | <fileset> | ||
25 | <include name="OpenSim.build"/> | ||
26 | <include name="OpenSim.sln"/> | ||
27 | </fileset> | ||
28 | </delete> | ||
11 | </target> | 29 | </target> |
12 | 30 | ||
13 | <property name="distbindir" value="distbin" /> | 31 | <property name="distbindir" value="distbin" /> |
diff --git a/OpenSim/Data/MSSQL/MSSQLSimulationData.cs b/OpenSim/Data/MSSQL/MSSQLSimulationData.cs index e58620a..d6b1561 100644 --- a/OpenSim/Data/MSSQL/MSSQLSimulationData.cs +++ b/OpenSim/Data/MSSQL/MSSQLSimulationData.cs | |||
@@ -1367,7 +1367,7 @@ VALUES | |||
1367 | newSettings.TerrainRaiseLimit = Convert.ToDouble(row["terrain_raise_limit"]); | 1367 | newSettings.TerrainRaiseLimit = Convert.ToDouble(row["terrain_raise_limit"]); |
1368 | newSettings.TerrainLowerLimit = Convert.ToDouble(row["terrain_lower_limit"]); | 1368 | newSettings.TerrainLowerLimit = Convert.ToDouble(row["terrain_lower_limit"]); |
1369 | newSettings.UseEstateSun = Convert.ToBoolean(row["use_estate_sun"]); | 1369 | newSettings.UseEstateSun = Convert.ToBoolean(row["use_estate_sun"]); |
1370 | newSettings.Sandbox = Convert.ToBoolean(row["sandbox"]); | 1370 | newSettings.Sandbox = Convert.ToBoolean(row["Sandbox"]); |
1371 | newSettings.FixedSun = Convert.ToBoolean(row["fixed_sun"]); | 1371 | newSettings.FixedSun = Convert.ToBoolean(row["fixed_sun"]); |
1372 | newSettings.SunPosition = Convert.ToDouble(row["sun_position"]); | 1372 | newSettings.SunPosition = Convert.ToDouble(row["sun_position"]); |
1373 | newSettings.SunVector = new Vector3( | 1373 | newSettings.SunVector = new Vector3( |
@@ -1782,7 +1782,7 @@ VALUES | |||
1782 | parameters.Add(_Database.CreateParameter("terrain_raise_limit", settings.TerrainRaiseLimit)); | 1782 | parameters.Add(_Database.CreateParameter("terrain_raise_limit", settings.TerrainRaiseLimit)); |
1783 | parameters.Add(_Database.CreateParameter("terrain_lower_limit", settings.TerrainLowerLimit)); | 1783 | parameters.Add(_Database.CreateParameter("terrain_lower_limit", settings.TerrainLowerLimit)); |
1784 | parameters.Add(_Database.CreateParameter("use_estate_sun", settings.UseEstateSun)); | 1784 | parameters.Add(_Database.CreateParameter("use_estate_sun", settings.UseEstateSun)); |
1785 | parameters.Add(_Database.CreateParameter("sandbox", settings.Sandbox)); | 1785 | parameters.Add(_Database.CreateParameter("Sandbox", settings.Sandbox)); |
1786 | parameters.Add(_Database.CreateParameter("fixed_sun", settings.FixedSun)); | 1786 | parameters.Add(_Database.CreateParameter("fixed_sun", settings.FixedSun)); |
1787 | parameters.Add(_Database.CreateParameter("sun_position", settings.SunPosition)); | 1787 | parameters.Add(_Database.CreateParameter("sun_position", settings.SunPosition)); |
1788 | parameters.Add(_Database.CreateParameter("sunvectorx", settings.SunVector.X)); | 1788 | parameters.Add(_Database.CreateParameter("sunvectorx", settings.SunVector.X)); |
diff --git a/OpenSim/Data/MySQL/MySQLSimulationData.cs b/OpenSim/Data/MySQL/MySQLSimulationData.cs index 7c995ad..381a514 100644 --- a/OpenSim/Data/MySQL/MySQLSimulationData.cs +++ b/OpenSim/Data/MySQL/MySQLSimulationData.cs | |||
@@ -1283,7 +1283,7 @@ namespace OpenSim.Data.MySQL | |||
1283 | newSettings.TerrainRaiseLimit = Convert.ToDouble(row["terrain_raise_limit"]); | 1283 | newSettings.TerrainRaiseLimit = Convert.ToDouble(row["terrain_raise_limit"]); |
1284 | newSettings.TerrainLowerLimit = Convert.ToDouble(row["terrain_lower_limit"]); | 1284 | newSettings.TerrainLowerLimit = Convert.ToDouble(row["terrain_lower_limit"]); |
1285 | newSettings.UseEstateSun = Convert.ToBoolean(row["use_estate_sun"]); | 1285 | newSettings.UseEstateSun = Convert.ToBoolean(row["use_estate_sun"]); |
1286 | newSettings.Sandbox = Convert.ToBoolean(row["sandbox"]); | 1286 | newSettings.Sandbox = Convert.ToBoolean(row["Sandbox"]); |
1287 | newSettings.SunVector = new Vector3 ( | 1287 | newSettings.SunVector = new Vector3 ( |
1288 | Convert.ToSingle(row["sunvectorx"]), | 1288 | Convert.ToSingle(row["sunvectorx"]), |
1289 | Convert.ToSingle(row["sunvectory"]), | 1289 | Convert.ToSingle(row["sunvectory"]), |
diff --git a/OpenSim/Data/SQLite/SQLiteSimulationData.cs b/OpenSim/Data/SQLite/SQLiteSimulationData.cs index 186a586..7e7c08a 100644 --- a/OpenSim/Data/SQLite/SQLiteSimulationData.cs +++ b/OpenSim/Data/SQLite/SQLiteSimulationData.cs | |||
@@ -2157,7 +2157,7 @@ namespace OpenSim.Data.SQLite | |||
2157 | row["terrain_raise_limit"] = settings.TerrainRaiseLimit; | 2157 | row["terrain_raise_limit"] = settings.TerrainRaiseLimit; |
2158 | row["terrain_lower_limit"] = settings.TerrainLowerLimit; | 2158 | row["terrain_lower_limit"] = settings.TerrainLowerLimit; |
2159 | row["use_estate_sun"] = settings.UseEstateSun; | 2159 | row["use_estate_sun"] = settings.UseEstateSun; |
2160 | row["Sandbox"] = settings.Sandbox; // database uses upper case S for sandbox | 2160 | row["sandbox"] = settings.Sandbox; // unlike other database modules, sqlite uses a lower case s for sandbox! |
2161 | row["sunvectorx"] = settings.SunVector.X; | 2161 | row["sunvectorx"] = settings.SunVector.X; |
2162 | row["sunvectory"] = settings.SunVector.Y; | 2162 | row["sunvectory"] = settings.SunVector.Y; |
2163 | row["sunvectorz"] = settings.SunVector.Z; | 2163 | row["sunvectorz"] = settings.SunVector.Z; |
diff --git a/OpenSim/Framework/Console/MockConsole.cs b/OpenSim/Framework/Console/MockConsole.cs index a29b370..4d8751f 100644 --- a/OpenSim/Framework/Console/MockConsole.cs +++ b/OpenSim/Framework/Console/MockConsole.cs | |||
@@ -29,6 +29,7 @@ using System; | |||
29 | using System.Threading; | 29 | using System.Threading; |
30 | using System.Collections.Generic; | 30 | using System.Collections.Generic; |
31 | using System.Text; | 31 | using System.Text; |
32 | using System.Xml; | ||
32 | 33 | ||
33 | namespace OpenSim.Framework.Console | 34 | namespace OpenSim.Framework.Console |
34 | { | 35 | { |
@@ -37,28 +38,42 @@ namespace OpenSim.Framework.Console | |||
37 | /// Don't use this except for Unit Testing or you're in for a world of hurt when the | 38 | /// Don't use this except for Unit Testing or you're in for a world of hurt when the |
38 | /// sim gets to ReadLine | 39 | /// sim gets to ReadLine |
39 | /// </summary> | 40 | /// </summary> |
40 | public class MockConsole : CommandConsole | 41 | public class MockConsole : ICommandConsole |
41 | { | 42 | { |
42 | public MockConsole(string defaultPrompt) : base(defaultPrompt) | 43 | private MockCommands m_commands = new MockCommands(); |
43 | { | ||
44 | } | ||
45 | public override void Output(string text) | ||
46 | { | ||
47 | } | ||
48 | public override void Output(string text, string level) | ||
49 | { | ||
50 | } | ||
51 | 44 | ||
52 | public override string ReadLine(string p, bool isCommand, bool e) | 45 | public ICommands Commands { get { return m_commands; } } |
53 | { | 46 | |
54 | //Thread.CurrentThread.Join(1000); | 47 | public void Prompt() {} |
55 | return string.Empty; | 48 | |
56 | } | 49 | public void RunCommand(string cmd) {} |
57 | public override void UnlockOutput() | 50 | |
58 | { | 51 | public string ReadLine(string p, bool isCommand, bool e) { return ""; } |
59 | } | 52 | |
60 | public override void LockOutput() | 53 | public object ConsoleScene { get { return null; } } |
61 | { | 54 | |
62 | } | 55 | public void Output(string text, string level) {} |
56 | public void Output(string text) {} | ||
57 | public void OutputFormat(string format, params object[] components) {} | ||
58 | |||
59 | public string CmdPrompt(string p) { return ""; } | ||
60 | public string CmdPrompt(string p, string def) { return ""; } | ||
61 | public string CmdPrompt(string p, List<char> excludedCharacters) { return ""; } | ||
62 | public string CmdPrompt(string p, string def, List<char> excludedCharacters) { return ""; } | ||
63 | |||
64 | public string CmdPrompt(string prompt, string defaultresponse, List<string> options) { return ""; } | ||
65 | |||
66 | public string PasswdPrompt(string p) { return ""; } | ||
67 | } | ||
68 | |||
69 | public class MockCommands : ICommands | ||
70 | { | ||
71 | public void FromXml(XmlElement root, CommandDelegate fn) {} | ||
72 | public List<string> GetHelp(string[] cmd) { return null; } | ||
73 | public void AddCommand(string module, bool shared, string command, string help, string longhelp, CommandDelegate fn) {} | ||
74 | public void AddCommand(string module, bool shared, string command, string help, string longhelp, string descriptivehelp, CommandDelegate fn) {} | ||
75 | public string[] FindNextOption(string[] cmd, bool term) { return null; } | ||
76 | public string[] Resolve(string[] cmd) { return null; } | ||
77 | public XmlElement GetXml(XmlDocument doc) { return null; } | ||
63 | } | 78 | } |
64 | } | 79 | } \ No newline at end of file |
diff --git a/OpenSim/Framework/Servers/VersionInfo.cs b/OpenSim/Framework/Servers/VersionInfo.cs index f30cb7a..7a5d715 100644 --- a/OpenSim/Framework/Servers/VersionInfo.cs +++ b/OpenSim/Framework/Servers/VersionInfo.cs | |||
@@ -29,7 +29,7 @@ namespace OpenSim | |||
29 | { | 29 | { |
30 | public class VersionInfo | 30 | public class VersionInfo |
31 | { | 31 | { |
32 | private const string VERSION_NUMBER = "0.7.3"; | 32 | private const string VERSION_NUMBER = "0.7.4"; |
33 | private const Flavour VERSION_FLAVOUR = Flavour.Dev; | 33 | private const Flavour VERSION_FLAVOUR = Flavour.Dev; |
34 | 34 | ||
35 | public enum Flavour | 35 | public enum Flavour |
diff --git a/OpenSim/Framework/WebUtil.cs b/OpenSim/Framework/WebUtil.cs index b761dfe..af25da9 100644 --- a/OpenSim/Framework/WebUtil.cs +++ b/OpenSim/Framework/WebUtil.cs | |||
@@ -63,77 +63,7 @@ namespace OpenSim.Framework | |||
63 | // a "long" call for warning & debugging purposes | 63 | // a "long" call for warning & debugging purposes |
64 | public const int LongCallTime = 500; | 64 | public const int LongCallTime = 500; |
65 | 65 | ||
66 | // /// <summary> | 66 | #region JSONRequest |
67 | // /// Send LLSD to an HTTP client in application/llsd+json form | ||
68 | // /// </summary> | ||
69 | // /// <param name="response">HTTP response to send the data in</param> | ||
70 | // /// <param name="body">LLSD to send to the client</param> | ||
71 | // public static void SendJSONResponse(OSHttpResponse response, OSDMap body) | ||
72 | // { | ||
73 | // byte[] responseData = Encoding.UTF8.GetBytes(OSDParser.SerializeJsonString(body)); | ||
74 | // | ||
75 | // response.ContentEncoding = Encoding.UTF8; | ||
76 | // response.ContentLength = responseData.Length; | ||
77 | // response.ContentType = "application/llsd+json"; | ||
78 | // response.Body.Write(responseData, 0, responseData.Length); | ||
79 | // } | ||
80 | // | ||
81 | // /// <summary> | ||
82 | // /// Send LLSD to an HTTP client in application/llsd+xml form | ||
83 | // /// </summary> | ||
84 | // /// <param name="response">HTTP response to send the data in</param> | ||
85 | // /// <param name="body">LLSD to send to the client</param> | ||
86 | // public static void SendXMLResponse(OSHttpResponse response, OSDMap body) | ||
87 | // { | ||
88 | // byte[] responseData = OSDParser.SerializeLLSDXmlBytes(body); | ||
89 | // | ||
90 | // response.ContentEncoding = Encoding.UTF8; | ||
91 | // response.ContentLength = responseData.Length; | ||
92 | // response.ContentType = "application/llsd+xml"; | ||
93 | // response.Body.Write(responseData, 0, responseData.Length); | ||
94 | // } | ||
95 | |||
96 | /// <summary> | ||
97 | /// Make a GET or GET-like request to a web service that returns LLSD | ||
98 | /// or JSON data | ||
99 | /// </summary> | ||
100 | public static OSDMap ServiceRequest(string url, string httpVerb) | ||
101 | { | ||
102 | string errorMessage; | ||
103 | |||
104 | try | ||
105 | { | ||
106 | HttpWebRequest request = (HttpWebRequest)HttpWebRequest.Create(url); | ||
107 | request.Method = httpVerb; | ||
108 | |||
109 | using (WebResponse response = request.GetResponse()) | ||
110 | { | ||
111 | using (Stream responseStream = response.GetResponseStream()) | ||
112 | { | ||
113 | try | ||
114 | { | ||
115 | string responseStr = responseStream.GetStreamString(); | ||
116 | OSD responseOSD = OSDParser.Deserialize(responseStr); | ||
117 | if (responseOSD.Type == OSDType.Map) | ||
118 | return (OSDMap)responseOSD; | ||
119 | else | ||
120 | errorMessage = "Response format was invalid."; | ||
121 | } | ||
122 | catch | ||
123 | { | ||
124 | errorMessage = "Failed to parse the response."; | ||
125 | } | ||
126 | } | ||
127 | } | ||
128 | } | ||
129 | catch (Exception ex) | ||
130 | { | ||
131 | m_log.Warn(httpVerb + " on URL " + url + " failed: " + ex.Message); | ||
132 | errorMessage = ex.Message; | ||
133 | } | ||
134 | |||
135 | return new OSDMap { { "Message", OSD.FromString("Service request failed. " + errorMessage) } }; | ||
136 | } | ||
137 | 67 | ||
138 | /// <summary> | 68 | /// <summary> |
139 | /// PUT JSON-encoded data to a web service that returns LLSD or | 69 | /// PUT JSON-encoded data to a web service that returns LLSD or |
@@ -303,6 +233,10 @@ namespace OpenSim.Framework | |||
303 | return result; | 233 | return result; |
304 | } | 234 | } |
305 | 235 | ||
236 | #endregion JSONRequest | ||
237 | |||
238 | #region FormRequest | ||
239 | |||
306 | /// <summary> | 240 | /// <summary> |
307 | /// POST URL-encoded form data to a web service that returns LLSD or | 241 | /// POST URL-encoded form data to a web service that returns LLSD or |
308 | /// JSON data | 242 | /// JSON data |
@@ -397,6 +331,8 @@ namespace OpenSim.Framework | |||
397 | result["Message"] = OSD.FromString("Service request failed: " + msg); | 331 | result["Message"] = OSD.FromString("Service request failed: " + msg); |
398 | return result; | 332 | return result; |
399 | } | 333 | } |
334 | |||
335 | #endregion FormRequest | ||
400 | 336 | ||
401 | #region Uri | 337 | #region Uri |
402 | 338 | ||
diff --git a/OpenSim/Region/CoreModules/Avatar/Profile/BasicProfileModule.cs b/OpenSim/Region/CoreModules/Avatar/Profile/BasicProfileModule.cs index eb1e4b5..8101ca2 100644 --- a/OpenSim/Region/CoreModules/Avatar/Profile/BasicProfileModule.cs +++ b/OpenSim/Region/CoreModules/Avatar/Profile/BasicProfileModule.cs | |||
@@ -150,7 +150,16 @@ namespace OpenSim.Region.CoreModules.Avatar.Profile | |||
150 | string skillsText = String.Empty; | 150 | string skillsText = String.Empty; |
151 | string languages = String.Empty; | 151 | string languages = String.Empty; |
152 | 152 | ||
153 | Byte[] charterMember = Utils.StringToBytes("Avatar"); | 153 | UserAccount account = m_Scenes[0].UserAccountService.GetUserAccount(m_Scenes[0].RegionInfo.ScopeID, avatarID); |
154 | |||
155 | string name = "Avatar"; | ||
156 | int created = 0; | ||
157 | if (account != null) | ||
158 | { | ||
159 | name = account.FirstName + " " + account.LastName; | ||
160 | created = account.Created; | ||
161 | } | ||
162 | Byte[] charterMember = Utils.StringToBytes(name); | ||
154 | 163 | ||
155 | profileUrl = "No profile data"; | 164 | profileUrl = "No profile data"; |
156 | aboutText = string.Empty; | 165 | aboutText = string.Empty; |
@@ -160,7 +169,7 @@ namespace OpenSim.Region.CoreModules.Avatar.Profile | |||
160 | partner = UUID.Zero; | 169 | partner = UUID.Zero; |
161 | 170 | ||
162 | remoteClient.SendAvatarProperties(avatarID, aboutText, | 171 | remoteClient.SendAvatarProperties(avatarID, aboutText, |
163 | Util.ToDateTime(0).ToString( | 172 | Util.ToDateTime(created).ToString( |
164 | "M/d/yyyy", CultureInfo.InvariantCulture), | 173 | "M/d/yyyy", CultureInfo.InvariantCulture), |
165 | charterMember, firstLifeAboutText, | 174 | charterMember, firstLifeAboutText, |
166 | (uint)(0 & 0xff), | 175 | (uint)(0 & 0xff), |
diff --git a/OpenSim/Region/CoreModules/Framework/InventoryAccess/HGInventoryAccessModule.cs b/OpenSim/Region/CoreModules/Framework/InventoryAccess/HGInventoryAccessModule.cs index 0c4ff7f..d2fe388 100644 --- a/OpenSim/Region/CoreModules/Framework/InventoryAccess/HGInventoryAccessModule.cs +++ b/OpenSim/Region/CoreModules/Framework/InventoryAccess/HGInventoryAccessModule.cs | |||
@@ -117,7 +117,7 @@ namespace OpenSim.Region.CoreModules.Framework.InventoryAccess | |||
117 | string userAssetServer = string.Empty; | 117 | string userAssetServer = string.Empty; |
118 | if (IsForeignUser(avatarID, out userAssetServer) && userAssetServer != string.Empty && m_OutboundPermission) | 118 | if (IsForeignUser(avatarID, out userAssetServer) && userAssetServer != string.Empty && m_OutboundPermission) |
119 | { | 119 | { |
120 | Util.FireAndForget(delegate { m_assMapper.Post(assetID, avatarID, userAssetServer); }); | 120 | m_assMapper.Post(assetID, avatarID, userAssetServer); |
121 | } | 121 | } |
122 | } | 122 | } |
123 | 123 | ||
diff --git a/OpenSim/Region/CoreModules/World/WorldMap/WorldMapModule.cs b/OpenSim/Region/CoreModules/World/WorldMap/WorldMapModule.cs index 74b047b..fd122da 100644 --- a/OpenSim/Region/CoreModules/World/WorldMap/WorldMapModule.cs +++ b/OpenSim/Region/CoreModules/World/WorldMap/WorldMapModule.cs | |||
@@ -132,7 +132,7 @@ namespace OpenSim.Region.CoreModules.World.WorldMap | |||
132 | { | 132 | { |
133 | } | 133 | } |
134 | 134 | ||
135 | public Type ReplaceableInterface | 135 | public Type ReplaceableInterface |
136 | { | 136 | { |
137 | get { return null; } | 137 | get { return null; } |
138 | } | 138 | } |
@@ -220,7 +220,7 @@ namespace OpenSim.Region.CoreModules.World.WorldMap | |||
220 | // There is a major hack going on in this method. The viewer doesn't request | 220 | // There is a major hack going on in this method. The viewer doesn't request |
221 | // map blocks (RequestMapBlocks) above 2048. That means that if we don't hack, | 221 | // map blocks (RequestMapBlocks) above 2048. That means that if we don't hack, |
222 | // grids above that cell don't have a map at all. So, here's the hack: we wait | 222 | // grids above that cell don't have a map at all. So, here's the hack: we wait |
223 | // for this CAP request to come, and we inject the map blocks at this point. | 223 | // for this CAP request to come, and we inject the map blocks at this point. |
224 | // In a normal scenario, this request simply sends back the MapLayer (the blue color). | 224 | // In a normal scenario, this request simply sends back the MapLayer (the blue color). |
225 | // In the hacked scenario, it also sends the map blocks via UDP. | 225 | // In the hacked scenario, it also sends the map blocks via UDP. |
226 | // | 226 | // |
@@ -751,7 +751,7 @@ namespace OpenSim.Region.CoreModules.World.WorldMap | |||
751 | { | 751 | { |
752 | uint x = 0, y = 0; | 752 | uint x = 0, y = 0; |
753 | Utils.LongToUInts(regionhandle, out x, out y); | 753 | Utils.LongToUInts(regionhandle, out x, out y); |
754 | GridRegion mreg = m_scene.GridService.GetRegionByPosition(m_scene.RegionInfo.ScopeID, (int)x, (int)y); | 754 | GridRegion mreg = m_scene.GridService.GetRegionByPosition(m_scene.RegionInfo.ScopeID, (int)x, (int)y); |
755 | 755 | ||
756 | if (mreg != null) | 756 | if (mreg != null) |
757 | { | 757 | { |
@@ -857,7 +857,7 @@ namespace OpenSim.Region.CoreModules.World.WorldMap | |||
857 | finally | 857 | finally |
858 | { | 858 | { |
859 | if (os != null) | 859 | if (os != null) |
860 | os.Close(); | 860 | os.Close(); |
861 | } | 861 | } |
862 | 862 | ||
863 | string response_mapItems_reply = null; | 863 | string response_mapItems_reply = null; |
@@ -960,16 +960,16 @@ namespace OpenSim.Region.CoreModules.World.WorldMap | |||
960 | // on an unloaded square. | 960 | // on an unloaded square. |
961 | // But make sure: Look whether the one we requested is in there | 961 | // But make sure: Look whether the one we requested is in there |
962 | List<GridRegion> regions = m_scene.GridService.GetRegionRange(m_scene.RegionInfo.ScopeID, | 962 | List<GridRegion> regions = m_scene.GridService.GetRegionRange(m_scene.RegionInfo.ScopeID, |
963 | minX * (int)Constants.RegionSize, | 963 | minX * (int)Constants.RegionSize, |
964 | maxX * (int)Constants.RegionSize, | 964 | maxX * (int)Constants.RegionSize, |
965 | minY * (int)Constants.RegionSize, | 965 | minY * (int)Constants.RegionSize, |
966 | maxY * (int)Constants.RegionSize); | 966 | maxY * (int)Constants.RegionSize); |
967 | 967 | ||
968 | if (regions != null) | 968 | if (regions != null) |
969 | { | 969 | { |
970 | foreach (GridRegion r in regions) | 970 | foreach (GridRegion r in regions) |
971 | { | 971 | { |
972 | if ((r.RegionLocX == minX * (int)Constants.RegionSize) && | 972 | if ((r.RegionLocX == minX * (int)Constants.RegionSize) && |
973 | (r.RegionLocY == minY * (int)Constants.RegionSize)) | 973 | (r.RegionLocY == minY * (int)Constants.RegionSize)) |
974 | { | 974 | { |
975 | // found it => add it to response | 975 | // found it => add it to response |
@@ -1004,7 +1004,7 @@ namespace OpenSim.Region.CoreModules.World.WorldMap | |||
1004 | { | 1004 | { |
1005 | List<MapBlockData> mapBlocks = new List<MapBlockData>(); | 1005 | List<MapBlockData> mapBlocks = new List<MapBlockData>(); |
1006 | List<GridRegion> regions = m_scene.GridService.GetRegionRange(m_scene.RegionInfo.ScopeID, | 1006 | List<GridRegion> regions = m_scene.GridService.GetRegionRange(m_scene.RegionInfo.ScopeID, |
1007 | (minX - 4) * (int)Constants.RegionSize, | 1007 | (minX - 4) * (int)Constants.RegionSize, |
1008 | (maxX + 4) * (int)Constants.RegionSize, | 1008 | (maxX + 4) * (int)Constants.RegionSize, |
1009 | (minY - 4) * (int)Constants.RegionSize, | 1009 | (minY - 4) * (int)Constants.RegionSize, |
1010 | (maxY + 4) * (int)Constants.RegionSize); | 1010 | (maxY + 4) * (int)Constants.RegionSize); |
@@ -1336,7 +1336,7 @@ namespace OpenSim.Region.CoreModules.World.WorldMap | |||
1336 | // Cannot create a map for a nonexistant heightmap | 1336 | // Cannot create a map for a nonexistant heightmap |
1337 | if (m_scene.Heightmap == null) | 1337 | if (m_scene.Heightmap == null) |
1338 | return; | 1338 | return; |
1339 | 1339 | ||
1340 | //create a texture asset of the terrain | 1340 | //create a texture asset of the terrain |
1341 | IMapImageGenerator terrain = m_scene.RequestModuleInterface<IMapImageGenerator>(); | 1341 | IMapImageGenerator terrain = m_scene.RequestModuleInterface<IMapImageGenerator>(); |
1342 | if (terrain == null) | 1342 | if (terrain == null) |
@@ -1345,7 +1345,7 @@ namespace OpenSim.Region.CoreModules.World.WorldMap | |||
1345 | byte[] data = terrain.WriteJpeg2000Image(); | 1345 | byte[] data = terrain.WriteJpeg2000Image(); |
1346 | if (data == null) | 1346 | if (data == null) |
1347 | return; | 1347 | return; |
1348 | 1348 | ||
1349 | byte[] overlay = GenerateOverlay(); | 1349 | byte[] overlay = GenerateOverlay(); |
1350 | 1350 | ||
1351 | m_log.Debug("[WORLDMAP]: STORING MAPTILE IMAGE"); | 1351 | m_log.Debug("[WORLDMAP]: STORING MAPTILE IMAGE"); |
@@ -1366,7 +1366,7 @@ namespace OpenSim.Region.CoreModules.World.WorldMap | |||
1366 | // Store the new one | 1366 | // Store the new one |
1367 | m_log.DebugFormat("[WORLDMAP]: Storing map tile {0}", asset.ID); | 1367 | m_log.DebugFormat("[WORLDMAP]: Storing map tile {0}", asset.ID); |
1368 | m_scene.AssetService.Store(asset); | 1368 | m_scene.AssetService.Store(asset); |
1369 | 1369 | ||
1370 | if (overlay != null) | 1370 | if (overlay != null) |
1371 | { | 1371 | { |
1372 | parcelImageID = UUID.Random(); | 1372 | parcelImageID = UUID.Random(); |
@@ -1390,7 +1390,7 @@ namespace OpenSim.Region.CoreModules.World.WorldMap | |||
1390 | m_scene.RegionInfo.RegionSettings.TerrainImageID = terrainImageID; | 1390 | m_scene.RegionInfo.RegionSettings.TerrainImageID = terrainImageID; |
1391 | m_scene.RegionInfo.RegionSettings.ParcelImageID = parcelImageID; | 1391 | m_scene.RegionInfo.RegionSettings.ParcelImageID = parcelImageID; |
1392 | m_scene.RegionInfo.RegionSettings.Save(); | 1392 | m_scene.RegionInfo.RegionSettings.Save(); |
1393 | 1393 | ||
1394 | // Delete the old one | 1394 | // Delete the old one |
1395 | // m_log.DebugFormat("[WORLDMAP]: Deleting old map tile {0}", lastTerrainImageID); | 1395 | // m_log.DebugFormat("[WORLDMAP]: Deleting old map tile {0}", lastTerrainImageID); |
1396 | m_scene.AssetService.Delete(lastTerrainImageID.ToString()); | 1396 | m_scene.AssetService.Delete(lastTerrainImageID.ToString()); |
@@ -1469,18 +1469,18 @@ namespace OpenSim.Region.CoreModules.World.WorldMap | |||
1469 | if ((land.LandData.Flags & (uint)ParcelFlags.ForSale) != 0) | 1469 | if ((land.LandData.Flags & (uint)ParcelFlags.ForSale) != 0) |
1470 | { | 1470 | { |
1471 | landForSale = true; | 1471 | landForSale = true; |
1472 | 1472 | ||
1473 | saleBitmap = land.MergeLandBitmaps(saleBitmap, land.GetLandBitmap()); | 1473 | saleBitmap = land.MergeLandBitmaps(saleBitmap, land.GetLandBitmap()); |
1474 | } | 1474 | } |
1475 | } | 1475 | } |
1476 | 1476 | ||
1477 | if (!landForSale) | 1477 | if (!landForSale) |
1478 | { | 1478 | { |
1479 | m_log.DebugFormat("[WORLD MAP]: Region {0} has no parcels for sale, not geenrating overlay", m_scene.RegionInfo.RegionName); | 1479 | m_log.DebugFormat("[WORLD MAP]: Region {0} has no parcels for sale, not generating overlay", m_scene.RegionInfo.RegionName); |
1480 | return null; | 1480 | return null; |
1481 | } | 1481 | } |
1482 | 1482 | ||
1483 | m_log.DebugFormat("[WORLD MAP]: Region {0} has parcels for sale, genrating overlay", m_scene.RegionInfo.RegionName); | 1483 | m_log.DebugFormat("[WORLD MAP]: Region {0} has parcels for sale, generating overlay", m_scene.RegionInfo.RegionName); |
1484 | 1484 | ||
1485 | for (int x = 0 ; x < 64 ; x++) | 1485 | for (int x = 0 ; x < 64 ; x++) |
1486 | { | 1486 | { |
diff --git a/OpenSim/Region/Framework/Scenes/ScenePresence.cs b/OpenSim/Region/Framework/Scenes/ScenePresence.cs index 40c8d06..ec6bb89 100644 --- a/OpenSim/Region/Framework/Scenes/ScenePresence.cs +++ b/OpenSim/Region/Framework/Scenes/ScenePresence.cs | |||
@@ -343,13 +343,7 @@ namespace OpenSim.Region.Framework.Scenes | |||
343 | /// </summary> | 343 | /// </summary> |
344 | protected Vector3 m_lastCameraPosition; | 344 | protected Vector3 m_lastCameraPosition; |
345 | 345 | ||
346 | protected Vector3 m_CameraPosition; | 346 | public Vector3 CameraPosition { get; set; } |
347 | |||
348 | public Vector3 CameraPosition | ||
349 | { | ||
350 | get { return m_CameraPosition; } | ||
351 | private set { m_CameraPosition = value; } | ||
352 | } | ||
353 | 347 | ||
354 | public Quaternion CameraRotation | 348 | public Quaternion CameraRotation |
355 | { | 349 | { |
@@ -359,28 +353,9 @@ namespace OpenSim.Region.Framework.Scenes | |||
359 | // Use these three vectors to figure out what the agent is looking at | 353 | // Use these three vectors to figure out what the agent is looking at |
360 | // Convert it to a Matrix and/or Quaternion | 354 | // Convert it to a Matrix and/or Quaternion |
361 | // | 355 | // |
362 | protected Vector3 m_CameraAtAxis; | 356 | public Vector3 CameraAtAxis { get; set; } |
363 | protected Vector3 m_CameraLeftAxis; | 357 | public Vector3 CameraLeftAxis { get; set; } |
364 | protected Vector3 m_CameraUpAxis; | 358 | public Vector3 CameraUpAxis { get; set; } |
365 | |||
366 | public Vector3 CameraAtAxis | ||
367 | { | ||
368 | get { return m_CameraAtAxis; } | ||
369 | private set { m_CameraAtAxis = value; } | ||
370 | } | ||
371 | |||
372 | |||
373 | public Vector3 CameraLeftAxis | ||
374 | { | ||
375 | get { return m_CameraLeftAxis; } | ||
376 | private set { m_CameraLeftAxis = value; } | ||
377 | } | ||
378 | |||
379 | public Vector3 CameraUpAxis | ||
380 | { | ||
381 | get { return m_CameraUpAxis; } | ||
382 | private set { m_CameraUpAxis = value; } | ||
383 | } | ||
384 | 359 | ||
385 | public Vector3 Lookat | 360 | public Vector3 Lookat |
386 | { | 361 | { |
@@ -396,33 +371,15 @@ namespace OpenSim.Region.Framework.Scenes | |||
396 | } | 371 | } |
397 | #endregion | 372 | #endregion |
398 | 373 | ||
399 | public readonly string Firstname; | 374 | public string Firstname { get; private set; } |
400 | public readonly string Lastname; | 375 | public string Lastname { get; private set; } |
401 | 376 | ||
402 | private string m_grouptitle; | 377 | public string Grouptitle { get; set; } |
403 | |||
404 | public string Grouptitle | ||
405 | { | ||
406 | get { return m_grouptitle; } | ||
407 | set { m_grouptitle = value; } | ||
408 | } | ||
409 | 378 | ||
410 | // Agent's Draw distance. | 379 | // Agent's Draw distance. |
411 | protected float m_DrawDistance; | 380 | public float DrawDistance { get; set; } |
412 | |||
413 | public float DrawDistance | ||
414 | { | ||
415 | get { return m_DrawDistance; } | ||
416 | private set { m_DrawDistance = value; } | ||
417 | } | ||
418 | |||
419 | protected bool m_allowMovement = true; | ||
420 | 381 | ||
421 | public bool AllowMovement | 382 | public bool AllowMovement { get; set; } |
422 | { | ||
423 | get { return m_allowMovement; } | ||
424 | set { m_allowMovement = value; } | ||
425 | } | ||
426 | 383 | ||
427 | private bool m_setAlwaysRun; | 384 | private bool m_setAlwaysRun; |
428 | 385 | ||
@@ -449,13 +406,7 @@ namespace OpenSim.Region.Framework.Scenes | |||
449 | } | 406 | } |
450 | } | 407 | } |
451 | 408 | ||
452 | private byte m_state; | 409 | public byte State { get; set; } |
453 | |||
454 | public byte State | ||
455 | { | ||
456 | get { return m_state; } | ||
457 | set { m_state = value; } | ||
458 | } | ||
459 | 410 | ||
460 | private AgentManager.ControlFlags m_AgentControlFlags; | 411 | private AgentManager.ControlFlags m_AgentControlFlags; |
461 | 412 | ||
@@ -465,29 +416,14 @@ namespace OpenSim.Region.Framework.Scenes | |||
465 | set { m_AgentControlFlags = (AgentManager.ControlFlags)value; } | 416 | set { m_AgentControlFlags = (AgentManager.ControlFlags)value; } |
466 | } | 417 | } |
467 | 418 | ||
468 | /// <summary> | 419 | public IClientAPI ControllingClient { get; set; } |
469 | /// This works out to be the ClientView object associated with this avatar, or it's client connection manager | ||
470 | /// </summary> | ||
471 | private IClientAPI m_controllingClient; | ||
472 | |||
473 | public IClientAPI ControllingClient | ||
474 | { | ||
475 | get { return m_controllingClient; } | ||
476 | private set { m_controllingClient = value; } | ||
477 | } | ||
478 | 420 | ||
479 | public IClientCore ClientView | 421 | public IClientCore ClientView |
480 | { | 422 | { |
481 | get { return (IClientCore) m_controllingClient; } | 423 | get { return (IClientCore)ControllingClient; } |
482 | } | 424 | } |
483 | 425 | ||
484 | protected Vector3 m_parentPosition; | 426 | public Vector3 ParentPosition { get; set; } |
485 | |||
486 | public Vector3 ParentPosition | ||
487 | { | ||
488 | get { return m_parentPosition; } | ||
489 | set { m_parentPosition = value; } | ||
490 | } | ||
491 | 427 | ||
492 | /// <summary> | 428 | /// <summary> |
493 | /// Position of this avatar relative to the region the avatar is in | 429 | /// Position of this avatar relative to the region the avatar is in |
@@ -747,7 +683,7 @@ namespace OpenSim.Region.Framework.Scenes | |||
747 | IClientAPI client, Scene world, AvatarAppearance appearance, PresenceType type) | 683 | IClientAPI client, Scene world, AvatarAppearance appearance, PresenceType type) |
748 | { | 684 | { |
749 | AttachmentsSyncLock = new Object(); | 685 | AttachmentsSyncLock = new Object(); |
750 | 686 | AllowMovement = true; | |
751 | IsChildAgent = true; | 687 | IsChildAgent = true; |
752 | m_sendCourseLocationsMethod = SendCoarseLocationsDefault; | 688 | m_sendCourseLocationsMethod = SendCoarseLocationsDefault; |
753 | Animator = new ScenePresenceAnimator(this); | 689 | Animator = new ScenePresenceAnimator(this); |
@@ -826,17 +762,17 @@ namespace OpenSim.Region.Framework.Scenes | |||
826 | private Vector3[] GetWalkDirectionVectors() | 762 | private Vector3[] GetWalkDirectionVectors() |
827 | { | 763 | { |
828 | Vector3[] vector = new Vector3[11]; | 764 | Vector3[] vector = new Vector3[11]; |
829 | vector[0] = new Vector3(m_CameraUpAxis.Z, 0f, -m_CameraAtAxis.Z); //FORWARD | 765 | vector[0] = new Vector3(CameraUpAxis.Z, 0f, -CameraAtAxis.Z); //FORWARD |
830 | vector[1] = new Vector3(-m_CameraUpAxis.Z, 0f, m_CameraAtAxis.Z); //BACK | 766 | vector[1] = new Vector3(-CameraUpAxis.Z, 0f, CameraAtAxis.Z); //BACK |
831 | vector[2] = Vector3.UnitY; //LEFT | 767 | vector[2] = Vector3.UnitY; //LEFT |
832 | vector[3] = -Vector3.UnitY; //RIGHT | 768 | vector[3] = -Vector3.UnitY; //RIGHT |
833 | vector[4] = new Vector3(m_CameraAtAxis.Z, 0f, m_CameraUpAxis.Z); //UP | 769 | vector[4] = new Vector3(CameraAtAxis.Z, 0f, CameraUpAxis.Z); //UP |
834 | vector[5] = new Vector3(-m_CameraAtAxis.Z, 0f, -m_CameraUpAxis.Z); //DOWN | 770 | vector[5] = new Vector3(-CameraAtAxis.Z, 0f, -CameraUpAxis.Z); //DOWN |
835 | vector[6] = new Vector3(m_CameraUpAxis.Z, 0f, -m_CameraAtAxis.Z); //FORWARD_NUDGE | 771 | vector[6] = new Vector3(CameraUpAxis.Z, 0f, -CameraAtAxis.Z); //FORWARD_NUDGE |
836 | vector[7] = new Vector3(-m_CameraUpAxis.Z, 0f, m_CameraAtAxis.Z); //BACK_NUDGE | 772 | vector[7] = new Vector3(-CameraUpAxis.Z, 0f, CameraAtAxis.Z); //BACK_NUDGE |
837 | vector[8] = Vector3.UnitY; //LEFT_NUDGE | 773 | vector[8] = Vector3.UnitY; //LEFT_NUDGE |
838 | vector[9] = -Vector3.UnitY; //RIGHT_NUDGE | 774 | vector[9] = -Vector3.UnitY; //RIGHT_NUDGE |
839 | vector[10] = new Vector3(-m_CameraAtAxis.Z, 0f, -m_CameraUpAxis.Z); //DOWN_NUDGE | 775 | vector[10] = new Vector3(-CameraAtAxis.Z, 0f, -CameraUpAxis.Z); //DOWN_NUDGE |
840 | return vector; | 776 | return vector; |
841 | } | 777 | } |
842 | 778 | ||
@@ -1333,7 +1269,7 @@ namespace OpenSim.Region.Framework.Scenes | |||
1333 | // Convert it to a Matrix and/or Quaternion | 1269 | // Convert it to a Matrix and/or Quaternion |
1334 | CameraAtAxis = agentData.CameraAtAxis; | 1270 | CameraAtAxis = agentData.CameraAtAxis; |
1335 | CameraLeftAxis = agentData.CameraLeftAxis; | 1271 | CameraLeftAxis = agentData.CameraLeftAxis; |
1336 | m_CameraUpAxis = agentData.CameraUpAxis; | 1272 | CameraUpAxis = agentData.CameraUpAxis; |
1337 | 1273 | ||
1338 | // The Agent's Draw distance setting | 1274 | // The Agent's Draw distance setting |
1339 | // When we get to the point of re-computing neighbors everytime this | 1275 | // When we get to the point of re-computing neighbors everytime this |
@@ -1345,7 +1281,7 @@ namespace OpenSim.Region.Framework.Scenes | |||
1345 | // Check if Client has camera in 'follow cam' or 'build' mode. | 1281 | // Check if Client has camera in 'follow cam' or 'build' mode. |
1346 | Vector3 camdif = (Vector3.One * Rotation - Vector3.One * CameraRotation); | 1282 | Vector3 camdif = (Vector3.One * Rotation - Vector3.One * CameraRotation); |
1347 | 1283 | ||
1348 | m_followCamAuto = ((m_CameraUpAxis.Z > 0.959f && m_CameraUpAxis.Z < 0.98f) | 1284 | m_followCamAuto = ((CameraUpAxis.Z > 0.959f && CameraUpAxis.Z < 0.98f) |
1349 | && (Math.Abs(camdif.X) < 0.4f && Math.Abs(camdif.Y) < 0.4f)) ? true : false; | 1285 | && (Math.Abs(camdif.X) < 0.4f && Math.Abs(camdif.Y) < 0.4f)) ? true : false; |
1350 | 1286 | ||
1351 | m_mouseLook = (flags & AgentManager.ControlFlags.AGENT_CONTROL_MOUSELOOK) != 0; | 1287 | m_mouseLook = (flags & AgentManager.ControlFlags.AGENT_CONTROL_MOUSELOOK) != 0; |
@@ -3078,7 +3014,7 @@ namespace OpenSim.Region.Framework.Scenes | |||
3078 | cAgent.Center = CameraPosition; | 3014 | cAgent.Center = CameraPosition; |
3079 | cAgent.AtAxis = CameraAtAxis; | 3015 | cAgent.AtAxis = CameraAtAxis; |
3080 | cAgent.LeftAxis = CameraLeftAxis; | 3016 | cAgent.LeftAxis = CameraLeftAxis; |
3081 | cAgent.UpAxis = m_CameraUpAxis; | 3017 | cAgent.UpAxis = CameraUpAxis; |
3082 | 3018 | ||
3083 | cAgent.Far = DrawDistance; | 3019 | cAgent.Far = DrawDistance; |
3084 | 3020 | ||
@@ -3164,7 +3100,7 @@ namespace OpenSim.Region.Framework.Scenes | |||
3164 | CameraPosition = cAgent.Center; | 3100 | CameraPosition = cAgent.Center; |
3165 | CameraAtAxis = cAgent.AtAxis; | 3101 | CameraAtAxis = cAgent.AtAxis; |
3166 | CameraLeftAxis = cAgent.LeftAxis; | 3102 | CameraLeftAxis = cAgent.LeftAxis; |
3167 | m_CameraUpAxis = cAgent.UpAxis; | 3103 | CameraUpAxis = cAgent.UpAxis; |
3168 | 3104 | ||
3169 | // When we get to the point of re-computing neighbors everytime this | 3105 | // When we get to the point of re-computing neighbors everytime this |
3170 | // changes, then start using the agent's drawdistance rather than the | 3106 | // changes, then start using the agent's drawdistance rather than the |
diff --git a/OpenSim/Region/Framework/Scenes/Tests/TaskInventoryTests.cs b/OpenSim/Region/Framework/Scenes/Tests/TaskInventoryTests.cs index e4b607d..e16903c 100644 --- a/OpenSim/Region/Framework/Scenes/Tests/TaskInventoryTests.cs +++ b/OpenSim/Region/Framework/Scenes/Tests/TaskInventoryTests.cs | |||
@@ -65,8 +65,7 @@ namespace OpenSim.Region.Framework.Tests | |||
65 | 65 | ||
66 | // Create an object embedded inside the first | 66 | // Create an object embedded inside the first |
67 | UUID taskSceneObjectItemId = UUID.Parse("00000000-0000-0000-0000-100000000000"); | 67 | UUID taskSceneObjectItemId = UUID.Parse("00000000-0000-0000-0000-100000000000"); |
68 | TaskInventoryItem taskSceneObjectItem | 68 | TaskInventoryHelpers.AddSceneObject(scene, sop1, "tso", taskSceneObjectItemId, user1.PrincipalID); |
69 | = TaskInventoryHelpers.AddSceneObject(scene, sop1, "tso", taskSceneObjectItemId, user1.PrincipalID); | ||
70 | 69 | ||
71 | TaskInventoryItem addedItem = sop1.Inventory.GetInventoryItem(taskSceneObjectItemId); | 70 | TaskInventoryItem addedItem = sop1.Inventory.GetInventoryItem(taskSceneObjectItemId); |
72 | Assert.That(addedItem.ItemID, Is.EqualTo(taskSceneObjectItemId)); | 71 | Assert.That(addedItem.ItemID, Is.EqualTo(taskSceneObjectItemId)); |
diff --git a/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs b/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs index c5392b5..0003515 100644 --- a/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs +++ b/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs | |||
@@ -4039,7 +4039,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api | |||
4039 | Vector3 av3 = new Vector3(Util.Clip((float)color.x, 0.0f, 1.0f), | 4039 | Vector3 av3 = new Vector3(Util.Clip((float)color.x, 0.0f, 1.0f), |
4040 | Util.Clip((float)color.y, 0.0f, 1.0f), | 4040 | Util.Clip((float)color.y, 0.0f, 1.0f), |
4041 | Util.Clip((float)color.z, 0.0f, 1.0f)); | 4041 | Util.Clip((float)color.z, 0.0f, 1.0f)); |
4042 | m_host.SetText(text.Length > 254 ? text.Remove(255) : text, av3, Util.Clip((float)alpha, 0.0f, 1.0f)); | 4042 | m_host.SetText(text.Length > 254 ? text.Remove(254) : text, av3, Util.Clip((float)alpha, 0.0f, 1.0f)); |
4043 | //m_host.ParentGroup.HasGroupChanged = true; | 4043 | //m_host.ParentGroup.HasGroupChanged = true; |
4044 | //m_host.ParentGroup.ScheduleGroupForFullUpdate(); | 4044 | //m_host.ParentGroup.ScheduleGroupForFullUpdate(); |
4045 | } | 4045 | } |
diff --git a/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/OSSL_Api.cs b/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/OSSL_Api.cs index ff1f5fd..8edd146 100644 --- a/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/OSSL_Api.cs +++ b/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/OSSL_Api.cs | |||
@@ -2160,6 +2160,31 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api | |||
2160 | return result; | 2160 | return result; |
2161 | } | 2161 | } |
2162 | 2162 | ||
2163 | public LSL_String osReplaceString(string src, string pattern, string replace, int count, int start) | ||
2164 | { | ||
2165 | CheckThreatLevel(ThreatLevel.High, "osReplaceString"); | ||
2166 | m_host.AddScriptLPS(1); | ||
2167 | |||
2168 | // Normalize indices (if negative). | ||
2169 | // After normlaization they may still be | ||
2170 | // negative, but that is now relative to | ||
2171 | // the start, rather than the end, of the | ||
2172 | // sequence. | ||
2173 | if (start < 0) | ||
2174 | { | ||
2175 | start = src.Length + start; | ||
2176 | } | ||
2177 | |||
2178 | if (start < 0 || start >= src.Length) | ||
2179 | { | ||
2180 | return src; | ||
2181 | } | ||
2182 | |||
2183 | // Find matches beginning at start position | ||
2184 | Regex matcher = new Regex(pattern); | ||
2185 | return matcher.Replace(src,replace,count,start); | ||
2186 | } | ||
2187 | |||
2163 | public string osLoadedCreationDate() | 2188 | public string osLoadedCreationDate() |
2164 | { | 2189 | { |
2165 | CheckThreatLevel(ThreatLevel.Low, "osLoadedCreationDate"); | 2190 | CheckThreatLevel(ThreatLevel.Low, "osLoadedCreationDate"); |
diff --git a/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/Plugins/SensorRepeat.cs b/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/Plugins/SensorRepeat.cs index 5c1bdff..fbb7c39 100644 --- a/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/Plugins/SensorRepeat.cs +++ b/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/Plugins/SensorRepeat.cs | |||
@@ -157,12 +157,12 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api.Plugins | |||
157 | 157 | ||
158 | public void CheckSenseRepeaterEvents() | 158 | public void CheckSenseRepeaterEvents() |
159 | { | 159 | { |
160 | // Nothing to do here? | ||
161 | if (SenseRepeaters.Count == 0) | ||
162 | return; | ||
163 | |||
164 | lock (SenseRepeatListLock) | 160 | lock (SenseRepeatListLock) |
165 | { | 161 | { |
162 | // Nothing to do here? | ||
163 | if (SenseRepeaters.Count == 0) | ||
164 | return; | ||
165 | |||
166 | // Go through all timers | 166 | // Go through all timers |
167 | foreach (SenseRepeatClass ts in SenseRepeaters) | 167 | foreach (SenseRepeatClass ts in SenseRepeaters) |
168 | { | 168 | { |
@@ -635,7 +635,9 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api.Plugins | |||
635 | ts.next = | 635 | ts.next = |
636 | DateTime.Now.ToUniversalTime().AddSeconds(ts.interval); | 636 | DateTime.Now.ToUniversalTime().AddSeconds(ts.interval); |
637 | 637 | ||
638 | SenseRepeaters.Add(ts); | 638 | lock (SenseRepeatListLock) |
639 | SenseRepeaters.Add(ts); | ||
640 | |||
639 | idx += 6; | 641 | idx += 6; |
640 | } | 642 | } |
641 | } | 643 | } |
diff --git a/OpenSim/Region/ScriptEngine/Shared/Api/Interface/IOSSL_Api.cs b/OpenSim/Region/ScriptEngine/Shared/Api/Interface/IOSSL_Api.cs index dbc1dfc..82a6caf 100644 --- a/OpenSim/Region/ScriptEngine/Shared/Api/Interface/IOSSL_Api.cs +++ b/OpenSim/Region/ScriptEngine/Shared/Api/Interface/IOSSL_Api.cs | |||
@@ -165,6 +165,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api.Interfaces | |||
165 | 165 | ||
166 | LSL_String osFormatString(string str, LSL_List strings); | 166 | LSL_String osFormatString(string str, LSL_List strings); |
167 | LSL_List osMatchString(string src, string pattern, int start); | 167 | LSL_List osMatchString(string src, string pattern, int start); |
168 | LSL_String osReplaceString(string src, string pattern, string replace, int count, int start); | ||
168 | 169 | ||
169 | // Information about data loaded into the region | 170 | // Information about data loaded into the region |
170 | string osLoadedCreationDate(); | 171 | string osLoadedCreationDate(); |
diff --git a/OpenSim/Region/ScriptEngine/Shared/Api/Runtime/OSSL_Stub.cs b/OpenSim/Region/ScriptEngine/Shared/Api/Runtime/OSSL_Stub.cs index cc8d417..4341246 100644 --- a/OpenSim/Region/ScriptEngine/Shared/Api/Runtime/OSSL_Stub.cs +++ b/OpenSim/Region/ScriptEngine/Shared/Api/Runtime/OSSL_Stub.cs | |||
@@ -472,6 +472,12 @@ namespace OpenSim.Region.ScriptEngine.Shared.ScriptBase | |||
472 | return m_OSSL_Functions.osMatchString(src, pattern, start); | 472 | return m_OSSL_Functions.osMatchString(src, pattern, start); |
473 | } | 473 | } |
474 | 474 | ||
475 | public LSL_String osReplaceString(string src, string pattern, string replace, int count, int start) | ||
476 | { | ||
477 | return m_OSSL_Functions.osReplaceString(src,pattern,replace,count,start); | ||
478 | } | ||
479 | |||
480 | |||
475 | // Information about data loaded into the region | 481 | // Information about data loaded into the region |
476 | public string osLoadedCreationDate() | 482 | public string osLoadedCreationDate() |
477 | { | 483 | { |
diff --git a/OpenSim/Region/UserStatistics/WebStatsModule.cs b/OpenSim/Region/UserStatistics/WebStatsModule.cs index ad272f7..b9ba4bc 100644 --- a/OpenSim/Region/UserStatistics/WebStatsModule.cs +++ b/OpenSim/Region/UserStatistics/WebStatsModule.cs | |||
@@ -224,13 +224,11 @@ namespace OpenSim.Region.UserStatistics | |||
224 | concurrencyCounter--; | 224 | concurrencyCounter--; |
225 | 225 | ||
226 | response_code = 200; | 226 | response_code = 200; |
227 | |||
228 | } | 227 | } |
229 | else | 228 | else |
230 | { | 229 | { |
231 | strOut = MainServer.Instance.GetHTTP404(""); | 230 | strOut = MainServer.Instance.GetHTTP404(""); |
232 | } | 231 | } |
233 | |||
234 | 232 | ||
235 | responsedata["int_response_code"] = response_code; | 233 | responsedata["int_response_code"] = response_code; |
236 | responsedata["content_type"] = contenttype; | 234 | responsedata["content_type"] = contenttype; |
@@ -247,43 +245,44 @@ namespace OpenSim.Region.UserStatistics | |||
247 | // TODO: FIXME: implement stats migrations | 245 | // TODO: FIXME: implement stats migrations |
248 | const string SQL = @"SELECT * FROM migrations LIMIT 1"; | 246 | const string SQL = @"SELECT * FROM migrations LIMIT 1"; |
249 | 247 | ||
250 | SqliteCommand cmd = new SqliteCommand(SQL, db); | 248 | using (SqliteCommand cmd = new SqliteCommand(SQL, db)) |
251 | |||
252 | try | ||
253 | { | ||
254 | cmd.ExecuteNonQuery(); | ||
255 | } | ||
256 | catch (SqliteSyntaxException) | ||
257 | { | 249 | { |
258 | CreateTables(db); | 250 | try |
251 | { | ||
252 | cmd.ExecuteNonQuery(); | ||
253 | } | ||
254 | catch (SqliteSyntaxException) | ||
255 | { | ||
256 | CreateTables(db); | ||
257 | } | ||
259 | } | 258 | } |
260 | } | 259 | } |
261 | } | 260 | } |
262 | 261 | ||
263 | public void CreateTables(SqliteConnection db) | 262 | public void CreateTables(SqliteConnection db) |
264 | { | 263 | { |
265 | SqliteCommand createcmd = new SqliteCommand(SQL_STATS_TABLE_CREATE, db); | 264 | using (SqliteCommand createcmd = new SqliteCommand(SQL_STATS_TABLE_CREATE, db)) |
266 | createcmd.ExecuteNonQuery(); | 265 | { |
266 | createcmd.ExecuteNonQuery(); | ||
267 | 267 | ||
268 | createcmd.CommandText = SQL_MIGRA_TABLE_CREATE; | 268 | createcmd.CommandText = SQL_MIGRA_TABLE_CREATE; |
269 | createcmd.ExecuteNonQuery(); | 269 | createcmd.ExecuteNonQuery(); |
270 | } | ||
270 | } | 271 | } |
271 | 272 | ||
272 | public virtual void PostInitialise() | 273 | public virtual void PostInitialise() |
273 | { | 274 | { |
274 | if (!enabled) | 275 | if (!enabled) |
275 | { | ||
276 | return; | 276 | return; |
277 | } | 277 | |
278 | AddHandlers(); | 278 | AddHandlers(); |
279 | } | 279 | } |
280 | 280 | ||
281 | public virtual void Close() | 281 | public virtual void Close() |
282 | { | 282 | { |
283 | if (!enabled) | 283 | if (!enabled) |
284 | { | ||
285 | return; | 284 | return; |
286 | } | 285 | |
287 | dbConn.Close(); | 286 | dbConn.Close(); |
288 | dbConn.Dispose(); | 287 | dbConn.Dispose(); |
289 | m_sessions.Clear(); | 288 | m_sessions.Clear(); |
@@ -304,7 +303,8 @@ namespace OpenSim.Region.UserStatistics | |||
304 | 303 | ||
305 | public void OnRegisterCaps(UUID agentID, Caps caps) | 304 | public void OnRegisterCaps(UUID agentID, Caps caps) |
306 | { | 305 | { |
307 | m_log.DebugFormat("[WEB STATS MODULE]: OnRegisterCaps: agentID {0} caps {1}", agentID, caps); | 306 | // m_log.DebugFormat("[WEB STATS MODULE]: OnRegisterCaps: agentID {0} caps {1}", agentID, caps); |
307 | |||
308 | string capsPath = "/CAPS/VS/" + UUID.Random(); | 308 | string capsPath = "/CAPS/VS/" + UUID.Random(); |
309 | caps.RegisterHandler("ViewerStats", | 309 | caps.RegisterHandler("ViewerStats", |
310 | new RestStreamHandler("POST", capsPath, | 310 | new RestStreamHandler("POST", capsPath, |
@@ -318,7 +318,6 @@ namespace OpenSim.Region.UserStatistics | |||
318 | 318 | ||
319 | public void OnDeRegisterCaps(UUID agentID, Caps caps) | 319 | public void OnDeRegisterCaps(UUID agentID, Caps caps) |
320 | { | 320 | { |
321 | |||
322 | } | 321 | } |
323 | 322 | ||
324 | protected virtual void AddHandlers() | 323 | protected virtual void AddHandlers() |
@@ -368,7 +367,6 @@ namespace OpenSim.Region.UserStatistics | |||
368 | 367 | ||
369 | public void OnMakeChildAgent(ScenePresence agent) | 368 | public void OnMakeChildAgent(ScenePresence agent) |
370 | { | 369 | { |
371 | |||
372 | } | 370 | } |
373 | 371 | ||
374 | public void OnClientClosed(UUID agentID, Scene scene) | 372 | public void OnClientClosed(UUID agentID, Scene scene) |
@@ -430,6 +428,7 @@ namespace OpenSim.Region.UserStatistics | |||
430 | return scene.RegionInfo.RegionID; | 428 | return scene.RegionInfo.RegionID; |
431 | } | 429 | } |
432 | } | 430 | } |
431 | |||
433 | return UUID.Zero; | 432 | return UUID.Zero; |
434 | } | 433 | } |
435 | 434 | ||
@@ -458,14 +457,14 @@ namespace OpenSim.Region.UserStatistics | |||
458 | UserSessionData usd; | 457 | UserSessionData usd; |
459 | OSD message = OSDParser.DeserializeLLSDXml(request); | 458 | OSD message = OSDParser.DeserializeLLSDXml(request); |
460 | OSDMap mmap; | 459 | OSDMap mmap; |
460 | |||
461 | lock (m_sessions) | 461 | lock (m_sessions) |
462 | { | 462 | { |
463 | if (agentID != UUID.Zero) | 463 | if (agentID != UUID.Zero) |
464 | { | 464 | { |
465 | |||
466 | if (!m_sessions.ContainsKey(agentID)) | 465 | if (!m_sessions.ContainsKey(agentID)) |
467 | { | 466 | { |
468 | m_log.Warn("[WEB STATS MODULE]: no session for stat disclosure"); | 467 | m_log.WarnFormat("[WEB STATS MODULE]: no session for stat disclosure for agent {0}", agentID); |
469 | return new UserSessionID(); | 468 | return new UserSessionID(); |
470 | } | 469 | } |
471 | uid = m_sessions[agentID]; | 470 | uid = m_sessions[agentID]; |
@@ -585,8 +584,6 @@ namespace OpenSim.Region.UserStatistics | |||
585 | usd.n_out_kb = (float)net_out["kbytes"].AsReal(); | 584 | usd.n_out_kb = (float)net_out["kbytes"].AsReal(); |
586 | usd.n_out_pk = net_out["packets"].AsInteger(); | 585 | usd.n_out_pk = net_out["packets"].AsInteger(); |
587 | } | 586 | } |
588 | |||
589 | |||
590 | } | 587 | } |
591 | } | 588 | } |
592 | 589 | ||
@@ -602,83 +599,85 @@ namespace OpenSim.Region.UserStatistics | |||
602 | 599 | ||
603 | lock (db) | 600 | lock (db) |
604 | { | 601 | { |
605 | SqliteCommand updatecmd = new SqliteCommand(SQL_STATS_TABLE_UPDATE, db); | 602 | using (SqliteCommand updatecmd = new SqliteCommand(SQL_STATS_TABLE_UPDATE, db)) |
606 | updatecmd.Parameters.Add(new SqliteParameter(":session_id", uid.session_data.session_id.ToString())); | ||
607 | updatecmd.Parameters.Add(new SqliteParameter(":agent_id", uid.session_data.agent_id.ToString())); | ||
608 | updatecmd.Parameters.Add(new SqliteParameter(":region_id", uid.session_data.region_id.ToString())); | ||
609 | updatecmd.Parameters.Add(new SqliteParameter(":last_updated", (int) uid.session_data.last_updated)); | ||
610 | updatecmd.Parameters.Add(new SqliteParameter(":remote_ip", uid.session_data.remote_ip)); | ||
611 | updatecmd.Parameters.Add(new SqliteParameter(":name_f", uid.session_data.name_f)); | ||
612 | updatecmd.Parameters.Add(new SqliteParameter(":name_l", uid.session_data.name_l)); | ||
613 | updatecmd.Parameters.Add(new SqliteParameter(":avg_agents_in_view", uid.session_data.avg_agents_in_view)); | ||
614 | updatecmd.Parameters.Add(new SqliteParameter(":min_agents_in_view", | ||
615 | (int) uid.session_data.min_agents_in_view)); | ||
616 | updatecmd.Parameters.Add(new SqliteParameter(":max_agents_in_view", | ||
617 | (int) uid.session_data.max_agents_in_view)); | ||
618 | updatecmd.Parameters.Add(new SqliteParameter(":mode_agents_in_view", | ||
619 | (int) uid.session_data.mode_agents_in_view)); | ||
620 | updatecmd.Parameters.Add(new SqliteParameter(":avg_fps", uid.session_data.avg_fps)); | ||
621 | updatecmd.Parameters.Add(new SqliteParameter(":min_fps", uid.session_data.min_fps)); | ||
622 | updatecmd.Parameters.Add(new SqliteParameter(":max_fps", uid.session_data.max_fps)); | ||
623 | updatecmd.Parameters.Add(new SqliteParameter(":mode_fps", uid.session_data.mode_fps)); | ||
624 | updatecmd.Parameters.Add(new SqliteParameter(":a_language", uid.session_data.a_language)); | ||
625 | updatecmd.Parameters.Add(new SqliteParameter(":mem_use", uid.session_data.mem_use)); | ||
626 | updatecmd.Parameters.Add(new SqliteParameter(":meters_traveled", uid.session_data.meters_traveled)); | ||
627 | updatecmd.Parameters.Add(new SqliteParameter(":avg_ping", uid.session_data.avg_ping)); | ||
628 | updatecmd.Parameters.Add(new SqliteParameter(":min_ping", uid.session_data.min_ping)); | ||
629 | updatecmd.Parameters.Add(new SqliteParameter(":max_ping", uid.session_data.max_ping)); | ||
630 | updatecmd.Parameters.Add(new SqliteParameter(":mode_ping", uid.session_data.mode_ping)); | ||
631 | updatecmd.Parameters.Add(new SqliteParameter(":regions_visited", uid.session_data.regions_visited)); | ||
632 | updatecmd.Parameters.Add(new SqliteParameter(":run_time", uid.session_data.run_time)); | ||
633 | updatecmd.Parameters.Add(new SqliteParameter(":avg_sim_fps", uid.session_data.avg_sim_fps)); | ||
634 | updatecmd.Parameters.Add(new SqliteParameter(":min_sim_fps", uid.session_data.min_sim_fps)); | ||
635 | updatecmd.Parameters.Add(new SqliteParameter(":max_sim_fps", uid.session_data.max_sim_fps)); | ||
636 | updatecmd.Parameters.Add(new SqliteParameter(":mode_sim_fps", uid.session_data.mode_sim_fps)); | ||
637 | updatecmd.Parameters.Add(new SqliteParameter(":start_time", uid.session_data.start_time)); | ||
638 | updatecmd.Parameters.Add(new SqliteParameter(":client_version", uid.session_data.client_version)); | ||
639 | updatecmd.Parameters.Add(new SqliteParameter(":s_cpu", uid.session_data.s_cpu)); | ||
640 | updatecmd.Parameters.Add(new SqliteParameter(":s_gpu", uid.session_data.s_gpu)); | ||
641 | updatecmd.Parameters.Add(new SqliteParameter(":s_os", uid.session_data.s_os)); | ||
642 | updatecmd.Parameters.Add(new SqliteParameter(":s_ram", uid.session_data.s_ram)); | ||
643 | updatecmd.Parameters.Add(new SqliteParameter(":d_object_kb", uid.session_data.d_object_kb)); | ||
644 | updatecmd.Parameters.Add(new SqliteParameter(":d_texture_kb", uid.session_data.d_texture_kb)); | ||
645 | updatecmd.Parameters.Add(new SqliteParameter(":d_world_kb", uid.session_data.d_world_kb)); | ||
646 | updatecmd.Parameters.Add(new SqliteParameter(":n_in_kb", uid.session_data.n_in_kb)); | ||
647 | updatecmd.Parameters.Add(new SqliteParameter(":n_in_pk", uid.session_data.n_in_pk)); | ||
648 | updatecmd.Parameters.Add(new SqliteParameter(":n_out_kb", uid.session_data.n_out_kb)); | ||
649 | updatecmd.Parameters.Add(new SqliteParameter(":n_out_pk", uid.session_data.n_out_pk)); | ||
650 | updatecmd.Parameters.Add(new SqliteParameter(":f_dropped", uid.session_data.f_dropped)); | ||
651 | updatecmd.Parameters.Add(new SqliteParameter(":f_failed_resends", uid.session_data.f_failed_resends)); | ||
652 | updatecmd.Parameters.Add(new SqliteParameter(":f_invalid", uid.session_data.f_invalid)); | ||
653 | |||
654 | updatecmd.Parameters.Add(new SqliteParameter(":f_off_circuit", uid.session_data.f_off_circuit)); | ||
655 | updatecmd.Parameters.Add(new SqliteParameter(":f_resent", uid.session_data.f_resent)); | ||
656 | updatecmd.Parameters.Add(new SqliteParameter(":f_send_packet", uid.session_data.f_send_packet)); | ||
657 | |||
658 | updatecmd.Parameters.Add(new SqliteParameter(":session_key", uid.session_data.session_id.ToString())); | ||
659 | updatecmd.Parameters.Add(new SqliteParameter(":agent_key", uid.session_data.agent_id.ToString())); | ||
660 | updatecmd.Parameters.Add(new SqliteParameter(":region_key", uid.session_data.region_id.ToString())); | ||
661 | // m_log.Debug("UPDATE"); | ||
662 | |||
663 | int result = updatecmd.ExecuteNonQuery(); | ||
664 | |||
665 | if (result == 0) | ||
666 | { | 603 | { |
667 | // m_log.Debug("INSERT"); | 604 | updatecmd.Parameters.Add(new SqliteParameter(":session_id", uid.session_data.session_id.ToString())); |
668 | updatecmd.CommandText = SQL_STATS_TABLE_INSERT; | 605 | updatecmd.Parameters.Add(new SqliteParameter(":agent_id", uid.session_data.agent_id.ToString())); |
669 | try | 606 | updatecmd.Parameters.Add(new SqliteParameter(":region_id", uid.session_data.region_id.ToString())); |
670 | { | 607 | updatecmd.Parameters.Add(new SqliteParameter(":last_updated", (int) uid.session_data.last_updated)); |
671 | updatecmd.ExecuteNonQuery(); | 608 | updatecmd.Parameters.Add(new SqliteParameter(":remote_ip", uid.session_data.remote_ip)); |
672 | } | 609 | updatecmd.Parameters.Add(new SqliteParameter(":name_f", uid.session_data.name_f)); |
673 | catch (SqliteExecutionException) | 610 | updatecmd.Parameters.Add(new SqliteParameter(":name_l", uid.session_data.name_l)); |
611 | updatecmd.Parameters.Add(new SqliteParameter(":avg_agents_in_view", uid.session_data.avg_agents_in_view)); | ||
612 | updatecmd.Parameters.Add(new SqliteParameter(":min_agents_in_view", | ||
613 | (int) uid.session_data.min_agents_in_view)); | ||
614 | updatecmd.Parameters.Add(new SqliteParameter(":max_agents_in_view", | ||
615 | (int) uid.session_data.max_agents_in_view)); | ||
616 | updatecmd.Parameters.Add(new SqliteParameter(":mode_agents_in_view", | ||
617 | (int) uid.session_data.mode_agents_in_view)); | ||
618 | updatecmd.Parameters.Add(new SqliteParameter(":avg_fps", uid.session_data.avg_fps)); | ||
619 | updatecmd.Parameters.Add(new SqliteParameter(":min_fps", uid.session_data.min_fps)); | ||
620 | updatecmd.Parameters.Add(new SqliteParameter(":max_fps", uid.session_data.max_fps)); | ||
621 | updatecmd.Parameters.Add(new SqliteParameter(":mode_fps", uid.session_data.mode_fps)); | ||
622 | updatecmd.Parameters.Add(new SqliteParameter(":a_language", uid.session_data.a_language)); | ||
623 | updatecmd.Parameters.Add(new SqliteParameter(":mem_use", uid.session_data.mem_use)); | ||
624 | updatecmd.Parameters.Add(new SqliteParameter(":meters_traveled", uid.session_data.meters_traveled)); | ||
625 | updatecmd.Parameters.Add(new SqliteParameter(":avg_ping", uid.session_data.avg_ping)); | ||
626 | updatecmd.Parameters.Add(new SqliteParameter(":min_ping", uid.session_data.min_ping)); | ||
627 | updatecmd.Parameters.Add(new SqliteParameter(":max_ping", uid.session_data.max_ping)); | ||
628 | updatecmd.Parameters.Add(new SqliteParameter(":mode_ping", uid.session_data.mode_ping)); | ||
629 | updatecmd.Parameters.Add(new SqliteParameter(":regions_visited", uid.session_data.regions_visited)); | ||
630 | updatecmd.Parameters.Add(new SqliteParameter(":run_time", uid.session_data.run_time)); | ||
631 | updatecmd.Parameters.Add(new SqliteParameter(":avg_sim_fps", uid.session_data.avg_sim_fps)); | ||
632 | updatecmd.Parameters.Add(new SqliteParameter(":min_sim_fps", uid.session_data.min_sim_fps)); | ||
633 | updatecmd.Parameters.Add(new SqliteParameter(":max_sim_fps", uid.session_data.max_sim_fps)); | ||
634 | updatecmd.Parameters.Add(new SqliteParameter(":mode_sim_fps", uid.session_data.mode_sim_fps)); | ||
635 | updatecmd.Parameters.Add(new SqliteParameter(":start_time", uid.session_data.start_time)); | ||
636 | updatecmd.Parameters.Add(new SqliteParameter(":client_version", uid.session_data.client_version)); | ||
637 | updatecmd.Parameters.Add(new SqliteParameter(":s_cpu", uid.session_data.s_cpu)); | ||
638 | updatecmd.Parameters.Add(new SqliteParameter(":s_gpu", uid.session_data.s_gpu)); | ||
639 | updatecmd.Parameters.Add(new SqliteParameter(":s_os", uid.session_data.s_os)); | ||
640 | updatecmd.Parameters.Add(new SqliteParameter(":s_ram", uid.session_data.s_ram)); | ||
641 | updatecmd.Parameters.Add(new SqliteParameter(":d_object_kb", uid.session_data.d_object_kb)); | ||
642 | updatecmd.Parameters.Add(new SqliteParameter(":d_texture_kb", uid.session_data.d_texture_kb)); | ||
643 | updatecmd.Parameters.Add(new SqliteParameter(":d_world_kb", uid.session_data.d_world_kb)); | ||
644 | updatecmd.Parameters.Add(new SqliteParameter(":n_in_kb", uid.session_data.n_in_kb)); | ||
645 | updatecmd.Parameters.Add(new SqliteParameter(":n_in_pk", uid.session_data.n_in_pk)); | ||
646 | updatecmd.Parameters.Add(new SqliteParameter(":n_out_kb", uid.session_data.n_out_kb)); | ||
647 | updatecmd.Parameters.Add(new SqliteParameter(":n_out_pk", uid.session_data.n_out_pk)); | ||
648 | updatecmd.Parameters.Add(new SqliteParameter(":f_dropped", uid.session_data.f_dropped)); | ||
649 | updatecmd.Parameters.Add(new SqliteParameter(":f_failed_resends", uid.session_data.f_failed_resends)); | ||
650 | updatecmd.Parameters.Add(new SqliteParameter(":f_invalid", uid.session_data.f_invalid)); | ||
651 | |||
652 | updatecmd.Parameters.Add(new SqliteParameter(":f_off_circuit", uid.session_data.f_off_circuit)); | ||
653 | updatecmd.Parameters.Add(new SqliteParameter(":f_resent", uid.session_data.f_resent)); | ||
654 | updatecmd.Parameters.Add(new SqliteParameter(":f_send_packet", uid.session_data.f_send_packet)); | ||
655 | |||
656 | updatecmd.Parameters.Add(new SqliteParameter(":session_key", uid.session_data.session_id.ToString())); | ||
657 | updatecmd.Parameters.Add(new SqliteParameter(":agent_key", uid.session_data.agent_id.ToString())); | ||
658 | updatecmd.Parameters.Add(new SqliteParameter(":region_key", uid.session_data.region_id.ToString())); | ||
659 | |||
660 | // m_log.DebugFormat("[WEB STATS MODULE]: Database stats update for {0}", uid.session_data.agent_id); | ||
661 | |||
662 | int result = updatecmd.ExecuteNonQuery(); | ||
663 | |||
664 | if (result == 0) | ||
674 | { | 665 | { |
675 | m_log.Warn("[WEB STATS MODULE]: failed to write stats to storage Execution Exception"); | 666 | // m_log.DebugFormat("[WEB STATS MODULE]: Database stats insert for {0}", uid.session_data.agent_id); |
676 | } | 667 | |
677 | catch (SqliteSyntaxException) | 668 | updatecmd.CommandText = SQL_STATS_TABLE_INSERT; |
678 | { | ||
679 | m_log.Warn("[WEB STATS MODULE]: failed to write stats to storage SQL Syntax Exception"); | ||
680 | } | ||
681 | 669 | ||
670 | try | ||
671 | { | ||
672 | updatecmd.ExecuteNonQuery(); | ||
673 | } | ||
674 | catch (Exception e) | ||
675 | { | ||
676 | m_log.WarnFormat( | ||
677 | "[WEB STATS MODULE]: failed to write stats for {0}, storage Execution Exception {1}{2}", | ||
678 | uid.session_data.agent_id, e.Message, e.StackTrace); | ||
679 | } | ||
680 | } | ||
682 | } | 681 | } |
683 | } | 682 | } |
684 | } | 683 | } |
diff --git a/OpenSim/Services/AuthenticationService/PasswordAuthenticationService.cs b/OpenSim/Services/AuthenticationService/PasswordAuthenticationService.cs index da19b2e..48eb3f8 100644 --- a/OpenSim/Services/AuthenticationService/PasswordAuthenticationService.cs +++ b/OpenSim/Services/AuthenticationService/PasswordAuthenticationService.cs | |||
@@ -78,9 +78,9 @@ namespace OpenSim.Services.AuthenticationService | |||
78 | } | 78 | } |
79 | else | 79 | else |
80 | { | 80 | { |
81 | string hashed = Util.Md5Hash(Util.Md5Hash(password) + ":" + data.Data["passwordSalt"].ToString()); | 81 | string hashed = Util.Md5Hash(password + ":" + data.Data["passwordSalt"].ToString()); |
82 | 82 | ||
83 | // m_log.DebugFormat("[PASS AUTH]: got {0}; hashed = {1}; stored = {2}; passonly {3}", password, hashed, data.Data["passwordHash"].ToString(), hashed2); | 83 | //m_log.DebugFormat("[PASS AUTH]: got {0}; hashed = {1}; stored = {2}", password, hashed, data.Data["passwordHash"].ToString()); |
84 | 84 | ||
85 | if (data.Data["passwordHash"].ToString() == hashed) | 85 | if (data.Data["passwordHash"].ToString() == hashed) |
86 | { | 86 | { |
diff --git a/OpenSim/Tests/Common/Helpers/SceneHelpers.cs b/OpenSim/Tests/Common/Helpers/SceneHelpers.cs index aa904aa..8a69d7c 100644 --- a/OpenSim/Tests/Common/Helpers/SceneHelpers.cs +++ b/OpenSim/Tests/Common/Helpers/SceneHelpers.cs | |||
@@ -113,7 +113,7 @@ namespace OpenSim.Tests.Common | |||
113 | Console.WriteLine("Setting up test scene {0}", name); | 113 | Console.WriteLine("Setting up test scene {0}", name); |
114 | 114 | ||
115 | // We must set up a console otherwise setup of some modules may fail | 115 | // We must set up a console otherwise setup of some modules may fail |
116 | MainConsole.Instance = new MockConsole("TEST PROMPT"); | 116 | MainConsole.Instance = new MockConsole(); |
117 | 117 | ||
118 | RegionInfo regInfo = new RegionInfo(x, y, new IPEndPoint(IPAddress.Loopback, 9000), "127.0.0.1"); | 118 | RegionInfo regInfo = new RegionInfo(x, y, new IPEndPoint(IPAddress.Loopback, 9000), "127.0.0.1"); |
119 | regInfo.RegionName = name; | 119 | regInfo.RegionName = name; |
diff --git a/OpenSim/Tools/pCampBot/Bot.cs b/OpenSim/Tools/pCampBot/Bot.cs index 0bd0bcc..da090dd 100644 --- a/OpenSim/Tools/pCampBot/Bot.cs +++ b/OpenSim/Tools/pCampBot/Bot.cs | |||
@@ -420,6 +420,8 @@ namespace pCampBot | |||
420 | 420 | ||
421 | public void Network_LoginProgress(object sender, LoginProgressEventArgs args) | 421 | public void Network_LoginProgress(object sender, LoginProgressEventArgs args) |
422 | { | 422 | { |
423 | m_log.DebugFormat("[BOT]: Bot {0} {1} in Network_LoginProcess", Name, args.Status); | ||
424 | |||
423 | if (args.Status == LoginStatus.Success) | 425 | if (args.Status == LoginStatus.Success) |
424 | { | 426 | { |
425 | if (OnConnected != null) | 427 | if (OnConnected != null) |
@@ -431,10 +433,15 @@ namespace pCampBot | |||
431 | 433 | ||
432 | public void Network_SimConnected(object sender, SimConnectedEventArgs args) | 434 | public void Network_SimConnected(object sender, SimConnectedEventArgs args) |
433 | { | 435 | { |
436 | m_log.DebugFormat( | ||
437 | "[BOT]: Bot {0} connected to {1} at {2}", Name, args.Simulator.Name, args.Simulator.IPEndPoint); | ||
434 | } | 438 | } |
435 | 439 | ||
436 | public void Network_OnDisconnected(object sender, DisconnectedEventArgs args) | 440 | public void Network_OnDisconnected(object sender, DisconnectedEventArgs args) |
437 | { | 441 | { |
442 | m_log.DebugFormat( | ||
443 | "[BOT]: Bot {0} disconnected reason {1}, message {2}", Name, args.Reason, args.Message); | ||
444 | |||
438 | // m_log.ErrorFormat("Fired Network_OnDisconnected"); | 445 | // m_log.ErrorFormat("Fired Network_OnDisconnected"); |
439 | 446 | ||
440 | // if ( | 447 | // if ( |
diff --git a/OpenSim/Tools/pCampBot/BotManager.cs b/OpenSim/Tools/pCampBot/BotManager.cs index 6481e97..0f501b7 100644 --- a/OpenSim/Tools/pCampBot/BotManager.cs +++ b/OpenSim/Tools/pCampBot/BotManager.cs | |||
@@ -266,7 +266,7 @@ namespace pCampBot | |||
266 | /// <returns></returns> | 266 | /// <returns></returns> |
267 | protected CommandConsole CreateConsole() | 267 | protected CommandConsole CreateConsole() |
268 | { | 268 | { |
269 | return new LocalConsole("Region"); | 269 | return new LocalConsole("pCampbot"); |
270 | } | 270 | } |
271 | 271 | ||
272 | private void HandleShutdown(string module, string[] cmd) | 272 | private void HandleShutdown(string module, string[] cmd) |
diff --git a/OpenSim/Tools/pCampBot/pCampBot.cs b/OpenSim/Tools/pCampBot/pCampBot.cs index a73fcbe..ec5ad04 100644 --- a/OpenSim/Tools/pCampBot/pCampBot.cs +++ b/OpenSim/Tools/pCampBot/pCampBot.cs | |||
@@ -56,6 +56,10 @@ namespace pCampBot | |||
56 | { | 56 | { |
57 | Help(); | 57 | Help(); |
58 | } | 58 | } |
59 | else if (config.Get("firstname") == null || config.Get("lastname") == null || config.Get("password") == null) | ||
60 | { | ||
61 | Console.WriteLine("ERROR: You must supply a firstname, lastname and password for the bots."); | ||
62 | } | ||
59 | else | 63 | else |
60 | { | 64 | { |
61 | int botcount = config.GetInt("botcount", 1); | 65 | int botcount = config.GetInt("botcount", 1); |
@@ -128,3 +128,4 @@ OpenSim, as well as how to report bugs, and participate in the OpenSim | |||
128 | project can always be found at http://opensimulator.org. | 128 | project can always be found at http://opensimulator.org. |
129 | 129 | ||
130 | Thanks for trying OpenSim, we hope it is a pleasant experience. | 130 | Thanks for trying OpenSim, we hope it is a pleasant experience. |
131 | |||
diff --git a/bin/Google.ProtocolBuffers.dll b/bin/Google.ProtocolBuffers.dll deleted file mode 100755 index 666aa93..0000000 --- a/bin/Google.ProtocolBuffers.dll +++ /dev/null | |||
Binary files differ | |||
diff --git a/bin/Iesi.Collections.dll b/bin/Iesi.Collections.dll deleted file mode 100755 index 107c362..0000000 --- a/bin/Iesi.Collections.dll +++ /dev/null | |||
Binary files differ | |||
diff --git a/bin/Kds.Serialization.dll b/bin/Kds.Serialization.dll deleted file mode 100755 index 7f03277..0000000 --- a/bin/Kds.Serialization.dll +++ /dev/null | |||
Binary files differ | |||
diff --git a/bin/MonoXnaCompactMaths.dll b/bin/MonoXnaCompactMaths.dll deleted file mode 100755 index 9fe8334..0000000 --- a/bin/MonoXnaCompactMaths.dll +++ /dev/null | |||
Binary files differ | |||