From ca1e1c48967a991c276cff32634c817c25be7764 Mon Sep 17 00:00:00 2001 From: orignal Date: Sat, 1 Feb 2014 09:16:50 -0500 Subject: [PATCH] fixed compilation error and potentil memory corruption --- util.cpp | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/util.cpp b/util.cpp index e988427c..88a1f7c8 100644 --- a/util.cpp +++ b/util.cpp @@ -91,7 +91,6 @@ namespace filesystem { const boost::filesystem::path &GetDataDir() { - static boost::filesystem::path path; if (i2p::util::config::mapArgs.count("-datadir")) { @@ -106,7 +105,8 @@ namespace filesystem if (!boost::filesystem::create_directory( path )) { LogPrint("Failed to create data directory!"); - return ""; + path = ""; + return path; } } if (!boost::filesystem::is_directory(path)) { @@ -181,7 +181,9 @@ namespace http { i2p::util::http::url u(address); boost::asio::ip::tcp::iostream site; - site.expires_from_now (boost::posix_time::seconds(30)); + // please don't uncomment following line because it's not compatible with boost 1.46 + // 1.46 is default boost for Ubuntu 12.04 LTS + //site.expires_from_now (boost::posix_time::seconds(30)); site.connect(u.host_, "http"); if (site) {