diff options
Diffstat (limited to 'OpenSim/Framework')
8 files changed, 135 insertions, 97 deletions
diff --git a/OpenSim/Framework/AssetBase.cs b/OpenSim/Framework/AssetBase.cs index dfe559e..f3dd70a 100644 --- a/OpenSim/Framework/AssetBase.cs +++ b/OpenSim/Framework/AssetBase.cs | |||
@@ -33,128 +33,166 @@ namespace OpenSim.Framework | |||
33 | [Serializable] | 33 | [Serializable] |
34 | public class AssetBase | 34 | public class AssetBase |
35 | { | 35 | { |
36 | private byte[] _data; | 36 | private byte[] m_data; |
37 | private AssetMetadata _metadata; | 37 | private AssetMetadata m_metadata; |
38 | 38 | ||
39 | public AssetBase() | 39 | public AssetBase() |
40 | { | 40 | { |
41 | Metadata = new AssetMetadata(); | 41 | m_metadata = new AssetMetadata(); |
42 | } | 42 | } |
43 | 43 | ||
44 | public AssetBase(UUID assetId, string name) | 44 | public AssetBase(UUID assetId, string name) |
45 | { | 45 | { |
46 | Metadata = new AssetMetadata(); | 46 | m_metadata = new AssetMetadata(); |
47 | Metadata.FullID = assetId; | 47 | m_metadata.FullID = assetId; |
48 | Metadata.Name = name; | 48 | m_metadata.Name = name; |
49 | } | 49 | } |
50 | 50 | ||
51 | public virtual byte[] Data | 51 | public virtual byte[] Data |
52 | { | 52 | { |
53 | get { return _data; } | 53 | get { return m_data; } |
54 | set { _data = value; } | 54 | set { m_data = value; } |
55 | } | 55 | } |
56 | 56 | ||
57 | public virtual AssetMetadata Metadata | 57 | public UUID FullID |
58 | { | 58 | { |
59 | get { return _metadata; } | 59 | get { return m_metadata.FullID; } |
60 | set { _metadata = value; } | 60 | set { m_metadata.FullID = value; } |
61 | } | 61 | } |
62 | 62 | ||
63 | // We expose FullID here because the NHibernate mappers require a | 63 | public string ID |
64 | // property on the AssetBase class for its primary key (see | 64 | { |
65 | // OpenSim/Data/NHibernate/Resources/AssetBase.hbm.xml). | 65 | get { return m_metadata.ID; } |
66 | public UUID FullID | 66 | set { m_metadata.ID = value; } |
67 | } | ||
68 | |||
69 | public string Name | ||
70 | { | ||
71 | get { return m_metadata.Name; } | ||
72 | set { m_metadata.Name = value; } | ||
73 | } | ||
74 | |||
75 | public string Description | ||
76 | { | ||
77 | get { return m_metadata.Description; } | ||
78 | set { m_metadata.Description = value; } | ||
79 | } | ||
80 | |||
81 | public sbyte Type | ||
67 | { | 82 | { |
68 | get { return Metadata.FullID; } | 83 | get { return m_metadata.Type; } |
69 | set { Metadata.FullID = value; } | 84 | set { m_metadata.Type = value; } |
85 | } | ||
86 | |||
87 | public bool Local | ||
88 | { | ||
89 | get { return m_metadata.Local; } | ||
90 | set { m_metadata.Local = value; } | ||
91 | } | ||
92 | |||
93 | public bool Temporary | ||
94 | { | ||
95 | get { return m_metadata.Temporary; } | ||
96 | set { m_metadata.Temporary = value; } | ||
97 | } | ||
98 | |||
99 | // We have methods here because properties are serialized, and we don't | ||
100 | // want that. | ||
101 | public virtual AssetMetadata getMetadata() | ||
102 | { | ||
103 | return m_metadata; | ||
104 | } | ||
105 | |||
106 | public virtual void setMetadata(AssetMetadata metadata) | ||
107 | { | ||
108 | m_metadata = metadata; | ||
70 | } | 109 | } |
71 | } | 110 | } |
72 | 111 | ||
73 | [Serializable] | ||
74 | public class AssetMetadata | 112 | public class AssetMetadata |
75 | { | 113 | { |
76 | private UUID _fullid; | 114 | private UUID m_fullid; |
77 | private string _name = String.Empty; | 115 | private string m_name = String.Empty; |
78 | private string _description = String.Empty; | 116 | private string m_description = String.Empty; |
79 | private DateTime _creation_date; | 117 | private DateTime m_creation_date; |
80 | private sbyte _type; | 118 | private sbyte m_type; |
81 | private string _content_type; | 119 | private string m_content_type; |
82 | private byte[] _sha1; | 120 | private byte[] m_sha1; |
83 | private bool _local = false; | 121 | private bool m_local = false; |
84 | private bool _temporary = false; | 122 | private bool m_temporary = false; |
85 | //private Dictionary<string, Uri> _methods = new Dictionary<string, Uri>(); | 123 | //private Dictionary<string, Uri> m_methods = new Dictionary<string, Uri>(); |
86 | //private OSDMap _extra_data; | 124 | //private OSDMap m_extra_data; |
87 | 125 | ||
88 | public UUID FullID | 126 | public UUID FullID |
89 | { | 127 | { |
90 | get { return _fullid; } | 128 | get { return m_fullid; } |
91 | set { _fullid = value; } | 129 | set { m_fullid = value; } |
92 | } | 130 | } |
93 | 131 | ||
94 | public string ID | 132 | public string ID |
95 | { | 133 | { |
96 | get { return _fullid.ToString(); } | 134 | get { return m_fullid.ToString(); } |
97 | set { _fullid = new UUID(value); } | 135 | set { m_fullid = new UUID(value); } |
98 | } | 136 | } |
99 | 137 | ||
100 | public string Name | 138 | public string Name |
101 | { | 139 | { |
102 | get { return _name; } | 140 | get { return m_name; } |
103 | set { _name = value; } | 141 | set { m_name = value; } |
104 | } | 142 | } |
105 | 143 | ||
106 | public string Description | 144 | public string Description |
107 | { | 145 | { |
108 | get { return _description; } | 146 | get { return m_description; } |
109 | set { _description = value; } | 147 | set { m_description = value; } |
110 | } | 148 | } |
111 | 149 | ||
112 | public DateTime CreationDate | 150 | public DateTime CreationDate |
113 | { | 151 | { |
114 | get { return _creation_date; } | 152 | get { return m_creation_date; } |
115 | set { _creation_date = value; } | 153 | set { m_creation_date = value; } |
116 | } | 154 | } |
117 | 155 | ||
118 | public sbyte Type | 156 | public sbyte Type |
119 | { | 157 | { |
120 | get { return _type; } | 158 | get { return m_type; } |
121 | set { _type = value; } | 159 | set { m_type = value; } |
122 | } | 160 | } |
123 | 161 | ||
124 | public string ContentType | 162 | public string ContentType |
125 | { | 163 | { |
126 | get { return _content_type; } | 164 | get { return m_content_type; } |
127 | set { _content_type = value; } | 165 | set { m_content_type = value; } |
128 | } | 166 | } |
129 | 167 | ||
130 | public byte[] SHA1 | 168 | public byte[] SHA1 |
131 | { | 169 | { |
132 | get { return _sha1; } | 170 | get { return m_sha1; } |
133 | set { _sha1 = value; } | 171 | set { m_sha1 = value; } |
134 | } | 172 | } |
135 | 173 | ||
136 | public bool Local | 174 | public bool Local |
137 | { | 175 | { |
138 | get { return _local; } | 176 | get { return m_local; } |
139 | set { _local = value; } | 177 | set { m_local = value; } |
140 | } | 178 | } |
141 | 179 | ||
142 | public bool Temporary | 180 | public bool Temporary |
143 | { | 181 | { |
144 | get { return _temporary; } | 182 | get { return m_temporary; } |
145 | set { _temporary = value; } | 183 | set { m_temporary = value; } |
146 | } | 184 | } |
147 | 185 | ||
148 | //public Dictionary<string, Uri> Methods | 186 | //public Dictionary<string, Uri> Methods |
149 | //{ | 187 | //{ |
150 | // get { return _methods; } | 188 | // get { return m_methods; } |
151 | // set { _methods = value; } | 189 | // set { m_methods = value; } |
152 | //} | 190 | //} |
153 | 191 | ||
154 | //public OSDMap ExtraData | 192 | //public OSDMap ExtraData |
155 | //{ | 193 | //{ |
156 | // get { return _extra_data; } | 194 | // get { return m_extra_data; } |
157 | // set { _extra_data = value; } | 195 | // set { m_extra_data = value; } |
158 | //} | 196 | //} |
159 | } | 197 | } |
160 | } | 198 | } |
diff --git a/OpenSim/Framework/AssetLandmark.cs b/OpenSim/Framework/AssetLandmark.cs index bbf25d8..d636d34 100644 --- a/OpenSim/Framework/AssetLandmark.cs +++ b/OpenSim/Framework/AssetLandmark.cs | |||
@@ -40,10 +40,10 @@ namespace OpenSim.Framework | |||
40 | public AssetLandmark(AssetBase a) | 40 | public AssetLandmark(AssetBase a) |
41 | { | 41 | { |
42 | Data = a.Data; | 42 | Data = a.Data; |
43 | Metadata.FullID = a.Metadata.FullID; | 43 | FullID = a.FullID; |
44 | Metadata.Type = a.Metadata.Type; | 44 | Type = a.Type; |
45 | Metadata.Name = a.Metadata.Name; | 45 | Name = a.Name; |
46 | Metadata.Description = a.Metadata.Description; | 46 | Description = a.Description; |
47 | InternData(); | 47 | InternData(); |
48 | } | 48 | } |
49 | 49 | ||
diff --git a/OpenSim/Framework/AssetLoader/Filesystem/AssetLoaderFileSystem.cs b/OpenSim/Framework/AssetLoader/Filesystem/AssetLoaderFileSystem.cs index 01cbfce..378eff5 100644 --- a/OpenSim/Framework/AssetLoader/Filesystem/AssetLoaderFileSystem.cs +++ b/OpenSim/Framework/AssetLoader/Filesystem/AssetLoaderFileSystem.cs | |||
@@ -145,7 +145,7 @@ namespace OpenSim.Framework.AssetLoader.Filesystem | |||
145 | 145 | ||
146 | AssetBase newAsset = CreateAsset(assetIdStr, name, assetPath, false); | 146 | AssetBase newAsset = CreateAsset(assetIdStr, name, assetPath, false); |
147 | 147 | ||
148 | newAsset.Metadata.Type = type; | 148 | newAsset.Type = type; |
149 | assets.Add(newAsset); | 149 | assets.Add(newAsset); |
150 | } | 150 | } |
151 | } | 151 | } |
diff --git a/OpenSim/Framework/Communications/Cache/AssetCache.cs b/OpenSim/Framework/Communications/Cache/AssetCache.cs index 76c6045..0e1f948 100644 --- a/OpenSim/Framework/Communications/Cache/AssetCache.cs +++ b/OpenSim/Framework/Communications/Cache/AssetCache.cs | |||
@@ -341,11 +341,11 @@ namespace OpenSim.Framework.Communications.Cache | |||
341 | /// <param name="asset"></param> | 341 | /// <param name="asset"></param> |
342 | public void AddAsset(AssetBase asset) | 342 | public void AddAsset(AssetBase asset) |
343 | { | 343 | { |
344 | if (!m_memcache.Contains(asset.Metadata.FullID)) | 344 | if (!m_memcache.Contains(asset.FullID)) |
345 | { | 345 | { |
346 | m_log.Info("[CACHE] Caching " + asset.Metadata.FullID + " for 24 hours from last access"); | 346 | m_log.Info("[CACHE] Caching " + asset.FullID + " for 24 hours from last access"); |
347 | // Use 24 hour rolling asset cache. | 347 | // Use 24 hour rolling asset cache. |
348 | m_memcache.AddOrUpdate(asset.Metadata.FullID, asset, TimeSpan.FromHours(24)); | 348 | m_memcache.AddOrUpdate(asset.FullID, asset, TimeSpan.FromHours(24)); |
349 | 349 | ||
350 | // According to http://wiki.secondlife.com/wiki/AssetUploadRequest, Local signifies that the | 350 | // According to http://wiki.secondlife.com/wiki/AssetUploadRequest, Local signifies that the |
351 | // information is stored locally. It could disappear, in which case we could send the | 351 | // information is stored locally. It could disappear, in which case we could send the |
@@ -365,7 +365,7 @@ namespace OpenSim.Framework.Communications.Cache | |||
365 | // But for now, we're going to take the easy way out and store local assets globally. | 365 | // But for now, we're going to take the easy way out and store local assets globally. |
366 | // | 366 | // |
367 | // TODO: Also, Temporary is now deprecated. We should start ignoring it and not passing it out from LLClientView. | 367 | // TODO: Also, Temporary is now deprecated. We should start ignoring it and not passing it out from LLClientView. |
368 | if (!asset.Metadata.Temporary || asset.Metadata.Local) | 368 | if (!asset.Temporary || asset.Local) |
369 | { | 369 | { |
370 | m_assetServer.StoreAsset(asset); | 370 | m_assetServer.StoreAsset(asset); |
371 | } | 371 | } |
@@ -396,25 +396,25 @@ namespace OpenSim.Framework.Communications.Cache | |||
396 | { | 396 | { |
397 | 397 | ||
398 | AssetInfo assetInf = new AssetInfo(asset); | 398 | AssetInfo assetInf = new AssetInfo(asset); |
399 | if (!m_memcache.Contains(assetInf.Metadata.FullID)) | 399 | if (!m_memcache.Contains(assetInf.FullID)) |
400 | { | 400 | { |
401 | m_memcache.AddOrUpdate(assetInf.Metadata.FullID, assetInf, TimeSpan.FromHours(24)); | 401 | m_memcache.AddOrUpdate(assetInf.FullID, assetInf, TimeSpan.FromHours(24)); |
402 | 402 | ||
403 | if (StatsManager.SimExtraStats != null) | 403 | if (StatsManager.SimExtraStats != null) |
404 | { | 404 | { |
405 | StatsManager.SimExtraStats.AddAsset(assetInf); | 405 | StatsManager.SimExtraStats.AddAsset(assetInf); |
406 | } | 406 | } |
407 | 407 | ||
408 | if (RequestedAssets.ContainsKey(assetInf.Metadata.FullID)) | 408 | if (RequestedAssets.ContainsKey(assetInf.FullID)) |
409 | { | 409 | { |
410 | AssetRequest req = RequestedAssets[assetInf.Metadata.FullID]; | 410 | AssetRequest req = RequestedAssets[assetInf.FullID]; |
411 | req.AssetInf = assetInf; | 411 | req.AssetInf = assetInf; |
412 | req.NumPackets = CalculateNumPackets(assetInf.Data); | 412 | req.NumPackets = CalculateNumPackets(assetInf.Data); |
413 | 413 | ||
414 | RequestedAssets.Remove(assetInf.Metadata.FullID); | 414 | RequestedAssets.Remove(assetInf.FullID); |
415 | // If it's a direct request for a script, drop it | 415 | // If it's a direct request for a script, drop it |
416 | // because it's a hacked client | 416 | // because it's a hacked client |
417 | if (req.AssetRequestSource != 2 || assetInf.Metadata.Type != 10) | 417 | if (req.AssetRequestSource != 2 || assetInf.Type != 10) |
418 | AssetRequests.Add(req); | 418 | AssetRequests.Add(req); |
419 | } | 419 | } |
420 | } | 420 | } |
@@ -424,8 +424,8 @@ namespace OpenSim.Framework.Communications.Cache | |||
424 | 424 | ||
425 | lock (RequestLists) | 425 | lock (RequestLists) |
426 | { | 426 | { |
427 | if (RequestLists.TryGetValue(asset.Metadata.FullID, out reqList)) | 427 | if (RequestLists.TryGetValue(asset.FullID, out reqList)) |
428 | RequestLists.Remove(asset.Metadata.FullID); | 428 | RequestLists.Remove(asset.FullID); |
429 | } | 429 | } |
430 | 430 | ||
431 | if (reqList != null) | 431 | if (reqList != null) |
@@ -436,8 +436,8 @@ namespace OpenSim.Framework.Communications.Cache | |||
436 | foreach (NewAssetRequest req in reqList.Requests) | 436 | foreach (NewAssetRequest req in reqList.Requests) |
437 | { | 437 | { |
438 | // Xantor 20080526 are we really calling all the callbacks if multiple queued for 1 request? -- Yes, checked | 438 | // Xantor 20080526 are we really calling all the callbacks if multiple queued for 1 request? -- Yes, checked |
439 | // m_log.DebugFormat("[ASSET CACHE]: Callback for asset {0}", asset.Metadata.FullID); | 439 | // m_log.DebugFormat("[ASSET CACHE]: Callback for asset {0}", asset.FullID); |
440 | req.Callback(asset.Metadata.FullID, asset); | 440 | req.Callback(asset.FullID, asset); |
441 | } | 441 | } |
442 | } | 442 | } |
443 | } | 443 | } |
@@ -545,7 +545,7 @@ namespace OpenSim.Framework.Communications.Cache | |||
545 | } | 545 | } |
546 | 546 | ||
547 | // Scripts cannot be retrieved by direct request | 547 | // Scripts cannot be retrieved by direct request |
548 | if (transferRequest.TransferInfo.SourceType == 2 && asset.Metadata.Type == 10) | 548 | if (transferRequest.TransferInfo.SourceType == 2 && asset.Type == 10) |
549 | return; | 549 | return; |
550 | 550 | ||
551 | // The asset is knosn to exist and is in our cache, so add it to the AssetRequests list | 551 | // The asset is knosn to exist and is in our cache, so add it to the AssetRequests list |
@@ -631,10 +631,10 @@ namespace OpenSim.Framework.Communications.Cache | |||
631 | public AssetInfo(AssetBase aBase) | 631 | public AssetInfo(AssetBase aBase) |
632 | { | 632 | { |
633 | Data = aBase.Data; | 633 | Data = aBase.Data; |
634 | Metadata.FullID = aBase.Metadata.FullID; | 634 | FullID = aBase.FullID; |
635 | Metadata.Type = aBase.Metadata.Type; | 635 | Type = aBase.Type; |
636 | Metadata.Name = aBase.Metadata.Name; | 636 | Name = aBase.Name; |
637 | Metadata.Description = aBase.Metadata.Description; | 637 | Description = aBase.Description; |
638 | } | 638 | } |
639 | } | 639 | } |
640 | 640 | ||
@@ -643,10 +643,10 @@ namespace OpenSim.Framework.Communications.Cache | |||
643 | public TextureImage(AssetBase aBase) | 643 | public TextureImage(AssetBase aBase) |
644 | { | 644 | { |
645 | Data = aBase.Data; | 645 | Data = aBase.Data; |
646 | Metadata.FullID = aBase.Metadata.FullID; | 646 | FullID = aBase.FullID; |
647 | Metadata.Type = aBase.Metadata.Type; | 647 | Type = aBase.Type; |
648 | Metadata.Name = aBase.Metadata.Name; | 648 | Name = aBase.Name; |
649 | Metadata.Description = aBase.Metadata.Description; | 649 | Description = aBase.Description; |
650 | } | 650 | } |
651 | } | 651 | } |
652 | 652 | ||
diff --git a/OpenSim/Framework/Communications/Cache/CryptoGridAssetClient.cs b/OpenSim/Framework/Communications/Cache/CryptoGridAssetClient.cs index 0f4e8ac..f1c19fa 100644 --- a/OpenSim/Framework/Communications/Cache/CryptoGridAssetClient.cs +++ b/OpenSim/Framework/Communications/Cache/CryptoGridAssetClient.cs | |||
@@ -441,17 +441,17 @@ namespace OpenSim.Framework.Communications.Cache | |||
441 | string salt = Convert.ToBase64String(rand); | 441 | string salt = Convert.ToBase64String(rand); |
442 | 442 | ||
443 | x.Data = UtilRijndael.Encrypt(x.Data, file.Secret, salt, "SHA1", 2, file.IVBytes, file.Keysize); | 443 | x.Data = UtilRijndael.Encrypt(x.Data, file.Secret, salt, "SHA1", 2, file.IVBytes, file.Keysize); |
444 | x.Metadata.Description = String.Format("ENCASS#:~:#{0}#:~:#{1}#:~:#{2}#:~:#{3}", | 444 | x.Description = String.Format("ENCASS#:~:#{0}#:~:#{1}#:~:#{2}#:~:#{3}", |
445 | "OPENSIM_AES_AF1", | 445 | "OPENSIM_AES_AF1", |
446 | file.AlsoKnownAs, | 446 | file.AlsoKnownAs, |
447 | salt, | 447 | salt, |
448 | x.Metadata.Description); | 448 | x.Description); |
449 | } | 449 | } |
450 | 450 | ||
451 | private bool DecryptAssetBase(AssetBase x) | 451 | private bool DecryptAssetBase(AssetBase x) |
452 | { | 452 | { |
453 | // Check it's encrypted first. | 453 | // Check it's encrypted first. |
454 | if (!x.Metadata.Description.Contains("ENCASS")) | 454 | if (!x.Description.Contains("ENCASS")) |
455 | return true; | 455 | return true; |
456 | 456 | ||
457 | // ENCASS:ALG:AKA:SALT:Description | 457 | // ENCASS:ALG:AKA:SALT:Description |
@@ -459,7 +459,7 @@ namespace OpenSim.Framework.Communications.Cache | |||
459 | string[] splitchars = new string[1]; | 459 | string[] splitchars = new string[1]; |
460 | splitchars[0] = "#:~:#"; | 460 | splitchars[0] = "#:~:#"; |
461 | 461 | ||
462 | string[] meta = x.Metadata.Description.Split(splitchars, StringSplitOptions.None); | 462 | string[] meta = x.Description.Split(splitchars, StringSplitOptions.None); |
463 | if (meta.Length < 5) | 463 | if (meta.Length < 5) |
464 | { | 464 | { |
465 | m_log.Warn("[ENCASSETS] Recieved Encrypted Asset, but header is corrupt"); | 465 | m_log.Warn("[ENCASSETS] Recieved Encrypted Asset, but header is corrupt"); |
@@ -470,7 +470,7 @@ namespace OpenSim.Framework.Communications.Cache | |||
470 | if (m_keyfiles.ContainsKey(meta[2])) | 470 | if (m_keyfiles.ContainsKey(meta[2])) |
471 | { | 471 | { |
472 | RjinKeyfile deckey = m_keyfiles[meta[2]]; | 472 | RjinKeyfile deckey = m_keyfiles[meta[2]]; |
473 | x.Metadata.Description = meta[4]; | 473 | x.Description = meta[4]; |
474 | switch (meta[1]) | 474 | switch (meta[1]) |
475 | { | 475 | { |
476 | case "OPENSIM_AES_AF1": | 476 | case "OPENSIM_AES_AF1": |
@@ -544,7 +544,7 @@ namespace OpenSim.Framework.Communications.Cache | |||
544 | { | 544 | { |
545 | string assetUrl = _assetServerUrl + "/assets/"; | 545 | string assetUrl = _assetServerUrl + "/assets/"; |
546 | 546 | ||
547 | m_log.InfoFormat("[CRYPTO GRID ASSET CLIENT]: Sending store request for asset {0}", asset.Metadata.FullID); | 547 | m_log.InfoFormat("[CRYPTO GRID ASSET CLIENT]: Sending store request for asset {0}", asset.FullID); |
548 | 548 | ||
549 | RestObjectPoster.BeginPostObject<AssetBase>(assetUrl, asset); | 549 | RestObjectPoster.BeginPostObject<AssetBase>(assetUrl, asset); |
550 | } | 550 | } |
diff --git a/OpenSim/Framework/Communications/Cache/FileAssetClient.cs b/OpenSim/Framework/Communications/Cache/FileAssetClient.cs index e6574a1..8d03f56 100644 --- a/OpenSim/Framework/Communications/Cache/FileAssetClient.cs +++ b/OpenSim/Framework/Communications/Cache/FileAssetClient.cs | |||
@@ -79,7 +79,7 @@ namespace OpenSim.Framework.Communications.Cache | |||
79 | 79 | ||
80 | public override void StoreAsset(AssetBase asset) | 80 | public override void StoreAsset(AssetBase asset) |
81 | { | 81 | { |
82 | byte[] idBytes = asset.Metadata.FullID.Guid.ToByteArray(); | 82 | byte[] idBytes = asset.FullID.Guid.ToByteArray(); |
83 | 83 | ||
84 | string cdir = m_dir + Path.DirectorySeparatorChar + idBytes[0] | 84 | string cdir = m_dir + Path.DirectorySeparatorChar + idBytes[0] |
85 | + Path.DirectorySeparatorChar + idBytes[1]; | 85 | + Path.DirectorySeparatorChar + idBytes[1]; |
@@ -90,7 +90,7 @@ namespace OpenSim.Framework.Communications.Cache | |||
90 | if (!Directory.Exists(cdir)) | 90 | if (!Directory.Exists(cdir)) |
91 | Directory.CreateDirectory(cdir); | 91 | Directory.CreateDirectory(cdir); |
92 | 92 | ||
93 | FileStream x = new FileStream(cdir + Path.DirectorySeparatorChar + asset.Metadata.FullID + ".xml", FileMode.Create); | 93 | FileStream x = new FileStream(cdir + Path.DirectorySeparatorChar + asset.FullID + ".xml", FileMode.Create); |
94 | m_xs.Serialize(x, asset); | 94 | m_xs.Serialize(x, asset); |
95 | 95 | ||
96 | x.Flush(); | 96 | x.Flush(); |
diff --git a/OpenSim/Framework/Communications/Cache/GridAssetClient.cs b/OpenSim/Framework/Communications/Cache/GridAssetClient.cs index 6522ad0..3b6dc52 100644 --- a/OpenSim/Framework/Communications/Cache/GridAssetClient.cs +++ b/OpenSim/Framework/Communications/Cache/GridAssetClient.cs | |||
@@ -126,7 +126,7 @@ namespace OpenSim.Framework.Communications.Cache | |||
126 | // rc.Request(s); | 126 | // rc.Request(s); |
127 | //m_log.InfoFormat("[ASSET]: Stored {0}", rc); | 127 | //m_log.InfoFormat("[ASSET]: Stored {0}", rc); |
128 | 128 | ||
129 | m_log.InfoFormat("[GRID ASSET CLIENT]: Sending store request for asset {0}", asset.Metadata.FullID); | 129 | m_log.InfoFormat("[GRID ASSET CLIENT]: Sending store request for asset {0}", asset.FullID); |
130 | 130 | ||
131 | RestObjectPoster.BeginPostObject<AssetBase>(assetUrl, asset); | 131 | RestObjectPoster.BeginPostObject<AssetBase>(assetUrl, asset); |
132 | } | 132 | } |
diff --git a/OpenSim/Framework/Communications/Capabilities/Caps.cs b/OpenSim/Framework/Communications/Capabilities/Caps.cs index b68083e..a4c847d 100644 --- a/OpenSim/Framework/Communications/Capabilities/Caps.cs +++ b/OpenSim/Framework/Communications/Capabilities/Caps.cs | |||
@@ -740,9 +740,9 @@ namespace OpenSim.Framework.Communications.Capabilities | |||
740 | 740 | ||
741 | AssetBase asset; | 741 | AssetBase asset; |
742 | asset = new AssetBase(); | 742 | asset = new AssetBase(); |
743 | asset.Metadata.FullID = assetID; | 743 | asset.FullID = assetID; |
744 | asset.Metadata.Type = assType; | 744 | asset.Type = assType; |
745 | asset.Metadata.Name = assetName; | 745 | asset.Name = assetName; |
746 | asset.Data = data; | 746 | asset.Data = data; |
747 | m_assetCache.AddAsset(asset); | 747 | m_assetCache.AddAsset(asset); |
748 | 748 | ||
@@ -750,7 +750,7 @@ namespace OpenSim.Framework.Communications.Capabilities | |||
750 | item.Owner = m_agentID; | 750 | item.Owner = m_agentID; |
751 | item.Creator = m_agentID; | 751 | item.Creator = m_agentID; |
752 | item.ID = inventoryItem; | 752 | item.ID = inventoryItem; |
753 | item.AssetID = asset.Metadata.FullID; | 753 | item.AssetID = asset.FullID; |
754 | item.Description = assetDescription; | 754 | item.Description = assetDescription; |
755 | item.Name = assetName; | 755 | item.Name = assetName; |
756 | item.AssetType = assType; | 756 | item.AssetType = assType; |