* minor: fix log message printed when unrecognized elements are found in inventory rest input xml

0.6.1-post-fixes
Justin Clarke Casey 2008-12-01 17:49:52 +00:00
parent c8abe037a5
commit 5a0fa4f34c
2 changed files with 119 additions and 135 deletions

View File

@ -247,10 +247,8 @@ namespace OpenSim.ApplicationPlugins.Rest.Inventory
/// The only parameter we recognize is a UUID. The enclosed asset data (base-64 encoded)
/// is decoded and stored in the database, identified by the supplied UUID.
/// </summary>
private void DoPut(AssetRequestData rdata)
{
bool modified = false;
bool created = false;

View File

@ -121,7 +121,6 @@ namespace OpenSim.ApplicationPlugins.Rest.Inventory
/// This property is declared locally because it is used a lot and
/// brevity is nice.
/// </summary>
internal string MsgId
{
get { return Rest.MsgId; }
@ -139,7 +138,6 @@ namespace OpenSim.ApplicationPlugins.Rest.Inventory
/// <param name=response>Outbound HTTP request information</param>
/// <param name=qPrefix>REST service domain prefix</param>
/// <returns>A RequestData instance suitable for this service</returns>
private RequestData Allocate(OSHttpRequest request, OSHttpResponse response, string prefix)
{
return (RequestData) new InventoryRequestData(request, response, prefix);
@ -152,7 +150,6 @@ namespace OpenSim.ApplicationPlugins.Rest.Inventory
/// It handles all aspects of inventory REST processing, i.e. /admin/inventory
/// </summary>
/// <param name=hdata>A consolidated HTTP request work area</param>
private void DoInventory(RequestData hdata)
{
InventoryRequestData rdata = (InventoryRequestData) hdata;
@ -295,7 +292,6 @@ namespace OpenSim.ApplicationPlugins.Rest.Inventory
Rest.Log.DebugFormat("{0} Inventory catalog requested for {1} {2}",
MsgId, rdata.userProfile.FirstName, rdata.userProfile.SurName);
lock (rdata)
{
if (!rdata.HaveInventory)
@ -373,7 +369,6 @@ namespace OpenSim.ApplicationPlugins.Rest.Inventory
/// corresponding subtree based upon node name.
/// </summary>
/// <param name=rdata>HTTP service request work area</param>
private void DoGet(InventoryRequestData rdata)
{
rdata.initXmlWriter();
@ -439,7 +434,6 @@ namespace OpenSim.ApplicationPlugins.Rest.Inventory
/// context identified by the URI.
/// </summary>
/// <param name=rdata>HTTP service request work area</param>
private void DoExtend(InventoryRequestData rdata)
{
bool created = false;
@ -667,7 +661,6 @@ namespace OpenSim.ApplicationPlugins.Rest.Inventory
/// during the reconstitution process.
/// </summary>
/// <param name=rdata>HTTP service request work area</param>
private void DoUpdate(InventoryRequestData rdata)
{
int count = 0;
@ -1303,7 +1296,6 @@ namespace OpenSim.ApplicationPlugins.Rest.Inventory
/// <param name=rdata>HTTP service request work area</param>
/// <param name=i>The item to be formatted</param>
/// <param name=indent>Pretty print indentation</param>
private void formatItem(InventoryRequestData rdata, InventoryItemBase i, string indent)
{
Rest.Log.DebugFormat("{0} Item : {1} {2} {3} Type = {4}, AssetType = {5}",
@ -1349,7 +1341,6 @@ namespace OpenSim.ApplicationPlugins.Rest.Inventory
/// that required it cannot be completed, and it fails accordingly.
/// </summary>
/// <param name=rdata>HTTP service request work area</param>
private InventoryFolderBase GetTrashCan(InventoryRequestData rdata)
{
InventoryFolderBase TrashCan = null;
@ -1394,7 +1385,6 @@ namespace OpenSim.ApplicationPlugins.Rest.Inventory
/// </summary>
/// <param name=newf>Folder obtained from enclosed entity</param>
/// <param name=oldf>Folder obtained from the user's inventory</param>
private bool FolderHasChanged(InventoryFolderBase newf, InventoryFolderBase oldf)
{
return (newf.Name != oldf.Name
@ -1411,7 +1401,6 @@ namespace OpenSim.ApplicationPlugins.Rest.Inventory
/// </summary>
/// <param name=newf>Item obtained from enclosed entity</param>
/// <param name=oldf>Item obtained from the user's inventory</param>
private bool ItemHasChanged(InventoryItemBase newf, InventoryItemBase oldf)
{
return (newf.Name != oldf.Name
@ -1449,7 +1438,6 @@ namespace OpenSim.ApplicationPlugins.Rest.Inventory
/// missing parent IDs are resolved).
/// </summary>
/// <param name=rdata>HTTP service request work area</param>
internal XmlInventoryCollection ReconstituteEntity(InventoryRequestData rdata)
{
Rest.Log.DebugFormat("{0} Reconstituting entity", MsgId);
@ -1509,6 +1497,7 @@ namespace OpenSim.ApplicationPlugins.Rest.Inventory
Validate(ic);
}
break;
case XmlNodeType.EndElement :
switch (ic.xml.Name)
{
@ -1536,8 +1525,9 @@ namespace OpenSim.ApplicationPlugins.Rest.Inventory
break;
}
break;
default :
Rest.Log.DebugFormat("{0} [0] Ignoring: <{1}>:<2>",
Rest.Log.DebugFormat("{0} Ignoring: <{1}>:<{2}>",
MsgId, ic.xml.NodeType, ic.xml.Value);
break;
}
@ -1688,7 +1678,6 @@ namespace OpenSim.ApplicationPlugins.Rest.Inventory
/// All context is reset whenever the effective folder changes
/// or an item is successfully validated.
/// </summary>
private void CollectItem(XmlInventoryCollection ic)
{
Rest.Log.DebugFormat("{0} Interpret item element", MsgId);
@ -1793,7 +1782,6 @@ namespace OpenSim.ApplicationPlugins.Rest.Inventory
/// An asset, if created is stored in the
/// XmlInventoryCollection
/// </summary>
private void CollectAsset(XmlInventoryCollection ic)
{
Rest.Log.DebugFormat("{0} Interpret asset element", MsgId);
@ -1885,7 +1873,7 @@ namespace OpenSim.ApplicationPlugins.Rest.Inventory
{
string b64string = null;
// Generate a UUID of none were given, and generally none should
// Generate a UUID if none were given, and generally none should
// be. Ever.
if (uuid == UUID.Zero)
@ -1927,7 +1915,6 @@ namespace OpenSim.ApplicationPlugins.Rest.Inventory
}
ic.Push(asset);
}
/// <summary>
@ -1935,7 +1922,6 @@ namespace OpenSim.ApplicationPlugins.Rest.Inventory
/// This overrides the default permissions set when the
/// XmlInventoryCollection object was created.
/// </summary>
private void CollectPermissions(XmlInventoryCollection ic)
{
if (ic.xml.HasAttributes)