From 0d1c70726e36478da3605c84774081d1e8361d50 Mon Sep 17 00:00:00 2001 From: upstream svn Date: Fri, 9 Jul 2010 22:43:00 +0000 Subject: [PATCH] Leftovers from IP filter patch IP filter is never ready here (it's set ready later on event), so the connect operations can be deferred --- .svn-revision | 2 +- src/amule.cpp | 21 +++++++-------------- 2 files changed, 8 insertions(+), 15 deletions(-) diff --git a/.svn-revision b/.svn-revision index 289150f8..7b16a10f 100644 --- a/.svn-revision +++ b/.svn-revision @@ -1 +1 @@ -10239 +10240 diff --git a/src/amule.cpp b/src/amule.cpp index 83265d88..b595feb9 100644 --- a/src/amule.cpp +++ b/src/amule.cpp @@ -567,11 +567,6 @@ bool CamuleApp::OnInit() // The user can start pressing buttons like mad if he feels like it. m_app_state = APP_STATE_RUNNING; - // Kry - Load the sources seeds on app init - if (thePrefs::GetSrcSeedsOn() && ipfilter->IsReady()) { - downloadqueue->LoadSourceSeeds(); - } - if (!serverlist->GetServerCount() && thePrefs::GetNetworkED2K()) { // There are no servers and ED2K active -> ask for download. // As we cannot ask in amuled, we just update there @@ -595,17 +590,15 @@ bool CamuleApp::OnInit() // Autoconnect if that option is enabled - if (thePrefs::DoAutoConnect() && (thePrefs::GetNetworkED2K() || thePrefs::GetNetworkKademlia())) { - if (ipfilter->IsReady()) { - // If it's not ready it will connect later, so don't print it now. - AddLogLineC(_("Connecting")); - } + if (thePrefs::DoAutoConnect()) { + // IP filter is still loading and will be finished on event. + // Tell it to autoconnect. if (thePrefs::GetNetworkED2K()) { - theApp->serverconnect->ConnectToAnyServer(); + ipfilter->ConnectToAnyServerWhenReady(); + } + if (thePrefs::GetNetworkKademlia()) { + ipfilter->StartKADWhenReady(); } - - StartKad(); - } // Enable GeoIP -- 2.11.4.GIT