2007-12-06 Tambet Ingo <tambet@gmail.com>
* src/NetworkManagerSystem.c * (nm_system_device_set_from_ip4_config): Change the arguments: This whole file shouldn't really know anything about NMDevices, it should deal only with device interfaces. Devices might have different ifaces for different stuff and this place shouldn't know anything about it. * src/NetworkManagerPolicy.c: Get rid of leftover global * variable global_policy. (global_state_changed): Implement. In the current NM it's not really important, but will be required in the case of multiple active devices. (Or even better, if stuff like that gets moved out from NM). * src/vpn-manager/nm-vpn-connection.c * (connection_state_changed): Don't call nm_system_device_set_from_ip4_config() directly, use nm_device_set_ip4_config() instead. * src/nm-device.c: Add a ip_face protected member. It's used for * 'multi-interface' devices like serial devices (ttyS0 and ppp0 for example). (nm_device_get_ip_iface): Implement. Default to the device iface if ip_iface is not set. (nm_device_set_ip_iface): Implement. (nm_device_activate_stage5_ip_config_commit): Move all the extra actions that happen after setting ip4_config from here ... (nm_device_set_ip4_config): ... to here. The reason behind it is that no other code than this function should call nm_system_device_set_from_ip4_config() because no other code has enough information on which arguments to use. So instead, other code could just set the new ip4 config using this function and everyone is happy. * src/nm-umts-device.c: Store the pending ids so that we can * remove pending actions if we happen to get deactivated while something is pending. (automatic_registration): Handle the response that indicates pending network registration and wait until the pending registration is done. (real_deactivate_quickly): If there's a pending operation, cancel it. * src/nm-serial-device.c (ppp_ip4_config): Set the ip_iface when * the iface is up ... (real_deactivate_quickly): ... and remove it when it's down. (nm_serial_device_get_reply): Return the timeout id so that the callers can remove it if needed. (nm_serial_device_wait_for_reply): Ditto. git-svn-id: http://svn-archive.gnome.org/svn/NetworkManager/trunk@3141 4912f4e0-d625-0410-9fb7-b9a5a253dbdc
This commit is contained in:
@@ -1,3 +1,5 @@
|
||||
/* -*- Mode: C; tab-width: 5; indent-tabs-mode: t; c-basic-offset: 5 -*- */
|
||||
|
||||
/* NetworkManager -- Network link manager
|
||||
*
|
||||
* Dan Williams <dcbw@redhat.com>
|
||||
@@ -61,7 +63,10 @@ gboolean nm_system_device_get_use_dhcp (NMDevice *dev);
|
||||
|
||||
gboolean nm_system_device_get_disabled (NMDevice *dev);
|
||||
|
||||
gboolean nm_system_device_set_from_ip4_config (NMDevice *dev);
|
||||
gboolean nm_system_device_set_from_ip4_config (const char *iface,
|
||||
NMIP4Config *config,
|
||||
gboolean route_to_iface);
|
||||
|
||||
gboolean nm_system_vpn_device_set_from_ip4_config (NMDevice *active_device,
|
||||
const char *iface,
|
||||
NMIP4Config *config,
|
||||
|
Reference in New Issue
Block a user