From 6c3a80636ac70afd3e3c8ced530656fbed17328d Mon Sep 17 00:00:00 2001 From: rakshasa Date: Thu, 22 Oct 2009 07:01:53 +0000 Subject: [PATCH] * Fixed warnings in snprintf statements. * Don't send numwant in tracker STOPPED requests. * Reintroudced clearing of epoll event list when a socket is closed as it might cause race conditions. git-svn-id: svn://rakshasa.no/libtorrent/trunk/rtorrent@1097 e378c898-3ddf-0310-93e7-cc216c733640 --- src/command_download.cc | 4 ++++ src/display/utils.h | 3 ++- 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/src/command_download.cc b/src/command_download.cc index facc96e0..5918aff2 100644 --- a/src/command_download.cc +++ b/src/command_download.cc @@ -114,6 +114,10 @@ apply_d_change_link(int changeType, core::Download* download, const torrent::Obj target = rpc::call_command_string("d.get_base_path", rpc::make_target(download)); link = rak::path_expand(prefix + rpc::call_command_string("d.get_base_filename", rpc::make_target(download)) + postfix); +// } else if (type == "directory_path") { +// target = rpc::call_command_string("d.get_directory", rpc::make_target(download)); +// link = rak::path_expand(prefix + rpc::call_command_string("d.get_base_path", rpc::make_target(download)) + postfix); + } else if (type == "tied") { link = rak::path_expand(rpc::call_command_string("d.get_tied_to_file", rpc::make_target(download))); diff --git a/src/display/utils.h b/src/display/utils.h index 48637e64..3d69021e 100644 --- a/src/display/utils.h +++ b/src/display/utils.h @@ -84,7 +84,8 @@ print_buffer(char* first, char* last, const char* format) { if (first >= last) return first; - int s = snprintf(first, last - first, format); + // Adding 'i' format to suppress a GCC warning. + int s = snprintf(first, last - first, format, 0); if (s < 0) return first;