* Changing push_log calls to the new logging facility.

git-svn-id: svn://rakshasa.no/libtorrent/trunk/rtorrent@1284 e378c898-3ddf-0310-93e7-cc216c733640
This commit is contained in:
rakshasa
2011-09-21 05:07:06 +00:00
parent 156d69c854
commit 4914d798f1
10 changed files with 44 additions and 31 deletions
+5
View File
@@ -43,6 +43,7 @@
#include <sys/socket.h>
#include <torrent/exceptions.h>
#include <torrent/poll.h>
#include <torrent/utils/log.h>
#include "utils/socket_fd.h"
@@ -182,6 +183,8 @@ SCgiTask::event_read() {
write(m_parent->log_fd(), "\n---\n", sizeof("\n---\n"));
}
lt_log_print(torrent::LOG_RPC_DEBUG, "---\n%*s\n---", m_bufferSize - std::distance(m_buffer, m_body), m_body);
// Close if the call failed, else stay open to write back data.
if (!m_parent->receive_call(this, m_body, m_bufferSize - std::distance(m_buffer, m_body)))
close();
@@ -240,6 +243,8 @@ SCgiTask::receive_write(const char* buffer, uint32_t length) {
write(m_parent->log_fd(), "\n---\n", sizeof("\n---\n"));
}
lt_log_print(torrent::LOG_RPC_DEBUG, "---\n%*s\n---", m_bufferSize, m_buffer);
event_write();
return true;
}