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