~ubuntu-branches/debian/experimental/libtorrent/experimental

« back to all changes in this revision

Viewing changes to src/protocol/peer_connection_leech.cc

  • Committer: Bazaar Package Importer
  • Author(s): Qingning Huo
  • Date: 2006-01-12 20:47:33 UTC
  • mto: (4.1.1 edgy) (6.2.1 squeeze) (1.3.1 upstream)
  • mto: This revision was merged to the branch mainline in revision 4.
  • Revision ID: james.westby@ubuntu.com-20060112204733-2vw5t3vdne40s8mq
Tags: upstream-0.8.2
ImportĀ upstreamĀ versionĀ 0.8.2

Show diffs side-by-side

added added

removed removed

Lines of Context:
412
412
    }
413
413
  }
414
414
 
 
415
  // Send the interested state before any requests as some clients,
 
416
  // e.g. BitTornado 0.7.14 and uTorrent 0.3.0, disconnect if a
 
417
  // request has been received while uninterested. The problem arises
 
418
  // as they send unchoke before receiving interested.
 
419
  if (m_sendInterested && m_up->can_write_interested()) {
 
420
    m_up->write_interested(m_up->interested());
 
421
    m_sendInterested = false;
 
422
  }
 
423
 
415
424
  if (m_tryRequest &&
416
425
 
417
426
      !(m_tryRequest = !should_request()) &&
422
431
//     m_up->set_interested(false);
423
432
  }
424
433
 
425
 
  if (m_sendInterested && m_up->can_write_interested()) {
426
 
    m_up->write_interested(m_up->interested());
427
 
    m_sendInterested = false;
428
 
  }
429
 
 
430
434
  while (!m_haveQueue.empty() && m_up->can_write_have()) {
431
435
    m_up->write_have(m_haveQueue.front());
432
436
    m_haveQueue.pop_front();