aboutsummaryrefslogtreecommitdiffstatshomepage
diff options
context:
space:
mode:
authorJustin Clark-Casey (justincc)2011-11-24 20:22:17 +0000
committerJustin Clark-Casey (justincc)2011-11-24 20:22:17 +0000
commitdecabe11816069b71a982505f2078f2ae7f63654 (patch)
treebdfe0a895ddcd3a84c6c9374fac16f4f101c7687
parentAdd disabled CrossBehaviour to pCampBot, which is designed to cross test bots... (diff)
parentAppend asset ID to URL for storage requests to allow caching proxies to work ... (diff)
downloadopensim-SC_OLD-decabe11816069b71a982505f2078f2ae7f63654.zip
opensim-SC_OLD-decabe11816069b71a982505f2078f2ae7f63654.tar.gz
opensim-SC_OLD-decabe11816069b71a982505f2078f2ae7f63654.tar.bz2
opensim-SC_OLD-decabe11816069b71a982505f2078f2ae7f63654.tar.xz
Merge branch 'master' of ssh://opensimulator.org/var/git/opensim
Diffstat (limited to '')
-rw-r--r--OpenSim/Region/OptionalModules/World/AutoBackup/AutoBackupModuleState.cs202
-rw-r--r--OpenSim/Services/Connectors/SimianGrid/SimianAssetServiceConnector.cs4
2 files changed, 104 insertions, 102 deletions
diff --git a/OpenSim/Region/OptionalModules/World/AutoBackup/AutoBackupModuleState.cs b/OpenSim/Region/OptionalModules/World/AutoBackup/AutoBackupModuleState.cs
index 2db718c..f9e118b 100644
--- a/OpenSim/Region/OptionalModules/World/AutoBackup/AutoBackupModuleState.cs
+++ b/OpenSim/Region/OptionalModules/World/AutoBackup/AutoBackupModuleState.cs
@@ -23,104 +23,104 @@
23 * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 23 * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
24 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS 24 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
25 * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 25 * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
26 */ 26 */
27 27
28using System; 28using System;
29using System.Collections.Generic; 29using System.Collections.Generic;
30 30
31 31
32namespace OpenSim.Region.OptionalModules.World.AutoBackup 32namespace OpenSim.Region.OptionalModules.World.AutoBackup
33{ 33{
34 /// <summary>AutoBackupModuleState: Auto-Backup state for one region (scene). 34 /// <summary>AutoBackupModuleState: Auto-Backup state for one region (scene).
35 /// If you use this class in any way outside of AutoBackupModule, you should treat the class as opaque. 35 /// If you use this class in any way outside of AutoBackupModule, you should treat the class as opaque.
36 /// Since it is not part of the framework, you really should not rely upon it outside of the AutoBackupModule implementation. 36 /// Since it is not part of the framework, you really should not rely upon it outside of the AutoBackupModule implementation.
37 /// </summary> 37 /// </summary>
38 /// 38 ///
39 public class AutoBackupModuleState 39 public class AutoBackupModuleState
40 { 40 {
41 private Dictionary<Guid, string> m_liveRequests = null; 41 private Dictionary<Guid, string> m_liveRequests = null;
42 42
43 public AutoBackupModuleState() 43 public AutoBackupModuleState()
44 { 44 {
45 this.Enabled = false; 45 this.Enabled = false;
46 this.BackupDir = "."; 46 this.BackupDir = ".";
47 this.BusyCheck = true; 47 this.BusyCheck = true;
48 this.Timer = null; 48 this.Timer = null;
49 this.NamingType = NamingType.Time; 49 this.NamingType = NamingType.Time;
50 this.Script = null; 50 this.Script = null;
51 } 51 }
52 52
53 public Dictionary<Guid, string> LiveRequests 53 public Dictionary<Guid, string> LiveRequests
54 { 54 {
55 get { 55 get {
56 return this.m_liveRequests ?? 56 return this.m_liveRequests ??
57 (this.m_liveRequests = new Dictionary<Guid, string>(1)); 57 (this.m_liveRequests = new Dictionary<Guid, string>(1));
58 } 58 }
59 } 59 }
60 60
61 public bool Enabled 61 public bool Enabled
62 { 62 {
63 get; 63 get;
64 set; 64 set;
65 } 65 }
66 66
67 public System.Timers.Timer Timer 67 public System.Timers.Timer Timer
68 { 68 {
69 get; 69 get;
70 set; 70 set;
71 } 71 }
72 72
73 public double IntervalMinutes 73 public double IntervalMinutes
74 { 74 {
75 get 75 get
76 { 76 {
77 if (this.Timer == null) 77 if (this.Timer == null)
78 { 78 {
79 return -1.0; 79 return -1.0;
80 } 80 }
81 else 81 else
82 { 82 {
83 return this.Timer.Interval / 60000.0; 83 return this.Timer.Interval / 60000.0;
84 } 84 }
85 } 85 }
86 } 86 }
87 87
88 public bool BusyCheck 88 public bool BusyCheck
89 { 89 {
90 get; 90 get;
91 set; 91 set;
92 } 92 }
93 93
94 public string Script 94 public string Script
95 { 95 {
96 get; 96 get;
97 set; 97 set;
98 } 98 }
99 99
100 public string BackupDir 100 public string BackupDir
101 { 101 {
102 get; 102 get;
103 set; 103 set;
104 } 104 }
105 105
106 public NamingType NamingType 106 public NamingType NamingType
107 { 107 {
108 get; 108 get;
109 set; 109 set;
110 } 110 }
111 111
112 public new string ToString() 112 public new string ToString()
113 { 113 {
114 string retval = ""; 114 string retval = "";
115 115
116 retval += "[AUTO BACKUP]: AutoBackup: " + (Enabled ? "ENABLED" : "DISABLED") + "\n"; 116 retval += "[AUTO BACKUP]: AutoBackup: " + (Enabled ? "ENABLED" : "DISABLED") + "\n";
117 retval += "[AUTO BACKUP]: Interval: " + IntervalMinutes + " minutes" + "\n"; 117 retval += "[AUTO BACKUP]: Interval: " + IntervalMinutes + " minutes" + "\n";
118 retval += "[AUTO BACKUP]: Do Busy Check: " + (BusyCheck ? "Yes" : "No") + "\n"; 118 retval += "[AUTO BACKUP]: Do Busy Check: " + (BusyCheck ? "Yes" : "No") + "\n";
119 retval += "[AUTO BACKUP]: Naming Type: " + NamingType.ToString() + "\n"; 119 retval += "[AUTO BACKUP]: Naming Type: " + NamingType.ToString() + "\n";
120 retval += "[AUTO BACKUP]: Backup Dir: " + BackupDir + "\n"; 120 retval += "[AUTO BACKUP]: Backup Dir: " + BackupDir + "\n";
121 retval += "[AUTO BACKUP]: Script: " + Script + "\n"; 121 retval += "[AUTO BACKUP]: Script: " + Script + "\n";
122 return retval; 122 return retval;
123 } 123 }
124 } 124 }
125} 125}
126 126
diff --git a/OpenSim/Services/Connectors/SimianGrid/SimianAssetServiceConnector.cs b/OpenSim/Services/Connectors/SimianGrid/SimianAssetServiceConnector.cs
index d8089ac..9573e21 100644
--- a/OpenSim/Services/Connectors/SimianGrid/SimianAssetServiceConnector.cs
+++ b/OpenSim/Services/Connectors/SimianGrid/SimianAssetServiceConnector.cs
@@ -334,7 +334,9 @@ namespace OpenSim.Services.Connectors.SimianGrid
334 // Make the remote storage request 334 // Make the remote storage request
335 try 335 try
336 { 336 {
337 HttpWebRequest request = (HttpWebRequest)HttpWebRequest.Create(m_serverUrl); 337 // Simian does not require the asset ID to be in the URL because it's in the post data.
338 // By appending it to the URL also, we allow caching proxies (squid) to invalidate asset URLs
339 HttpWebRequest request = (HttpWebRequest)HttpWebRequest.Create(m_serverUrl + asset.FullID.ToString());
338 340
339 HttpWebResponse response = MultipartForm.Post(request, postParameters); 341 HttpWebResponse response = MultipartForm.Post(request, postParameters);
340 using (Stream responseStream = response.GetResponseStream()) 342 using (Stream responseStream = response.GetResponseStream())