Add copyright header. Formatting cleanup. Ignore some generated files.

0.6.5-rc1
Jeff Ames 2009-05-05 09:59:15 +00:00
parent 6ae88d129a
commit 8ea12ad6c0
9 changed files with 102 additions and 87 deletions

View File

@ -245,7 +245,7 @@ namespace OpenSim.ApplicationPlugins.CreateCommsManager
m_httpServer.AddStreamHandler(new OpenSim.SimStatusHandler()); m_httpServer.AddStreamHandler(new OpenSim.SimStatusHandler());
m_httpServer.AddStreamHandler(new OpenSim.XSimStatusHandler(m_openSim)); m_httpServer.AddStreamHandler(new OpenSim.XSimStatusHandler(m_openSim));
if(m_openSim.userStatsURI != String.Empty ) if (m_openSim.userStatsURI != String.Empty )
m_httpServer.AddStreamHandler(new OpenSim.UXSimStatusHandler(m_openSim)); m_httpServer.AddStreamHandler(new OpenSim.UXSimStatusHandler(m_openSim));
} }

View File

@ -413,9 +413,9 @@ namespace OpenSim.ApplicationPlugins.RemoteController
private bool getBoolean(Hashtable requestData, string tag, bool defv) private bool getBoolean(Hashtable requestData, string tag, bool defv)
{ {
// If an access value has been provided, apply it. // If an access value has been provided, apply it.
if(requestData.Contains(tag)) if (requestData.Contains(tag))
{ {
switch(((string)requestData[tag]).ToLower()) switch (((string)requestData[tag]).ToLower())
{ {
case "true" : case "true" :
case "t" : case "t" :
@ -670,7 +670,7 @@ namespace OpenSim.ApplicationPlugins.RemoteController
{ {
List<ILandObject> parcels = ((Scene)newscene).LandChannel.AllParcels(); List<ILandObject> parcels = ((Scene)newscene).LandChannel.AllParcels();
foreach(ILandObject parcel in parcels) foreach (ILandObject parcel in parcels)
{ {
parcel.landData.Flags |= (uint) Parcel.ParcelFlags.AllowVoiceChat; parcel.landData.Flags |= (uint) Parcel.ParcelFlags.AllowVoiceChat;
parcel.landData.Flags |= (uint) Parcel.ParcelFlags.UseEstateVoiceChan; parcel.landData.Flags |= (uint) Parcel.ParcelFlags.UseEstateVoiceChan;
@ -826,7 +826,7 @@ namespace OpenSim.ApplicationPlugins.RemoteController
bool enableVoice = getBoolean(requestData, "enable_voice", true); bool enableVoice = getBoolean(requestData, "enable_voice", true);
List<ILandObject> parcels = ((Scene)scene).LandChannel.AllParcels(); List<ILandObject> parcels = ((Scene)scene).LandChannel.AllParcels();
foreach(ILandObject parcel in parcels) foreach (ILandObject parcel in parcels)
{ {
if (enableVoice) if (enableVoice)
{ {

View File

@ -210,7 +210,7 @@ namespace OpenSim.Framework
public static T GetDataBlock<T>() where T: new() public static T GetDataBlock<T>() where T: new()
{ {
lock(DataBlocks) lock (DataBlocks)
{ {
if (DataBlocks.ContainsKey(typeof(T)) && DataBlocks[typeof(T)].Count > 0) if (DataBlocks.ContainsKey(typeof(T)) && DataBlocks[typeof(T)].Count > 0)
{ {

View File

@ -135,6 +135,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP
{ {
return ((bytePosition - cFirstPacketSize + cImagePacketSize - 1) / cImagePacketSize) + 1; return ((bytePosition - cFirstPacketSize + cImagePacketSize - 1) / cImagePacketSize) + 1;
} }
public int LastPacketSize() public int LastPacketSize()
{ {
if (m_packetNumber == 1) if (m_packetNumber == 1)
@ -148,7 +149,6 @@ namespace OpenSim.Region.ClientStack.LindenUDP
return lastsize; return lastsize;
} }
public int CurrentBytePosition() public int CurrentBytePosition()
{ {
if (m_packetNumber == 0) if (m_packetNumber == 0)
@ -234,7 +234,6 @@ namespace OpenSim.Region.ClientStack.LindenUDP
//Send the packet //Send the packet
client.SendImageNextPart((ushort)(m_packetNumber-1), m_requestedUUID, imageData); client.SendImageNextPart((ushort)(m_packetNumber-1), m_requestedUUID, imageData);
} }
if (complete) if (complete)
{ {
@ -257,7 +256,6 @@ namespace OpenSim.Region.ClientStack.LindenUDP
{ {
if (m_packetNumber <= m_stopPacket) if (m_packetNumber <= m_stopPacket)
{ {
bool SendMore = true; bool SendMore = true;
if (!m_sentinfo || (m_packetNumber == 0)) if (!m_sentinfo || (m_packetNumber == 0))
{ {
@ -274,7 +272,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP
m_packetNumber = 2; m_packetNumber = 2;
} }
int count=0; int count = 0;
while (SendMore && count < 5 && m_packetNumber <= m_stopPacket) while (SendMore && count < 5 && m_packetNumber <= m_stopPacket)
{ {
count++; count++;
@ -284,13 +282,9 @@ namespace OpenSim.Region.ClientStack.LindenUDP
if (m_packetNumber > m_stopPacket) if (m_packetNumber > m_stopPacket)
{ {
return true; return true;
} }
} }
} }
return false; return false;
} }
@ -343,12 +337,9 @@ namespace OpenSim.Region.ClientStack.LindenUDP
} }
else else
{ {
//discardLevel of -1 means just update the priority //discardLevel of -1 means just update the priority
if (m_requestedDiscardLevel != -1) if (m_requestedDiscardLevel != -1)
{ {
//Evaluate the discard level //Evaluate the discard level
//First, is it positive? //First, is it positive?
if (m_requestedDiscardLevel >= 0) if (m_requestedDiscardLevel >= 0)
@ -387,13 +378,10 @@ namespace OpenSim.Region.ClientStack.LindenUDP
{ {
m_completedSendAtCurrentDiscardLevel = false; m_completedSendAtCurrentDiscardLevel = false;
} }
}
} }
} }
} }
} }
}
} }
} }

View File

@ -248,7 +248,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP
public void Cancel(uint sequence) public void Cancel(uint sequence)
{ {
while(contents.Remove(sequence)) while (contents.Remove(sequence))
; ;
} }

View File

@ -1861,7 +1861,7 @@ namespace OpenSim.Region.Framework.Scenes
{ {
bool welcome = true; bool welcome = true;
if(m_regInfo.EstateSettings.IsBanned(client.AgentId) && (!Permissions.IsGod(client.AgentId))) if (m_regInfo.EstateSettings.IsBanned(client.AgentId) && (!Permissions.IsGod(client.AgentId)))
{ {
m_log.WarnFormat("[CONNECTION BEGIN]: Denied access to: {0} ({1} {2}) at {3} because the user is on the banlist", m_log.WarnFormat("[CONNECTION BEGIN]: Denied access to: {0} ({1} {2}) at {3} because the user is on the banlist",
client.AgentId, client.FirstName, client.LastName, RegionInfo.RegionName); client.AgentId, client.FirstName, client.LastName, RegionInfo.RegionName);
@ -1876,7 +1876,7 @@ namespace OpenSim.Region.Framework.Scenes
welcome = false; welcome = false;
} }
if(!welcome) if (!welcome)
{ {
try try
{ {

View File

@ -1,3 +1,30 @@
/*
* Copyright (c) Contributors, http://opensimulator.org/
* See CONTRIBUTORS.TXT for a full list of copyright holders.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions are met:
* * Redistributions of source code must retain the above copyright
* notice, this list of conditions and the following disclaimer.
* * Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in the
* documentation and/or other materials provided with the distribution.
* * Neither the name of the OpenSimulator Project nor the
* names of its contributors may be used to endorse or promote products
* derived from this software without specific prior written permission.
*
* THIS SOFTWARE IS PROVIDED BY THE DEVELOPERS ``AS IS'' AND ANY
* EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
* WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
* DISCLAIMED. IN NO EVENT SHALL THE CONTRIBUTORS BE LIABLE FOR ANY
* DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
* (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
* LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
* ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
namespace OpenSim.Services.Interfaces namespace OpenSim.Services.Interfaces
{ {
public interface IUserService public interface IUserService