New issue 327 by Theo...@gmail.com: Specto always thinks it's offline with
NetworkManager 0.9
http://code.google.com/p/specto/issues/detail?id=327
What steps will reproduce the problem?
1. Connect to the Internet on a system running NetworkManger 0.9.
2. Start Specto.
3. Add watches for a few web pages in Specto.
4. Click 'Refresh All'.
What is the expected output? What do you see instead?
Specto should refresh all its watches and pick up any changes. Instead,
None of the watches refresh, and a message in Specto's status bar explains
that networked watches won't work without an Internet connection.
What version of the product are you using? On what operating system?
I'm using Specto 0.3.1 on the Fedora 15 Alpha.
Please provide any additional information below.
I'm pretty sure this issue is due to the D-Bus API changes in NM 0.9,
documented here (specifically the changes to the state values):
http://projects.gnome.org/NetworkManager/developers/migrating-to-09/spec.html#type-NM_STATE
I've attached a patch against Specto 0.3.1 that seems to fix the issue with
NM 0.9. However, I'm still not sure how to detect which version of
NetworkManager is running, so some more changes will probably be needed to
make this work across different NetworkManager versions (there's a version
property in the D-Bus interface for NM 0.9, but I'm not sure if that's
present in older versions).
Attachments:
specto-0.3.1-networkmanager.patch 1.1 KB
Comment #1 on issue 327 by nekoh...@gmail.com: Specto always thinks it's
offline with NetworkManager 0.9
http://code.google.com/p/specto/issues/detail?id=327
Wow, thanks a lot for coming up with a patch!
Two things:
- you check for state 50, 60 and 70... but isn't 70 the only one that
should apply to specto? As far as I can tell, 50 is for "link-local", that
is ad-hoc networking. I'm not sure what 60 is for.
- I checked with d-feet, and there is indeed a Version property of
org.freedesktop.NetworkManager; in the case of NM 0.9.x, mine shows the
string "0.8.998". However, in the 0.8.x series of NM, there is no version
property in dbus at all. Would you be willing to modify your patch so that
it checks if there is such a "Version" property, if its value is high
enough (>0.8.9 ?), and then use the proper state numbers?
I have access to machines running NM 0.8.1 and 0.9 (0.8.998) so I could
help with testing.
All right, here's an updated patch that should work with older versions of
NetworkManager as well, and only considers global connectivity as
connected. Hopefully this will resolve things properly. =)
Attachments:
specto-0.3.1-networkmanager.patch 2.0 KB
Comment #3 on issue 327 by nekoh...@gmail.com: Specto always thinks it's
offline with NetworkManager 0.9
http://code.google.com/p/specto/issues/detail?id=327
I committed your patch in bzr revision 164.
I would like to give you my sincere thanks for your contribution, because
it made me look into the existing networkmanager code, and it motivated me
to refactor it entirely. The results of that cleanup are now in revision
165. I think it is now much more elegant and simpler (we shouldn't have to
care about NM <0.8 anymore).
I tested the code on NM 0.8.1 and NM 0.9 and it seems to work well.
You're welcome. Thanks for the quick and comprehensive fix!
Comment #6 on issue 327 by woutclym...@gmail.com: Specto always thinks it's
offline with NetworkManager 0.9
http://code.google.com/p/specto/issues/detail?id=327
Hello,
It seems that you changed some code when refactoring and now specto always
thinks the network is down. It was in the original patch from Theo so is
there a reason why you changed it?
The fix is attached
Attachments:
nm_specto.patch 792 bytes
I'm using ubuntu 11.04 and i think my version from networkmanager is 0.8.2.x
Also the "version" property is already supported in my version and that's
why it did not work for me.
No dbus exception is thrown.
Makes sense then. I just tested your patch on F15. Could you commit and
push to main?
Comment #10 on issue 327 by woutclym...@gmail.com: Specto always thinks
it's offline with NetworkManager 0.9
http://code.google.com/p/specto/issues/detail?id=327
Fixed in revision 166
Comment #11 on issue 327 by nekoh...@gmail.com: Specto always thinks it's
offline with NetworkManager 0.9
http://code.google.com/p/specto/issues/detail?id=327
(No comment was entered for this change.)
Issue 342 has been merged into this issue.