diff options
author | Mic Bowman | 2012-04-25 09:52:44 -0700 |
---|---|---|
committer | Mic Bowman | 2012-04-25 09:52:44 -0700 |
commit | 1afae013111b7c817037371fca805a78c3ab67cc (patch) | |
tree | dc4f08217c64fd92f4fac250344f009f583fca4e /OpenSim/Data/MySQL/MySQLAuthenticationData.cs | |
parent | Add try/catch around Json script method registration to avoild some issues (diff) | |
parent | Slight rewording of output messages. (diff) | |
download | opensim-SC-1afae013111b7c817037371fca805a78c3ab67cc.zip opensim-SC-1afae013111b7c817037371fca805a78c3ab67cc.tar.gz opensim-SC-1afae013111b7c817037371fca805a78c3ab67cc.tar.bz2 opensim-SC-1afae013111b7c817037371fca805a78c3ab67cc.tar.xz |
Merge branch 'master' of ssh://opensimulator.org/var/git/opensim
Diffstat (limited to 'OpenSim/Data/MySQL/MySQLAuthenticationData.cs')
-rw-r--r-- | OpenSim/Data/MySQL/MySQLAuthenticationData.cs | 23 |
1 files changed, 15 insertions, 8 deletions
diff --git a/OpenSim/Data/MySQL/MySQLAuthenticationData.cs b/OpenSim/Data/MySQL/MySQLAuthenticationData.cs index 8d82f61..664ce84 100644 --- a/OpenSim/Data/MySQL/MySQLAuthenticationData.cs +++ b/OpenSim/Data/MySQL/MySQLAuthenticationData.cs | |||
@@ -79,14 +79,7 @@ namespace OpenSim.Data.MySQL | |||
79 | { | 79 | { |
80 | ret.PrincipalID = principalID; | 80 | ret.PrincipalID = principalID; |
81 | 81 | ||
82 | if (m_ColumnNames == null) | 82 | CheckColumnNames(result); |
83 | { | ||
84 | m_ColumnNames = new List<string>(); | ||
85 | |||
86 | DataTable schemaTable = result.GetSchemaTable(); | ||
87 | foreach (DataRow row in schemaTable.Rows) | ||
88 | m_ColumnNames.Add(row["ColumnName"].ToString()); | ||
89 | } | ||
90 | 83 | ||
91 | foreach (string s in m_ColumnNames) | 84 | foreach (string s in m_ColumnNames) |
92 | { | 85 | { |
@@ -105,6 +98,20 @@ namespace OpenSim.Data.MySQL | |||
105 | } | 98 | } |
106 | } | 99 | } |
107 | 100 | ||
101 | private void CheckColumnNames(IDataReader result) | ||
102 | { | ||
103 | if (m_ColumnNames != null) | ||
104 | return; | ||
105 | |||
106 | List<string> columnNames = new List<string>(); | ||
107 | |||
108 | DataTable schemaTable = result.GetSchemaTable(); | ||
109 | foreach (DataRow row in schemaTable.Rows) | ||
110 | columnNames.Add(row["ColumnName"].ToString()); | ||
111 | |||
112 | m_ColumnNames = columnNames; | ||
113 | } | ||
114 | |||
108 | public bool Store(AuthenticationData data) | 115 | public bool Store(AuthenticationData data) |
109 | { | 116 | { |
110 | if (data.Data.ContainsKey("UUID")) | 117 | if (data.Data.ContainsKey("UUID")) |