aboutsummaryrefslogtreecommitdiffstatshomepage
diff options
context:
space:
mode:
authorJustin Clark-Casey (justincc)2014-01-15 00:28:58 +0000
committerJustin Clark-Casey (justincc)2014-01-15 00:28:58 +0000
commit91d86301efd478f9a10a077597e9c631e029457b (patch)
tree0c298b09c55bd7d8d5eb1bb5b9d7a83c2173f65c
parentFix false positive test failure in TestRepeatSameDrawContainingImageReusingTe... (diff)
parentDynamically adjust to the number of visual params sent. (diff)
downloadopensim-SC_OLD-91d86301efd478f9a10a077597e9c631e029457b.zip
opensim-SC_OLD-91d86301efd478f9a10a077597e9c631e029457b.tar.gz
opensim-SC_OLD-91d86301efd478f9a10a077597e9c631e029457b.tar.bz2
opensim-SC_OLD-91d86301efd478f9a10a077597e9c631e029457b.tar.xz
Merge branch '0.7.6-post-fixes' of ssh://opensimulator.org/var/git/opensim into 0.7.6-post-fixes
-rw-r--r--OpenSim/Data/MySQL/MySQLUserProfilesData.cs20
-rw-r--r--OpenSim/Data/SQLite/SQLiteUserProfilesData.cs3
-rw-r--r--OpenSim/Region/ClientStack/Linden/UDP/LLClientView.cs2
-rw-r--r--OpenSim/Region/CoreModules/Avatar/UserProfiles/UserProfileModule.cs4
-rw-r--r--OpenSim/Services/UserProfilesService/UserProfilesService.cs61
5 files changed, 80 insertions, 10 deletions
diff --git a/OpenSim/Data/MySQL/MySQLUserProfilesData.cs b/OpenSim/Data/MySQL/MySQLUserProfilesData.cs
index dca80c3..13e0a57 100644
--- a/OpenSim/Data/MySQL/MySQLUserProfilesData.cs
+++ b/OpenSim/Data/MySQL/MySQLUserProfilesData.cs
@@ -546,6 +546,10 @@ namespace OpenSim.Data.MySQL
546 reader.Read(); 546 reader.Read();
547 notes.Notes = OSD.FromString((string)reader["notes"]); 547 notes.Notes = OSD.FromString((string)reader["notes"]);
548 } 548 }
549 else
550 {
551 notes.Notes = OSD.FromString("");
552 }
549 } 553 }
550 } 554 }
551 } 555 }
@@ -927,15 +931,19 @@ namespace OpenSim.Data.MySQL
927 } 931 }
928 else 932 else
929 { 933 {
934 dbcon.Close();
935 dbcon.Open();
936
937 query = "INSERT INTO usersettings VALUES ";
938 query += "(?uuid,'false','false', ?Email)";
939
930 using (MySqlCommand put = new MySqlCommand(query, dbcon)) 940 using (MySqlCommand put = new MySqlCommand(query, dbcon))
931 { 941 {
932 query = "INSERT INTO usersettings VALUES ";
933 query += "(?Id,'false','false', '')";
934 942
935 lock(Lock) 943 put.Parameters.AddWithValue("?Email", pref.EMail);
936 { 944 put.Parameters.AddWithValue("?uuid", pref.UserId.ToString());
937 put.ExecuteNonQuery(); 945
938 } 946 put.ExecuteNonQuery();
939 } 947 }
940 } 948 }
941 } 949 }
diff --git a/OpenSim/Data/SQLite/SQLiteUserProfilesData.cs b/OpenSim/Data/SQLite/SQLiteUserProfilesData.cs
index 70ce07c..0a6c625 100644
--- a/OpenSim/Data/SQLite/SQLiteUserProfilesData.cs
+++ b/OpenSim/Data/SQLite/SQLiteUserProfilesData.cs
@@ -810,11 +810,12 @@ namespace OpenSim.Data.SQLite
810 else 810 else
811 { 811 {
812 query = "INSERT INTO usersettings VALUES "; 812 query = "INSERT INTO usersettings VALUES ";
813 query += "(:Id,'false','false', '')"; 813 query += "(:Id,'false','false', :Email)";
814 814
815 using (SqliteCommand put = (SqliteCommand)m_connection.CreateCommand()) 815 using (SqliteCommand put = (SqliteCommand)m_connection.CreateCommand())
816 { 816 {
817 put.Parameters.AddWithValue(":Id", pref.UserId.ToString()); 817 put.Parameters.AddWithValue(":Id", pref.UserId.ToString());
818 put.Parameters.AddWithValue(":Email", pref.EMail);
818 put.ExecuteNonQuery(); 819 put.ExecuteNonQuery();
819 820
820 } 821 }
diff --git a/OpenSim/Region/ClientStack/Linden/UDP/LLClientView.cs b/OpenSim/Region/ClientStack/Linden/UDP/LLClientView.cs
index c27e613..0b8aceb 100644
--- a/OpenSim/Region/ClientStack/Linden/UDP/LLClientView.cs
+++ b/OpenSim/Region/ClientStack/Linden/UDP/LLClientView.cs
@@ -3631,7 +3631,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP
3631 3631
3632 AvatarAppearancePacket avp = (AvatarAppearancePacket)PacketPool.Instance.GetPacket(PacketType.AvatarAppearance); 3632 AvatarAppearancePacket avp = (AvatarAppearancePacket)PacketPool.Instance.GetPacket(PacketType.AvatarAppearance);
3633 // TODO: don't create new blocks if recycling an old packet 3633 // TODO: don't create new blocks if recycling an old packet
3634 avp.VisualParam = new AvatarAppearancePacket.VisualParamBlock[218]; 3634 avp.VisualParam = new AvatarAppearancePacket.VisualParamBlock[visualParams.Length];
3635 avp.ObjectData.TextureEntry = textureEntry; 3635 avp.ObjectData.TextureEntry = textureEntry;
3636 3636
3637 AvatarAppearancePacket.VisualParamBlock avblock = null; 3637 AvatarAppearancePacket.VisualParamBlock avblock = null;
diff --git a/OpenSim/Region/CoreModules/Avatar/UserProfiles/UserProfileModule.cs b/OpenSim/Region/CoreModules/Avatar/UserProfiles/UserProfileModule.cs
index 697a73e..e13bf4f 100644
--- a/OpenSim/Region/CoreModules/Avatar/UserProfiles/UserProfileModule.cs
+++ b/OpenSim/Region/CoreModules/Avatar/UserProfiles/UserProfileModule.cs
@@ -760,8 +760,8 @@ namespace OpenSim.Region.OptionalModules.Avatar.UserProfiles
760 IClientAPI remoteClient = (IClientAPI)sender; 760 IClientAPI remoteClient = (IClientAPI)sender;
761 string serverURI = string.Empty; 761 string serverURI = string.Empty;
762 GetUserProfileServerURI(remoteClient.AgentId, out serverURI); 762 GetUserProfileServerURI(remoteClient.AgentId, out serverURI);
763 note.TargetId = remoteClient.AgentId; 763 note.UserId = remoteClient.AgentId;
764 UUID.TryParse(args[0], out note.UserId); 764 UUID.TryParse(args[0], out note.TargetId);
765 765
766 object Note = (object)note; 766 object Note = (object)note;
767 if(!JsonRpcRequest(ref Note, "avatarnotesrequest", serverURI, UUID.Random().ToString())) 767 if(!JsonRpcRequest(ref Note, "avatarnotesrequest", serverURI, UUID.Random().ToString()))
diff --git a/OpenSim/Services/UserProfilesService/UserProfilesService.cs b/OpenSim/Services/UserProfilesService/UserProfilesService.cs
index 69c7b91..dd26cdc 100644
--- a/OpenSim/Services/UserProfilesService/UserProfilesService.cs
+++ b/OpenSim/Services/UserProfilesService/UserProfilesService.cs
@@ -37,6 +37,7 @@ using OpenSim.Data;
37using OpenMetaverse; 37using OpenMetaverse;
38using OpenMetaverse.StructuredData; 38using OpenMetaverse.StructuredData;
39using OpenSim.Framework; 39using OpenSim.Framework;
40using OpenSim.Services.UserAccountService;
40 41
41namespace OpenSim.Services.ProfilesService 42namespace OpenSim.Services.ProfilesService
42{ 43{
@@ -166,11 +167,71 @@ namespace OpenSim.Services.ProfilesService
166 #region User Preferences 167 #region User Preferences
167 public bool UserPreferencesUpdate(ref UserPreferences pref, ref string result) 168 public bool UserPreferencesUpdate(ref UserPreferences pref, ref string result)
168 { 169 {
170 if(string.IsNullOrEmpty(pref.EMail))
171 {
172 UserAccount account = new UserAccount();
173 if(userAccounts is UserAccountService.UserAccountService)
174 {
175 try
176 {
177 account = userAccounts.GetUserAccount(UUID.Zero, pref.UserId);
178 if(string.IsNullOrEmpty(account.Email))
179 {
180 result = "No Email address on record!";
181 return false;
182 }
183 else
184 pref.EMail = account.Email;
185 }
186 catch
187 {
188 m_log.Info ("[PROFILES]: UserAccountService Exception: Could not get user account");
189 result = "Missing Email address!";
190 return false;
191 }
192 }
193 else
194 {
195 m_log.Info ("[PROFILES]: UserAccountService: Could not get user account");
196 result = "Missing Email address!";
197 return false;
198 }
199 }
169 return ProfilesData.UpdateUserPreferences(ref pref, ref result); 200 return ProfilesData.UpdateUserPreferences(ref pref, ref result);
170 } 201 }
171 202
172 public bool UserPreferencesRequest(ref UserPreferences pref, ref string result) 203 public bool UserPreferencesRequest(ref UserPreferences pref, ref string result)
173 { 204 {
205 if(string.IsNullOrEmpty(pref.EMail))
206 {
207 UserAccount account = new UserAccount();
208 if(userAccounts is UserAccountService.UserAccountService)
209 {
210 try
211 {
212 account = userAccounts.GetUserAccount(UUID.Zero, pref.UserId);
213 if(string.IsNullOrEmpty(account.Email))
214 {
215 result = "No Email address on record!";
216 return false;
217 }
218 else
219 pref.EMail = account.Email;
220 }
221 catch
222 {
223 m_log.Info ("[PROFILES]: UserAccountService Exception: Could not get user account");
224 result = "Missing Email address!";
225 return false;
226 }
227 }
228 else
229 {
230 m_log.Info ("[PROFILES]: UserAccountService: Could not get user account");
231 result = "Missing Email address!";
232 return false;
233 }
234 }
174 return ProfilesData.GetUserPreferences(ref pref, ref result); 235 return ProfilesData.GetUserPreferences(ref pref, ref result);
175 } 236 }
176 #endregion User Preferences 237 #endregion User Preferences