System-wide wireless connection bug
Lamarque Vieira Souza
lamarque at gmail.com
Wed Mar 9 19:56:11 CET 2011
Em Wednesday 09 March 2011, Andrey Borzenkov escreveu:
> 2011/3/9 Lamarque Vieira Souza <lamarque at gmail.com>:
> > 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%2
> > Fnetworkmanagement.git&a=shortlog&h=refs/heads/systemwide
> >
> > with several modifications for networkmanagement besides system
> > connections.
>
> I was testing this branch and I do not remember any issue with
> wireless - I think I could see both wired and wireless system
> connections.
Good to know that.
> > Do you plan to push those changes to master?
>
> This branch does not support user settings as of now. What are plans
> regarding NM 0.9? It dropped user settings completely; may be it makes
> sense to target this branch at NM 0.9 support? This obsoletes user
> settings problem completely.
We still need user settings support for those who are not going to
upgrade to NM 0.9 soon. Have you tested that branch against a NM 0.9 snapshot?
I still need to figure out what kind of changes we will need to do in
Solid::Control::NetworkManager (or its successor) to accomodate NM 0.9
specification. Maybe it is a good idea to create a new networkmanager-0.9
backend in kde://kde-workspace/solid/
> > 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
> >
> > _______________________________________________
> > kde-networkmanager mailing list
> > kde-networkmanager at kde.org
> > https://mail.kde.org/mailman/listinfo/kde-networkmanager
--
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/9ce24568/attachment-0001.htm
More information about the kde-networkmanager
mailing list