~ubuntu-branches/ubuntu/trusty/ktorrent/trusty

« back to all changes in this revision

Viewing changes to libbtcore/dht/announcetask.cpp

  • Committer: Bazaar Package Importer
  • Author(s): Alessandro Ghersi
  • Date: 2009-08-16 05:21:14 UTC
  • mfrom: (1.1.29 upstream) (0.6.3 squeeze)
  • Revision ID: james.westby@ubuntu.com-20090816052114-8qosmkhvmbl2o19m
Tags: 3.2.3.1+dfsg.1-1ubuntu1
* Merge from debian unstable, remaining changes: (LP: #414520)
  - Build-depend directly on libboost-serialization1.38-dev since
    libboost-serialization-dev from boost-defaults is not in Main
  - Add KUBUNTU_DESKTOP_POT to rules
  - Drop libphonon-dev

Show diffs side-by-side

added added

removed removed

Lines of Context:
85
85
                                returned_items.append(*i);
86
86
                        }
87
87
                        
88
 
                        // add the peer who responded to the answered list, so we can do an announce
89
 
                        KBucketEntry e(rsp->getOrigin(),rsp->getID());
90
 
                        if (!answered.contains(KBucketEntryAndToken(e,gpr->getToken())) && !answered_visited.contains(e))
91
 
                        {
92
 
                                answered.append(KBucketEntryAndToken(e,gpr->getToken()));
93
 
                        }
94
 
                        
95
88
                        emitDataReady();
96
89
                }
 
90
                
 
91
                // add the peer who responded to the answered list, so we can do an announce
 
92
                KBucketEntry e(rsp->getOrigin(),rsp->getID());
 
93
                if (!answered.contains(KBucketEntryAndToken(e,gpr->getToken())) && !answered_visited.contains(e))
 
94
                {
 
95
                        answered.append(KBucketEntryAndToken(e,gpr->getToken()));
 
96
                }
97
97
        }
98
98
 
99
99
        void AnnounceTask::callTimeout(RPCCall* )
114
114
                        {
115
115
                                AnnounceReq* anr = new AnnounceReq(node->getOurID(),info_hash,port,e.getToken());
116
116
                                anr->setOrigin(e.getAddress());
 
117
                                //Out(SYS_DHT|LOG_DEBUG) << "DHT: Announcing to " << e.getAddress().toString() << endl;
117
118
                                rpcCall(anr);
118
119
                                answered_visited.append(e);
119
120
                        }