Open-Transactions  0.93.0-ge03d287
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
opentxs::LucreDumper Class Reference

#include <DigitalCash.hpp>

Public Member Functions

 LucreDumper ()
 
 ~LucreDumper ()
 

Detailed Description

Definition at line 162 of file DigitalCash.hpp.

Constructor & Destructor Documentation

opentxs::LucreDumper::LucreDumper ( )

Definition at line 186 of file DigitalCash.cpp.

187 {
188 #ifdef _WIN32
189 #ifdef _DEBUG
190  OTString strOpenSSLDumpFilename("openssl.dumpfile"), strOpenSSLDumpFilePath,
191  strDataPath; // todo security. We shouldn't necessarily be dumping this
192  // info to file AT ALL.
193  bool bGetDataFolderSuccess = OTDataFolder::Get(strDataPath);
194  OT_ASSERT_MSG(bGetDataFolderSuccess,
195  "_OT_LucreDumper(): Failed to Get Data Path");
196  bool bRelativeToCanonicalSuccess = OTPaths::RelativeToCanonical(
197  strOpenSSLDumpFilePath, strDataPath, strOpenSSLDumpFilename);
198  OT_ASSERT_MSG(bRelativeToCanonicalSuccess,
199  "_OT_LucreDumper(): Unable To Build Full Path");
200 
201  strOpenSSLDumpFilename.Set("");
202  strDataPath.Set("");
203  SetDumper(strOpenSSLDumpFilePath.Get()); // We are only dumping this way
204  // currently as a temporary
205  // solution to the applink.c
206  // openssl thing that can cause
207  // crashes in Lucre when
208  // withdrawing cash. (Caused by
209  // da2ce7 removing Lucre from OT
210  // and moving it into a dylib.)
211  m_str_dumpfile = strOpenSSLDumpFilePath.Get();
212  strOpenSSLDumpFilePath.Set("");
213 #endif
214 #else
215  SetDumper(stderr);
216 #endif
217 }
static EXPORT bool RelativeToCanonical(OTString &out_strCanonicalPath, const OTString &strBasePath, const OTString &strRelativePath)
Definition: OTPaths.cpp:1280
#define OT_ASSERT_MSG(x, s)
Definition: Assert.hpp:155
void SetDumper(BIO *out)
static EXPORT OTString Get()
opentxs::LucreDumper::~LucreDumper ( )

Definition at line 219 of file DigitalCash.cpp.

220 {
221 #ifdef _WIN32
222 #ifdef _DEBUG
223  CleanupDumpFile(m_str_dumpfile.c_str());
224 #endif
225 #endif
226 }

The documentation for this class was generated from the following files: