Merge branch 'master' into xirvik

This commit is contained in:
rakshasa
2014-05-03 00:28:14 +09:00
2 changed files with 7 additions and 5 deletions
+5 -3
View File
@@ -140,7 +140,7 @@ initialize_xmlrpc() {
rpc::xmlrpc.insert_command(itr->first, itr->second.m_parm, itr->second.m_doc); rpc::xmlrpc.insert_command(itr->first, itr->second.m_parm, itr->second.m_doc);
} }
lt_log_print(torrent::LOG_RPC_INFO, "XMLRPC initialized with %u functions.", count); lt_log_print(torrent::LOG_RPC_EVENTS, "XMLRPC initialized with %u functions.", count);
} }
torrent::Object torrent::Object
@@ -169,7 +169,8 @@ apply_scgi(const std::string& arg, int type) {
sa.sa_inet()->clear(); sa.sa_inet()->clear();
saPtr = &sa; saPtr = &sa;
lt_log_print(torrent::LOG_RPC_WARN, "The SCGI socket has not been bound to any address and likely poses a security risk."); lt_log_print(torrent::LOG_RPC_EVENTS,
"The SCGI socket has not been bound to any address and likely poses a security risk.");
} else if (std::sscanf(arg.c_str(), "%1023[^:]:%i%c", address, &port, &dummy) == 2) { } else if (std::sscanf(arg.c_str(), "%1023[^:]:%i%c", address, &port, &dummy) == 2) {
if ((err = rak::address_info::get_address_info(address, PF_INET, SOCK_STREAM, &ai)) != 0) if ((err = rak::address_info::get_address_info(address, PF_INET, SOCK_STREAM, &ai)) != 0)
@@ -177,7 +178,8 @@ apply_scgi(const std::string& arg, int type) {
saPtr = ai->address(); saPtr = ai->address();
lt_log_print(torrent::LOG_RPC_WARN, "The SCGI socket is bound to a specific network device yet may still pose a security risk, consider using 'scgi_local'."); lt_log_print(torrent::LOG_RPC_EVENTS,
"The SCGI socket is bound to a specific network device yet may still pose a security risk, consider using 'scgi_local'.");
} else { } else {
throw torrent::input_error("Could not parse address."); throw torrent::input_error("Could not parse address.");
+2 -2
View File
@@ -185,7 +185,7 @@ SCgiTask::event_read() {
result = write(m_parent->log_fd(), "\n---\n", sizeof("\n---\n")); result = write(m_parent->log_fd(), "\n---\n", sizeof("\n---\n"));
} }
lt_log_print_dump(torrent::LOG_RPC_DEBUG, m_body, m_bufferSize - std::distance(m_buffer, m_body), "scgi", "RPC read.", 0); lt_log_print_dump(torrent::LOG_RPC_DUMP, m_body, m_bufferSize - std::distance(m_buffer, m_body), "scgi", "RPC read.", 0);
// Close if the call failed, else stay open to write back data. // 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))) if (!m_parent->receive_call(this, m_body, m_bufferSize - std::distance(m_buffer, m_body)))
@@ -246,7 +246,7 @@ SCgiTask::receive_write(const char* buffer, uint32_t length) {
result = write(m_parent->log_fd(), "\n---\n", sizeof("\n---\n")); result = write(m_parent->log_fd(), "\n---\n", sizeof("\n---\n"));
} }
lt_log_print_dump(torrent::LOG_RPC_DEBUG, m_buffer, m_bufferSize, "scgi", "RPC write.", 0); lt_log_print_dump(torrent::LOG_RPC_DUMP, m_buffer, m_bufferSize, "scgi", "RPC write.", 0);
event_write(); event_write();
return true; return true;