* 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
@@ -274,7 +274,7 @@ convert_to_string(const torrent::Object& rawSrc) {
switch (src.type()) {
case torrent::Object::TYPE_VALUE: {
char buffer[64];
snprintf(buffer, 64, "%lli", src.as_value());
snprintf(buffer, 64, "%lli", (long long int)src.as_value());
return std::string(buffer);
}
case torrent::Object::TYPE_STRING: return src.as_string();
@@ -449,7 +449,7 @@ print_object(char* first, char* last, const torrent::Object* src, int flags) {
}
case torrent::Object::TYPE_VALUE:
return std::min(first + snprintf(first, std::distance(first, last), "%lli", src->as_value()), last);
return std::min(first + snprintf(first, std::distance(first, last), "%lli", (long long int)src->as_value()), last);
case torrent::Object::TYPE_LIST:
if (first != last)
@@ -491,7 +491,7 @@ print_object_std(std::string* dest, const torrent::Object* src, int flags) {
case torrent::Object::TYPE_VALUE:
{
char buffer[64];
snprintf(buffer, 64, "%lli", src->as_value());
snprintf(buffer, 64, "%lli", (long long int)src->as_value());
*dest += buffer;
return;