Issue 327 in specto: Specto always thinks it's offline with NetworkManager 0.9

8 views
Skip to first unread message

spe...@googlecode.com

unread,
Apr 5, 2011, 11:25:39 PM4/5/11
to specto...@googlegroups.com
Status: New
Owner: ----

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

spe...@googlecode.com

unread,
Apr 12, 2011, 2:29:52 PM4/12/11
to specto...@googlegroups.com
Updates:
Status: Started
Labels: Type-Defect Priority-High Milestone-Release0.4 Maintainability
Patch DevBranch-Main

Comment #1 on issue 327 by nekoh...@gmail.com: Specto always thinks it's

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.

spe...@googlecode.com

unread,
Apr 12, 2011, 3:42:03 PM4/12/11
to specto...@googlegroups.com

Comment #2 on issue 327 by Theo...@gmail.com: Specto always thinks it's

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

spe...@googlecode.com

unread,
Apr 14, 2011, 12:07:13 PM4/14/11
to specto...@googlegroups.com
Updates:
Status: Fixed
Owner: nekoh...@gmail.com

Comment #3 on issue 327 by nekoh...@gmail.com: Specto always thinks it's

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.

spe...@googlecode.com

unread,
Apr 14, 2011, 1:09:02 PM4/14/11
to specto...@googlegroups.com

Comment #4 on issue 327 by Theo...@gmail.com: Specto always thinks it's

You're welcome. Thanks for the quick and comprehensive fix!

spe...@googlecode.com

unread,
May 1, 2011, 9:34:01 AM5/1/11
to specto...@googlegroups.com
Updates:
Status: Started

Comment #6 on issue 327 by woutclym...@gmail.com: Specto always thinks it's

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

spe...@googlecode.com

unread,
May 1, 2011, 6:24:05 PM5/1/11
to specto...@googlegroups.com

Comment #7 on issue 327 by nekoh...@gmail.com: Specto always thinks it's
My last commit works here on Ubuntu 10.10 (NM 0.8) and on Fedora 15 (NM
0.9)... doesn't it work on Arch?

And I'm not sure why it would fail on your end, given that the lines are
enclosed in a try statement. Maybe I've been naïve in thinking that
the "version" property only appeared in 0.9... Or maybe your patch could
catch the exact dbus exception instead (as the "TODO" in the code suggests).

What is the value of your "version" dbus property for network-manager? (you
can look using d-feet)

spe...@googlecode.com

unread,
May 2, 2011, 1:53:57 AM5/2/11
to specto...@googlegroups.com

Comment #8 on issue 327 by woutclym...@gmail.com: Specto always thinks it's

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.

spe...@googlecode.com

unread,
May 2, 2011, 8:30:12 AM5/2/11
to specto...@googlegroups.com

Comment #9 on issue 327 by nekoh...@gmail.com: Specto always thinks it's

Makes sense then. I just tested your patch on F15. Could you commit and
push to main?

spe...@googlecode.com

unread,
May 3, 2011, 1:11:01 PM5/3/11
to specto...@googlegroups.com
Updates:
Status: Fixed

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

spe...@googlecode.com

unread,
May 3, 2011, 1:43:51 PM5/3/11
to specto...@googlegroups.com
Updates:
Status: Committed

Comment #11 on issue 327 by nekoh...@gmail.com: Specto always thinks it's

(No comment was entered for this change.)

spe...@googlecode.com

unread,
Dec 1, 2011, 9:31:38 AM12/1/11
to specto...@googlegroups.com

Comment #13 on issue 327 by nekoh...@gmail.com: Specto always thinks it's

Issue 342 has been merged into this issue.

spe...@googlecode.com

unread,
Jan 4, 2014, 7:15:50 AM1/4/14
to specto...@googlegroups.com

Comment #14 on issue 327 by patrycju...@gmail.com: Specto always thinks
it's offline with NetworkManager 0.9
http://code.google.com/p/specto/issues/detail?id=327

where to put this patch


--
You received this message because this project is configured to send all
issue notifications to this address.
You may adjust your notification preferences at:
https://code.google.com/hosting/settings
Reply all
Reply to author
Forward
0 new messages