From 9edb91da5754cf194637d1d7faa513719b61f9b4 Mon Sep 17 00:00:00 2001 From: sapier Date: Mon, 6 Jan 2014 20:05:28 +0100 Subject: Fixed minetest reliable udp implementation (compatible to old clients) --- src/log.cpp | 2 ++ 1 file changed, 2 insertions(+) (limited to 'src/log.cpp') diff --git a/src/log.cpp b/src/log.cpp index 527f54480..97f25cc77 100644 --- a/src/log.cpp +++ b/src/log.cpp @@ -93,6 +93,7 @@ static std::string get_lev_string(enum LogMessageLevel lev) void log_printline(enum LogMessageLevel lev, const std::string &text) { + log_threadnamemutex.Lock(); std::string threadname = "(unknown thread)"; std::map::const_iterator i; i = log_threadnames.find(get_current_thread_id()); @@ -108,6 +109,7 @@ void log_printline(enum LogMessageLevel lev, const std::string &text) out->printLog(os.str(), lev); out->printLog(lev, text); } + log_threadnamemutex.Unlock(); } class Logbuf : public std::streambuf -- cgit v1.2.3