aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/linden/indra/llcommon/llsdutil.cpp
diff options
context:
space:
mode:
authorJacek Antonelli2008-08-15 23:44:49 -0500
committerJacek Antonelli2008-08-15 23:44:49 -0500
commitc659c65d02d4d92b614ccdf2e2a4a0dcf859a8cd (patch)
tree49f225d319b111f30f113c4cf7728565afa52132 /linden/indra/llcommon/llsdutil.cpp
parentSecond Life viewer sources 1.13.2.15 (diff)
downloadmeta-impy-c659c65d02d4d92b614ccdf2e2a4a0dcf859a8cd.zip
meta-impy-c659c65d02d4d92b614ccdf2e2a4a0dcf859a8cd.tar.gz
meta-impy-c659c65d02d4d92b614ccdf2e2a4a0dcf859a8cd.tar.bz2
meta-impy-c659c65d02d4d92b614ccdf2e2a4a0dcf859a8cd.tar.xz
Second Life viewer sources 1.13.3.2
Diffstat (limited to '')
-rw-r--r--linden/indra/llcommon/llsdutil.cpp11
1 files changed, 11 insertions, 0 deletions
diff --git a/linden/indra/llcommon/llsdutil.cpp b/linden/indra/llcommon/llsdutil.cpp
index f111039..0f295a1 100644
--- a/linden/indra/llcommon/llsdutil.cpp
+++ b/linden/indra/llcommon/llsdutil.cpp
@@ -222,3 +222,14 @@ U32 ll_ipaddr_from_sd(const LLSD& sd)
222 memcpy(&ret, &(v[0]), 4); /* Flawfinder: ignore */ 222 memcpy(&ret, &(v[0]), 4); /* Flawfinder: ignore */
223 return ret; 223 return ret;
224} 224}
225
226// Converts an LLSD binary to an LLSD string
227LLSD ll_string_from_binary(const LLSD& sd)
228{
229 std::vector<U8> value = sd.asBinary();
230 char* c_str = new char[value.size() + 1];
231 memcpy(c_str, &value[0], value.size());
232 c_str[value.size()] = '\0';
233
234 return c_str;
235}