Compare commits
36 Commits
master
...
0.6.8-post
Author | SHA1 | Date |
---|---|---|
justincc | 4be31557ba | |
justincc | 139b00ceec | |
justincc | 8026608621 | |
justincc | 89397669d1 | |
justincc | 754bfeeb04 | |
justincc | 9aee2bc8e7 | |
justincc | 136476aaf3 | |
justincc | ec6017c92b | |
justincc | 09618626d7 | |
justincc | 0e9dcbbea7 | |
justincc | 18110273a9 | |
justincc | 44f57b4dc4 | |
Justin Clark-Casey (justincc) | b52518bbfe | |
Justin Clark-Casey (justincc) | 48c25abe86 | |
Justin Clark-Casey (justincc) | 5550b7cd3b | |
justincc | 6f2961f0e2 | |
justincc | be3360db67 | |
Diva Canto | 52fd82ae5d | |
Diva Canto | fc374ada12 | |
Melanie | 19032739be | |
grid | d0b619c5b6 | |
Justin Clark-Casey (justincc) | 73045c5c43 | |
Justin Clark-Casey (justincc) | d7dc0381b8 | |
Justin Clark-Casey (justincc) | b2fdf11d51 | |
Justin Clark-Casey (justincc) | bf5e51ec2c | |
Justin Clark-Casey (justincc) | fd4924f6fa | |
Melanie | e385961f20 | |
Justin Clark-Casey (justincc) | b753a7cbb1 | |
Melanie | f253c05630 | |
Justin Clark-Casey (justincc) | 94b22e1d52 | |
Justin Clark-Casey (justincc) | 39ff943b9c | |
Justin Clark-Casey (justincc) | 613f3bb3ce | |
Justin Clark-Casey (justincc) | 716cbeed1d | |
Justin Clark-Casey (justincc) | f7e635f114 | |
Justin Clark-Casey (justincc) | ffc3dabc0a | |
Justin Clark-Casey | c6889ab06b |
|
@ -479,7 +479,9 @@ namespace OpenSim.Data.MySQL
|
|||
}
|
||||
else
|
||||
{
|
||||
m_log.Warn("[REGION DB]: Database contains an orphan child prim " + prim.UUID + " pointing to missing parent " + prim.ParentUUID);
|
||||
m_log.WarnFormat(
|
||||
"[REGION DB]: Database contains an orphan child prim {0} {1} in region {2} pointing to missing parent {3}. This prim will not be loaded.",
|
||||
prim.Name, prim.UUID, regionID, prim.ParentUUID);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -139,9 +139,16 @@ namespace OpenSim.Framework.Communications.Cache
|
|||
else
|
||||
{
|
||||
UserProfileData userProfile = m_commsManager.UserService.GetUserProfile(fname, lname);
|
||||
|
||||
|
||||
if (userProfile != null)
|
||||
{
|
||||
if ((userProfile.UserAssetURI == null || userProfile.UserAssetURI == "") && m_commsManager.NetworkServersInfo != null)
|
||||
userProfile.UserAssetURI = m_commsManager.NetworkServersInfo.AssetURL;
|
||||
if ((userProfile.UserInventoryURI == null || userProfile.UserInventoryURI == "") && m_commsManager.NetworkServersInfo != null)
|
||||
userProfile.UserInventoryURI = m_commsManager.NetworkServersInfo.InventoryURL;
|
||||
|
||||
return AddToCaches(userProfile);
|
||||
}
|
||||
else
|
||||
return null;
|
||||
}
|
||||
|
@ -169,7 +176,14 @@ namespace OpenSim.Framework.Communications.Cache
|
|||
{
|
||||
UserProfileData userProfile = m_commsManager.UserService.GetUserProfile(userID);
|
||||
if (userProfile != null)
|
||||
{
|
||||
if ((userProfile.UserAssetURI == null || userProfile.UserAssetURI == "") && m_commsManager.NetworkServersInfo != null)
|
||||
userProfile.UserAssetURI = m_commsManager.NetworkServersInfo.AssetURL;
|
||||
if ((userProfile.UserInventoryURI == null || userProfile.UserInventoryURI == "") && m_commsManager.NetworkServersInfo != null)
|
||||
userProfile.UserInventoryURI = m_commsManager.NetworkServersInfo.InventoryURL;
|
||||
|
||||
return AddToCaches(userProfile);
|
||||
}
|
||||
else
|
||||
return null;
|
||||
}
|
||||
|
|
|
@ -168,7 +168,7 @@ namespace OpenSim.Framework
|
|||
public const bool DefaultUserServerHttpSSL = false;
|
||||
public const uint DefaultMessageServerHttpPort = 8006;
|
||||
public const bool DefaultMessageServerHttpSSL = false;
|
||||
public const uint DefaultGridServerHttpPort = 8001;
|
||||
public const uint DefaultInventoryServerHttpPort = 8004;
|
||||
public const uint DefaultGridServerHttpPort = 8003;
|
||||
public const uint DefaultInventoryServerHttpPort = 8003;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -41,6 +41,7 @@ using log4net;
|
|||
using Nwc.XmlRpc;
|
||||
using OpenMetaverse.StructuredData;
|
||||
using CoolHTTPListener = HttpServer.HttpListener;
|
||||
using CoolHttpServer = HttpServer;
|
||||
using HttpListener=System.Net.HttpListener;
|
||||
|
||||
namespace OpenSim.Framework.Servers.HttpServer
|
||||
|
@ -48,7 +49,7 @@ namespace OpenSim.Framework.Servers.HttpServer
|
|||
public class BaseHttpServer : IHttpServer
|
||||
{
|
||||
private static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType);
|
||||
private HttpServerLogWriter httpserverlog = new HttpServerLogWriter();
|
||||
// private HttpServerLogWriter httpserverlog = new HttpServerLogWriter();
|
||||
|
||||
private volatile int NotSocketErrors = 0;
|
||||
public volatile bool HTTPDRunning = false;
|
||||
|
@ -253,60 +254,66 @@ namespace OpenSim.Framework.Servers.HttpServer
|
|||
|
||||
private void OnRequest(object source, RequestEventArgs args)
|
||||
{
|
||||
IHttpClientContext context = (IHttpClientContext)source;
|
||||
IHttpRequest request = args.Request;
|
||||
|
||||
PollServiceEventArgs psEvArgs;
|
||||
|
||||
if (TryGetPollServiceHTTPHandler(request.UriPath.ToString(), out psEvArgs))
|
||||
try
|
||||
{
|
||||
PollServiceHttpRequest psreq = new PollServiceHttpRequest(psEvArgs, context, request);
|
||||
|
||||
if (psEvArgs.Request != null)
|
||||
IHttpClientContext context = (IHttpClientContext)source;
|
||||
IHttpRequest request = args.Request;
|
||||
|
||||
PollServiceEventArgs psEvArgs;
|
||||
|
||||
if (TryGetPollServiceHTTPHandler(request.UriPath.ToString(), out psEvArgs))
|
||||
{
|
||||
OSHttpRequest req = new OSHttpRequest(context, request);
|
||||
|
||||
Stream requestStream = req.InputStream;
|
||||
|
||||
Encoding encoding = Encoding.UTF8;
|
||||
StreamReader reader = new StreamReader(requestStream, encoding);
|
||||
|
||||
string requestBody = reader.ReadToEnd();
|
||||
|
||||
Hashtable keysvals = new Hashtable();
|
||||
Hashtable headervals = new Hashtable();
|
||||
|
||||
string[] querystringkeys = req.QueryString.AllKeys;
|
||||
string[] rHeaders = req.Headers.AllKeys;
|
||||
|
||||
keysvals.Add("body", requestBody);
|
||||
keysvals.Add("uri", req.RawUrl);
|
||||
keysvals.Add("content-type", req.ContentType);
|
||||
keysvals.Add("http-method", req.HttpMethod);
|
||||
|
||||
foreach (string queryname in querystringkeys)
|
||||
PollServiceHttpRequest psreq = new PollServiceHttpRequest(psEvArgs, context, request);
|
||||
|
||||
if (psEvArgs.Request != null)
|
||||
{
|
||||
keysvals.Add(queryname, req.QueryString[queryname]);
|
||||
OSHttpRequest req = new OSHttpRequest(context, request);
|
||||
|
||||
Stream requestStream = req.InputStream;
|
||||
|
||||
Encoding encoding = Encoding.UTF8;
|
||||
StreamReader reader = new StreamReader(requestStream, encoding);
|
||||
|
||||
string requestBody = reader.ReadToEnd();
|
||||
|
||||
Hashtable keysvals = new Hashtable();
|
||||
Hashtable headervals = new Hashtable();
|
||||
|
||||
string[] querystringkeys = req.QueryString.AllKeys;
|
||||
string[] rHeaders = req.Headers.AllKeys;
|
||||
|
||||
keysvals.Add("body", requestBody);
|
||||
keysvals.Add("uri", req.RawUrl);
|
||||
keysvals.Add("content-type", req.ContentType);
|
||||
keysvals.Add("http-method", req.HttpMethod);
|
||||
|
||||
foreach (string queryname in querystringkeys)
|
||||
{
|
||||
keysvals.Add(queryname, req.QueryString[queryname]);
|
||||
}
|
||||
|
||||
foreach (string headername in rHeaders)
|
||||
{
|
||||
headervals[headername] = req.Headers[headername];
|
||||
}
|
||||
|
||||
keysvals.Add("headers",headervals);
|
||||
keysvals.Add("querystringkeys", querystringkeys);
|
||||
|
||||
psEvArgs.Request(psreq.RequestID, keysvals);
|
||||
}
|
||||
|
||||
foreach (string headername in rHeaders)
|
||||
{
|
||||
headervals[headername] = req.Headers[headername];
|
||||
}
|
||||
|
||||
keysvals.Add("headers",headervals);
|
||||
keysvals.Add("querystringkeys", querystringkeys);
|
||||
|
||||
psEvArgs.Request(psreq.RequestID, keysvals);
|
||||
|
||||
m_PollServiceManager.Enqueue(psreq);
|
||||
}
|
||||
else
|
||||
{
|
||||
OnHandleRequestIOThread(context, request);
|
||||
}
|
||||
|
||||
m_PollServiceManager.Enqueue(psreq);
|
||||
}
|
||||
else
|
||||
catch (Exception e)
|
||||
{
|
||||
OnHandleRequestIOThread(context, request);
|
||||
m_log.ErrorFormat("[BASE HTTP SERVER]: OnRequest() failed with {0} {1}", e.Message, e.StackTrace);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
public void OnHandleRequestIOThread(IHttpClientContext context, IHttpRequest request)
|
||||
|
@ -465,11 +472,11 @@ namespace OpenSim.Framework.Servers.HttpServer
|
|||
catch (SocketException e)
|
||||
{
|
||||
// This has to be here to prevent a Linux/Mono crash
|
||||
m_log.WarnFormat("[BASE HTTP SERVER] XmlRpcRequest issue {0}.\nNOTE: this may be spurious on Linux.", e);
|
||||
m_log.WarnFormat("[BASE HTTP SERVER]: XmlRpcRequest issue {0}.\nNOTE: this may be spurious on Linux.", e);
|
||||
}
|
||||
catch (IOException e)
|
||||
{
|
||||
m_log.Warn("[BASE HTTP SERVER] XmlRpcRequest issue: " + e.Message);
|
||||
m_log.Warn("[BASE HTTP SERVER]: XmlRpcRequest issue: " + e.Message);
|
||||
}
|
||||
return;
|
||||
}
|
||||
|
@ -548,7 +555,7 @@ namespace OpenSim.Framework.Servers.HttpServer
|
|||
}
|
||||
catch (IOException e)
|
||||
{
|
||||
m_log.ErrorFormat("[BASE HTTP SERVER] HandleRequest() threw ", e);
|
||||
m_log.ErrorFormat("[BASE HTTP SERVER]: HandleRequest() threw ", e);
|
||||
}
|
||||
catch (InvalidOperationException e)
|
||||
{
|
||||
|
@ -693,10 +700,24 @@ namespace OpenSim.Framework.Servers.HttpServer
|
|||
|
||||
try
|
||||
{
|
||||
xmlRprcRequest = (XmlRpcRequest) (new XmlRpcRequestDeserializer()).Deserialize(requestBody);
|
||||
xmlRprcRequest = (XmlRpcRequest)(new XmlRpcRequestDeserializer()).Deserialize(requestBody);
|
||||
}
|
||||
catch (XmlException)
|
||||
{
|
||||
catch (XmlException e)
|
||||
{
|
||||
// Don't log this for now since HandleXmlRpcRequests() acts as the final processing catch all for all requests
|
||||
// that aren't dealt with by another method. Enabling can result in false positives, for instance
|
||||
//
|
||||
// 14:59:12 - [BASE HTTP SERVER]: Ignoring XMLRPC request from 80.175.122.121:20478
|
||||
// due to deserialization exception Data at the root level is invalid. Line 1, pos
|
||||
// ition 1. at System.Xml.XmlTextReaderImpl.Throw(Exception e)
|
||||
// 14:59:12 - [BASE HTTP SERVER]: Request body auth_token=x3EA9wjAwTjuJwawE6PGqhQ%3
|
||||
// D%3D%3A0%3A9303959503950%3A%3A
|
||||
//
|
||||
// on the region simulator when the client makes a request that we don't deal with
|
||||
//
|
||||
// m_log.WarnFormat(
|
||||
// "[BASE HTTP SERVER]: Ignoring XMLRPC request from {0} due to deserialization exception {1} {2}",
|
||||
// request.RemoteIPEndPoint, e.Message, e.StackTrace);
|
||||
}
|
||||
|
||||
if (xmlRprcRequest != null)
|
||||
|
@ -724,12 +745,20 @@ namespace OpenSim.Framework.Servers.HttpServer
|
|||
}
|
||||
catch(Exception e)
|
||||
{
|
||||
string errorMessage
|
||||
= String.Format(
|
||||
"Requested method [{0}] from {1} threw exception: {2} {3}",
|
||||
methodName, request.RemoteIPEndPoint.Address, e.Message, e.StackTrace);
|
||||
|
||||
m_log.ErrorFormat("[BASE HTTP SERVER]: {0}", errorMessage);
|
||||
|
||||
// if the registered XmlRpc method threw an exception, we pass a fault-code along
|
||||
xmlRpcResponse = new XmlRpcResponse();
|
||||
|
||||
// Code probably set in accordance with http://xmlrpc-epi.sourceforge.net/specs/rfc.fault_codes.php
|
||||
xmlRpcResponse.SetFault(-32603, String.Format("Requested method [{0}] threw exception: {1}",
|
||||
methodName, e.Message));
|
||||
xmlRpcResponse.SetFault(-32603, errorMessage);
|
||||
}
|
||||
|
||||
// if the method wasn't found, we can't determine KeepAlive state anyway, so lets do it only here
|
||||
response.KeepAlive = m_rpcHandlersKeepAlive[methodName];
|
||||
}
|
||||
|
@ -755,7 +784,7 @@ namespace OpenSim.Framework.Servers.HttpServer
|
|||
byte[] buf = Encoding.UTF8.GetBytes("Not found");
|
||||
response.KeepAlive = false;
|
||||
|
||||
m_log.ErrorFormat("[BASE HTTP SERVER] Handler not found for http request {0}", request.RawUrl);
|
||||
m_log.ErrorFormat("[BASE HTTP SERVER]: Handler not found for http request {0}", request.RawUrl);
|
||||
|
||||
response.SendChunked = false;
|
||||
response.ContentLength64 = buf.Length;
|
||||
|
@ -767,7 +796,7 @@ namespace OpenSim.Framework.Servers.HttpServer
|
|||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
m_log.Warn("[HTTPD]: Error - " + ex.Message);
|
||||
m_log.Warn("[BASE HTTP SERVER]: Error - " + ex.Message);
|
||||
}
|
||||
finally
|
||||
{
|
||||
|
@ -779,11 +808,11 @@ namespace OpenSim.Framework.Servers.HttpServer
|
|||
catch (SocketException e)
|
||||
{
|
||||
// This has to be here to prevent a Linux/Mono crash
|
||||
m_log.WarnFormat("[BASE HTTP SERVER] XmlRpcRequest issue {0}.\nNOTE: this may be spurious on Linux.", e);
|
||||
m_log.WarnFormat("[BASE HTTP SERVER]: XmlRpcRequest issue {0}.\nNOTE: this may be spurious on Linux.", e);
|
||||
}
|
||||
catch (IOException e)
|
||||
{
|
||||
m_log.Warn("[BASE HTTP SERVER] XmlRpcRequest issue: " + e.Message);
|
||||
m_log.Warn("[BASE HTTP SERVER]: XmlRpcRequest issue: " + e.Message);
|
||||
}
|
||||
}
|
||||
return;
|
||||
|
@ -804,7 +833,7 @@ namespace OpenSim.Framework.Servers.HttpServer
|
|||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
m_log.Warn("[HTTPD]: Error - " + ex.Message);
|
||||
m_log.Warn("[BASE HTTP SERVER]: Error - " + ex.Message);
|
||||
}
|
||||
finally
|
||||
{
|
||||
|
@ -816,11 +845,11 @@ namespace OpenSim.Framework.Servers.HttpServer
|
|||
catch (SocketException e)
|
||||
{
|
||||
// This has to be here to prevent a Linux/Mono crash
|
||||
m_log.WarnFormat("[BASE HTTP SERVER] XmlRpcRequest issue {0}.\nNOTE: this may be spurious on Linux.", e);
|
||||
m_log.WarnFormat("[BASE HTTP SERVER]: XmlRpcRequest issue {0}.\nNOTE: this may be spurious on Linux.", e);
|
||||
}
|
||||
catch (IOException e)
|
||||
{
|
||||
m_log.Warn("[BASE HTTP SERVER] XmlRpcRequest issue: " + e.Message);
|
||||
m_log.Warn("[BASE HTTP SERVER]: XmlRpcRequest issue: " + e.Message);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -856,7 +885,7 @@ namespace OpenSim.Framework.Servers.HttpServer
|
|||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
m_log.Warn("[HTTPD]: Error - " + ex.Message);
|
||||
m_log.Warn("[BASE HTTP SERVER]: Error - " + ex.Message);
|
||||
}
|
||||
|
||||
if (llsdRequest != null)// && m_defaultLlsdHandler != null)
|
||||
|
@ -917,7 +946,7 @@ namespace OpenSim.Framework.Servers.HttpServer
|
|||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
m_log.Warn("[HTTPD]: Error - " + ex.Message);
|
||||
m_log.Warn("[BASE HTTP SERVER]: Error - " + ex.Message);
|
||||
}
|
||||
finally
|
||||
{
|
||||
|
@ -931,12 +960,12 @@ namespace OpenSim.Framework.Servers.HttpServer
|
|||
}
|
||||
catch (IOException e)
|
||||
{
|
||||
m_log.DebugFormat("[BASE HTTP SERVER] LLSD IOException {0}.", e);
|
||||
m_log.DebugFormat("[BASE HTTP SERVER]: LLSD IOException {0}.", e);
|
||||
}
|
||||
catch (SocketException e)
|
||||
{
|
||||
// This has to be here to prevent a Linux/Mono crash
|
||||
m_log.WarnFormat("[BASE HTTP SERVER] LLSD issue {0}.\nNOTE: this may be spurious on Linux.", e);
|
||||
m_log.WarnFormat("[BASE HTTP SERVER]: LLSD issue {0}.\nNOTE: this may be spurious on Linux.", e);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -1474,11 +1503,11 @@ namespace OpenSim.Framework.Servers.HttpServer
|
|||
catch (SocketException e)
|
||||
{
|
||||
// This has to be here to prevent a Linux/Mono crash
|
||||
m_log.WarnFormat("[BASE HTTP SERVER] XmlRpcRequest issue {0}.\nNOTE: this may be spurious on Linux.", e);
|
||||
m_log.WarnFormat("[BASE HTTP SERVER]: XmlRpcRequest issue {0}.\nNOTE: this may be spurious on Linux.", e);
|
||||
}
|
||||
catch (IOException e)
|
||||
{
|
||||
m_log.Warn("[BASE HTTP SERVER] XmlRpcRequest issue: " + e.Message);
|
||||
m_log.Warn("[BASE HTTP SERVER]: XmlRpcRequest issue: " + e.Message);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -1502,7 +1531,7 @@ namespace OpenSim.Framework.Servers.HttpServer
|
|||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
m_log.Warn("[HTTPD]: Error - " + ex.Message);
|
||||
m_log.Warn("[BASE HTTP SERVER]: Error - " + ex.Message);
|
||||
}
|
||||
finally
|
||||
{
|
||||
|
@ -1515,7 +1544,7 @@ namespace OpenSim.Framework.Servers.HttpServer
|
|||
catch (SocketException e)
|
||||
{
|
||||
// This has to be here to prevent a Linux/Mono crash
|
||||
m_log.WarnFormat("[BASE HTTP SERVER] XmlRpcRequest issue {0}.\nNOTE: this may be spurious on Linux.", e);
|
||||
m_log.WarnFormat("[BASE HTTP SERVER]: XmlRpcRequest issue {0}.\nNOTE: this may be spurious on Linux.", e);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -1538,7 +1567,7 @@ namespace OpenSim.Framework.Servers.HttpServer
|
|||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
m_log.Warn("[HTTPD]: Error - " + ex.Message);
|
||||
m_log.Warn("[BASE HTTP SERVER]: Error - " + ex.Message);
|
||||
}
|
||||
finally
|
||||
{
|
||||
|
@ -1558,7 +1587,7 @@ namespace OpenSim.Framework.Servers.HttpServer
|
|||
|
||||
public void Start()
|
||||
{
|
||||
m_log.Info("[HTTPD]: Starting up HTTP Server");
|
||||
m_log.Info("[BASE HTTP SERVER]: Starting up HTTP Server");
|
||||
StartHTTP();
|
||||
}
|
||||
|
||||
|
@ -1566,7 +1595,7 @@ namespace OpenSim.Framework.Servers.HttpServer
|
|||
{
|
||||
try
|
||||
{
|
||||
m_log.Info("[HTTPD]: Spawned main thread OK");
|
||||
m_log.Debug("[BASE HTTP SERVER]: Spawned main thread OK");
|
||||
//m_httpListener = new HttpListener();
|
||||
NotSocketErrors = 0;
|
||||
if (!m_ssl)
|
||||
|
@ -1575,7 +1604,9 @@ namespace OpenSim.Framework.Servers.HttpServer
|
|||
//m_httpListener.Prefixes.Add("http://10.1.1.5:" + m_port + "/");
|
||||
m_httpListener2 = CoolHTTPListener.Create(m_listenIPAddress, (int)m_port);
|
||||
m_httpListener2.ExceptionThrown += httpServerException;
|
||||
m_httpListener2.LogWriter = httpserverlog;
|
||||
|
||||
// Uncomment this line (and the httpserverlog field) for HttpServer.dll logging
|
||||
//m_httpListener2.LogWriter = httpserverlog;
|
||||
|
||||
// Uncomment this line in addition to those in HttpServerLogWriter
|
||||
// if you want more detailed trace information from the HttpServer
|
||||
|
@ -1606,8 +1637,8 @@ namespace OpenSim.Framework.Servers.HttpServer
|
|||
}
|
||||
catch (Exception e)
|
||||
{
|
||||
m_log.Error("[HTTPD]: Error - " + e.Message);
|
||||
m_log.Error("[HTTPD]: Tip: Do you have permission to listen on port " + m_port + ", " + m_sslport + "?");
|
||||
m_log.Error("[BASE HTTP SERVER]: Error - " + e.Message);
|
||||
m_log.Error("[BASE HTTP SERVER]: Tip: Do you have permission to listen on port " + m_port + ", " + m_sslport + "?");
|
||||
|
||||
// We want this exception to halt the entire server since in current configurations we aren't too
|
||||
// useful without inbound HTTP.
|
||||
|
@ -1628,7 +1659,7 @@ namespace OpenSim.Framework.Servers.HttpServer
|
|||
|
||||
public void httpServerException(object source, Exception exception)
|
||||
{
|
||||
m_log.ErrorFormat("[HTTPSERVER]: {0} had an exception {1}", source.ToString(), exception.ToString());
|
||||
m_log.ErrorFormat("[BASE HTTP SERVER]: {0} had an exception {1}", source.ToString(), exception.ToString());
|
||||
/*
|
||||
if (HTTPDRunning)// && NotSocketErrors > 5)
|
||||
{
|
||||
|
@ -1654,7 +1685,7 @@ namespace OpenSim.Framework.Servers.HttpServer
|
|||
}
|
||||
catch (NullReferenceException)
|
||||
{
|
||||
m_log.Warn("[BASEHTTPSERVER]: Null Reference when stopping HttpServer.");
|
||||
m_log.Warn("[BASE HTTP SERVER]: Null Reference when stopping HttpServer.");
|
||||
}
|
||||
|
||||
}
|
||||
|
@ -1805,34 +1836,32 @@ namespace OpenSim.Framework.Servers.HttpServer
|
|||
/// There is also a UseTraceLogs line in this file that can be uncommented for more detailed log information
|
||||
public class HttpServerLogWriter : ILogWriter
|
||||
{
|
||||
//private static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType);
|
||||
private static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType);
|
||||
|
||||
public void Write(object source, LogPrio priority, string message)
|
||||
{
|
||||
/*
|
||||
switch (priority)
|
||||
{
|
||||
case HttpServer.LogPrio.Debug:
|
||||
case CoolHttpServer.LogPrio.Debug:
|
||||
m_log.DebugFormat("[{0}]: {1}", source.ToString(), message);
|
||||
break;
|
||||
case HttpServer.LogPrio.Error:
|
||||
case CoolHttpServer.LogPrio.Error:
|
||||
m_log.ErrorFormat("[{0}]: {1}", source.ToString(), message);
|
||||
break;
|
||||
case HttpServer.LogPrio.Info:
|
||||
case CoolHttpServer.LogPrio.Info:
|
||||
m_log.InfoFormat("[{0}]: {1}", source.ToString(), message);
|
||||
break;
|
||||
case HttpServer.LogPrio.Warning:
|
||||
case CoolHttpServer.LogPrio.Warning:
|
||||
m_log.WarnFormat("[{0}]: {1}", source.ToString(), message);
|
||||
break;
|
||||
case HttpServer.LogPrio.Fatal:
|
||||
case CoolHttpServer.LogPrio.Fatal:
|
||||
m_log.ErrorFormat("[{0}]: FATAL! - {1}", source.ToString(), message);
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
*/
|
||||
|
||||
return;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
|
@ -29,8 +29,8 @@ namespace OpenSim
|
|||
{
|
||||
public class VersionInfo
|
||||
{
|
||||
private const string VERSION_NUMBER = "0.6.8";
|
||||
private const Flavour VERSION_FLAVOUR = Flavour.Dev;
|
||||
private const string VERSION_NUMBER = "0.6.8";
|
||||
private const Flavour VERSION_FLAVOUR = Flavour.Post_Fixes;
|
||||
|
||||
public enum Flavour
|
||||
{
|
||||
|
|
|
@ -50,7 +50,10 @@ namespace OpenSim.Grid.MessagingServer.Modules
|
|||
|
||||
private IGridServiceCore m_messageCore;
|
||||
|
||||
private Timer reconnectTimer = new Timer(300000); // 5 mins
|
||||
/// <value>
|
||||
/// Reregister with the user service every 5 minutes
|
||||
/// </value>
|
||||
private Timer reconnectTimer = new Timer(300000);
|
||||
|
||||
public InterMessageUserServerModule(MessageServerConfig config, IGridServiceCore messageCore)
|
||||
{
|
||||
|
@ -69,13 +72,11 @@ namespace OpenSim.Grid.MessagingServer.Modules
|
|||
|
||||
public void PostInitialise()
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
public void RegisterHandlers()
|
||||
{
|
||||
//have these in separate method as some servers restart the http server and reregister all the handlers.
|
||||
|
||||
//have these in separate method as some servers restart the http server and reregister all the handlers.
|
||||
}
|
||||
|
||||
public void registerWithUserServer(object sender, ElapsedEventArgs e)
|
||||
|
@ -112,23 +113,29 @@ namespace OpenSim.Grid.MessagingServer.Modules
|
|||
// Send Request
|
||||
try
|
||||
{
|
||||
XmlRpcRequest UserReq = new XmlRpcRequest("register_messageserver", SendParams);
|
||||
XmlRpcResponse UserResp = UserReq.Send(srv, 16000);
|
||||
XmlRpcRequest UserReq = new XmlRpcRequest("register_messageserver", SendParams);
|
||||
////XmlRpcResponse UserResp = UserReq.Send(srv, 16000);
|
||||
|
||||
//// Process Response
|
||||
//Hashtable GridRespData = (Hashtable)UserResp.Value;
|
||||
|
||||
Hashtable GridRespData = (Hashtable)UserReq.Invoke(srv);
|
||||
|
||||
// Process Response
|
||||
Hashtable GridRespData = (Hashtable)UserResp.Value;
|
||||
// if we got a response, we were successful
|
||||
if (!GridRespData.ContainsKey("responsestring"))
|
||||
success = false;
|
||||
else
|
||||
m_log.InfoFormat("[SERVER] Registered with {0}", srv);
|
||||
m_log.DebugFormat("[SERVER]: Registered with user service at {0}", srv);
|
||||
}
|
||||
catch
|
||||
catch (Exception e)
|
||||
{
|
||||
m_log.ErrorFormat("Unable to connect to server {0}. Server not running?", srv);
|
||||
m_log.ErrorFormat(
|
||||
"[SERVER]: Unable to connect to server {0} for registration. User service not running? Exception {1} {2}",
|
||||
srv, e.Message, e.StackTrace);
|
||||
success = false;
|
||||
}
|
||||
}
|
||||
|
||||
return success;
|
||||
}
|
||||
|
||||
|
@ -175,9 +182,11 @@ namespace OpenSim.Grid.MessagingServer.Modules
|
|||
if (!UserRespData.ContainsKey("responsestring"))
|
||||
success = false;
|
||||
}
|
||||
catch
|
||||
catch (Exception e)
|
||||
{
|
||||
m_log.ErrorFormat("Unable to connect to server {0}. Server not running?", srv);
|
||||
m_log.ErrorFormat(
|
||||
"[SERVER]: Unable to connect to server {0} for send. Server not running? Exception {0} {1}",
|
||||
srv, e.Message, e.StackTrace);
|
||||
success = false;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -92,7 +92,6 @@ namespace OpenSim.Grid.MessagingServer.Modules
|
|||
public void RegisterHandlers()
|
||||
{
|
||||
//have these in separate method as some servers restart the http server and reregister all the handlers.
|
||||
|
||||
}
|
||||
|
||||
#region FriendList Methods
|
||||
|
@ -152,7 +151,7 @@ namespace OpenSim.Grid.MessagingServer.Modules
|
|||
}
|
||||
else
|
||||
{
|
||||
m_log.WarnFormat("no data found for user {0}", receiver.agentData.AgentID);
|
||||
m_log.WarnFormat("[PRESENCE]: no data found for user {0}", receiver.agentData.AgentID);
|
||||
// Skip because we can't find any data on the user
|
||||
}
|
||||
}
|
||||
|
@ -260,7 +259,11 @@ namespace OpenSim.Grid.MessagingServer.Modules
|
|||
/// </summary>
|
||||
/// <param name="friendlistowner">The agent that we're retreiving the friends Data for.</param>
|
||||
private Dictionary<UUID, FriendListItem> GetUserFriendList(UUID friendlistowner)
|
||||
{
|
||||
{
|
||||
m_log.DebugFormat(
|
||||
"[MESSAGE SERVICE]: Requesting friends list for {0} from {1}",
|
||||
friendlistowner, m_cfg.UserServerURL);
|
||||
|
||||
Dictionary<UUID, FriendListItem> buddies = new Dictionary<UUID,FriendListItem>();
|
||||
|
||||
try
|
||||
|
@ -270,9 +273,11 @@ namespace OpenSim.Grid.MessagingServer.Modules
|
|||
|
||||
IList parameters = new ArrayList();
|
||||
parameters.Add(param);
|
||||
XmlRpcRequest req = new XmlRpcRequest("get_user_friend_list", parameters);
|
||||
XmlRpcResponse resp = req.Send(m_cfg.UserServerURL, 3000);
|
||||
Hashtable respData = (Hashtable)resp.Value;
|
||||
XmlRpcRequest req = new XmlRpcRequest("get_user_friend_list", parameters);
|
||||
//XmlRpcResponse resp = req.Send(m_cfg.UserServerURL, 3000);
|
||||
//Hashtable respData = (Hashtable)resp.Value;
|
||||
|
||||
Hashtable respData = (Hashtable)req.Invoke(m_cfg.UserServerURL);
|
||||
|
||||
if (respData.Contains("avcount"))
|
||||
{
|
||||
|
@ -282,7 +287,7 @@ namespace OpenSim.Grid.MessagingServer.Modules
|
|||
}
|
||||
catch (WebException e)
|
||||
{
|
||||
m_log.Warn("Error when trying to fetch Avatar's friends list: " +
|
||||
m_log.Warn("[FRIENDS]: Error when trying to fetch Avatar's friends list: " +
|
||||
e.Message);
|
||||
// Return Empty list (no friends)
|
||||
}
|
||||
|
@ -351,7 +356,7 @@ namespace OpenSim.Grid.MessagingServer.Modules
|
|||
|
||||
ulong regionHandle = Convert.ToUInt64((string)requestData["regionhandle"]);
|
||||
|
||||
m_log.InfoFormat("[LOGON]: User {0} {1} logged into region {2} as {3} agent, building indexes for user",
|
||||
m_log.DebugFormat("[LOGIN]: User {0} {1} logged into region {2} as {3} agent, building indexes for user",
|
||||
agentData.firstname, agentData.lastname, regionHandle, agentData.child ? "child" : "root");
|
||||
|
||||
UserPresenceData up = new UserPresenceData();
|
||||
|
@ -361,15 +366,13 @@ namespace OpenSim.Grid.MessagingServer.Modules
|
|||
up.OnlineYN = true;
|
||||
up.lookupUserRegionYN = false;
|
||||
ProcessFriendListSubscriptions(up);
|
||||
|
||||
}
|
||||
catch (Exception e)
|
||||
{
|
||||
m_log.WarnFormat("[LOGIN]: Exception on UserLoggedOn: {0}", e);
|
||||
m_log.ErrorFormat("[LOGIN]: Exception on UserLoggedOn: {0} {1}", e.Message, e.StackTrace);
|
||||
}
|
||||
|
||||
return new XmlRpcResponse();
|
||||
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
|
@ -479,7 +482,7 @@ namespace OpenSim.Grid.MessagingServer.Modules
|
|||
UUID regionID;
|
||||
if (UUID.TryParse((string)requestData["regionid"], out regionID))
|
||||
{
|
||||
m_log.DebugFormat("[PRESENCE] Processing region restart for {0}", regionID);
|
||||
m_log.DebugFormat("[PRESENCE]: Processing region restart for {0}", regionID);
|
||||
result["success"] = "TRUE";
|
||||
|
||||
foreach (UserPresenceData up in m_presences.Values)
|
||||
|
@ -488,7 +491,7 @@ namespace OpenSim.Grid.MessagingServer.Modules
|
|||
{
|
||||
if (up.OnlineYN)
|
||||
{
|
||||
m_log.DebugFormat("[PRESENCE] Logging off {0} because the region they were in has gone", up.agentData.AgentID);
|
||||
m_log.DebugFormat("[PRESENCE]: Logging off {0} because the region they were in has gone", up.agentData.AgentID);
|
||||
ProcessLogOff(up.agentData.AgentID);
|
||||
}
|
||||
}
|
||||
|
|
|
@ -69,7 +69,7 @@ namespace OpenSim.Grid.UserServer.Modules
|
|||
m_httpServer = httpServer;
|
||||
m_httpServer.AddStreamHandler(new RestStreamHandler("GET", "/get_grid_info",
|
||||
m_gridInfoService.RestGetGridInfoMethod));
|
||||
m_httpServer.AddXmlRPCHandler("get_grid_info", m_gridInfoService.XmlRpcGridInfoMethod);
|
||||
m_httpServer.AddXmlRPCHandler("get_grid_info", m_gridInfoService.XmlRpcGridInfoMethod, false);
|
||||
}
|
||||
|
||||
public void Close()
|
||||
|
|
|
@ -106,14 +106,14 @@ namespace OpenSim.Grid.UserServer.Modules
|
|||
{
|
||||
m_httpServer = httpServer;
|
||||
|
||||
m_httpServer.AddXmlRPCHandler("region_startup", RegionStartup);
|
||||
m_httpServer.AddXmlRPCHandler("region_shutdown", RegionShutdown);
|
||||
m_httpServer.AddXmlRPCHandler("agent_location", AgentLocation);
|
||||
m_httpServer.AddXmlRPCHandler("agent_leaving", AgentLeaving);
|
||||
// Message Server ---> User Server
|
||||
m_httpServer.AddXmlRPCHandler("register_messageserver", XmlRPCRegisterMessageServer);
|
||||
m_httpServer.AddXmlRPCHandler("agent_change_region", XmlRPCUserMovedtoRegion);
|
||||
m_httpServer.AddXmlRPCHandler("deregister_messageserver", XmlRPCDeRegisterMessageServer);
|
||||
m_httpServer.AddXmlRPCHandler("region_startup", RegionStartup, false);
|
||||
m_httpServer.AddXmlRPCHandler("region_shutdown", RegionShutdown, false);
|
||||
m_httpServer.AddXmlRPCHandler("agent_location", AgentLocation, false);
|
||||
m_httpServer.AddXmlRPCHandler("agent_leaving", AgentLeaving, false);
|
||||
// Message Server ---> User Server
|
||||
m_httpServer.AddXmlRPCHandler("register_messageserver", XmlRPCRegisterMessageServer, false);
|
||||
m_httpServer.AddXmlRPCHandler("agent_change_region", XmlRPCUserMovedtoRegion, false);
|
||||
m_httpServer.AddXmlRPCHandler("deregister_messageserver", XmlRPCDeRegisterMessageServer, false);
|
||||
}
|
||||
|
||||
public void RegisterMessageServer(string URI, MessageServerInfo serverData)
|
||||
|
@ -147,6 +147,7 @@ namespace OpenSim.Grid.UserServer.Modules
|
|||
MessageServers["URI"] = msginfo;
|
||||
}
|
||||
}
|
||||
|
||||
public void RemoveResponsibleRegion(string URI, ulong regionhandle)
|
||||
{
|
||||
if (!MessageServers.ContainsKey(URI))
|
||||
|
@ -164,8 +165,13 @@ namespace OpenSim.Grid.UserServer.Modules
|
|||
}
|
||||
|
||||
}
|
||||
|
||||
public XmlRpcResponse XmlRPCRegisterMessageServer(XmlRpcRequest request, IPEndPoint remoteClient)
|
||||
{
|
||||
m_log.DebugFormat(
|
||||
"[MSGSERVER]: Beginning processing message service registration request from {0}",
|
||||
remoteClient.Address);
|
||||
|
||||
XmlRpcResponse response = new XmlRpcResponse();
|
||||
Hashtable requestData = (Hashtable)request.Params[0];
|
||||
Hashtable responseData = new Hashtable();
|
||||
|
@ -173,8 +179,8 @@ namespace OpenSim.Grid.UserServer.Modules
|
|||
if (requestData.Contains("uri"))
|
||||
{
|
||||
string URI = (string)requestData["uri"];
|
||||
string sendkey=(string)requestData["sendkey"];
|
||||
string recvkey=(string)requestData["recvkey"];
|
||||
string sendkey = (string)requestData["sendkey"];
|
||||
string recvkey = (string)requestData["recvkey"];
|
||||
MessageServerInfo m = new MessageServerInfo();
|
||||
m.URI = URI;
|
||||
m.sendkey = sendkey;
|
||||
|
@ -182,9 +188,21 @@ namespace OpenSim.Grid.UserServer.Modules
|
|||
RegisterMessageServer(URI, m);
|
||||
responseData["responsestring"] = "TRUE";
|
||||
response.Value = responseData;
|
||||
|
||||
m_log.DebugFormat(
|
||||
"[MSGSERVER]: Successfully processed message service registration request from {0}",
|
||||
remoteClient.Address);
|
||||
}
|
||||
else
|
||||
{
|
||||
m_log.ErrorFormat(
|
||||
"[MSGSERVER]: Message service registration request from {0} did not contain a uri, not registering",
|
||||
remoteClient.Address);
|
||||
}
|
||||
|
||||
return response;
|
||||
}
|
||||
|
||||
public XmlRpcResponse XmlRPCDeRegisterMessageServer(XmlRpcRequest request, IPEndPoint remoteClient)
|
||||
{
|
||||
XmlRpcResponse response = new XmlRpcResponse();
|
||||
|
@ -201,6 +219,7 @@ namespace OpenSim.Grid.UserServer.Modules
|
|||
}
|
||||
return response;
|
||||
}
|
||||
|
||||
public XmlRpcResponse XmlRPCUserMovedtoRegion(XmlRpcRequest request, IPEndPoint remoteClient)
|
||||
{
|
||||
XmlRpcResponse response = new XmlRpcResponse();
|
||||
|
@ -510,4 +529,4 @@ namespace OpenSim.Grid.UserServer.Modules
|
|||
return response;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
|
@ -82,9 +82,9 @@ namespace OpenSim.Grid.UserServer.Modules
|
|||
{
|
||||
m_httpServer = httpServer;
|
||||
|
||||
httpServer.AddXmlRPCHandler("hg_login", XmlRpcLoginMethod);
|
||||
httpServer.AddXmlRPCHandler("hg_new_auth_key", XmlRpcGenerateKeyMethod);
|
||||
httpServer.AddXmlRPCHandler("hg_verify_auth_key", XmlRpcVerifyKeyMethod);
|
||||
httpServer.AddXmlRPCHandler("hg_login", XmlRpcLoginMethod, false);
|
||||
httpServer.AddXmlRPCHandler("hg_new_auth_key", XmlRpcGenerateKeyMethod, false);
|
||||
httpServer.AddXmlRPCHandler("hg_verify_auth_key", XmlRpcVerifyKeyMethod, false);
|
||||
}
|
||||
|
||||
|
||||
|
|
|
@ -90,9 +90,9 @@ namespace OpenSim.Grid.UserServer.Modules
|
|||
{
|
||||
m_httpServer = httpServer;
|
||||
|
||||
m_httpServer.AddXmlRPCHandler("login_to_simulator", XmlRpcLoginMethod);
|
||||
m_httpServer.AddXmlRPCHandler("login_to_simulator", XmlRpcLoginMethod, false);
|
||||
m_httpServer.AddHTTPHandler("login", ProcessHTMLLogin);
|
||||
m_httpServer.AddXmlRPCHandler("set_login_params", XmlRPCSetLoginParams);
|
||||
m_httpServer.AddXmlRPCHandler("set_login_params", XmlRPCSetLoginParams, false);
|
||||
m_httpServer.AddXmlRPCHandler("check_auth_session", XmlRPCCheckAuthSession, false);
|
||||
|
||||
if (registerLLSDHandler)
|
||||
|
|
|
@ -104,18 +104,18 @@ namespace OpenSim.Grid.UserServer.Modules
|
|||
|
||||
m_httpServer.AddStreamHandler(new RestStreamHandler("GET", "/users/", RESTGetUserProfile));
|
||||
|
||||
m_httpServer.AddXmlRPCHandler("get_user_by_name", XmlRPCGetUserMethodName);
|
||||
m_httpServer.AddXmlRPCHandler("get_user_by_uuid", XmlRPCGetUserMethodUUID);
|
||||
m_httpServer.AddXmlRPCHandler("get_avatar_picker_avatar", XmlRPCGetAvatarPickerAvatar);
|
||||
m_httpServer.AddXmlRPCHandler("get_user_by_name", XmlRPCGetUserMethodName, false);
|
||||
m_httpServer.AddXmlRPCHandler("get_user_by_uuid", XmlRPCGetUserMethodUUID, false);
|
||||
m_httpServer.AddXmlRPCHandler("get_avatar_picker_avatar", XmlRPCGetAvatarPickerAvatar, false);
|
||||
|
||||
// Used by IAR module to do password checks
|
||||
m_httpServer.AddXmlRPCHandler("authenticate_user_by_password", XmlRPCAuthenticateUserMethodPassword);
|
||||
m_httpServer.AddXmlRPCHandler("authenticate_user_by_password", XmlRPCAuthenticateUserMethodPassword, false);
|
||||
|
||||
m_httpServer.AddXmlRPCHandler("update_user_current_region", XmlRPCAtRegion);
|
||||
m_httpServer.AddXmlRPCHandler("logout_of_simulator", XmlRPCLogOffUserMethodUUID);
|
||||
m_httpServer.AddXmlRPCHandler("get_agent_by_uuid", XmlRPCGetAgentMethodUUID);
|
||||
m_httpServer.AddXmlRPCHandler("update_user_current_region", XmlRPCAtRegion, false);
|
||||
m_httpServer.AddXmlRPCHandler("logout_of_simulator", XmlRPCLogOffUserMethodUUID, false);
|
||||
m_httpServer.AddXmlRPCHandler("get_agent_by_uuid", XmlRPCGetAgentMethodUUID, false);
|
||||
|
||||
m_httpServer.AddXmlRPCHandler("update_user_profile", XmlRpcResponseXmlRPCUpdateUserProfile);
|
||||
m_httpServer.AddXmlRPCHandler("update_user_profile", XmlRpcResponseXmlRPCUpdateUserProfile, false);
|
||||
|
||||
m_httpServer.AddStreamHandler(new RestStreamHandler("DELETE", "/usersessions/", RestDeleteUserSessionMethod));
|
||||
}
|
||||
|
|
|
@ -67,8 +67,8 @@ namespace OpenSim.Grid.UserServer.Modules
|
|||
{
|
||||
m_httpServer = httpServer;
|
||||
|
||||
m_httpServer.AddXmlRPCHandler("get_avatar_appearance", XmlRPCGetAvatarAppearance);
|
||||
m_httpServer.AddXmlRPCHandler("update_avatar_appearance", XmlRPCUpdateAvatarAppearance);
|
||||
m_httpServer.AddXmlRPCHandler("get_avatar_appearance", XmlRPCGetAvatarAppearance, false);
|
||||
m_httpServer.AddXmlRPCHandler("update_avatar_appearance", XmlRPCUpdateAvatarAppearance, false);
|
||||
}
|
||||
|
||||
public XmlRpcResponse XmlRPCGetAvatarAppearance(XmlRpcRequest request, IPEndPoint remoteClient)
|
||||
|
|
|
@ -43,7 +43,7 @@ namespace OpenSim.Grid.UserServer.Modules
|
|||
{
|
||||
public class UserServerFriendsModule
|
||||
{
|
||||
//private static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType);
|
||||
private static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType);
|
||||
|
||||
private UserDataBaseService m_userDataBaseService;
|
||||
|
||||
|
@ -56,22 +56,20 @@ namespace OpenSim.Grid.UserServer.Modules
|
|||
|
||||
public void Initialise(IGridServiceCore core)
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
public void PostInitialise()
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
public void RegisterHandlers(BaseHttpServer httpServer)
|
||||
{
|
||||
m_httpServer = httpServer;
|
||||
|
||||
m_httpServer.AddXmlRPCHandler("add_new_user_friend", XmlRpcResponseXmlRPCAddUserFriend);
|
||||
m_httpServer.AddXmlRPCHandler("remove_user_friend", XmlRpcResponseXmlRPCRemoveUserFriend);
|
||||
m_httpServer.AddXmlRPCHandler("update_user_friend_perms", XmlRpcResponseXmlRPCUpdateUserFriendPerms);
|
||||
m_httpServer.AddXmlRPCHandler("get_user_friend_list", XmlRpcResponseXmlRPCGetUserFriendList);
|
||||
m_httpServer.AddXmlRPCHandler("add_new_user_friend", XmlRpcResponseXmlRPCAddUserFriend, false);
|
||||
m_httpServer.AddXmlRPCHandler("remove_user_friend", XmlRpcResponseXmlRPCRemoveUserFriend, false);
|
||||
m_httpServer.AddXmlRPCHandler("update_user_friend_perms", XmlRpcResponseXmlRPCUpdateUserFriendPerms, false);
|
||||
m_httpServer.AddXmlRPCHandler("get_user_friend_list", XmlRpcResponseXmlRPCGetUserFriendList, false);
|
||||
}
|
||||
|
||||
public XmlRpcResponse FriendListItemListtoXmlRPCResponse(List<FriendListItem> returnUsers)
|
||||
|
@ -158,7 +156,10 @@ namespace OpenSim.Grid.UserServer.Modules
|
|||
}
|
||||
|
||||
public XmlRpcResponse XmlRpcResponseXmlRPCGetUserFriendList(XmlRpcRequest request, IPEndPoint remoteClient)
|
||||
{
|
||||
{
|
||||
m_log.DebugFormat(
|
||||
"[USER SERVER FRIENDS MODULE]: BEGIN XmlRpcResponseXmlRPCGetUserFriendList from {0}", remoteClient);
|
||||
|
||||
// XmlRpcResponse response = new XmlRpcResponse();
|
||||
Hashtable requestData = (Hashtable)request.Params[0];
|
||||
// Hashtable responseData = new Hashtable();
|
||||
|
@ -168,7 +169,10 @@ namespace OpenSim.Grid.UserServer.Modules
|
|||
if (requestData.Contains("ownerID"))
|
||||
{
|
||||
returndata = m_userDataBaseService.GetUserFriendList(new UUID((string)requestData["ownerID"]));
|
||||
}
|
||||
}
|
||||
|
||||
m_log.DebugFormat(
|
||||
"[USER SERVER FRIENDS MODULE]: END XmlRpcResponseXmlRPCGetUserFriendList from {0}", remoteClient);
|
||||
|
||||
return FriendListItemListtoXmlRPCResponse(returndata);
|
||||
}
|
||||
|
|
|
@ -155,7 +155,7 @@ namespace OpenSim.Region.CoreModules.ServiceConnectorsOut.Grid
|
|||
((ISharedRegionModule)m_GridServiceConnector).AddRegion(scene);
|
||||
|
||||
// Yikes!! Remove this as soon as user services get refactored
|
||||
LocalAssetServerURI = scene.CommsManager.NetworkServersInfo.UserURL;
|
||||
LocalAssetServerURI = scene.CommsManager.NetworkServersInfo.AssetURL;
|
||||
LocalInventoryServerURI = scene.CommsManager.NetworkServersInfo.InventoryURL;
|
||||
LocalUserServerURI = scene.CommsManager.NetworkServersInfo.UserURL;
|
||||
HGNetworkServersInfo.Init(LocalAssetServerURI, LocalInventoryServerURI, LocalUserServerURI);
|
||||
|
|
|
@ -454,6 +454,8 @@ namespace OpenSim.Region.CoreModules.World.Archiver
|
|||
/// <summary>
|
||||
/// Resolve path to a working FileStream
|
||||
/// </summary>
|
||||
/// <param name="path"></param>
|
||||
/// <returns></returns>
|
||||
private Stream GetStream(string path)
|
||||
{
|
||||
if (File.Exists(path))
|
||||
|
@ -500,8 +502,9 @@ namespace OpenSim.Region.CoreModules.World.Archiver
|
|||
WebResponse response = request.GetResponse();
|
||||
Stream file = response.GetResponseStream();
|
||||
|
||||
if (response.ContentType != "application/x-oar")
|
||||
throw new Exception(String.Format("{0} does not identify an OAR file", uri.ToString()));
|
||||
// justincc: gonna ignore the content type for now and just try anything
|
||||
//if (response.ContentType != "application/x-oar")
|
||||
// throw new Exception(String.Format("{0} does not identify an OAR file", uri.ToString()));
|
||||
|
||||
if (response.ContentLength == 0)
|
||||
throw new Exception(String.Format("{0} returned an empty file", uri.ToString()));
|
||||
|
|
|
@ -800,30 +800,31 @@ namespace OpenSim.Region.CoreModules.World.Permissions
|
|||
}
|
||||
|
||||
protected bool GenericParcelOwnerPermission(UUID user, ILandObject parcel, ulong groupPowers)
|
||||
{
|
||||
bool permission = false;
|
||||
|
||||
{
|
||||
if (parcel.LandData.OwnerID == user)
|
||||
{
|
||||
permission = true;
|
||||
// Returning immediately so that group deeded objects on group deeded land don't trigger a NRE on
|
||||
// the subsequent redundant checks when using lParcelMediaCommandList()
|
||||
// See http://opensimulator.org/mantis/view.php?id=3999 for more details
|
||||
return true;
|
||||
}
|
||||
|
||||
if (parcel.LandData.IsGroupOwned && IsGroupMember(parcel.LandData.GroupID, user, groupPowers))
|
||||
{
|
||||
permission = true;
|
||||
return true;
|
||||
}
|
||||
|
||||
if (IsEstateManager(user))
|
||||
{
|
||||
permission = true;
|
||||
return true;
|
||||
}
|
||||
|
||||
if (IsAdministrator(user))
|
||||
{
|
||||
permission = true;
|
||||
return true;
|
||||
}
|
||||
|
||||
return permission;
|
||||
return false;
|
||||
}
|
||||
|
||||
protected bool GenericParcelPermission(UUID user, Vector3 pos, ulong groupPowers)
|
||||
|
|
|
@ -1199,6 +1199,7 @@ namespace OpenSim.Region.Framework.Scenes
|
|||
|
||||
if (!silent)
|
||||
{
|
||||
part.UpdateFlag = 0;
|
||||
if (part == m_rootPart)
|
||||
avatars[i].ControllingClient.SendKillObject(m_regionHandle, part.LocalId);
|
||||
}
|
||||
|
|
|
@ -259,8 +259,9 @@ namespace OpenSim.Region.Framework.Scenes
|
|||
{
|
||||
m_log.ErrorFormat(
|
||||
"[PRIM INVENTORY]: " +
|
||||
"Couldn't start script {0}, {1} since asset ID {2} could not be found",
|
||||
item.Name, item.ItemID, item.AssetID);
|
||||
"Couldn't start script {0}, {1} at {2} in {3} since asset ID {4} could not be found",
|
||||
item.Name, item.ItemID, m_part.AbsolutePosition,
|
||||
m_part.ParentGroup.Scene.RegionInfo.RegionName, item.AssetID);
|
||||
}
|
||||
else
|
||||
{
|
||||
|
@ -312,8 +313,9 @@ namespace OpenSim.Region.Framework.Scenes
|
|||
{
|
||||
m_log.ErrorFormat(
|
||||
"[PRIM INVENTORY]: " +
|
||||
"Couldn't start script with ID {0} since it couldn't be found for prim {1}, {2}",
|
||||
itemId, m_part.Name, m_part.UUID);
|
||||
"Couldn't start script with ID {0} since it couldn't be found for prim {1}, {2} at {3} in {4}",
|
||||
itemId, m_part.Name, m_part.UUID,
|
||||
m_part.AbsolutePosition, m_part.ParentGroup.Scene.RegionInfo.RegionName);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -333,8 +335,9 @@ namespace OpenSim.Region.Framework.Scenes
|
|||
{
|
||||
m_log.ErrorFormat(
|
||||
"[PRIM INVENTORY]: " +
|
||||
"Couldn't stop script with ID {0} since it couldn't be found for prim {1}, {2}",
|
||||
itemId, m_part.Name, m_part.UUID);
|
||||
"Couldn't stop script with ID {0} since it couldn't be found for prim {1}, {2} at {3} in {4}",
|
||||
itemId, m_part.Name, m_part.UUID,
|
||||
m_part.AbsolutePosition, m_part.ParentGroup.Scene.RegionInfo.RegionName);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -522,8 +525,9 @@ namespace OpenSim.Region.Framework.Scenes
|
|||
{
|
||||
m_log.ErrorFormat(
|
||||
"[PRIM INVENTORY]: " +
|
||||
"Tried to retrieve item ID {0} from prim {1}, {2} but the item does not exist in this inventory",
|
||||
item.ItemID, m_part.Name, m_part.UUID);
|
||||
"Tried to retrieve item ID {0} from prim {1}, {2} at {3} in {4} but the item does not exist in this inventory",
|
||||
item.ItemID, m_part.Name, m_part.UUID,
|
||||
m_part.AbsolutePosition, m_part.ParentGroup.Scene.RegionInfo.RegionName);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -579,8 +583,9 @@ namespace OpenSim.Region.Framework.Scenes
|
|||
{
|
||||
m_log.ErrorFormat(
|
||||
"[PRIM INVENTORY]: " +
|
||||
"Tried to remove item ID {0} from prim {1}, {2} but the item does not exist in this inventory",
|
||||
itemID, m_part.Name, m_part.UUID);
|
||||
"Tried to remove item ID {0} from prim {1}, {2} at {3} in {4} but the item does not exist in this inventory",
|
||||
itemID, m_part.Name, m_part.UUID,
|
||||
m_part.AbsolutePosition, m_part.ParentGroup.Scene.RegionInfo.RegionName);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -226,6 +226,10 @@ namespace OpenSim.Server.Base
|
|||
"quit",
|
||||
"Quit the application", HandleQuit);
|
||||
|
||||
MainConsole.Instance.Commands.AddCommand("base", false, "shutdown",
|
||||
"shutdown",
|
||||
"Quit the application", HandleQuit);
|
||||
|
||||
// Allow derived classes to perform initialization that
|
||||
// needs to be done after the console has opened
|
||||
//
|
||||
|
|
|
@ -342,7 +342,7 @@
|
|||
|
||||
; The MessagingServer is a companion of the UserServer. It uses
|
||||
; user_send_key and user_recv_key, too
|
||||
;messaging_server_url = "http://127.0.0.1:8006"
|
||||
messaging_server_url = "http://127.0.0.1:8006"
|
||||
|
||||
; What is reported as the "X-Secondlife-Shard"
|
||||
; Defaults to the user server url if not set
|
||||
|
@ -1152,7 +1152,6 @@
|
|||
safemode = false
|
||||
|
||||
[VivoxVoice]
|
||||
|
||||
; The VivoxVoice module will allow you to provide voice on your
|
||||
; region(s). It uses the same voice technology as the LL grid and
|
||||
; works with recent LL clients (we have tested 1.22.9.110075, so
|
||||
|
@ -1293,6 +1292,15 @@
|
|||
RootReprioritizationDistance = 10.0
|
||||
ChildReprioritizationDistance = 20.0
|
||||
|
||||
|
||||
[WebStats]
|
||||
; View region statistics via a web page
|
||||
; See http://opensimulator.org/wiki/FAQ#Region_Statistics_on_a_Web_Page
|
||||
; Use a web browser and type in the "Login URI" + "/SStats/"
|
||||
; For example- http://127.0.0.1:9000/SStats/
|
||||
; enabled=false
|
||||
|
||||
|
||||
;;
|
||||
;; These are defaults that are overwritten below in [Architecture].
|
||||
;; These defaults allow OpenSim to work out of the box with
|
||||
|
|
Loading…
Reference in New Issue