Lines Matching defs:cur_src
1005 CUpDownClient* cur_src = it2->GetClient();
1006 file.WriteUInt32(cur_src->GetUserIDHybrid());
1007 file.WriteUInt16(cur_src->GetUserPort());
1008 file.WriteHash(cur_src->GetUserHash());
1010 const uint8 uSupportsCryptLayer = cur_src->SupportsCryptLayer() ? 1 : 0;
1011 const uint8 uRequestsCryptLayer = cur_src->RequestsCryptLayer() ? 1 : 0;
1012 const uint8 uRequiresCryptLayer = cur_src->RequiresCryptLayer() ? 1 : 0;
1384 CUpDownClient *cur_src = it++->GetClient();
1385 if(cur_src->GetDownloadState() == DS_DOWNLOADING) {
1387 kBpsDown += cur_src->SetDownloadLimit(reducedownload);
1393 CUpDownClient* cur_src = it++->GetClient();
1394 switch (cur_src->GetDownloadState()) {
1397 kBpsDown += cur_src->SetDownloadLimit(reducedownload);
1407 if (cur_src->HasLowID() && !theApp->CanDoCallback(cur_src->GetServerIP(), cur_src->GetServerPort())) {
1413 RemoveSource(cur_src);
1418 cur_src->SetDownloadState(DS_ONQUEUE);
1426 if(!cur_src->SwapToAnotherFile(false , false, false , NULL)) {
1429 RemoveSource(cur_src);
1439 if ( !((!cur_src->GetLastAskedTime()) ||
1440 (dwCurTick - cur_src->GetLastAskedTime()) > FILEREASKTIME*2)) {
1445 cur_src->SetDownloadState(DS_NONE);
1450 if( cur_src->IsRemoteQueueFull()) {
1453 RemoveSource( cur_src );
1462 ( (!cur_src->GetLastAskedTime()) ||
1463 (dwCurTick - cur_src->GetLastAskedTime()) > FILEREASKTIME-20000)) {
1464 cur_src->UDPReaskForDownload();
1475 ( (!cur_src->GetLastAskedTime()) ||
1476 (dwCurTick - cur_src->GetLastAskedTime()) > FILEREASKTIME)) {
1477 if (!cur_src->AskForDownload()) {
2191 CUpDownClient* cur_src = it++->GetClient();
2193 if (!cur_src->SwapToAnotherFile(true, true, true, NULL)) {
2194 RemoveSource(cur_src,true,false);
2198 RemoveSource(cur_src,true,false);
2208 CUpDownClient* cur_src = it++->GetClient();
2209 if ( cur_src->DeleteFileRequest( this ) ) {
2210 Notify_SourceCtrlRemoveSource(cur_src->ECID(), this);
2414 CUpDownClient* cur_src = it++->GetClient();
2415 if (cur_src->GetDownloadState() == DS_DOWNLOADING) {
2416 if (!cur_src->GetSentCancelTransfer()) {
2418 AddDebugLogLineN( logLocalClient, wxT("Local Client: OP_CANCELTRANSFER to ") + cur_src->GetFullIP() );
2419 cur_src->SendPacket( &packet, false, true );
2420 cur_src->SetSentCancelTransfer( true );
2422 cur_src->SetDownloadState(DS_ONQUEUE);
2424 cur_src->ResetLastAskedTime();
2581 CUpDownClient* cur_src = it->GetClient();
2583 int state = cur_src->GetDownloadState();
2584 int valid = ( state == DS_DOWNLOADING ) || ( state == DS_ONQUEUE && !cur_src->IsRemoteQueueFull() );
2586 if ( cur_src->HasLowID() || !valid ) {
2591 const BitVector& srcstatus = cur_src->GetPartStatus();
2624 dwID = cur_src->GetUserIDHybrid();
2626 dwID = wxUINT32_SWAP_ALWAYS(cur_src->GetUserIDHybrid());
2629 data.WriteUInt16(cur_src->GetUserPort());
2630 data.WriteUInt32(cur_src->GetServerIP());
2631 data.WriteUInt16(cur_src->GetServerPort());
2634 data.WriteHash(cur_src->GetUserHash());
2643 const uint8 uSupportsCryptLayer = cur_src->SupportsCryptLayer() ? 1 : 0;
2644 const uint8 uRequestsCryptLayer = cur_src->RequestsCryptLayer() ? 1 : 0;
2645 const uint8 uRequiresCryptLayer = cur_src->RequiresCryptLayer() ? 1 : 0;
3147 CUpDownClient* cur_src = it->GetClient();
3149 if (!cur_src->GetFileComment().IsEmpty()) {
3150 if (thePrefs::IsCommentFiltered(cur_src->GetFileComment())) {
3156 uint8 rating = cur_src->GetFileRating();
3548 CUpDownClient *cur_src = it->GetClient();
3549 if (cur_src->GetFileComment().Length()>0 || cur_src->GetFileRating()>0) {
3551 list.push_back(SFileRating(*cur_src));
3982 CUpDownClient* cur_src = it++->GetClient();
3983 if ((cur_src->GetDownloadState() == DS_DOWNLOADING) && (cur_src != caller)) {
3985 (cur_src->GetKBpsDown() * 1024) * DROP_FACTOR);
3987 // printf("Selecting source %p to drop: %d < %d\n", cur_src, factored_bytes_per_second, speed);
3989 return cur_src;
3991 // printf("Not selecting source %p to drop: %d > %d\n", cur_src, factored_bytes_per_second, speed);