[gnome-applets/gnome-2-26] Fix network state detection in gweather
- From: Callum McKenzie <callum src gnome org>
- To: svn-commits-list gnome org
- Subject: [gnome-applets/gnome-2-26] Fix network state detection in gweather
- Date: Sat, 30 May 2009 03:06:55 -0400 (EDT)
commit 58eedcbac3a1df17812d244bcee1d29b5cfb06ee
Author: Callum McKenzie <callum spooky-possum org>
Date: Sat May 30 18:56:02 2009 +1200
Fix network state detection in gweather
Patch from Matthias Clasen to fix detection of network status changes
in gweather. See bug #579098 for details. I believe this also fixes
bugs 379422, and 565751.
---
gweather/gweather-applet.c | 7 ++++++-
1 files changed, 6 insertions(+), 1 deletions(-)
diff --git a/gweather/gweather-applet.c b/gweather/gweather-applet.c
index 101d64f..8d86ec0 100644
--- a/gweather/gweather-applet.c
+++ b/gweather/gweather-applet.c
@@ -17,6 +17,9 @@
#include <stdio.h>
#include <stdlib.h>
#include <assert.h>
+#include <netinet/in.h>
+#include <arpa/nameser.h>
+#include <resolv.h>
#include <gconf/gconf-client.h>
#include <panel-applet.h>
@@ -552,6 +555,8 @@ state_notify (DBusPendingCall *pending, gpointer data)
DBUS_TYPE_UINT32, &result,
DBUS_TYPE_INVALID)) {
if (result == NM_STATE_CONNECTED) {
+ /* thank you, glibc */
+ res_init ();
gweather_update (gw_applet);
}
}
@@ -614,7 +619,7 @@ setup_network_monitor (GWeatherApplet *gw_applet)
dbus_connection_add_filter (dbus, filter_func, gw_applet, NULL);
dbus_bus_add_match (dbus,
"type='signal',"
- "interface='" NM_DBUS_INTERFACE_DEVICE "'",
+ "interface='" NM_DBUS_INTERFACE "'",
NULL);
}
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]