diff options
author | Steven Bennetts <steve@lindenlab.com> | 2007-01-31 19:36:32 +0000 |
---|---|---|
committer | Steven Bennetts <steve@lindenlab.com> | 2007-01-31 19:36:32 +0000 |
commit | 934e15973ea86e0e863123d4c5eabeae44d6c763 (patch) | |
tree | c4d9ff93e1d9283c4807981ecf1973babf620143 /indra/llcommon/llsdutil.cpp | |
parent | 565e6873decfaadf9eda2d0109132eb64c0ad325 (diff) |
merge release@57486 release-candidate@57503
Diffstat (limited to 'indra/llcommon/llsdutil.cpp')
-rw-r--r-- | indra/llcommon/llsdutil.cpp | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/indra/llcommon/llsdutil.cpp b/indra/llcommon/llsdutil.cpp index 7cd0ed4c08..a6ac2fb12b 100644 --- a/indra/llcommon/llsdutil.cpp +++ b/indra/llcommon/llsdutil.cpp @@ -203,3 +203,14 @@ U32 ll_ipaddr_from_sd(const LLSD& sd) memcpy(&ret, &(v[0]), 4); /* Flawfinder: ignore */ return ret; } + +// Converts an LLSD binary to an LLSD string +LLSD ll_string_from_binary(const LLSD& sd) +{ + std::vector<U8> value = sd.asBinary(); + char* c_str = new char[value.size() + 1]; + memcpy(c_str, &value[0], value.size()); + c_str[value.size()] = '\0'; + + return c_str; +} |