diff options
author | Justin Clark-Casey (justincc) | 2013-07-13 00:03:23 +0100 |
---|---|---|
committer | Justin Clark-Casey (justincc) | 2013-07-13 00:03:23 +0100 |
commit | b4cb644a053d671861f5309930ce8f5551875b7a (patch) | |
tree | ed3d713200f61dee709a0457399d6e56a5b7a5db /OpenSim/Region | |
parent | In co-op termination, extend EventWaitHandle to give this an indefinite lifet... (diff) | |
parent | Add ToOSDMap() overrides to the Stat subclass CounterStat. (diff) | |
download | opensim-SC_OLD-b4cb644a053d671861f5309930ce8f5551875b7a.zip opensim-SC_OLD-b4cb644a053d671861f5309930ce8f5551875b7a.tar.gz opensim-SC_OLD-b4cb644a053d671861f5309930ce8f5551875b7a.tar.bz2 opensim-SC_OLD-b4cb644a053d671861f5309930ce8f5551875b7a.tar.xz |
Merge branch 'master' of ssh://opensimulator.org/var/git/opensim
Diffstat (limited to 'OpenSim/Region')
-rw-r--r-- | OpenSim/Region/ClientStack/Linden/Caps/UploadBakedTextureModule.cs | 35 |
1 files changed, 27 insertions, 8 deletions
diff --git a/OpenSim/Region/ClientStack/Linden/Caps/UploadBakedTextureModule.cs b/OpenSim/Region/ClientStack/Linden/Caps/UploadBakedTextureModule.cs index 3b0ccd7..79a935d 100644 --- a/OpenSim/Region/ClientStack/Linden/Caps/UploadBakedTextureModule.cs +++ b/OpenSim/Region/ClientStack/Linden/Caps/UploadBakedTextureModule.cs | |||
@@ -63,9 +63,16 @@ namespace OpenSim.Region.ClientStack.Linden | |||
63 | 63 | ||
64 | private Scene m_scene; | 64 | private Scene m_scene; |
65 | private bool m_persistBakedTextures; | 65 | private bool m_persistBakedTextures; |
66 | private string m_URL; | ||
66 | 67 | ||
67 | public void Initialise(IConfigSource source) | 68 | public void Initialise(IConfigSource source) |
68 | { | 69 | { |
70 | IConfig config = source.Configs["ClientStack.LindenCaps"]; | ||
71 | if (config == null) | ||
72 | return; | ||
73 | |||
74 | m_URL = config.GetString("Cap_UploadBakedTexture", string.Empty); | ||
75 | |||
69 | IConfig appearanceConfig = source.Configs["Appearance"]; | 76 | IConfig appearanceConfig = source.Configs["Appearance"]; |
70 | if (appearanceConfig != null) | 77 | if (appearanceConfig != null) |
71 | m_persistBakedTextures = appearanceConfig.GetBoolean("PersistBakedTextures", m_persistBakedTextures); | 78 | m_persistBakedTextures = appearanceConfig.GetBoolean("PersistBakedTextures", m_persistBakedTextures); |
@@ -100,15 +107,27 @@ namespace OpenSim.Region.ClientStack.Linden | |||
100 | 107 | ||
101 | public void RegisterCaps(UUID agentID, Caps caps) | 108 | public void RegisterCaps(UUID agentID, Caps caps) |
102 | { | 109 | { |
103 | caps.RegisterHandler( | 110 | UUID capID = UUID.Random(); |
104 | "UploadBakedTexture", | 111 | |
105 | new RestStreamHandler( | 112 | //caps.RegisterHandler("GetTexture", new StreamHandler("GET", "/CAPS/" + capID, ProcessGetTexture)); |
106 | "POST", | 113 | if (m_URL == "localhost") |
107 | "/CAPS/" + caps.CapsObjectPath + m_uploadBakedTexturePath, | 114 | { |
108 | new UploadBakedTextureHandler( | 115 | caps.RegisterHandler( |
109 | caps, m_scene.AssetService, m_persistBakedTextures).UploadBakedTexture, | ||
110 | "UploadBakedTexture", | 116 | "UploadBakedTexture", |
111 | agentID.ToString())); | 117 | new RestStreamHandler( |
118 | "POST", | ||
119 | "/CAPS/" + caps.CapsObjectPath + m_uploadBakedTexturePath, | ||
120 | new UploadBakedTextureHandler( | ||
121 | caps, m_scene.AssetService, m_persistBakedTextures).UploadBakedTexture, | ||
122 | "UploadBakedTexture", | ||
123 | agentID.ToString())); | ||
124 | |||
125 | } | ||
126 | else | ||
127 | { | ||
128 | caps.RegisterHandler("UploadBakedTexture", m_URL); | ||
129 | } | ||
130 | |||
112 | } | 131 | } |
113 | } | 132 | } |
114 | } \ No newline at end of file | 133 | } \ No newline at end of file |