Changeset 1143

Show
Ignore:
Timestamp:
03/12/10 05:29:11 (2 years ago)
Author:
rakshasa
Message:

* Fixed the linux fallocate detection script.

Location:
trunk
Files:
5 modified

Legend:

Unmodified
Added
Removed
  • trunk/libtorrent/scripts/checks.m4

    r1130 r1143  
    163163  AC_COMPILE_IFELSE( 
    164164    [[#include <fcntl.h> 
    165       int main() { 
    166         fallocate(0, FALLOC_FL_KEEP_SIZE, 0, 0); 
     165      #include <linux/falloc.h> 
     166      int main() { 
     167      fallocate(0, FALLOC_FL_KEEP_SIZE, 0, 0); 
    167168        return 0; 
    168169      } 
  • trunk/libtorrent/src/protocol/extensions.cc

    r1142 r1143  
    245245    // Ignore malformed messages. 
    246246    // DEBUG: 
    247     throw internal_error("ProtocolExtension::read_done '" + std::string(m_read, std::distance(m_read, m_readPos)) + "'"); 
     247//     throw internal_error("ProtocolExtension::read_done '" + std::string(m_read, std::distance(m_read, m_readPos)) + "'"); 
    248248  } 
    249249 
  • trunk/libtorrent/src/protocol/peer_connection_leech.cc

    r1142 r1143  
    465465    std::stringstream s; 
    466466    s << "Connection read fd(" << get_fd().get_fd() << ',' << m_down->get_state() << ',' << m_down->last_command() << ") \"" << e.what() << '"'; 
    467     //    s << " '" << rak::copy_escape_html((char*)m_down->buffer()->begin(), (char*)m_down->buffer()->position()) << "'"; 
     467    s << " '" << rak::copy_escape_html((char*)m_down->buffer()->begin(), (char*)m_down->buffer()->position()) << "'"; 
    468468 
    469469    throw internal_error(s.str()); 
  • trunk/libtorrent/src/torrent/object_stream.cc

    r1141 r1143  
    873873 
    874874  // DEBUG: Remove this. 
    875   { 
    876     torrent::Object obj; 
    877     if (object_read_bencode_c(output.buffer.first, output.pos, &obj) != output.pos) { 
    878       std::string escaped = rak::copy_escape_html(output.buffer.first, output.pos); 
    879  
    880       //char buffer[1024]; 
    881       //      sprintf(buffer, "Verified wrong, %u, '%u', '%s'.", std::distanescaped.c_str()); 
    882  
    883       throw torrent::internal_error("Invalid bencode data generated: '" + escaped + "'"); 
    884     } 
    885   } 
     875//   { 
     876//     torrent::Object obj; 
     877//     if (object_read_bencode_c(output.buffer.first, output.pos, &obj) != output.pos) { 
     878//       std::string escaped = rak::copy_escape_html(output.buffer.first, output.pos); 
     879 
     880//       //char buffer[1024]; 
     881//       //      sprintf(buffer, "Verified wrong, %u, '%u', '%s'.", std::distanescaped.c_str()); 
     882 
     883//       throw torrent::internal_error("Invalid bencode data generated: '" + escaped + "'"); 
     884//     } 
     885//   } 
    886886 
    887887  // Don't flush the buffer. 
  • trunk/rtorrent/scripts/checks.m4

    r1130 r1143  
    163163  AC_COMPILE_IFELSE( 
    164164    [[#include <fcntl.h> 
    165       int main() { 
    166         fallocate(0, FALLOC_FL_KEEP_SIZE, 0, 0); 
     165      #include <linux/falloc.h> 
     166      int main() { 
     167      fallocate(0, FALLOC_FL_KEEP_SIZE, 0, 0); 
    167168        return 0; 
    168169      }