* Fix the use of strlcpy.

* Allow lists as arguments in commands by using '{' and '}'. The list
will be recursed and all '$' will be called, while '~' will only be
expanded when in the first element in the list. E.g "execute =
touch,{~/tmp/,$get_client_version=}"

* Added rak::path_expand that works on char buffers.

* Fixed RequestList::calculate_pipe_size so it doesn't request too
many pieces from fast peers.

* Added 'execute_log' for logging the result of calls to 'execute'.


git-svn-id: svn://rakshasa.no/libtorrent/trunk/rtorrent@952 e378c898-3ddf-0310-93e7-cc216c733640
This commit is contained in:
rakshasa
2007-08-12 13:41:50 +00:00
parent 781e1ca7dc
commit 788b496241
9 changed files with 207 additions and 78 deletions
+8 -3
View File
@@ -46,15 +46,20 @@ public:
static const unsigned int max_args = 128;
static const unsigned int buffer_size = 4096;
static const int flag_throw = 0x1;
static const int flag_expand_tilde = 0x2;
static const int flag_expand_tilde = 0x1;
static const int flag_throw = 0x2;
ExecFile() : m_logFd(-1) {}
int log_fd() const { return m_logFd; }
void set_log_fd(int fd) { m_logFd = fd; }
int execute(const char* file, char* const* argv);
torrent::Object execute_object(const torrent::Object& rawArgs, int flags);
private:
int m_logFd;
};
}