aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim
diff options
context:
space:
mode:
authorJustin Clarke Casey2007-12-28 22:21:53 +0000
committerJustin Clarke Casey2007-12-28 22:21:53 +0000
commit592c39a7b011ef062b2b4f85e3808a514d513660 (patch)
treec50be355d353c473fa97d58fa9516928bc9472de /OpenSim
parentFactor out common asset loading from AssetServerBase and Grid/AssetServer/Main (diff)
downloadopensim-SC_OLD-592c39a7b011ef062b2b4f85e3808a514d513660.zip
opensim-SC_OLD-592c39a7b011ef062b2b4f85e3808a514d513660.tar.gz
opensim-SC_OLD-592c39a7b011ef062b2b4f85e3808a514d513660.tar.bz2
opensim-SC_OLD-592c39a7b011ef062b2b4f85e3808a514d513660.tar.xz
Remove now dead code
Diffstat (limited to 'OpenSim')
-rw-r--r--OpenSim/Grid/AssetServer/Main.cs44
1 files changed, 0 insertions, 44 deletions
diff --git a/OpenSim/Grid/AssetServer/Main.cs b/OpenSim/Grid/AssetServer/Main.cs
index 473c0bb..01b2c02 100644
--- a/OpenSim/Grid/AssetServer/Main.cs
+++ b/OpenSim/Grid/AssetServer/Main.cs
@@ -109,7 +109,6 @@ namespace OpenSim.Grid.AssetServer
109 return null; 109 return null;
110 } 110 }
111 111
112
113 public IAssetProvider LoadDatabasePlugin(string FileName) 112 public IAssetProvider LoadDatabasePlugin(string FileName)
114 { 113 {
115 MainLog.Instance.Verbose("ASSET SERVER", "LoadDatabasePlugin: Attempting to load " + FileName); 114 MainLog.Instance.Verbose("ASSET SERVER", "LoadDatabasePlugin: Attempting to load " + FileName);
@@ -150,9 +149,6 @@ namespace OpenSim.Grid.AssetServer
150 MainLog.Instance.Error("ASSET", "Failed to load a database plugin, server halting"); 149 MainLog.Instance.Error("ASSET", "Failed to load a database plugin, server halting");
151 Environment.Exit(-1); 150 Environment.Exit(-1);
152 } 151 }
153// assetServer.LoadDefaultAssets();
154
155// m_assetServer = assetServer;
156 } 152 }
157 catch (Exception e) 153 catch (Exception e)
158 { 154 {
@@ -161,46 +157,6 @@ namespace OpenSim.Grid.AssetServer
161 } 157 }
162 } 158 }
163 159
164 public void LoadAsset(AssetBase info, bool image, string filename)
165 {
166 //should request Asset from storage manager
167 //but for now read from file
168
169 string dataPath = Path.Combine(AppDomain.CurrentDomain.BaseDirectory, "assets"); //+ folder;
170 string fileName = Path.Combine(dataPath, filename);
171 FileInfo fInfo = new FileInfo(fileName);
172 long numBytes = fInfo.Length;
173 FileStream fStream = new FileStream(fileName, FileMode.Open, FileAccess.Read);
174 byte[] idata = new byte[numBytes];
175 BinaryReader br = new BinaryReader(fStream);
176 idata = br.ReadBytes((int) numBytes);
177 br.Close();
178 fStream.Close();
179 info.Data = idata;
180 //info.loaded=true;
181 }
182
183 public AssetBase CreateAsset(string assetIdStr, string name, string filename, bool isImage)
184 {
185 AssetBase asset = new AssetBase(
186 new LLUUID(assetIdStr),
187 name
188 );
189
190 if (!String.IsNullOrEmpty(filename))
191 {
192 MainLog.Instance.Verbose("ASSETS", "Loading: [{0}][{1}]", name, filename);
193
194 LoadAsset(asset, isImage, filename);
195 }
196 else
197 {
198 MainLog.Instance.Verbose("ASSETS", "Instantiated: [{0}]", name);
199 }
200
201 return asset;
202 }
203
204 public void LoadDefaultAssets() 160 public void LoadDefaultAssets()
205 { 161 {
206 assetLoader.ForEachXmlAsset(StoreAsset); 162 assetLoader.ForEachXmlAsset(StoreAsset);