aMule Bug Tracker - aMule
View Issue Details
0000659aMuleServerspublic2005-11-17 11:462005-11-18 15:17
Jacobo221 
Xaignar 
normalminoralways
resolvedfixed 
 
SVN 
0000659: disconnect button might not disconnect kad and block it's function
amuleDlg.cpp (in OnBnConnect function) contains:

        // Connect Kad also
        if( disconnect && thePrefs::GetNetworkKademlia()) {
                theApp.StopKad();
        } else {
                theApp.StartKad();
        }

So, if we go to Prefs -> Connection -> Kad and disable it, then we click the disconnect button... and it is not disconnected. What's more, the connect/disconnect button will not change to Connect since Kad is still connected.

It should just check "if( disconnect )". Both StartKad() (through GetNetworkKademlia()) and StopKad() (through IsRunning()) already check Kad's status.
No tags attached.
related to 0000658resolved Kry connect/disconnect buttons ambiguous 
Issue History
2005-11-17 11:46Jacobo221New Issue
2005-11-17 11:57Jacobo221CategoryExternal Conn => Servers
2005-11-17 15:39XaignarNote Added: 0001470
2005-11-17 16:33XaignarRelationship addedrelated to 0000658
2005-11-17 17:37KryNote Added: 0001474
2005-11-17 17:43KryStatusnew => resolved
2005-11-17 17:43KryFixed in Version => CVS
2005-11-17 17:43KryResolutionopen => fixed
2005-11-17 17:43KryAssigned To => Kry
2005-11-17 17:43KryNote Added: 0001476
2005-11-17 20:49Jacobo221Statusresolved => feedback
2005-11-17 20:49Jacobo221Resolutionfixed => reopened
2005-11-17 20:49Jacobo221Note Added: 0001483
2005-11-18 15:15Jacobo221Assigned ToKry =>
2005-11-18 15:15Jacobo221Resolutionreopened => fixed
2005-11-18 15:17XaignarStatusfeedback => resolved
2005-11-18 15:17XaignarAssigned To => Xaignar

Notes
(0001470)
Xaignar   
2005-11-17 15:39   
We need two buttons, afaics, this is simply too funky.
(0001474)
Kry   
2005-11-17 17:37   
No, it's ok. ED2K and Kad can be disconencted on their page.

I'll just make the disconenct happen on prefs change, as for the rest, is all ok.
(0001476)
Kry   
2005-11-17 17:43   
Commited and fixed.
(0001483)
Jacobo221   
2005-11-17 20:49   
this patch

+ if (thePrefs::GetNetworkED2K() && theApp.IsConnectedED2K()) {
+ theApp.serverconnect->Disconnect();
+ }
+
+ if (thePrefs::GetNetworkKademlia() && theApp.IsConnectedKad()) {
+ theApp.StopKad();
+ }
+

Is obviously acting inverse to what it should do.

It should be:

if (!thePrefs::GetNetworkED2K() && theApp.IsConnectedED2K())

...

if (!thePrefs::GetNetworkKademlia() && theApp.IsConnectedKad())