aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Services
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--OpenSim/Services/AssetService/AssetService.cs20
1 files changed, 17 insertions, 3 deletions
diff --git a/OpenSim/Services/AssetService/AssetService.cs b/OpenSim/Services/AssetService/AssetService.cs
index d6e5141..c279699 100644
--- a/OpenSim/Services/AssetService/AssetService.cs
+++ b/OpenSim/Services/AssetService/AssetService.cs
@@ -74,17 +74,31 @@ namespace OpenSim.Services.AssetService
74 74
75 public AssetMetadata GetMetadata(string id) 75 public AssetMetadata GetMetadata(string id)
76 { 76 {
77 return null; 77 UUID assetID;
78
79 if (!UUID.TryParse(id, out assetID))
80 return null;
81
82 AssetBase asset = m_Database.FetchAsset(assetID);
83 return asset.Metadata;
78 } 84 }
79 85
80 public byte[] GetData(string id) 86 public byte[] GetData(string id)
81 { 87 {
82 return null; 88 UUID assetID;
89
90 if (!UUID.TryParse(id, out assetID))
91 return null;
92
93 AssetBase asset = m_Database.FetchAsset(assetID);
94 return asset.Data;
83 } 95 }
84 96
85 public string Store(AssetBase asset) 97 public string Store(AssetBase asset)
86 { 98 {
87 return String.Empty; 99 m_Database.CreateAsset(asset);
100
101 return asset.ID;
88 } 102 }
89 103
90 public bool UpdateContent(string id, byte[] data) 104 public bool UpdateContent(string id, byte[] data)