aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenGridServices.AssetServer
diff options
context:
space:
mode:
authorgareth2007-04-30 04:50:25 +0000
committergareth2007-04-30 04:50:25 +0000
commitce60ca5e673cd97fb2bcc4f5b943badc717d3527 (patch)
tree22af777c6f2b22bebfa72ee3312873487b738e7e /OpenGridServices.AssetServer
parentW00t! It loads a DB! (diff)
downloadopensim-SC_OLD-ce60ca5e673cd97fb2bcc4f5b943badc717d3527.zip
opensim-SC_OLD-ce60ca5e673cd97fb2bcc4f5b943badc717d3527.tar.gz
opensim-SC_OLD-ce60ca5e673cd97fb2bcc4f5b943badc717d3527.tar.bz2
opensim-SC_OLD-ce60ca5e673cd97fb2bcc4f5b943badc717d3527.tar.xz
It kinda works...
Loads assets across the network, body shape still broken and not displaying properly in grid mode
Diffstat (limited to 'OpenGridServices.AssetServer')
-rw-r--r--OpenGridServices.AssetServer/Main.cs30
1 files changed, 29 insertions, 1 deletions
diff --git a/OpenGridServices.AssetServer/Main.cs b/OpenGridServices.AssetServer/Main.cs
index 887bf07..b57a5a5 100644
--- a/OpenGridServices.AssetServer/Main.cs
+++ b/OpenGridServices.AssetServer/Main.cs
@@ -100,7 +100,35 @@ namespace OpenGridServices.AssetServer
100 } 100 }
101 101
102 public string assetGetMethod(string request, string path, string param) { 102 public string assetGetMethod(string request, string path, string param) {
103 return ""; 103 byte[] assetdata=getAssetData(new LLUUID(param),false);
104 if(assetdata!=null) {
105 return System.Text.Encoding.ASCII.GetString(assetdata);
106 } else {
107 return "";
108 }
109
110 }
111
112 public byte[] getAssetData(LLUUID assetID, bool isTexture) {
113 byte[] idata = null;
114 bool found = false;
115 AssetStorage foundAsset = null;
116
117 IObjectSet result = db.Get(new AssetStorage(assetID));
118 if (result.Count > 0)
119 {
120 foundAsset = (AssetStorage)result.Next();
121 found = true;
122 }
123
124 if (found)
125 {
126 return foundAsset.Data;
127 }
128 else
129 {
130 return null;
131 }
104 } 132 }
105 133
106 public void setupDB() { 134 public void setupDB() {