Mercurial > hg > orthanc
changeset 2792:57e2d65d37ce
OrthancPlugins::MemoryBuffer::Release(), fixing openssl link
author | Sebastien Jodogne <s.jodogne@gmail.com> |
---|---|
date | Thu, 26 Jul 2018 22:06:55 +0200 |
parents | d015fa861e3c |
children | 87b426e54473 |
files | Plugins/Samples/Common/OrthancPluginCppWrapper.cpp Plugins/Samples/Common/OrthancPluginCppWrapper.h Resources/CMake/OpenSslConfiguration.cmake |
diffstat | 3 files changed, 15 insertions(+), 1 deletions(-) [+] |
line wrap: on
line diff
--- a/Plugins/Samples/Common/OrthancPluginCppWrapper.cpp Thu Jul 26 21:18:05 2018 +0200 +++ b/Plugins/Samples/Common/OrthancPluginCppWrapper.cpp Thu Jul 26 22:06:55 2018 +0200 @@ -107,6 +107,17 @@ } + OrthancPluginMemoryBuffer MemoryBuffer::Release() + { + OrthancPluginMemoryBuffer result = buffer_; + + buffer_.data = NULL; + buffer_.size = 0; + + return result; + } + + void MemoryBuffer::ToString(std::string& target) const { if (buffer_.size == 0)
--- a/Plugins/Samples/Common/OrthancPluginCppWrapper.h Thu Jul 26 21:18:05 2018 +0200 +++ b/Plugins/Samples/Common/OrthancPluginCppWrapper.h Thu Jul 26 22:06:55 2018 +0200 @@ -92,9 +92,11 @@ return &buffer_; } - // This transfers ownership + // This transfers ownership from "other" to "this" void Assign(OrthancPluginMemoryBuffer& other); + OrthancPluginMemoryBuffer Release(); + const char* GetData() const { if (buffer_.size > 0)
--- a/Resources/CMake/OpenSslConfiguration.cmake Thu Jul 26 21:18:05 2018 +0200 +++ b/Resources/CMake/OpenSslConfiguration.cmake Thu Jul 26 22:06:55 2018 +0200 @@ -312,6 +312,7 @@ ${OPENSSL_SOURCES_DIR}/ssl/bad_dtls_test.c ${OPENSSL_SOURCES_DIR}/ssl/clienthellotest.c ${OPENSSL_SOURCES_DIR}/ssl/sslv2conftest.c + ${OPENSSL_SOURCES_DIR}/crypto/ec/ecp_nistz256.c ${OPENSSL_SOURCES_DIR}/crypto/ec/ecp_nistz256_table.c )