aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim.RegionServer
diff options
context:
space:
mode:
authorMW2007-04-20 13:44:17 +0000
committerMW2007-04-20 13:44:17 +0000
commit84700807c7d8a40038de0792df01c3133965d291 (patch)
tree1b02ddbe44d66adf8ddfa6a65fccc8dc2a6f686e /OpenSim.RegionServer
parentIn memorium: Jesse Higginbotham (1990-2007) (diff)
downloadopensim-SC-84700807c7d8a40038de0792df01c3133965d291.zip
opensim-SC-84700807c7d8a40038de0792df01c3133965d291.tar.gz
opensim-SC-84700807c7d8a40038de0792df01c3133965d291.tar.bz2
opensim-SC-84700807c7d8a40038de0792df01c3133965d291.tar.xz
Hopefully fixed the forward slash bug in the gridurl set up
Diffstat (limited to '')
-rw-r--r--OpenSim.RegionServer/RegionInfo.cs23
1 files changed, 16 insertions, 7 deletions
diff --git a/OpenSim.RegionServer/RegionInfo.cs b/OpenSim.RegionServer/RegionInfo.cs
index 0d5e980..d3f67ef 100644
--- a/OpenSim.RegionServer/RegionInfo.cs
+++ b/OpenSim.RegionServer/RegionInfo.cs
@@ -44,7 +44,7 @@ namespace OpenSim
44 //we really want to keep any server connection code out of here and out of the code code 44 //we really want to keep any server connection code out of here and out of the code code
45 // and put it in the server connection classes (those inheriting from IGridServer etc) 45 // and put it in the server connection classes (those inheriting from IGridServer etc)
46 string reqtext; 46 string reqtext;
47 reqtext = "<Root>"; 47 reqtext = "<Root>";
48 reqtext += "<authkey>" + this.GridSendKey + "</authkey>"; 48 reqtext += "<authkey>" + this.GridSendKey + "</authkey>";
49 reqtext += "<sim>"; 49 reqtext += "<sim>";
50 reqtext += "<uuid>" + this.SimUUID.ToString() + "</uuid>"; 50 reqtext += "<uuid>" + this.SimUUID.ToString() + "</uuid>";
@@ -55,24 +55,33 @@ namespace OpenSim
55 reqtext += "<region_locy>" + this.RegionLocY.ToString() + "</region_locy>"; 55 reqtext += "<region_locy>" + this.RegionLocY.ToString() + "</region_locy>";
56 reqtext += "<estate_id>1</estate_id>"; 56 reqtext += "<estate_id>1</estate_id>";
57 reqtext += "</sim>"; 57 reqtext += "</sim>";
58 reqtext += "</Root>"; 58 reqtext += "</Root>";
59 59
60 byte[] reqdata = (new System.Text.ASCIIEncoding()).GetBytes(reqtext); 60 byte[] reqdata = (new System.Text.ASCIIEncoding()).GetBytes(reqtext);
61 string newpath = "";
62 if (this.GridURL.EndsWith("/"))
63 {
64 newpath = this.GridURL + "sims/";
65 }
66 else
67 {
68 newpath = this.GridURL + "/sims/";
69 }
61 70
62 WebRequest GridSaveReq = WebRequest.Create(this.GridURL + "sims/" + this.SimUUID.ToString()); 71 WebRequest GridSaveReq = WebRequest.Create(newpath + this.SimUUID.ToString());
63 GridSaveReq.Method = "POST"; 72 GridSaveReq.Method = "POST";
64 GridSaveReq.ContentType = "application/x-www-form-urlencoded"; 73 GridSaveReq.ContentType = "application/x-www-form-urlencoded";
65 GridSaveReq.ContentLength = reqdata.Length; 74 GridSaveReq.ContentLength = reqdata.Length;
66 75
67 Stream stOut = GridSaveReq.GetRequestStream(); 76 Stream stOut = GridSaveReq.GetRequestStream();
68 stOut.Write(reqdata,0,reqdata.Length); 77 stOut.Write(reqdata, 0, reqdata.Length);
69 stOut.Close(); 78 stOut.Close();
70 79
71 WebResponse gridresp = GridSaveReq.GetResponse(); 80 WebResponse gridresp = GridSaveReq.GetResponse();
72 StreamReader stIn = new StreamReader(gridresp.GetResponseStream(), Encoding.ASCII); 81 StreamReader stIn = new StreamReader(gridresp.GetResponseStream(), Encoding.ASCII);
73 string GridResponse = stIn.ReadToEnd(); 82 string GridResponse = stIn.ReadToEnd();
74 stIn.Close(); 83 stIn.Close();
75 gridresp.Close(); 84 gridresp.Close();
76 85
77 OpenSim.Framework.Console.MainConsole.Instance.WriteLine("RegionInfo.CS:SaveToGrid() - Grid said: " + GridResponse); 86 OpenSim.Framework.Console.MainConsole.Instance.WriteLine("RegionInfo.CS:SaveToGrid() - Grid said: " + GridResponse);
78 } 87 }