diff options
Diffstat (limited to 'OpenSim/Region/Environment/Modules/Avatar/InstantMessage')
-rw-r--r-- | OpenSim/Region/Environment/Modules/Avatar/InstantMessage/InstantMessageModule.cs | 35 |
1 files changed, 30 insertions, 5 deletions
diff --git a/OpenSim/Region/Environment/Modules/Avatar/InstantMessage/InstantMessageModule.cs b/OpenSim/Region/Environment/Modules/Avatar/InstantMessage/InstantMessageModule.cs index 6b2de80..9312fd8 100644 --- a/OpenSim/Region/Environment/Modules/Avatar/InstantMessage/InstantMessageModule.cs +++ b/OpenSim/Region/Environment/Modules/Avatar/InstantMessage/InstantMessageModule.cs | |||
@@ -274,14 +274,30 @@ namespace OpenSim.Region.Environment.Modules.Avatar.InstantMessage | |||
274 | message = (string)requestData["message"]; | 274 | message = (string)requestData["message"]; |
275 | 275 | ||
276 | // Bytes don't transfer well over XMLRPC, so, we Base64 Encode them. | 276 | // Bytes don't transfer well over XMLRPC, so, we Base64 Encode them. |
277 | byte[] dialogdata = Convert.FromBase64String((string)requestData["dialog"]); | 277 | string requestData1 = (string)requestData["dialog"]; |
278 | dialog = dialogdata[0]; | 278 | if (string.IsNullOrEmpty(requestData1)) |
279 | { | ||
280 | dialog = 0; | ||
281 | } | ||
282 | else | ||
283 | { | ||
284 | byte[] dialogdata = Convert.FromBase64String(requestData1); | ||
285 | dialog = dialogdata[0]; | ||
286 | } | ||
279 | 287 | ||
280 | if ((string)requestData["from_group"] == "TRUE") | 288 | if ((string)requestData["from_group"] == "TRUE") |
281 | fromGroup = true; | 289 | fromGroup = true; |
282 | 290 | ||
283 | byte[] offlinedata = Convert.FromBase64String((string)requestData["offline"]); | 291 | string requestData2 = (string)requestData["offline"]; |
284 | offline = offlinedata[0]; | 292 | if (String.IsNullOrEmpty(requestData2)) |
293 | { | ||
294 | offline = 0; | ||
295 | } | ||
296 | else | ||
297 | { | ||
298 | byte[] offlinedata = Convert.FromBase64String(requestData2); | ||
299 | offline = offlinedata[0]; | ||
300 | } | ||
285 | 301 | ||
286 | # region ParentEstateID | 302 | # region ParentEstateID |
287 | try | 303 | try |
@@ -346,7 +362,16 @@ namespace OpenSim.Region.Environment.Modules.Avatar.InstantMessage | |||
346 | # endregion | 362 | # endregion |
347 | 363 | ||
348 | Position = new Vector3(pos_x, pos_y, pos_z); | 364 | Position = new Vector3(pos_x, pos_y, pos_z); |
349 | binaryBucket = Convert.FromBase64String((string)requestData["binary_bucket"]); | 365 | |
366 | string requestData3 = (string)requestData["binary_bucket"]; | ||
367 | if (string.IsNullOrEmpty(requestData3)) | ||
368 | { | ||
369 | binaryBucket = new byte[0]; | ||
370 | } | ||
371 | else | ||
372 | { | ||
373 | binaryBucket = Convert.FromBase64String(requestData3); | ||
374 | } | ||
350 | 375 | ||
351 | // Create a New GridInstantMessageObject the the data | 376 | // Create a New GridInstantMessageObject the the data |
352 | GridInstantMessage gim = new GridInstantMessage(); | 377 | GridInstantMessage gim = new GridInstantMessage(); |