mirror of
https://github.com/rakshasa/rtorrent.git
synced 2026-10-19 23:56:16 +00:00
Since logs are now thread-safe, allow all threads to push log messages. #43
This commit is contained in:
@@ -137,9 +137,6 @@ Manager::handshake_log(const sockaddr* sa, int msg, int err, const torrent::Hash
|
|||||||
|
|
||||||
void
|
void
|
||||||
Manager::push_log(const char* msg) {
|
Manager::push_log(const char* msg) {
|
||||||
if (!pthread_equal(pthread_self(), torrent::main_thread()->pthread()))
|
|
||||||
throw torrent::internal_error("Manager::push_log(...): Cannot call this function from other threads than 'main'.");
|
|
||||||
|
|
||||||
m_log_important->lock_and_push_log(msg, strlen(msg), 0);
|
m_log_important->lock_and_push_log(msg, strlen(msg), 0);
|
||||||
m_log_complete->lock_and_push_log(msg, strlen(msg), 0);
|
m_log_complete->lock_and_push_log(msg, strlen(msg), 0);
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user