diff options
author | Cinder | 2015-06-14 08:45:22 -0600 |
---|---|---|
committer | Diva Canto | 2015-06-14 07:59:25 -0700 |
commit | 3853904b80c659ae94db780f4de713d639200e50 (patch) | |
tree | 04434a4586bf7de629ed8eebd1f26d7b6f770c9d /OpenSim | |
parent | AgentPreferences SQLLite Migration update Mantis #7157 (diff) | |
download | opensim-SC_OLD-3853904b80c659ae94db780f4de713d639200e50.zip opensim-SC_OLD-3853904b80c659ae94db780f4de713d639200e50.tar.gz opensim-SC_OLD-3853904b80c659ae94db780f4de713d639200e50.tar.bz2 opensim-SC_OLD-3853904b80c659ae94db780f4de713d639200e50.tar.xz |
Quell three new warnings I introduced with AgentPrefsData, return an empty llsd map instead of an empty llsd block when no AgentPrefs service is available to try and appease Firestorm
Signed-off-by: Diva Canto <diva@metaverseink.com>
Diffstat (limited to 'OpenSim')
4 files changed, 8 insertions, 8 deletions
diff --git a/OpenSim/Data/MySQL/MySQLAgentPreferencesData.cs b/OpenSim/Data/MySQL/MySQLAgentPreferencesData.cs index bf188ee..6be205e 100644 --- a/OpenSim/Data/MySQL/MySQLAgentPreferencesData.cs +++ b/OpenSim/Data/MySQL/MySQLAgentPreferencesData.cs | |||
@@ -52,9 +52,9 @@ namespace OpenSim.Data.MySQL | |||
52 | return ret[0]; | 52 | return ret[0]; |
53 | } | 53 | } |
54 | 54 | ||
55 | public void Store(AgentPreferencesData data) | 55 | public override bool Store(AgentPreferencesData data) |
56 | { | 56 | { |
57 | base.Store(data); | 57 | return base.Store(data); |
58 | } | 58 | } |
59 | } | 59 | } |
60 | } | 60 | } |
diff --git a/OpenSim/Data/PGSQL/PGSQLAgentPreferencesData.cs b/OpenSim/Data/PGSQL/PGSQLAgentPreferencesData.cs index c27087d..4c84724 100644 --- a/OpenSim/Data/PGSQL/PGSQLAgentPreferencesData.cs +++ b/OpenSim/Data/PGSQL/PGSQLAgentPreferencesData.cs | |||
@@ -52,9 +52,9 @@ namespace OpenSim.Data.PGSQL | |||
52 | return ret[0]; | 52 | return ret[0]; |
53 | } | 53 | } |
54 | 54 | ||
55 | public void Store(AgentPreferencesData data) | 55 | public override bool Store(AgentPreferencesData data) |
56 | { | 56 | { |
57 | base.Store(data); | 57 | return base.Store(data); |
58 | } | 58 | } |
59 | } | 59 | } |
60 | } | 60 | } |
diff --git a/OpenSim/Data/SQLite/SQLiteAgentPreferencesData.cs b/OpenSim/Data/SQLite/SQLiteAgentPreferencesData.cs index ea267ac..5bfcedb 100644 --- a/OpenSim/Data/SQLite/SQLiteAgentPreferencesData.cs +++ b/OpenSim/Data/SQLite/SQLiteAgentPreferencesData.cs | |||
@@ -56,9 +56,9 @@ namespace OpenSim.Data.SQLite | |||
56 | return ret[0]; | 56 | return ret[0]; |
57 | } | 57 | } |
58 | 58 | ||
59 | public void Store(AgentPreferencesData data) | 59 | public override bool Store(AgentPreferencesData data) |
60 | { | 60 | { |
61 | base.Store(data); | 61 | return base.Store(data); |
62 | } | 62 | } |
63 | } | 63 | } |
64 | } | 64 | } |
diff --git a/OpenSim/Region/ClientStack/Linden/Caps/AgentPreferencesModule.cs b/OpenSim/Region/ClientStack/Linden/Caps/AgentPreferencesModule.cs index fcc260f..aabdb51 100644 --- a/OpenSim/Region/ClientStack/Linden/Caps/AgentPreferencesModule.cs +++ b/OpenSim/Region/ClientStack/Linden/Caps/AgentPreferencesModule.cs | |||
@@ -118,12 +118,13 @@ namespace OpenSim.Region.ClientStack.LindenCaps | |||
118 | 118 | ||
119 | public string UpdateAgentPreferences(string request, string path, string param, UUID agent) | 119 | public string UpdateAgentPreferences(string request, string path, string param, UUID agent) |
120 | { | 120 | { |
121 | OSDMap resp = new OSDMap(); | ||
121 | // The viewer doesn't do much with the return value, so for now, if there is no preference service, | 122 | // The viewer doesn't do much with the return value, so for now, if there is no preference service, |
122 | // we'll return a null llsd block for debugging purposes. This may change if someone knows what the | 123 | // we'll return a null llsd block for debugging purposes. This may change if someone knows what the |
123 | // correct server response would be here. | 124 | // correct server response would be here. |
124 | if (m_scenes[0].AgentPreferencesService == null) | 125 | if (m_scenes[0].AgentPreferencesService == null) |
125 | { | 126 | { |
126 | return "<llsd><undef /></llsd>"; | 127 | return OSDParser.SerializeLLSDXmlString(resp); |
127 | } | 128 | } |
128 | m_log.DebugFormat("[AgentPrefs]: UpdateAgentPreferences for {0}", agent.ToString()); | 129 | m_log.DebugFormat("[AgentPrefs]: UpdateAgentPreferences for {0}", agent.ToString()); |
129 | OSDMap req = (OSDMap)OSDParser.DeserializeLLSDXml(request); | 130 | OSDMap req = (OSDMap)OSDParser.DeserializeLLSDXml(request); |
@@ -158,7 +159,6 @@ namespace OpenSim.Region.ClientStack.LindenCaps | |||
158 | data.LanguageIsPublic = req["language_is_public"].AsBoolean(); | 159 | data.LanguageIsPublic = req["language_is_public"].AsBoolean(); |
159 | } | 160 | } |
160 | m_scenes[0].AgentPreferencesService.StoreAgentPreferences(data); | 161 | m_scenes[0].AgentPreferencesService.StoreAgentPreferences(data); |
161 | OSDMap resp = new OSDMap(); | ||
162 | OSDMap respAccessPrefs = new OSDMap(); | 162 | OSDMap respAccessPrefs = new OSDMap(); |
163 | respAccessPrefs["max"] = data.AccessPrefs; | 163 | respAccessPrefs["max"] = data.AccessPrefs; |
164 | resp["access_prefs"] = respAccessPrefs; | 164 | resp["access_prefs"] = respAccessPrefs; |