* Casting printf input to match the format type.

* Properly clear the queued events during closing of a socket by checking for the file descriptor, not the ptr.

* SCGI m_task queue could overflow since the check was not working.


git-svn-id: svn://rakshasa.no/libtorrent/trunk/rtorrent@1246 e378c898-3ddf-0310-93e7-cc216c733640
This commit is contained in:
rakshasa
2011-07-19 13:11:28 +00:00
parent dbde781bc5
commit f5d4924b22
9 changed files with 14 additions and 14 deletions
+3 -3
View File
@@ -241,7 +241,7 @@ int64_t
cg_get_index(const torrent::Object& raw_args) {
const torrent::Object& arg = (raw_args.is_list() && !raw_args.as_list().empty()) ? raw_args.as_list().front() : raw_args;
int64_t index = 0;
size_t index = 0;
if (arg.is_string()) {
if (!rpc::parse_whole_value_nothrow(arg.as_string().c_str(), &index))
@@ -322,7 +322,7 @@ cg_get_index(const torrent::Object& raw_args) {
if (index < 0)
index = (int64_t)cg_list_hack.size() + index;
if (index >= cg_list_hack.size())
if ((size_t)index >= cg_list_hack.size())
throw torrent::input_error("Choke group not found.");
return index;
@@ -332,7 +332,7 @@ torrent::choke_group*
cg_get_group(const torrent::Object& raw_args) {
int64_t index = cg_get_index(raw_args);
if (index >= cg_list_hack.size())
if ((size_t)index >= cg_list_hack.size())
throw torrent::input_error("Choke group not found.");
return cg_list_hack.at(index);