summaryrefslogtreecommitdiff
path: root/src/nm-netlink-monitor.c
diff options
context:
space:
mode:
authorDan Williams <dcbw@redhat.com>2007-08-26 18:48:41 +0000
committerDan Williams <dcbw@redhat.com>2007-08-26 18:48:41 +0000
commit4c06f348afb7938a8421f29e15a4e15c92027f62 (patch)
tree667af731f7b2ec2ed9b2a1218ff249c076093b80 /src/nm-netlink-monitor.c
parentcd00315325e9e540172f1bfe559b30402cabe254 (diff)
downloadNetworkManager-4c06f348afb7938a8421f29e15a4e15c92027f62.tar.gz
2007-08-26 Dan Williams <dcbw@redhat.com>
* src/nm-netlink-monitor.c - (nm_netlink_monitor_class_init): fix marshalling types for interface-connected/interface-disconnected - (nm_netlink_monitor_event_handler): clean up carrier on/off check git-svn-id: http://svn-archive.gnome.org/svn/NetworkManager/trunk@2732 4912f4e0-d625-0410-9fb7-b9a5a253dbdc
Diffstat (limited to 'src/nm-netlink-monitor.c')
-rw-r--r--src/nm-netlink-monitor.c9
1 files changed, 3 insertions, 6 deletions
diff --git a/src/nm-netlink-monitor.c b/src/nm-netlink-monitor.c
index cb54a2192c..d611f367d9 100644
--- a/src/nm-netlink-monitor.c
+++ b/src/nm-netlink-monitor.c
@@ -120,7 +120,7 @@ nm_netlink_monitor_class_init (NMNetlinkMonitorClass *monitor_class)
G_OBJECT_CLASS_TYPE (object_class),
G_SIGNAL_RUN_LAST,
G_STRUCT_OFFSET (NMNetlinkMonitorClass, interface_connected),
- NULL, NULL, g_cclosure_marshal_VOID__STRING,
+ NULL, NULL, g_cclosure_marshal_VOID__INT,
G_TYPE_NONE, 1, G_TYPE_INT);
signals[INTERFACE_DISCONNECTED] =
@@ -128,7 +128,7 @@ nm_netlink_monitor_class_init (NMNetlinkMonitorClass *monitor_class)
G_OBJECT_CLASS_TYPE (object_class),
G_SIGNAL_RUN_LAST,
G_STRUCT_OFFSET (NMNetlinkMonitorClass, interface_disconnected),
- NULL, NULL, g_cclosure_marshal_VOID__STRING,
+ NULL, NULL, g_cclosure_marshal_VOID__INT,
G_TYPE_NONE, 1, G_TYPE_INT);
signals[ERROR] =
@@ -692,10 +692,7 @@ nm_netlink_monitor_event_handler (GIOChannel *channel,
int data_len = RTA_PAYLOAD (attribute);
if (attribute->rta_type == IFLA_IFNAME) {
- /* The !! weirdness is to cannonicalize the value to 0 or 1. */
- gboolean is_connected = !!((gboolean) (interface_info->ifi_flags & IFF_RUNNING));
-
- if (is_connected) {
+ if (interface_info->ifi_flags & IFF_RUNNING) {
g_signal_emit (G_OBJECT (monitor),
signals[INTERFACE_CONNECTED],
0, interface_info->ifi_index);