diff options
Diffstat (limited to '')
-rw-r--r-- | OpenSim/Framework/AvatarAppearance.cs | 4 | ||||
-rw-r--r-- | OpenSim/Framework/Communications/TemporaryUserProfilePlugin.cs | 104 | ||||
-rw-r--r-- | OpenSim/Framework/Console/LocalConsole.cs | 14 | ||||
-rw-r--r-- | OpenSim/Framework/Console/RemoteConsole.cs | 4 | ||||
-rw-r--r-- | OpenSim/Framework/RegionInfo.cs | 1 | ||||
-rw-r--r-- | OpenSim/Framework/Util.cs | 18 |
6 files changed, 23 insertions, 122 deletions
diff --git a/OpenSim/Framework/AvatarAppearance.cs b/OpenSim/Framework/AvatarAppearance.cs index c0e9891..5da8ba1 100644 --- a/OpenSim/Framework/AvatarAppearance.cs +++ b/OpenSim/Framework/AvatarAppearance.cs | |||
@@ -69,7 +69,7 @@ namespace OpenSim.Framework | |||
69 | private static UUID HAIR_ASSET = new UUID("d342e6c0-b9d2-11dc-95ff-0800200c9a66"); | 69 | private static UUID HAIR_ASSET = new UUID("d342e6c0-b9d2-11dc-95ff-0800200c9a66"); |
70 | private static UUID HAIR_ITEM = new UUID("d342e6c1-b9d2-11dc-95ff-0800200c9a66"); | 70 | private static UUID HAIR_ITEM = new UUID("d342e6c1-b9d2-11dc-95ff-0800200c9a66"); |
71 | 71 | ||
72 | public readonly static int VISUALPARAM_COUNT = 218; | 72 | public readonly static int VISUALPARAM_COUNT = 218; |
73 | 73 | ||
74 | protected UUID m_owner; | 74 | protected UUID m_owner; |
75 | 75 | ||
@@ -361,7 +361,7 @@ namespace OpenSim.Framework | |||
361 | // This sets Visual Params with *less* weirder values then default. Instead of a ugly alien, it looks like a fat scientist | 361 | // This sets Visual Params with *less* weirder values then default. Instead of a ugly alien, it looks like a fat scientist |
362 | SetDefaultParams(m_visualparams); | 362 | SetDefaultParams(m_visualparams); |
363 | SetDefaultWearables(); | 363 | SetDefaultWearables(); |
364 | m_texture = GetDefaultTexture(); | 364 | m_texture = GetDefaultTexture(); |
365 | } | 365 | } |
366 | 366 | ||
367 | public AvatarAppearance(UUID avatarID, AvatarWearable[] wearables, byte[] visualParams) | 367 | public AvatarAppearance(UUID avatarID, AvatarWearable[] wearables, byte[] visualParams) |
diff --git a/OpenSim/Framework/Communications/TemporaryUserProfilePlugin.cs b/OpenSim/Framework/Communications/TemporaryUserProfilePlugin.cs deleted file mode 100644 index 2413055..0000000 --- a/OpenSim/Framework/Communications/TemporaryUserProfilePlugin.cs +++ /dev/null | |||
@@ -1,104 +0,0 @@ | |||
1 | /* | ||
2 | * Copyright (c) Contributors, http://opensimulator.org/ | ||
3 | * See CONTRIBUTORS.TXT for a full list of copyright holders. | ||
4 | * | ||
5 | * Redistribution and use in source and binary forms, with or without | ||
6 | * modification, are permitted provided that the following conditions are met: | ||
7 | * * Redistributions of source code must retain the above copyright | ||
8 | * notice, this list of conditions and the following disclaimer. | ||
9 | * * Redistributions in binary form must reproduce the above copyright | ||
10 | * notice, this list of conditions and the following disclaimer in the | ||
11 | * documentation and/or other materials provided with the distribution. | ||
12 | * * Neither the name of the OpenSimulator Project nor the | ||
13 | * names of its contributors may be used to endorse or promote products | ||
14 | * derived from this software without specific prior written permission. | ||
15 | * | ||
16 | * THIS SOFTWARE IS PROVIDED BY THE DEVELOPERS ``AS IS'' AND ANY | ||
17 | * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED | ||
18 | * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE | ||
19 | * DISCLAIMED. IN NO EVENT SHALL THE CONTRIBUTORS BE LIABLE FOR ANY | ||
20 | * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES | ||
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 | ||
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 | ||
25 | * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. | ||
26 | */ | ||
27 | |||
28 | using System; | ||
29 | using System.Collections.Generic; | ||
30 | using System.Reflection; | ||
31 | using log4net; | ||
32 | using OpenMetaverse; | ||
33 | using OpenSim.Data; | ||
34 | |||
35 | namespace OpenSim.Framework.Communications | ||
36 | { | ||
37 | /// <summary> | ||
38 | /// Plugin for managing temporary user profiles. | ||
39 | /// </summary> | ||
40 | public class TemporaryUserProfilePlugin : IUserDataPlugin | ||
41 | { | ||
42 | //private static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType); | ||
43 | |||
44 | protected Dictionary<UUID, UserProfileData> m_profiles = new Dictionary<UUID, UserProfileData>(); | ||
45 | |||
46 | public string Name { get { return "TemporaryUserProfilePlugin"; } } | ||
47 | public string Version { get { return "0.1"; } } | ||
48 | public void Initialise() {} | ||
49 | public void Initialise(string connect) {} | ||
50 | public void Dispose() {} | ||
51 | |||
52 | public UserProfileData GetUserByUUID(UUID user) | ||
53 | { | ||
54 | //m_log.DebugFormat("[TEMP USER PROFILE]: Received request for {0}", user); | ||
55 | |||
56 | lock (m_profiles) | ||
57 | { | ||
58 | if (m_profiles.ContainsKey(user)) | ||
59 | return m_profiles[user]; | ||
60 | else | ||
61 | return null; | ||
62 | } | ||
63 | } | ||
64 | |||
65 | public UserProfileData GetUserByName(string fname, string lname) | ||
66 | { | ||
67 | // We deliberately don't look up a temporary profile by name so that we don't obscure non-temporary | ||
68 | // profiles. | ||
69 | |||
70 | return null; | ||
71 | } | ||
72 | |||
73 | public virtual void AddTemporaryUserProfile(UserProfileData userProfile) | ||
74 | { | ||
75 | //m_log.DebugFormat("[TEMP USER PROFILE]: Adding {0} {1}", userProfile.Name, userProfile.ID); | ||
76 | |||
77 | lock (m_profiles) | ||
78 | { | ||
79 | m_profiles[userProfile.ID] = userProfile; | ||
80 | } | ||
81 | } | ||
82 | |||
83 | public UserProfileData GetUserByUri(Uri uri) { return null; } | ||
84 | public List<AvatarPickerAvatar> GeneratePickerResults(UUID queryID, string query) { return null; } | ||
85 | public UserAgentData GetAgentByUUID(UUID user) { return null; } | ||
86 | public UserAgentData GetAgentByName(string name) { return null; } | ||
87 | public UserAgentData GetAgentByName(string fname, string lname) { return null; } | ||
88 | public void StoreWebLoginKey(UUID agentID, UUID webLoginKey) {} | ||
89 | public void AddNewUserProfile(UserProfileData user) {} | ||
90 | public bool UpdateUserProfile(UserProfileData user) { return false; } | ||
91 | public void AddNewUserAgent(UserAgentData agent) {} | ||
92 | public void AddNewUserFriend(UUID friendlistowner, UUID friend, uint perms) {} | ||
93 | public void RemoveUserFriend(UUID friendlistowner, UUID friend) {} | ||
94 | public void UpdateUserFriendPerms(UUID friendlistowner, UUID friend, uint perms) {} | ||
95 | public List<FriendListItem> GetUserFriendList(UUID friendlistowner) { return null; } | ||
96 | public Dictionary<UUID, FriendRegionInfo> GetFriendRegionInfos(List<UUID> uuids) { return null; } | ||
97 | public bool MoneyTransferRequest(UUID from, UUID to, uint amount) { return false; } | ||
98 | public bool InventoryTransferRequest(UUID from, UUID to, UUID inventory) { return false; } | ||
99 | public AvatarAppearance GetUserAppearance(UUID user) { return null; } | ||
100 | public void UpdateUserAppearance(UUID user, AvatarAppearance appearance) {} | ||
101 | public void ResetAttachments(UUID userID) {} | ||
102 | public void LogoutUsers(UUID regionID) {} | ||
103 | } | ||
104 | } | ||
diff --git a/OpenSim/Framework/Console/LocalConsole.cs b/OpenSim/Framework/Console/LocalConsole.cs index b7e191b..be936b6 100644 --- a/OpenSim/Framework/Console/LocalConsole.cs +++ b/OpenSim/Framework/Console/LocalConsole.cs | |||
@@ -38,7 +38,7 @@ namespace OpenSim.Framework.Console | |||
38 | { | 38 | { |
39 | /// <summary> | 39 | /// <summary> |
40 | /// A console that uses cursor control and color | 40 | /// A console that uses cursor control and color |
41 | /// </summary> | 41 | /// </summary> |
42 | public class LocalConsole : CommandConsole | 42 | public class LocalConsole : CommandConsole |
43 | { | 43 | { |
44 | // private static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType); | 44 | // private static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType); |
@@ -100,8 +100,8 @@ namespace OpenSim.Framework.Console | |||
100 | private int SetCursorTop(int top) | 100 | private int SetCursorTop(int top) |
101 | { | 101 | { |
102 | // From at least mono 2.4.2.3, window resizing can give mono an invalid row and column values. If we try | 102 | // From at least mono 2.4.2.3, window resizing can give mono an invalid row and column values. If we try |
103 | // to set a cursor row position with a currently invalid column, mono will throw an exception. | 103 | // to set a cursor row position with a currently invalid column, mono will throw an exception. |
104 | // Therefore, we need to make sure that the column position is valid first. | 104 | // Therefore, we need to make sure that the column position is valid first. |
105 | int left = System.Console.CursorLeft; | 105 | int left = System.Console.CursorLeft; |
106 | 106 | ||
107 | if (left < 0) | 107 | if (left < 0) |
@@ -129,12 +129,12 @@ namespace OpenSim.Framework.Console | |||
129 | /// </param> | 129 | /// </param> |
130 | /// <returns> | 130 | /// <returns> |
131 | /// The new cursor column. | 131 | /// The new cursor column. |
132 | /// </returns> | 132 | /// </returns> |
133 | private int SetCursorLeft(int left) | 133 | private int SetCursorLeft(int left) |
134 | { | 134 | { |
135 | // From at least mono 2.4.2.3, window resizing can give mono an invalid row and column values. If we try | 135 | // From at least mono 2.4.2.3, window resizing can give mono an invalid row and column values. If we try |
136 | // to set a cursor column position with a currently invalid row, mono will throw an exception. | 136 | // to set a cursor column position with a currently invalid row, mono will throw an exception. |
137 | // Therefore, we need to make sure that the row position is valid first. | 137 | // Therefore, we need to make sure that the row position is valid first. |
138 | int top = System.Console.CursorTop; | 138 | int top = System.Console.CursorTop; |
139 | 139 | ||
140 | if (top < 0) | 140 | if (top < 0) |
@@ -183,7 +183,7 @@ namespace OpenSim.Framework.Console | |||
183 | System.Console.Write("{0}", prompt); | 183 | System.Console.Write("{0}", prompt); |
184 | 184 | ||
185 | SetCursorTop(new_y); | 185 | SetCursorTop(new_y); |
186 | SetCursorLeft(new_x); | 186 | SetCursorLeft(new_x); |
187 | } | 187 | } |
188 | } | 188 | } |
189 | 189 | ||
diff --git a/OpenSim/Framework/Console/RemoteConsole.cs b/OpenSim/Framework/Console/RemoteConsole.cs index 9fdd1b8..6f8348d 100644 --- a/OpenSim/Framework/Console/RemoteConsole.cs +++ b/OpenSim/Framework/Console/RemoteConsole.cs | |||
@@ -302,9 +302,9 @@ namespace OpenSim.Framework.Console | |||
302 | if (!UUID.TryParse(post["ID"].ToString(), out id)) | 302 | if (!UUID.TryParse(post["ID"].ToString(), out id)) |
303 | return reply; | 303 | return reply; |
304 | 304 | ||
305 | lock(m_Connections) | 305 | lock (m_Connections) |
306 | { | 306 | { |
307 | if(!m_Connections.ContainsKey(id)) | 307 | if (!m_Connections.ContainsKey(id)) |
308 | return reply; | 308 | return reply; |
309 | } | 309 | } |
310 | 310 | ||
diff --git a/OpenSim/Framework/RegionInfo.cs b/OpenSim/Framework/RegionInfo.cs index 0a826a6..ac38ac2 100644 --- a/OpenSim/Framework/RegionInfo.cs +++ b/OpenSim/Framework/RegionInfo.cs | |||
@@ -483,7 +483,6 @@ namespace OpenSim.Framework | |||
483 | else | 483 | else |
484 | m_externalHostName = externalName; | 484 | m_externalHostName = externalName; |
485 | 485 | ||
486 | |||
487 | m_regionType = config.GetString("RegionType", String.Empty); | 486 | m_regionType = config.GetString("RegionType", String.Empty); |
488 | 487 | ||
489 | // Prim stuff | 488 | // Prim stuff |
diff --git a/OpenSim/Framework/Util.cs b/OpenSim/Framework/Util.cs index 2fc7adc..10af925 100644 --- a/OpenSim/Framework/Util.cs +++ b/OpenSim/Framework/Util.cs | |||
@@ -589,11 +589,17 @@ namespace OpenSim.Framework | |||
589 | 589 | ||
590 | public static IPAddress GetLocalHost() | 590 | public static IPAddress GetLocalHost() |
591 | { | 591 | { |
592 | string dnsAddress = "localhost"; | 592 | IPAddress[] iplist = GetLocalHosts(); |
593 | 593 | ||
594 | IPAddress[] hosts = Dns.GetHostEntry(dnsAddress).AddressList; | 594 | if (iplist.Length == 0) // No accessible external interfaces |
595 | { | ||
596 | IPAddress[] loopback = Dns.GetHostAddresses("localhost"); | ||
597 | IPAddress localhost = loopback[0]; | ||
595 | 598 | ||
596 | foreach (IPAddress host in hosts) | 599 | return localhost; |
600 | } | ||
601 | |||
602 | foreach (IPAddress host in iplist) | ||
597 | { | 603 | { |
598 | if (!IPAddress.IsLoopback(host) && host.AddressFamily == AddressFamily.InterNetwork) | 604 | if (!IPAddress.IsLoopback(host) && host.AddressFamily == AddressFamily.InterNetwork) |
599 | { | 605 | { |
@@ -601,15 +607,15 @@ namespace OpenSim.Framework | |||
601 | } | 607 | } |
602 | } | 608 | } |
603 | 609 | ||
604 | if (hosts.Length > 0) | 610 | if (iplist.Length > 0) |
605 | { | 611 | { |
606 | foreach (IPAddress host in hosts) | 612 | foreach (IPAddress host in iplist) |
607 | { | 613 | { |
608 | if (host.AddressFamily == AddressFamily.InterNetwork) | 614 | if (host.AddressFamily == AddressFamily.InterNetwork) |
609 | return host; | 615 | return host; |
610 | } | 616 | } |
611 | // Well all else failed... | 617 | // Well all else failed... |
612 | return hosts[0]; | 618 | return iplist[0]; |
613 | } | 619 | } |
614 | 620 | ||
615 | return null; | 621 | return null; |