aboutsummaryrefslogtreecommitdiffstatshomepage
diff options
context:
space:
mode:
authorMelanie2019-10-06 23:24:41 +0100
committerMelanie2019-10-06 23:24:41 +0100
commiteb55f7f2bc3afb2477974e5417e48b8f8ee6cc65 (patch)
tree35d8479fd9142e441fb436b20ecce10877f0ace7
parentRemove a no longer used property that used ScopeID in an improper way (diff)
downloadopensim-SC-eb55f7f2bc3afb2477974e5417e48b8f8ee6cc65.zip
opensim-SC-eb55f7f2bc3afb2477974e5417e48b8f8ee6cc65.tar.gz
opensim-SC-eb55f7f2bc3afb2477974e5417e48b8f8ee6cc65.tar.bz2
opensim-SC-eb55f7f2bc3afb2477974e5417e48b8f8ee6cc65.tar.xz
Introduce a way to send the grid's message kay, if one is used
-rw-r--r--OpenSim/Services/Connectors/InstantMessage/InstantMessageServiceConnector.cs9
-rw-r--r--OpenSim/Services/HypergridService/HGInstantMessageService.cs5
2 files changed, 9 insertions, 5 deletions
diff --git a/OpenSim/Services/Connectors/InstantMessage/InstantMessageServiceConnector.cs b/OpenSim/Services/Connectors/InstantMessage/InstantMessageServiceConnector.cs
index e19c23d..c1f23af 100644
--- a/OpenSim/Services/Connectors/InstantMessage/InstantMessageServiceConnector.cs
+++ b/OpenSim/Services/Connectors/InstantMessage/InstantMessageServiceConnector.cs
@@ -50,9 +50,9 @@ namespace OpenSim.Services.Connectors.InstantMessage
50 /// <param name="url">URL we pull the data out of to send the request to</param> 50 /// <param name="url">URL we pull the data out of to send the request to</param>
51 /// <param name="im">The Instant Message </param> 51 /// <param name="im">The Instant Message </param>
52 /// <returns>Bool if the message was successfully delivered at the other side.</returns> 52 /// <returns>Bool if the message was successfully delivered at the other side.</returns>
53 public static bool SendInstantMessage(string url, GridInstantMessage im) 53 public static bool SendInstantMessage(string url, GridInstantMessage im, string messageKey)
54 { 54 {
55 Hashtable xmlrpcdata = ConvertGridInstantMessageToXMLRPC(im); 55 Hashtable xmlrpcdata = ConvertGridInstantMessageToXMLRPC(im, messageKey);
56 xmlrpcdata["region_handle"] = 0; 56 xmlrpcdata["region_handle"] = 0;
57 57
58 ArrayList SendParams = new ArrayList(); 58 ArrayList SendParams = new ArrayList();
@@ -97,7 +97,7 @@ namespace OpenSim.Services.Connectors.InstantMessage
97 /// </summary> 97 /// </summary>
98 /// <param name="msg">The GridInstantMessage object</param> 98 /// <param name="msg">The GridInstantMessage object</param>
99 /// <returns>Hashtable containing the XMLRPC request</returns> 99 /// <returns>Hashtable containing the XMLRPC request</returns>
100 protected static Hashtable ConvertGridInstantMessageToXMLRPC(GridInstantMessage msg) 100 protected static Hashtable ConvertGridInstantMessageToXMLRPC(GridInstantMessage msg, string messageKey)
101 { 101 {
102 Hashtable gim = new Hashtable(); 102 Hashtable gim = new Hashtable();
103 gim["from_agent_id"] = msg.fromAgentID.ToString(); 103 gim["from_agent_id"] = msg.fromAgentID.ToString();
@@ -125,6 +125,9 @@ namespace OpenSim.Services.Connectors.InstantMessage
125 gim["binary_bucket"] = Convert.ToBase64String(msg.binaryBucket, Base64FormattingOptions.None); 125 gim["binary_bucket"] = Convert.ToBase64String(msg.binaryBucket, Base64FormattingOptions.None);
126 gim["region_id"] = new UUID(msg.RegionID).ToString(); 126 gim["region_id"] = new UUID(msg.RegionID).ToString();
127 127
128 if (messageKey != String.Empty)
129 gim["message_key"] = messageKey;
130
128 return gim; 131 return gim;
129 } 132 }
130 133
diff --git a/OpenSim/Services/HypergridService/HGInstantMessageService.cs b/OpenSim/Services/HypergridService/HGInstantMessageService.cs
index d1739cf..09c5354 100644
--- a/OpenSim/Services/HypergridService/HGInstantMessageService.cs
+++ b/OpenSim/Services/HypergridService/HGInstantMessageService.cs
@@ -118,6 +118,7 @@ namespace OpenSim.Services.HypergridService
118 return; 118 return;
119 } 119 }
120 120
121 m_messageKey = cnf.GetString("MessageKey", String.Empty);
121 m_ForwardOfflineGroupMessages = cnf.GetBoolean("ForwardOfflineGroupMessages", false); 122 m_ForwardOfflineGroupMessages = cnf.GetBoolean("ForwardOfflineGroupMessages", false);
122 123
123 if (m_InGatekeeper) 124 if (m_InGatekeeper)
@@ -282,7 +283,7 @@ namespace OpenSim.Services.HypergridService
282 283
283 if (reginfo != null) 284 if (reginfo != null)
284 { 285 {
285 imresult = InstantMessageServiceConnector.SendInstantMessage(reginfo.ServerURI, im); 286 imresult = InstantMessageServiceConnector.SendInstantMessage(reginfo.ServerURI, im, m_messageKey);
286 } 287 }
287 else 288 else
288 { 289 {
@@ -373,4 +374,4 @@ namespace OpenSim.Services.HypergridService
373 return m_OfflineIMService.StoreMessage(im, out reason); 374 return m_OfflineIMService.StoreMessage(im, out reason);
374 } 375 }
375 } 376 }
376} \ No newline at end of file 377}