Merge branch 'master' of ssh://diva@opensimulator.org/var/git/opensim

This commit is contained in:
Diva Canto
2009-09-26 07:49:04 -07:00
15 changed files with 112 additions and 34 deletions

View File

@@ -118,6 +118,10 @@ namespace OpenSim.Region.CoreModules.Avatar.Inventory.Archiver
protected void ReceivedAllAssets(ICollection<UUID> assetsFoundUuids, ICollection<UUID> assetsNotFoundUuids)
{
// We're almost done. Just need to write out the control file now
m_archiveWriter.WriteFile(ArchiveConstants.CONTROL_FILE_PATH, Create0p1ControlFile());
m_log.InfoFormat("[ARCHIVER]: Added control file to archive.");
Exception reportedException = null;
bool succeeded = true;
@@ -320,7 +324,9 @@ namespace OpenSim.Region.CoreModules.Avatar.Inventory.Archiver
SaveInvFolder(inventoryFolder, ArchiveConstants.INVENTORY_PATH, !foundStar);
}
SaveUsers();
// Don't put all this profile information into the archive right now.
//SaveUsers();
new AssetsRequest(
new AssetsArchiver(m_archiveWriter), m_assetUuids.Keys,
m_scene.AssetService, ReceivedAllAssets).Execute();
@@ -409,5 +415,29 @@ namespace OpenSim.Region.CoreModules.Avatar.Inventory.Archiver
ArchiveConstants.INVENTORY_NODE_NAME_COMPONENT_SEPARATOR,
id);
}
/// <summary>
/// Create the control file for a 0.1 version archive
/// </summary>
/// <returns></returns>
public static string Create0p1ControlFile()
{
StringWriter sw = new StringWriter();
XmlTextWriter xtw = new XmlTextWriter(sw);
xtw.Formatting = Formatting.Indented;
xtw.WriteStartDocument();
xtw.WriteStartElement("archive");
xtw.WriteAttributeString("major_version", "0");
xtw.WriteAttributeString("minor_version", "1");
xtw.WriteEndElement();
xtw.Flush();
xtw.Close();
String s = sw.ToString();
sw.Close();
return s;
}
}
}

View File

@@ -200,11 +200,10 @@ namespace OpenSim.Region.CoreModules.Scripting.LSLHttp
if (m_RequestMap.ContainsKey(request))
{
UrlData urlData = m_RequestMap[request];
RequestData requestData=urlData.requests[request];
urlData.requests[request].responseCode = status;
urlData.requests[request].responseBody = body;
//urlData.requests[request].ev.Set();
urlData.requests[request].requestDone=true;
urlData.requests[request].requestDone =true;
}
else
{
@@ -397,7 +396,7 @@ namespace OpenSim.Region.CoreModules.Scripting.LSLHttp
{
Hashtable headers = (Hashtable)request["headers"];
string uri_full = "http://" + m_ExternalHostNameForLSL + ":" + m_HttpServer.Port.ToString() + uri;// "/lslhttp/" + urlcode.ToString() + "/";
// string uri_full = "http://" + m_ExternalHostNameForLSL + ":" + m_HttpServer.Port.ToString() + uri;// "/lslhttp/" + urlcode.ToString() + "/";
int pos1 = uri.IndexOf("/");// /lslhttp
int pos2 = uri.IndexOf("/", pos1 + 1);// /lslhttp/
@@ -471,7 +470,7 @@ namespace OpenSim.Region.CoreModules.Scripting.LSLHttp
url.engine.PostScriptEvent(url.itemID, "http_request", new Object[] { requestID.ToString(), request["http-method"].ToString(), request["body"].ToString() });
//send initial response?
Hashtable response = new Hashtable();
// Hashtable response = new Hashtable();
return;

View File

@@ -79,12 +79,12 @@ namespace OpenSim.Region.CoreModules.World.Land
{
if (!enabledYN)
return;
/*
// For testing on a single instance
if (scene.RegionInfo.RegionLocX == 1004 && scene.RegionInfo.RegionLocY == 1000)
return;
//
//
*/
lock (m_startingScenes)
m_startingScenes.Add(scene.RegionInfo.originRegionID, scene);