aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Framework/General
diff options
context:
space:
mode:
authorAdam Frisby2007-07-04 05:49:12 +0000
committerAdam Frisby2007-07-04 05:49:12 +0000
commit249ce4cf6f353dd59ebec27689e74a527c39a090 (patch)
tree9f4a8da19e5aef1a12be5279459c40d96aa29f0d /OpenSim/Framework/General
parent* Cleaning - attempting to get compiler warnings back down to zero. (diff)
downloadopensim-SC_OLD-249ce4cf6f353dd59ebec27689e74a527c39a090.zip
opensim-SC_OLD-249ce4cf6f353dd59ebec27689e74a527c39a090.tar.gz
opensim-SC_OLD-249ce4cf6f353dd59ebec27689e74a527c39a090.tar.bz2
opensim-SC_OLD-249ce4cf6f353dd59ebec27689e74a527c39a090.tar.xz
* More cleaning - Sugilite now only has build errors for "value is never used" properties (which I presume will be filled in over time)
Diffstat (limited to 'OpenSim/Framework/General')
-rw-r--r--OpenSim/Framework/General/Types/RegionHandle.cs5
1 files changed, 4 insertions, 1 deletions
diff --git a/OpenSim/Framework/General/Types/RegionHandle.cs b/OpenSim/Framework/General/Types/RegionHandle.cs
index 409b05a..4a055ad 100644
--- a/OpenSim/Framework/General/Types/RegionHandle.cs
+++ b/OpenSim/Framework/General/Types/RegionHandle.cs
@@ -20,7 +20,10 @@ namespace OpenSim.Framework.Types
20 { 20 {
21 IPAddress addr = IPAddress.Parse(ip); 21 IPAddress addr = IPAddress.Parse(ip);
22 22
23 long baseHandle = addr.Address; 23 if (addr.AddressFamily != System.Net.Sockets.AddressFamily.InterNetwork)
24 throw new Exception("Bad RegionHandle Parameter - must be an IPv4 address");
25
26 uint baseHandle = BitConverter.ToUInt32(addr.GetAddressBytes(), 0);
24 27
25 // Split the IP address in half 28 // Split the IP address in half
26 short a = (short)((baseHandle << 16) & 0xFFFF); 29 short a = (short)((baseHandle << 16) & 0xFFFF);