GNOME Bugzilla – Bug 579092
make network status tracking work
Last modified: 2009-07-28 23:07:43 UTC
Turns out that glibc is playing stupid here, and we need to call res_init () ourselves, or we continue to get transport errors from libsoup, even after going online.
Created attachment 132730 [details] [review] add res_init() call
*** Bug 532367 has been marked as a duplicate of this bug. ***
I'm pretty sure only the <resolv.h> #include is needed, not the other two. Also, as noted in the dup, this mostly only affected Fedora, because everyone else patches glibc to work around it. So this would be a more commonly-reported bug if not for that. (Presumably it affects the BSDs and Solaris too though...) Also, Fedora is shipping this patch in F11 and it works. So like, anyway, we should commit this. :)
*** Bug 586167 has been marked as a duplicate of this bug. ***
A similar patch (see 579098) for the weather applet has been out for a couple of releases now. It appears to work fine.
Except that if I read that patch well, it won't work for the case where the network connection breaks elsewhere, like on the router. See Bug 586167
My understanding (as related to the stand-alone applet where the code was originally taken from) is that NetworkManager is used to monitor the state of the connection and the problem occurs when the connection is brought back up and the resolver isn't set up properly with the new connection. This is what this patch fixes. The situation you describe in 586167 would trigger this bug.
586167 is not totally clear. It's only this bug if you logged in while the network was broken (or if you restarted the clock-applet while the network was broken). If it was up and working correctly, and then the network went down and came back up, and you never logged out, and the clock never recovered, then it's a different bug. (And actually, F11 is already patched to avoid this, so if you're on F11, then it's not this bug...)
17:32:18 up 10 days, 17:13, 19 users, load average: 1.16, 0.76, 0.43 That's the time since I have last logged in. This week-end I had an "internet outtage" and the weather is stuck to what it was at the time and has never updated since. Also note that given the non-reliability of my ethernet jack I also get NM to kick in a reconnection (non withstanding when I change room) And yes I run F11. So whatever patch is in F11 does not fix this. That's why I filed bug 586167.
This bug is not about your broken router, or other ways of not having connectivity. It is about making the code in gweather that reacts to NM connection status changes work right.
But does NM get a notification of that? As far is I know it does not (nor do I see how it could).
I think I'm experiencing a version of this problem, in which if my system does not have a connection to the internet, before I login to Gnome, no weather displays in the clock applet. It's just blank. So for example, if I'm logging into a wifi spot (not automatically) the weather function of the clock applet effectively doesn't work. If, however, after I make my wifi connection, I log out and back in again, then weather starts working. Very annoying. Curiously the plain old weather applet (not the weather element of the clock applet) works fine.