diff options
author | Dr Scofield | 2009-06-03 12:48:04 +0000 |
---|---|---|
committer | Dr Scofield | 2009-06-03 12:48:04 +0000 |
commit | 717fd3b5b91f54113ef554799f124275d5489ea1 (patch) | |
tree | 64748d1b66ada5dc3d3a97d80547c18570d05e14 /OpenSim/Region/CoreModules/World/Archiver/ArchiveWriteRequestExecution.cs | |
parent | From: Chris Yeoh <yeohc@au1.ibm.com> (diff) | |
download | opensim-SC_OLD-717fd3b5b91f54113ef554799f124275d5489ea1.zip opensim-SC_OLD-717fd3b5b91f54113ef554799f124275d5489ea1.tar.gz opensim-SC_OLD-717fd3b5b91f54113ef554799f124275d5489ea1.tar.bz2 opensim-SC_OLD-717fd3b5b91f54113ef554799f124275d5489ea1.tar.xz |
From: Chris Yeoh <yeohc@au1.ibm.com>
This patch adds oar file date and time (UTC) meta data to an oar file
when it is created. It also adds a unique ID, though this id does not
in anyway identify the machine that the oar file was created on.
When an oar file with this meta data is loaded this extra information
is saved with the region settings and available via LSL through:
- osLoadedCreationDate()
- osLoadedCreationTime()
- osLoadedCreationID()
If there is no meta data these fields will be blank. Subsequent oar
file loads will erase the information for the previous oar file
load. Persistence has only been implemented for MySQL, the other
backends need updating.
Overall this allows us to much more easily identify the specific version of
software that clients are using. Its very straightforward to edit the oar file
to change the ID string to be something more human friendly.
Included in the patch is a new file OpenSim/Data/MySQL/Resources/030_RegionStore.sql
required for the MySQL DB migration.
btw I had a chat with justincc about this a few weeks ago since he
wrote the oar file import/export and he sounded happy to accept
something that included date/time information but didn't want anything
that would silently leak private information like machine names.
Diffstat (limited to '')
-rw-r--r-- | OpenSim/Region/CoreModules/World/Archiver/ArchiveWriteRequestExecution.cs | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/OpenSim/Region/CoreModules/World/Archiver/ArchiveWriteRequestExecution.cs b/OpenSim/Region/CoreModules/World/Archiver/ArchiveWriteRequestExecution.cs index 05b51ed..e9b24f4 100644 --- a/OpenSim/Region/CoreModules/World/Archiver/ArchiveWriteRequestExecution.cs +++ b/OpenSim/Region/CoreModules/World/Archiver/ArchiveWriteRequestExecution.cs | |||
@@ -154,8 +154,16 @@ namespace OpenSim.Region.CoreModules.World.Archiver | |||
154 | xtw.WriteStartElement("archive"); | 154 | xtw.WriteStartElement("archive"); |
155 | xtw.WriteAttributeString("major_version", "0"); | 155 | xtw.WriteAttributeString("major_version", "0"); |
156 | xtw.WriteAttributeString("minor_version", "2"); | 156 | xtw.WriteAttributeString("minor_version", "2"); |
157 | |||
158 | xtw.WriteStartElement("creation_info"); | ||
159 | DateTime now = DateTime.UtcNow; | ||
160 | xtw.WriteElementString("date", now.ToLongDateString()); | ||
161 | xtw.WriteElementString("time", now.ToLongTimeString()); | ||
162 | xtw.WriteElementString("id", UUID.Random().ToString()); | ||
163 | xtw.WriteEndElement(); | ||
157 | xtw.WriteEndElement(); | 164 | xtw.WriteEndElement(); |
158 | 165 | ||
166 | |||
159 | xtw.Flush(); | 167 | xtw.Flush(); |
160 | xtw.Close(); | 168 | xtw.Close(); |
161 | 169 | ||