aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Services
diff options
context:
space:
mode:
Diffstat (limited to 'OpenSim/Services')
-rw-r--r--OpenSim/Services/Connectors/Grid/GridServiceConnector.cs2
-rw-r--r--OpenSim/Services/Connectors/Inventory/InventoryServiceConnector.cs7
-rw-r--r--OpenSim/Services/Connectors/Neighbour/NeighbourServiceConnector.cs36
-rw-r--r--OpenSim/Services/GridService/GridService.cs1
-rw-r--r--OpenSim/Services/Interfaces/IGridService.cs14
5 files changed, 39 insertions, 21 deletions
diff --git a/OpenSim/Services/Connectors/Grid/GridServiceConnector.cs b/OpenSim/Services/Connectors/Grid/GridServiceConnector.cs
index acdf558..02f2b79 100644
--- a/OpenSim/Services/Connectors/Grid/GridServiceConnector.cs
+++ b/OpenSim/Services/Connectors/Grid/GridServiceConnector.cs
@@ -99,7 +99,7 @@ namespace OpenSim.Services.Connectors
99 sendData["METHOD"] = "register"; 99 sendData["METHOD"] = "register";
100 100
101 string reqString = ServerUtils.BuildQueryString(sendData); 101 string reqString = ServerUtils.BuildQueryString(sendData);
102 //m_log.DebugFormat("[GRID CONNECTOR]: queryString = {0}", reqString); 102 // m_log.DebugFormat("[GRID CONNECTOR]: queryString = {0}", reqString);
103 try 103 try
104 { 104 {
105 string reply = SynchronousRestFormsRequester.MakeRequest("POST", 105 string reply = SynchronousRestFormsRequester.MakeRequest("POST",
diff --git a/OpenSim/Services/Connectors/Inventory/InventoryServiceConnector.cs b/OpenSim/Services/Connectors/Inventory/InventoryServiceConnector.cs
index 5443891..e047f71 100644
--- a/OpenSim/Services/Connectors/Inventory/InventoryServiceConnector.cs
+++ b/OpenSim/Services/Connectors/Inventory/InventoryServiceConnector.cs
@@ -416,13 +416,6 @@ namespace OpenSim.Services.Connectors
416 e.Source, e.Message); 416 e.Source, e.Message);
417 } 417 }
418 418
419 foreach (InventoryItemBase item in items)
420 {
421 InventoryItemBase itm = this.QueryItem(userID, item, sessionID);
422 itm.Name = item.Name;
423 itm.Folder = item.Folder;
424 this.UpdateItem(userID, itm, sessionID);
425 }
426 } 419 }
427 420
428 private void MoveItemsCompleted(IAsyncResult iar) 421 private void MoveItemsCompleted(IAsyncResult iar)
diff --git a/OpenSim/Services/Connectors/Neighbour/NeighbourServiceConnector.cs b/OpenSim/Services/Connectors/Neighbour/NeighbourServiceConnector.cs
index 145f212..0a982f8 100644
--- a/OpenSim/Services/Connectors/Neighbour/NeighbourServiceConnector.cs
+++ b/OpenSim/Services/Connectors/Neighbour/NeighbourServiceConnector.cs
@@ -76,10 +76,12 @@ namespace OpenSim.Services.Connectors
76 // Don't remote-call this instance; that's a startup hickup 76 // Don't remote-call this instance; that's a startup hickup
77 !((regInfo.ExternalHostName == thisRegion.ExternalHostName) && (regInfo.HttpPort == thisRegion.HttpPort))) 77 !((regInfo.ExternalHostName == thisRegion.ExternalHostName) && (regInfo.HttpPort == thisRegion.HttpPort)))
78 { 78 {
79 DoHelloNeighbourCall(regInfo, thisRegion); 79 if (!DoHelloNeighbourCall(regInfo, thisRegion))
80 return null;
80 } 81 }
81 //else 82 else
82 // m_log.Warn("[REST COMMS]: Region not found " + regionHandle); 83 return null;
84
83 return regInfo; 85 return regInfo;
84 } 86 }
85 87
@@ -102,6 +104,7 @@ namespace OpenSim.Services.Connectors
102 catch (Exception e) 104 catch (Exception e)
103 { 105 {
104 m_log.Debug("[REST COMMS]: PackRegionInfoData failed with exception: " + e.Message); 106 m_log.Debug("[REST COMMS]: PackRegionInfoData failed with exception: " + e.Message);
107 return false;
105 } 108 }
106 // Add the regionhandle of the destination region 109 // Add the regionhandle of the destination region
107 args["destination_handle"] = OSD.FromString(region.RegionHandle.ToString()); 110 args["destination_handle"] = OSD.FromString(region.RegionHandle.ToString());
@@ -118,7 +121,7 @@ namespace OpenSim.Services.Connectors
118 catch (Exception e) 121 catch (Exception e)
119 { 122 {
120 m_log.WarnFormat("[REST COMMS]: Exception thrown on serialization of HelloNeighbour: {0}", e.Message); 123 m_log.WarnFormat("[REST COMMS]: Exception thrown on serialization of HelloNeighbour: {0}", e.Message);
121 // ignore. buffer will be empty, caller should check. 124 return false;
122 } 125 }
123 126
124 Stream os = null; 127 Stream os = null;
@@ -127,20 +130,23 @@ namespace OpenSim.Services.Connectors
127 HelloNeighbourRequest.ContentLength = buffer.Length; //Count bytes to send 130 HelloNeighbourRequest.ContentLength = buffer.Length; //Count bytes to send
128 os = HelloNeighbourRequest.GetRequestStream(); 131 os = HelloNeighbourRequest.GetRequestStream();
129 os.Write(buffer, 0, strBuffer.Length); //Send it 132 os.Write(buffer, 0, strBuffer.Length); //Send it
130 os.Close();
131 //m_log.InfoFormat("[REST COMMS]: Posted HelloNeighbour request to remote sim {0}", uri); 133 //m_log.InfoFormat("[REST COMMS]: Posted HelloNeighbour request to remote sim {0}", uri);
132 } 134 }
133 //catch (WebException ex) 135 catch (Exception ex)
134 catch
135 { 136 {
136 //m_log.InfoFormat("[REST COMMS]: Bad send on HelloNeighbour {0}", ex.Message); 137 m_log.InfoFormat("[REST COMMS]: Unable to send HelloNeighbour to {0}: {1}", region.RegionName, ex.Message);
137
138 return false; 138 return false;
139 } 139 }
140 finally
141 {
142 if (os != null)
143 os.Close();
144 }
140 145
141 // Let's wait for the response 146 // Let's wait for the response
142 //m_log.Info("[REST COMMS]: Waiting for a reply after DoHelloNeighbourCall"); 147 //m_log.Info("[REST COMMS]: Waiting for a reply after DoHelloNeighbourCall");
143 148
149 StreamReader sr = null;
144 try 150 try
145 { 151 {
146 WebResponse webResponse = HelloNeighbourRequest.GetResponse(); 152 WebResponse webResponse = HelloNeighbourRequest.GetResponse();
@@ -149,17 +155,21 @@ namespace OpenSim.Services.Connectors
149 m_log.Info("[REST COMMS]: Null reply on DoHelloNeighbourCall post"); 155 m_log.Info("[REST COMMS]: Null reply on DoHelloNeighbourCall post");
150 } 156 }
151 157
152 StreamReader sr = new StreamReader(webResponse.GetResponseStream()); 158 sr = new StreamReader(webResponse.GetResponseStream());
153 //reply = sr.ReadToEnd().Trim(); 159 //reply = sr.ReadToEnd().Trim();
154 sr.ReadToEnd().Trim(); 160 sr.ReadToEnd().Trim();
155 sr.Close();
156 //m_log.InfoFormat("[REST COMMS]: DoHelloNeighbourCall reply was {0} ", reply); 161 //m_log.InfoFormat("[REST COMMS]: DoHelloNeighbourCall reply was {0} ", reply);
157 162
158 } 163 }
159 catch (WebException ex) 164 catch (Exception ex)
160 { 165 {
161 m_log.InfoFormat("[REST COMMS]: exception on reply of DoHelloNeighbourCall {0}", ex.Message); 166 m_log.InfoFormat("[REST COMMS]: exception on reply of DoHelloNeighbourCall {0}", ex.Message);
162 // ignore, really 167 return false;
168 }
169 finally
170 {
171 if (sr != null)
172 sr.Close();
163 } 173 }
164 174
165 return true; 175 return true;
diff --git a/OpenSim/Services/GridService/GridService.cs b/OpenSim/Services/GridService/GridService.cs
index a2e4771..86815e5 100644
--- a/OpenSim/Services/GridService/GridService.cs
+++ b/OpenSim/Services/GridService/GridService.cs
@@ -200,6 +200,7 @@ namespace OpenSim.Services.GridService
200 rdata.RegionName = rinfo.RegionName; 200 rdata.RegionName = rinfo.RegionName;
201 rdata.Data = rinfo.ToKeyValuePairs(); 201 rdata.Data = rinfo.ToKeyValuePairs();
202 rdata.Data["regionHandle"] = Utils.UIntsToLong((uint)rdata.posX, (uint)rdata.posY); 202 rdata.Data["regionHandle"] = Utils.UIntsToLong((uint)rdata.posX, (uint)rdata.posY);
203 rdata.Data["owner_uuid"] = rinfo.EstateOwner.ToString();
203 return rdata; 204 return rdata;
204 } 205 }
205 206
diff --git a/OpenSim/Services/Interfaces/IGridService.cs b/OpenSim/Services/Interfaces/IGridService.cs
index 2290530..14560b1 100644
--- a/OpenSim/Services/Interfaces/IGridService.cs
+++ b/OpenSim/Services/Interfaces/IGridService.cs
@@ -140,6 +140,14 @@ namespace OpenSim.Services.Interfaces
140 } 140 }
141 protected int m_regionLocY; 141 protected int m_regionLocY;
142 142
143 protected UUID m_estateOwner;
144
145 public UUID EstateOwner
146 {
147 get { return m_estateOwner; }
148 set { m_estateOwner = value; }
149 }
150
143 public UUID RegionID = UUID.Zero; 151 public UUID RegionID = UUID.Zero;
144 public UUID ScopeID = UUID.Zero; 152 public UUID ScopeID = UUID.Zero;
145 153
@@ -191,6 +199,7 @@ namespace OpenSim.Services.Interfaces
191 Access = ConvertFrom.AccessLevel; 199 Access = ConvertFrom.AccessLevel;
192 Maturity = ConvertFrom.RegionSettings.Maturity; 200 Maturity = ConvertFrom.RegionSettings.Maturity;
193 RegionSecret = ConvertFrom.regionSecret; 201 RegionSecret = ConvertFrom.regionSecret;
202 EstateOwner = ConvertFrom.EstateSettings.EstateOwner;
194 } 203 }
195 204
196 public GridRegion(GridRegion ConvertFrom) 205 public GridRegion(GridRegion ConvertFrom)
@@ -207,6 +216,7 @@ namespace OpenSim.Services.Interfaces
207 Access = ConvertFrom.Access; 216 Access = ConvertFrom.Access;
208 Maturity = ConvertFrom.Maturity; 217 Maturity = ConvertFrom.Maturity;
209 RegionSecret = ConvertFrom.RegionSecret; 218 RegionSecret = ConvertFrom.RegionSecret;
219 EstateOwner = ConvertFrom.EstateOwner;
210 } 220 }
211 221
212 /// <value> 222 /// <value>
@@ -291,6 +301,7 @@ namespace OpenSim.Services.Interfaces
291 kvp["regionMapTexture"] = TerrainImage.ToString(); 301 kvp["regionMapTexture"] = TerrainImage.ToString();
292 kvp["access"] = Access.ToString(); 302 kvp["access"] = Access.ToString();
293 kvp["regionSecret"] = RegionSecret; 303 kvp["regionSecret"] = RegionSecret;
304 kvp["owner_uuid"] = EstateOwner.ToString();
294 // Maturity doesn't seem to exist in the DB 305 // Maturity doesn't seem to exist in the DB
295 return kvp; 306 return kvp;
296 } 307 }
@@ -345,6 +356,9 @@ namespace OpenSim.Services.Interfaces
345 if (kvp.ContainsKey("regionSecret")) 356 if (kvp.ContainsKey("regionSecret"))
346 RegionSecret =(string)kvp["regionSecret"]; 357 RegionSecret =(string)kvp["regionSecret"];
347 358
359 if (kvp.ContainsKey("owner_uuid"))
360 EstateOwner = new UUID(kvp["owner_uuid"].ToString());
361
348 } 362 }
349 } 363 }
350 364