diff options
Diffstat (limited to 'linden/indra/llcommon/llsdutil.cpp')
-rw-r--r-- | linden/indra/llcommon/llsdutil.cpp | 11 |
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 | ||
227 | LLSD 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 | } | ||