2004-09-11 Dan Williams <dcbw@redhat.com>
* src/NetworkManager.c - Fix race condition between initscripts and NM on card insertion which could cause a card to keep an IP address and routes around even when it was not the active device * src/NetworkManagerDbus.c - Fix compile errors, free more DBusErrors git-svn-id: http://svn-archive.gnome.org/svn/NetworkManager/trunk@154 4912f4e0-d625-0410-9fb7-b9a5a253dbdc
This commit is contained in:
10
ChangeLog
10
ChangeLog
@@ -1,3 +1,13 @@
|
|||||||
|
2004-09-11 Dan Williams <dcbw@redhat.com>
|
||||||
|
|
||||||
|
* src/NetworkManager.c
|
||||||
|
- Fix race condition between initscripts and NM on card insertion
|
||||||
|
which could cause a card to keep an IP address and routes around
|
||||||
|
even when it was not the active device
|
||||||
|
|
||||||
|
* src/NetworkManagerDbus.c
|
||||||
|
- Fix compile errors, free more DBusErrors
|
||||||
|
|
||||||
2004-09-11 Dan Williams <dcbw@redhat.com>
|
2004-09-11 Dan Williams <dcbw@redhat.com>
|
||||||
|
|
||||||
* docs/NetworkManager DBUS API.txt
|
* docs/NetworkManager DBUS API.txt
|
||||||
|
@@ -372,6 +372,18 @@ gboolean nm_link_state_monitor (gpointer user_data)
|
|||||||
*/
|
*/
|
||||||
nm_device_update_ip4_address (dev);
|
nm_device_update_ip4_address (dev);
|
||||||
}
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
/* Ensure that the device has no IP address or routes. This will
|
||||||
|
* sometimes occur when a card gets inserted, and the system
|
||||||
|
* initscripts will run to bring the card up, but they get around to
|
||||||
|
* running _after_ we've been notified of insertion and cleared out
|
||||||
|
* card info already.
|
||||||
|
*/
|
||||||
|
nm_system_device_flush_routes (dev);
|
||||||
|
if (nm_device_get_ip4_address (dev) != 0)
|
||||||
|
nm_system_device_flush_addresses (dev);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
element = g_slist_next (element);
|
element = g_slist_next (element);
|
||||||
|
@@ -1396,11 +1396,11 @@ DBusConnection *nm_dbus_init (NMData *data)
|
|||||||
|
|
||||||
dbus_error_init (&dbus_error);
|
dbus_error_init (&dbus_error);
|
||||||
connection = dbus_bus_get (DBUS_BUS_SYSTEM, &dbus_error);
|
connection = dbus_bus_get (DBUS_BUS_SYSTEM, &dbus_error);
|
||||||
if ((connection == NULL) || dbus_error_is_set (&error))
|
if ((connection == NULL) || dbus_error_is_set (&dbus_error))
|
||||||
{
|
{
|
||||||
syslog (LOG_ERR, "nm_dbus_init() could not get the system bus. Make sure the message bus daemon is running?");
|
syslog (LOG_ERR, "nm_dbus_init() could not get the system bus. Make sure the message bus daemon is running?");
|
||||||
if (dbus_error_is_set (&error))
|
if (dbus_error_is_set (&dbus_error))
|
||||||
dbus_error_free (&error);
|
dbus_error_free (&dbus_error);
|
||||||
return (NULL);
|
return (NULL);
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -1430,18 +1430,20 @@ DBusConnection *nm_dbus_init (NMData *data)
|
|||||||
"sender='" NMI_DBUS_SERVICE "',"
|
"sender='" NMI_DBUS_SERVICE "',"
|
||||||
"path='" NMI_DBUS_PATH "'",
|
"path='" NMI_DBUS_PATH "'",
|
||||||
&dbus_error);
|
&dbus_error);
|
||||||
|
dbus_error_free (&dbus_error);
|
||||||
|
|
||||||
dbus_bus_add_match(connection,
|
dbus_bus_add_match(connection,
|
||||||
"type='signal',"
|
"type='signal',"
|
||||||
"interface='" DBUS_INTERFACE_ORG_FREEDESKTOP_DBUS "',"
|
"interface='" DBUS_INTERFACE_ORG_FREEDESKTOP_DBUS "',"
|
||||||
"sender='" DBUS_SERVICE_ORG_FREEDESKTOP_DBUS "'",
|
"sender='" DBUS_SERVICE_ORG_FREEDESKTOP_DBUS "'",
|
||||||
&dbus_error);
|
&dbus_error);
|
||||||
|
dbus_error_free (&dbus_error);
|
||||||
|
|
||||||
dbus_bus_acquire_service (connection, NM_DBUS_SERVICE, 0, &dbus_error);
|
dbus_bus_acquire_service (connection, NM_DBUS_SERVICE, 0, &dbus_error);
|
||||||
if (dbus_error_is_set (&dbus_error))
|
if (dbus_error_is_set (&dbus_error))
|
||||||
{
|
{
|
||||||
syslog (LOG_ERR, "nm_dbus_init() could not acquire its service. dbus_bus_acquire_service() says: '%s'", dbus_error.message);
|
syslog (LOG_ERR, "nm_dbus_init() could not acquire its service. dbus_bus_acquire_service() says: '%s'", dbus_error.message);
|
||||||
dbus_error_free (&error);
|
dbus_error_free (&dbus_error);
|
||||||
return (NULL);
|
return (NULL);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user