diff options
author | UbitUmarov | 2016-07-27 23:39:50 +0100 |
---|---|---|
committer | UbitUmarov | 2016-07-27 23:39:50 +0100 |
commit | 376084a2e52561cfd1b359aabe9bb64ecc84c2fc (patch) | |
tree | 77052f68f03eb426b35fc7bd584eeadf9a4b34cf /OpenSim/Framework | |
parent | add another gatekeeper login fail reason reply (diff) | |
parent | first step removing MegaRegions: refuse to run. Thanks to all that made MegaR... (diff) | |
download | opensim-SC-376084a2e52561cfd1b359aabe9bb64ecc84c2fc.zip opensim-SC-376084a2e52561cfd1b359aabe9bb64ecc84c2fc.tar.gz opensim-SC-376084a2e52561cfd1b359aabe9bb64ecc84c2fc.tar.bz2 opensim-SC-376084a2e52561cfd1b359aabe9bb64ecc84c2fc.tar.xz |
Merge branch 'master' into httptests
Diffstat (limited to 'OpenSim/Framework')
-rw-r--r-- | OpenSim/Framework/ChildAgentDataUpdate.cs | 79 | ||||
-rw-r--r-- | OpenSim/Framework/GridInstantMessage.cs | 19 | ||||
-rw-r--r-- | OpenSim/Framework/IClientAPI.cs | 10 | ||||
-rw-r--r-- | OpenSim/Framework/IMoneyModule.cs | 7 | ||||
-rw-r--r-- | OpenSim/Framework/ISceneAgent.cs | 1 | ||||
-rw-r--r-- | OpenSim/Framework/Servers/BaseOpenSimServer.cs | 11 |
6 files changed, 63 insertions, 64 deletions
diff --git a/OpenSim/Framework/ChildAgentDataUpdate.cs b/OpenSim/Framework/ChildAgentDataUpdate.cs index 72c2c34..74f18bf 100644 --- a/OpenSim/Framework/ChildAgentDataUpdate.cs +++ b/OpenSim/Framework/ChildAgentDataUpdate.cs | |||
@@ -353,6 +353,10 @@ namespace OpenSim.Framework | |||
353 | public UUID PreyAgent; | 353 | public UUID PreyAgent; |
354 | public Byte AgentAccess; | 354 | public Byte AgentAccess; |
355 | public UUID ActiveGroupID; | 355 | public UUID ActiveGroupID; |
356 | public string ActiveGroupName; | ||
357 | public string ActiveGroupTitle = null; | ||
358 | public UUID agentCOF; | ||
359 | public byte CrossingFlags; | ||
356 | 360 | ||
357 | public AgentGroupData[] Groups; | 361 | public AgentGroupData[] Groups; |
358 | public Dictionary<ulong, string> ChildrenCapSeeds = null; | 362 | public Dictionary<ulong, string> ChildrenCapSeeds = null; |
@@ -361,7 +365,6 @@ namespace OpenSim.Framework | |||
361 | public Animation AnimState = null; | 365 | public Animation AnimState = null; |
362 | public Byte MotionState = 0; | 366 | public Byte MotionState = 0; |
363 | 367 | ||
364 | public UUID GranterID; | ||
365 | public UUID ParentPart; | 368 | public UUID ParentPart; |
366 | public Vector3 SitOffset; | 369 | public Vector3 SitOffset; |
367 | 370 | ||
@@ -374,12 +377,6 @@ namespace OpenSim.Framework | |||
374 | MethodBase.GetCurrentMethod().DeclaringType); | 377 | MethodBase.GetCurrentMethod().DeclaringType); |
375 | // DEBUG OFF | 378 | // DEBUG OFF |
376 | 379 | ||
377 | /* | ||
378 | public byte[] AgentTextures; | ||
379 | public byte[] VisualParams; | ||
380 | public UUID[] Wearables; | ||
381 | public AvatarAttachment[] Attachments; | ||
382 | */ | ||
383 | // Scripted | 380 | // Scripted |
384 | public ControllerData[] Controllers; | 381 | public ControllerData[] Controllers; |
385 | 382 | ||
@@ -393,8 +390,6 @@ namespace OpenSim.Framework | |||
393 | 390 | ||
394 | public virtual OSDMap Pack(EntityTransferContext ctx) | 391 | public virtual OSDMap Pack(EntityTransferContext ctx) |
395 | { | 392 | { |
396 | int wearablesCount = -1; | ||
397 | |||
398 | // m_log.InfoFormat("[CHILDAGENTDATAUPDATE] Pack data"); | 393 | // m_log.InfoFormat("[CHILDAGENTDATAUPDATE] Pack data"); |
399 | 394 | ||
400 | OSDMap args = new OSDMap(); | 395 | OSDMap args = new OSDMap(); |
@@ -433,8 +428,14 @@ namespace OpenSim.Framework | |||
433 | args["prey_agent"] = OSD.FromUUID(PreyAgent); | 428 | args["prey_agent"] = OSD.FromUUID(PreyAgent); |
434 | args["agent_access"] = OSD.FromString(AgentAccess.ToString()); | 429 | args["agent_access"] = OSD.FromString(AgentAccess.ToString()); |
435 | 430 | ||
431 | args["agent_cof"] = OSD.FromUUID(agentCOF); | ||
432 | args["crossingflags"] = OSD.FromInteger(CrossingFlags); | ||
433 | |||
436 | args["active_group_id"] = OSD.FromUUID(ActiveGroupID); | 434 | args["active_group_id"] = OSD.FromUUID(ActiveGroupID); |
437 | 435 | args["active_group_name"] = OSD.FromString(ActiveGroupName); | |
436 | if(ActiveGroupTitle != null) | ||
437 | args["active_group_title"] = OSD.FromString(ActiveGroupTitle); | ||
438 | |||
438 | if ((Groups != null) && (Groups.Length > 0)) | 439 | if ((Groups != null) && (Groups.Length > 0)) |
439 | { | 440 | { |
440 | OSDArray groups = new OSDArray(Groups.Length); | 441 | OSDArray groups = new OSDArray(Groups.Length); |
@@ -497,48 +498,6 @@ namespace OpenSim.Framework | |||
497 | if (Appearance != null) | 498 | if (Appearance != null) |
498 | args["packed_appearance"] = Appearance.Pack(ctx); | 499 | args["packed_appearance"] = Appearance.Pack(ctx); |
499 | 500 | ||
500 | //if ((AgentTextures != null) && (AgentTextures.Length > 0)) | ||
501 | //{ | ||
502 | // OSDArray textures = new OSDArray(AgentTextures.Length); | ||
503 | // foreach (UUID uuid in AgentTextures) | ||
504 | // textures.Add(OSD.FromUUID(uuid)); | ||
505 | // args["agent_textures"] = textures; | ||
506 | //} | ||
507 | |||
508 | // The code to pack textures, visuals, wearables and attachments | ||
509 | // should be removed; packed appearance contains the full appearance | ||
510 | // This is retained for backward compatibility only | ||
511 | |||
512 | /* then lets remove | ||
513 | if (Appearance.Texture != null) | ||
514 | { | ||
515 | byte[] rawtextures = Appearance.Texture.GetBytes(); | ||
516 | args["texture_entry"] = OSD.FromBinary(rawtextures); | ||
517 | } | ||
518 | |||
519 | if ((Appearance.VisualParams != null) && (Appearance.VisualParams.Length > 0)) | ||
520 | args["visual_params"] = OSD.FromBinary(Appearance.VisualParams); | ||
521 | |||
522 | // We might not pass this in all cases... | ||
523 | if ((Appearance.Wearables != null) && (Appearance.Wearables.Length > 0)) | ||
524 | { | ||
525 | OSDArray wears = new OSDArray(Appearance.Wearables.Length); | ||
526 | foreach (AvatarWearable awear in Appearance.Wearables) | ||
527 | wears.Add(awear.Pack()); | ||
528 | |||
529 | args["wearables"] = wears; | ||
530 | } | ||
531 | |||
532 | List<AvatarAttachment> attachments = Appearance.GetAttachments(); | ||
533 | if ((attachments != null) && (attachments.Count > 0)) | ||
534 | { | ||
535 | OSDArray attachs = new OSDArray(attachments.Count); | ||
536 | foreach (AvatarAttachment att in attachments) | ||
537 | attachs.Add(att.Pack()); | ||
538 | args["attachments"] = attachs; | ||
539 | } | ||
540 | // End of code to remove | ||
541 | */ | ||
542 | if ((Controllers != null) && (Controllers.Length > 0)) | 501 | if ((Controllers != null) && (Controllers.Length > 0)) |
543 | { | 502 | { |
544 | OSDArray controls = new OSDArray(Controllers.Length); | 503 | OSDArray controls = new OSDArray(Controllers.Length); |
@@ -662,10 +621,22 @@ namespace OpenSim.Framework | |||
662 | if (args["agent_access"] != null) | 621 | if (args["agent_access"] != null) |
663 | Byte.TryParse(args["agent_access"].AsString(), out AgentAccess); | 622 | Byte.TryParse(args["agent_access"].AsString(), out AgentAccess); |
664 | 623 | ||
665 | if (args["active_group_id"] != null) | 624 | if (args.ContainsKey("agent_cof") && args["agent_cof"] != null) |
625 | agentCOF = args["agent_cof"].AsUUID(); | ||
626 | |||
627 | if (args.ContainsKey("crossingflags") && args["crossingflags"] != null) | ||
628 | CrossingFlags = (byte)args["crossingflags"].AsInteger(); | ||
629 | |||
630 | if (args.ContainsKey("active_group_id") && args["active_group_id"] != null) | ||
666 | ActiveGroupID = args["active_group_id"].AsUUID(); | 631 | ActiveGroupID = args["active_group_id"].AsUUID(); |
667 | 632 | ||
668 | if ((args["groups"] != null) && (args["groups"]).Type == OSDType.Array) | 633 | if (args.ContainsKey("active_group_name") && args["active_group_name"] != null) |
634 | ActiveGroupName = args["active_group_name"].AsString(); | ||
635 | |||
636 | if(args.ContainsKey("active_group_title") && args["active_group_title"] != null) | ||
637 | ActiveGroupTitle = args["active_group_title"].AsString(); | ||
638 | |||
639 | if (args.ContainsKey("groups") && (args["groups"] != null) && (args["groups"]).Type == OSDType.Array) | ||
669 | { | 640 | { |
670 | OSDArray groups = (OSDArray)(args["groups"]); | 641 | OSDArray groups = (OSDArray)(args["groups"]); |
671 | Groups = new AgentGroupData[groups.Count]; | 642 | Groups = new AgentGroupData[groups.Count]; |
diff --git a/OpenSim/Framework/GridInstantMessage.cs b/OpenSim/Framework/GridInstantMessage.cs index da3690c..53d98db 100644 --- a/OpenSim/Framework/GridInstantMessage.cs +++ b/OpenSim/Framework/GridInstantMessage.cs | |||
@@ -47,6 +47,7 @@ namespace OpenSim.Framework | |||
47 | public uint ParentEstateID; | 47 | public uint ParentEstateID; |
48 | public Guid RegionID; | 48 | public Guid RegionID; |
49 | public uint timestamp; | 49 | public uint timestamp; |
50 | public Guid ID; | ||
50 | 51 | ||
51 | public GridInstantMessage() | 52 | public GridInstantMessage() |
52 | { | 53 | { |
@@ -66,6 +67,8 @@ namespace OpenSim.Framework | |||
66 | Position = im.Position; | 67 | Position = im.Position; |
67 | binaryBucket = im.binaryBucket; | 68 | binaryBucket = im.binaryBucket; |
68 | RegionID = im.RegionID; | 69 | RegionID = im.RegionID; |
70 | ParentEstateID = im.ParentEstateID; | ||
71 | ID = im.ID; | ||
69 | 72 | ||
70 | if (addTimestamp) | 73 | if (addTimestamp) |
71 | timestamp = (uint)Util.UnixTimeSinceEpoch(); | 74 | timestamp = (uint)Util.UnixTimeSinceEpoch(); |
@@ -75,7 +78,7 @@ namespace OpenSim.Framework | |||
75 | string _fromAgentName, UUID _toAgentID, | 78 | string _fromAgentName, UUID _toAgentID, |
76 | byte _dialog, bool _fromGroup, string _message, | 79 | byte _dialog, bool _fromGroup, string _message, |
77 | UUID _imSessionID, bool _offline, Vector3 _position, | 80 | UUID _imSessionID, bool _offline, Vector3 _position, |
78 | byte[] _binaryBucket, bool addTimestamp) | 81 | byte[] _binaryBucket, UUID _ID, bool addTimestamp) |
79 | { | 82 | { |
80 | fromAgentID = _fromAgentID.Guid; | 83 | fromAgentID = _fromAgentID.Guid; |
81 | fromAgentName = _fromAgentName; | 84 | fromAgentName = _fromAgentName; |
@@ -84,6 +87,8 @@ namespace OpenSim.Framework | |||
84 | fromGroup = _fromGroup; | 87 | fromGroup = _fromGroup; |
85 | message = _message; | 88 | message = _message; |
86 | imSessionID = _imSessionID.Guid; | 89 | imSessionID = _imSessionID.Guid; |
90 | ID = _ID.Guid; | ||
91 | |||
87 | if (_offline) | 92 | if (_offline) |
88 | offline = 1; | 93 | offline = 1; |
89 | else | 94 | else |
@@ -102,11 +107,21 @@ namespace OpenSim.Framework | |||
102 | } | 107 | } |
103 | 108 | ||
104 | public GridInstantMessage(IScene scene, UUID _fromAgentID, | 109 | public GridInstantMessage(IScene scene, UUID _fromAgentID, |
110 | string _fromAgentName, UUID _toAgentID, | ||
111 | byte _dialog, bool _fromGroup, string _message, | ||
112 | UUID _imSessionID, bool _offline, Vector3 _position, | ||
113 | byte[] _binaryBucket, bool addTimestamp) : this (scene, _fromAgentID, | ||
114 | _fromAgentName, _toAgentID, _dialog, _fromGroup, _message, | ||
115 | _imSessionID, _offline, _position, _binaryBucket, UUID.Zero, addTimestamp) | ||
116 | { | ||
117 | } | ||
118 | |||
119 | public GridInstantMessage(IScene scene, UUID _fromAgentID, | ||
105 | string _fromAgentName, UUID _toAgentID, byte _dialog, | 120 | string _fromAgentName, UUID _toAgentID, byte _dialog, |
106 | string _message, bool _offline, | 121 | string _message, bool _offline, |
107 | Vector3 _position) : this(scene, _fromAgentID, _fromAgentName, | 122 | Vector3 _position) : this(scene, _fromAgentID, _fromAgentName, |
108 | _toAgentID, _dialog, false, _message, | 123 | _toAgentID, _dialog, false, _message, |
109 | _fromAgentID ^ _toAgentID, _offline, _position, new byte[0], true) | 124 | _fromAgentID ^ _toAgentID, _offline, _position, new byte[0], UUID.Zero, true) |
110 | { | 125 | { |
111 | } | 126 | } |
112 | } | 127 | } |
diff --git a/OpenSim/Framework/IClientAPI.cs b/OpenSim/Framework/IClientAPI.cs index d9932eb..9bf51f8 100644 --- a/OpenSim/Framework/IClientAPI.cs +++ b/OpenSim/Framework/IClientAPI.cs | |||
@@ -727,11 +727,15 @@ namespace OpenSim.Framework | |||
727 | 727 | ||
728 | UUID SecureSessionId { get; } | 728 | UUID SecureSessionId { get; } |
729 | 729 | ||
730 | UUID ActiveGroupId { get; } | 730 | UUID ActiveGroupId { get; set; } |
731 | 731 | ||
732 | string ActiveGroupName { get; } | 732 | string ActiveGroupName { get; set;} |
733 | 733 | ||
734 | ulong ActiveGroupPowers { get; } | 734 | ulong ActiveGroupPowers { get; set;} |
735 | |||
736 | Dictionary<UUID, ulong> GetGroupPowers(); | ||
737 | |||
738 | void SetGroupPowers(Dictionary<UUID, ulong> powers); | ||
735 | 739 | ||
736 | ulong GetGroupPowers(UUID groupID); | 740 | ulong GetGroupPowers(UUID groupID); |
737 | 741 | ||
diff --git a/OpenSim/Framework/IMoneyModule.cs b/OpenSim/Framework/IMoneyModule.cs index 55c9613..be45438 100644 --- a/OpenSim/Framework/IMoneyModule.cs +++ b/OpenSim/Framework/IMoneyModule.cs | |||
@@ -32,14 +32,13 @@ namespace OpenSim.Framework | |||
32 | public delegate void ObjectPaid(UUID objectID, UUID agentID, int amount); | 32 | public delegate void ObjectPaid(UUID objectID, UUID agentID, int amount); |
33 | public interface IMoneyModule | 33 | public interface IMoneyModule |
34 | { | 34 | { |
35 | bool ObjectGiveMoney(UUID objectID, UUID fromID, UUID toID, | 35 | bool ObjectGiveMoney(UUID objectID, UUID fromID, |
36 | int amount, UUID txn, out string reason); | 36 | UUID toID, int amount, UUID txn, out string reason); |
37 | 37 | ||
38 | int GetBalance(UUID agentID); | 38 | int GetBalance(UUID agentID); |
39 | bool UploadCovered(UUID agentID, int amount); | 39 | bool UploadCovered(UUID agentID, int amount); |
40 | bool AmountCovered(UUID agentID, int amount); | 40 | bool AmountCovered(UUID agentID, int amount); |
41 | void ApplyCharge(UUID agentID, int amount, MoneyTransactionType type); | 41 | void ApplyCharge(UUID agentID, int amount, MoneyTransactionType type, string extraData = ""); |
42 | void ApplyCharge(UUID agentID, int amount, MoneyTransactionType type, string extraData); | ||
43 | void ApplyUploadCharge(UUID agentID, int amount, string text); | 42 | void ApplyUploadCharge(UUID agentID, int amount, string text); |
44 | void MoveMoney(UUID fromUser, UUID toUser, int amount, string text); | 43 | void MoveMoney(UUID fromUser, UUID toUser, int amount, string text); |
45 | 44 | ||
diff --git a/OpenSim/Framework/ISceneAgent.cs b/OpenSim/Framework/ISceneAgent.cs index be11931..1848b17 100644 --- a/OpenSim/Framework/ISceneAgent.cs +++ b/OpenSim/Framework/ISceneAgent.cs | |||
@@ -55,6 +55,7 @@ namespace OpenSim.Framework | |||
55 | /// </summary> | 55 | /// </summary> |
56 | bool IsChildAgent { get; } | 56 | bool IsChildAgent { get; } |
57 | 57 | ||
58 | bool Invulnerable { get; set; } | ||
58 | /// <summary> | 59 | /// <summary> |
59 | /// Avatar appearance data. | 60 | /// Avatar appearance data. |
60 | /// </summary> | 61 | /// </summary> |
diff --git a/OpenSim/Framework/Servers/BaseOpenSimServer.cs b/OpenSim/Framework/Servers/BaseOpenSimServer.cs index 3426d10..1d4deac 100644 --- a/OpenSim/Framework/Servers/BaseOpenSimServer.cs +++ b/OpenSim/Framework/Servers/BaseOpenSimServer.cs | |||
@@ -157,7 +157,16 @@ namespace OpenSim.Framework.Servers | |||
157 | "[STARTUP]: Operating system version: {0}, .NET platform {1}, {2}-bit\n", | 157 | "[STARTUP]: Operating system version: {0}, .NET platform {1}, {2}-bit\n", |
158 | Environment.OSVersion, Environment.OSVersion.Platform, Util.Is64BitProcess() ? "64" : "32"); | 158 | Environment.OSVersion, Environment.OSVersion.Platform, Util.Is64BitProcess() ? "64" : "32"); |
159 | 159 | ||
160 | StartupSpecific(); | 160 | try |
161 | { | ||
162 | StartupSpecific(); | ||
163 | } | ||
164 | catch(Exception e) | ||
165 | { | ||
166 | m_log.FatalFormat("Fatal error: {0}", | ||
167 | (e.Message == null || e.Message == String.Empty) ? "Unknown reason":e.Message ); | ||
168 | Environment.Exit(1); | ||
169 | } | ||
161 | 170 | ||
162 | TimeSpan timeTaken = DateTime.Now - m_startuptime; | 171 | TimeSpan timeTaken = DateTime.Now - m_startuptime; |
163 | 172 | ||