aboutsummaryrefslogtreecommitdiff
path: root/contrib/epee/src
diff options
context:
space:
mode:
Diffstat (limited to 'contrib/epee/src')
-rw-r--r--contrib/epee/src/mlocker.cpp4
-rw-r--r--contrib/epee/src/network_throttle-detail.cpp1
2 files changed, 3 insertions, 2 deletions
diff --git a/contrib/epee/src/mlocker.cpp b/contrib/epee/src/mlocker.cpp
index 5573d591a..c3262e8f4 100644
--- a/contrib/epee/src/mlocker.cpp
+++ b/contrib/epee/src/mlocker.cpp
@@ -84,8 +84,8 @@ namespace epee
boost::mutex &mlocker::mutex()
{
- static boost::mutex vmutex;
- return vmutex;
+ static boost::mutex *vmutex = new boost::mutex();
+ return *vmutex;
}
std::map<size_t, unsigned int> &mlocker::map()
{
diff --git a/contrib/epee/src/network_throttle-detail.cpp b/contrib/epee/src/network_throttle-detail.cpp
index 28c85bb78..6f727a1cf 100644
--- a/contrib/epee/src/network_throttle-detail.cpp
+++ b/contrib/epee/src/network_throttle-detail.cpp
@@ -150,6 +150,7 @@ network_throttle::network_throttle(const std::string &nameshort, const std::stri
m_any_packet_yet = false;
m_slot_size = 1.0; // hard coded in few places
m_target_speed = 16 * 1024; // other defaults are probably defined in the command-line parsing code when this class is used e.g. as main global throttle
+ m_last_sample_time = 0;
}
void network_throttle::set_name(const std::string &name)