summaryrefslogtreecommitdiff
path: root/src/nm-netlink-monitor.c
diff options
context:
space:
mode:
authorDan Williams <dcbw@redhat.com>2007-01-04 12:06:26 +0000
committerDan Williams <dcbw@redhat.com>2007-01-04 12:06:26 +0000
commit0df1e42c39d3ddc000d9c4bf2057e96b4fc97bd9 (patch)
treec76cf32d2c43bdd9124a7f6a436b88c3cda17059 /src/nm-netlink-monitor.c
parent2ea7f1e5ea8120926b7bcf1f103800943ca44cfb (diff)
2007-01-04 Dan Williams <dcbw@redhat.com>
Threading removal related cleanups: - Use the glib default main context. Remove the device main context member from NMDevice, and the main_context member from NMData. Change all the idle and timeout scheduler functions to use plain g_idle_add() and g_timeout_add(). - As a side-effect of the first change, nm_dbus_manager_get() no longer takes an argument; fix that up too. - Remove all locking, which is useless since we no longer use threads. For example, nm_get_device_by_iface_locked() has been removed. The global device list lock, the AP List lock, and all static locks in NetworkManagerPolicy.c have been removed. The locking utility functions in NetworkManagerUtils.c have also been removed. - Other cleanups in spacing and code style git-svn-id: http://svn-archive.gnome.org/svn/NetworkManager/trunk@2205 4912f4e0-d625-0410-9fb7-b9a5a253dbdc
Diffstat (limited to 'src/nm-netlink-monitor.c')
-rw-r--r--src/nm-netlink-monitor.c6
1 files changed, 2 insertions, 4 deletions
diff --git a/src/nm-netlink-monitor.c b/src/nm-netlink-monitor.c
index 7b8821c627..2b638c8fdb 100644
--- a/src/nm-netlink-monitor.c
+++ b/src/nm-netlink-monitor.c
@@ -720,7 +720,7 @@ nm_netlink_monitor_event_handler (GIOChannel *channel,
gboolean is_connected = !!((gboolean) (interface_info->ifi_flags & IFF_RUNNING));
NMDevice * dev;
- if ((dev = nm_get_device_by_iface_locked (monitor->priv->app_data, iface)))
+ if ((dev = nm_get_device_by_iface (monitor->priv->app_data, iface)))
{
if (is_connected) {
g_signal_emit (G_OBJECT (monitor),
@@ -731,7 +731,6 @@ nm_netlink_monitor_event_handler (GIOChannel *channel,
nm_netlink_monitor_signals[INTERFACE_DISCONNECTED],
0, dev);
}
- g_object_unref (G_OBJECT (dev));
}
}
g_free (iface);
@@ -739,7 +738,7 @@ nm_netlink_monitor_event_handler (GIOChannel *channel,
char * iface = nm_system_get_iface_from_rtnl_index (interface_info->ifi_index);
if (iface != NULL) {
NMDevice *dev;
- if ((dev = nm_get_device_by_iface_locked (monitor->priv->app_data, iface)))
+ if ((dev = nm_get_device_by_iface (monitor->priv->app_data, iface)))
{
char * data = g_malloc0 (data_len);
memcpy (data, RTA_DATA (attribute), data_len);
@@ -747,7 +746,6 @@ nm_netlink_monitor_event_handler (GIOChannel *channel,
nm_netlink_monitor_signals[WIRELESS_EVENT],
0, dev, data, data_len);
g_free (data);
- g_object_unref (G_OBJECT (dev));
}
}
g_free (iface);