mirror of
https://github.com/rakshasa/rtorrent.git
synced 2026-08-17 15:42:30 +00:00
Removed deprecated rak errno and file headers.
This commit is contained in:
+6
-2
@@ -1,5 +1,6 @@
|
||||
#include "config.h"
|
||||
|
||||
#include <cerrno>
|
||||
#include <fstream>
|
||||
#include <string>
|
||||
#include <sys/stat.h>
|
||||
@@ -10,7 +11,6 @@
|
||||
#include <lua.hpp>
|
||||
#endif
|
||||
|
||||
#include <rak/error_number.h>
|
||||
#include <rak/path.h>
|
||||
#include <rak/string_manip.h>
|
||||
#include <torrent/object.h>
|
||||
@@ -419,12 +419,16 @@ execute_lua(LuaEngine* engine, rpc::target_type target_type, torrent::Object con
|
||||
}
|
||||
|
||||
#else
|
||||
|
||||
torrent::Object
|
||||
execute_lua(LuaEngine* engine, torrent::Object const& rawArgs, int flags) {
|
||||
execute_lua([[maybe_unused]] LuaEngine* engine, [[maybe_unused]] torrent::Object const& rawArgs, [[maybe_unused]] int flags) {
|
||||
throw torrent::input_error("Lua support not enabled");
|
||||
return torrent::Object();
|
||||
}
|
||||
|
||||
LuaEngine::LuaEngine() {}
|
||||
LuaEngine::~LuaEngine() {}
|
||||
|
||||
#endif
|
||||
|
||||
} // namespace rpc
|
||||
|
||||
@@ -2,7 +2,6 @@
|
||||
|
||||
#include "rpc/scgi_task.h"
|
||||
|
||||
#include <rak/error_number.h>
|
||||
#include <cstdio>
|
||||
#include <vector>
|
||||
#include <sys/types.h>
|
||||
@@ -59,7 +58,7 @@ SCgiTask::event_read() {
|
||||
int bytes = ::recv(m_fileDesc, m_position, m_buffer_size - (m_position - m_buffer), 0);
|
||||
|
||||
if (bytes <= 0) {
|
||||
if (bytes == 0 || !rak::error_number::current().is_blocked_momentary())
|
||||
if (bytes == 0 || !(errno == EAGAIN || errno == EINTR))
|
||||
close();
|
||||
|
||||
return;
|
||||
@@ -194,7 +193,7 @@ SCgiTask::event_write() {
|
||||
#endif
|
||||
|
||||
if (bytes == -1) {
|
||||
if (!rak::error_number::current().is_blocked_momentary())
|
||||
if (!(errno == EAGAIN || errno == EINTR))
|
||||
close();
|
||||
|
||||
return;
|
||||
|
||||
Reference in New Issue
Block a user