[Kde-hardware-devel] KDE networkmanagement plasma applet and disconnect issue

Gökçen Eraslan gokcen at pardus.org.tr
Thu Jan 13 11:46:47 CET 2011


Hello,

Yesterday, I have spent all my day to fix disconnect issue of KNM. The issue 
is, when you disconnect using plasmoid, something automatically reconnects 
interface. In current Solid::Control::NetworkManager we have a 
DeactivateConnection method[1], and this method is used in KNM. But this 
method just deactivate the connection and then NM tries to reconnect to 
another connection which is set as autoconnect. 

The bug here is using DeactivateConnection method of NM[2], here is another 
guy mentioning about the same problem[3]. Solution is to call Disconnect 
method of the according interface instead[4], which is added in NM 0.8. 
Unfortunately this method does not exist in current Solid. 

Attached patch (created against KDe 4.5.5) tries to implement this method in 
Solid by updating solid/networkmanager-0.7/dbus/nm-deviceinterface.h file 
which is autogenerated using qdbusxml2cpp and adding method to:

* libs/solid/control/ifaces/networkinterface.*
* libs/solid/control/backends/fakenet/fakenetworkinterface.*
* solid/networkmanager-0.7/networkinterface.*
* solid/wicd/networkinterface.*

However when I try to call it using:

Solid::Control::NetworkInterface* iface = 
Solid::Control::NetworkManager::findNetworkInterface(deviceUni);

if (iface)
  iface->disconnect();


the method is not called. I put debug lines to every method I've implemented, 
but nothing is printed and connection is not disconnected.

Any ideas about that? I'm not familiar with solid, the patch may have 
mistakes.

Cheers.

[1] http://api.kde.org/4.5-api/kdebase-workspace-
apidocs/libs/solid/html/namespaceSolid_1_1Control_1_1NetworkManager.html#dbd96918b07abc71b8618b96aad9814d

[2] 
http://projects.gnome.org/NetworkManager/developers/spec-08.html#org.freedesktop.NetworkManager

[3] http://osdir.com/ml/networkmanager-list/2011-01/msg00007.html

[4] 
http://projects.gnome.org/NetworkManager/developers/spec-08.html#org.freedesktop.NetworkManager.Device

-- 
Gökçen Eraslan
-------------- next part --------------
A non-text attachment was scrubbed...
Name: add-disconnect-method-to-interface.diff
Type: text/x-patch
Size: 4953 bytes
Desc: not available
Url : http://mail.kde.org/pipermail/kde-hardware-devel/attachments/20110113/4299c962/attachment.diff 
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 198 bytes
Desc: This is a digitally signed message part.
Url : http://mail.kde.org/pipermail/kde-hardware-devel/attachments/20110113/4299c962/attachment.sig 


More information about the Kde-hardware-devel mailing list