MCPcopy Create free account
hub / github.com/amule-project/amule / OnIPFilterEvent

Method OnIPFilterEvent

src/IPFilter.cpp:522–563  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

520
521
522void 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

Callers

nothing calls this directly

Calls 8

IsOnShutDownMethod · 0.80
swapFunction · 0.70
FilterQueuesMethod · 0.45
FilterServersMethod · 0.45
ConnectToAnyServerMethod · 0.45
StartKadMethod · 0.45
ShowConnectionStateMethod · 0.45
LoadSourceSeedsMethod · 0.45

Tested by

no test coverage detected