System-wide wireless connection bug

Lamarque Vieira Souza lamarque at gmail.com
Wed Mar 9 19:22:15 CET 2011


	Hi,

	What is the status of your work on system connections implementation? 
Does it still have the problems you mentioned below? I see you have been 
working in a git branch:

http://quickgit.kde.org/index.php?p=clones%2Fnetworkmanagement%2Fgokcen%2Fnetworkmanagement.git&a=shortlog&h=refs/heads/systemwide

	with several modifications for networkmanagement besides system 
connections. Do you plan to push those changes to master?
	
Em Friday 19 November 2010, Gökçen Eraslan escreveu:
> Hello,
> 
> I've found another bug in KNM and prepared a patch for that. Problem is: I
> can see wired system-wide connections in plasma applet but I can't see
> wireless system-wide connections.
> 
> Steps to reproduce:
> 1- Add a system-wide wireless connection (using nm-applet unfortunately)
> 2- Try to connect it from KNM plasma applet.
> 
> Reason is that:
> 
> * kded module gets a system-wide wireless connection and calls
> NMDBusSettingsConnectionProvider::initialiseAndRegisterRemoteConnection
> method, in this method an empty Connection is created:
> 
> 00096         Knm::Connection * connection = new Knm::Connection(QUuid(),
> Knm::Connection::Wired);
> 
> At this point, connection type is wired but the setting gathered from NM
> DBus interface is for a wireless connection. After that, empty connection
> gets filled with ConnectionDbus class:
> 
> 00097         ConnectionDbus dbusConverter(connection);
> 00098         dbusConverter.fromDbusMap(connectionIface->GetSettings());
> 
> and in fromDbusMap method:
> 
> 00227     m_connection->setType(type);
> 
> is called. type of connection is changed using setType method, but Settings
> objects of the connection are still for a wired connection because
> Connection is initialized with Knm::Connection::Wired parameter. After
> that,
> ConnectionDbus class tries change the settings :
> 
> 00228
> 00229     // all other settings
> 00230     foreach (Setting * setting, m_connection->settings()) {
> 00231         if (settings.contains(setting->name())) {
> 00232             SettingDbus * sd = dbusFor(setting);
> 00233             sd->fromMap(settings.value(setting->name()));
> 00234         }
> 00235     }
> 
> but since the settings are all in wired type, this does not work and
> connection has the wired settings. And in:
> WirelessNetworkInterfaceActivatableProvider::handleAdd method:
> 
> 00093     Knm::WirelessSetting * wirelessSetting =
> dynamic_cast<Knm::WirelessSetting *>(addedConnection-
> 
> >setting(Knm::Setting::Wireless));
> 
> 00094
> 00095     if (wirelessSetting) {
> 
> it's checked whether the connection has a setting named 802-11-wireless,
> but it doesn't since settings are still in wired type.
> 
> setType method of Connection class is wrong and must be changed since it
> just changes the type and does not change Settings objects created in init
> method.
> 
> Here is the attached patch to regenerate Settings objects of connection
> when setType is called with a second parameter regenerateSettings. An
> alternative solution would be making ConnectionDbus and Connection classes
> friends, so ConnectionDbus::fromDbusMap method can create new Settings
> objects itself.
> 
> Cheers.


-- 
Lamarque V. Souza
http://www.geographicguide.com/brazil.htm
Linux User #57137 - http://counter.li.org/
http://www.kde-mg.org
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://mail.kde.org/pipermail/kde-networkmanager/attachments/20110309/2e3f1fd8/attachment.htm 


More information about the kde-networkmanager mailing list