| 520 | |
| 521 | |
| 522 | void CIPFilter::OnIPFilterEvent(CIPFilterEvent& evt) |
| 523 | { |
| 524 | { |
| 525 | wxMutexLocker lock(m_mutex); |
| 526 | std::swap(m_rangeIPs, evt.m_rangeIPs); |
| 527 | std::swap(m_rangeLengths, evt.m_rangeLengths); |
| 528 | std::swap(m_rangeNames, evt.m_rangeNames); |
| 529 | m_ready = true; |
| 530 | } |
| 531 | if (theApp->IsOnShutDown()) { |
| 532 | return; |
| 533 | } |
| 534 | AddLogLineN(_("IP filter is ready")); |
| 535 | |
| 536 | if (thePrefs::IsFilteringClients()) { |
| 537 | theApp->clientlist->FilterQueues(); |
| 538 | } |
| 539 | if (thePrefs::IsFilteringServers()) { |
| 540 | theApp->serverlist->FilterServers(); |
| 541 | } |
| 542 | // Now start networks we didn't start earlier |
| 543 | if (m_connectToAnyServerWhenReady || m_startKADWhenReady) { |
| 544 | AddLogLineC(_("Connecting")); |
| 545 | } |
| 546 | if (m_connectToAnyServerWhenReady) { |
| 547 | m_connectToAnyServerWhenReady = false; |
| 548 | theApp->serverconnect->ConnectToAnyServer(); |
| 549 | } |
| 550 | if (m_startKADWhenReady) { |
| 551 | m_startKADWhenReady = false; |
| 552 | theApp->StartKad(); |
| 553 | } |
| 554 | theApp->ShowConnectionState(true); // update connect button |
| 555 | if (thePrefs::GetSrcSeedsOn()) { |
| 556 | theApp->downloadqueue->LoadSourceSeeds(); |
| 557 | } |
| 558 | // Trigger filter update if configured |
| 559 | if (m_updateAfterLoading) { |
| 560 | m_updateAfterLoading = false; |
| 561 | Update(thePrefs::IPFilterURL()); |
| 562 | } |
| 563 | } |
| 564 | |
| 565 | // File_checked_for_headers |
nothing calls this directly
no test coverage detected