NetworkManager r3963 - in trunk: . src
- From: dcbw svn gnome org
- To: svn-commits-list gnome org
- Subject: NetworkManager r3963 - in trunk: . src
- Date: Thu, 14 Aug 2008 17:45:47 +0000 (UTC)
Author: dcbw
Date: Thu Aug 14 17:45:47 2008
New Revision: 3963
URL: http://svn.gnome.org/viewvc/NetworkManager?rev=3963&view=rev
Log:
2008-08-14 Dan Williams <dcbw redhat com>
* src/nm-device.c
- (nm_device_deactivate_quickly): tear down activation request after
calling device-specific deactivation
* src/nm-hso-gsm-device.c
- (real_deactivate_quickly): terminate connection when deactivating
Modified:
trunk/ChangeLog
trunk/src/nm-device.c
trunk/src/nm-hso-gsm-device.c
Modified: trunk/src/nm-device.c
==============================================================================
--- trunk/src/nm-device.c (original)
+++ trunk/src/nm-device.c Thu Aug 14 17:45:47 2008
@@ -1361,13 +1361,13 @@
aipd_cleanup (self);
- /* Tear down an existing activation request */
- clear_act_request (self);
-
/* Call device type-specific deactivation */
if (NM_DEVICE_GET_CLASS (self)->deactivate_quickly)
NM_DEVICE_GET_CLASS (self)->deactivate_quickly (self);
+ /* Tear down an existing activation request */
+ clear_act_request (self);
+
return TRUE;
}
Modified: trunk/src/nm-hso-gsm-device.c
==============================================================================
--- trunk/src/nm-hso-gsm-device.c (original)
+++ trunk/src/nm-hso-gsm-device.c Thu Aug 14 17:45:47 2008
@@ -390,12 +390,32 @@
real_deactivate_quickly (NMDevice *device)
{
NMHsoGsmDevicePrivate *priv = NM_HSO_GSM_DEVICE_GET_PRIVATE (device);
+ NMActRequest *req;
+ guint cid;
+ char *command;
if (priv->pending_ip4_config) {
g_object_unref (priv->pending_ip4_config);
priv->pending_ip4_config = NULL;
}
+ /* Don't leave the modem connected */
+ req = nm_device_get_act_request (device);
+ if (req) {
+ cid = GPOINTER_TO_UINT (g_object_get_data (G_OBJECT (req), GSM_CID));
+ if (cid) {
+ command = g_strdup_printf ("AT_OWANCALL=%d,0,1", cid);
+ nm_serial_device_send_command_string (NM_SERIAL_DEVICE (device), command);
+ g_free (command);
+
+ /* FIXME: doesn't seem to take the command otherwise, perhaps since
+ * the serial port gets closed right away
+ */
+ g_usleep (G_USEC_PER_SEC / 3);
+ }
+ }
+
+
if (NM_DEVICE_CLASS (nm_hso_gsm_device_parent_class)->deactivate_quickly)
NM_DEVICE_CLASS (nm_hso_gsm_device_parent_class)->deactivate_quickly (device);
}
@@ -410,6 +430,7 @@
nm_system_device_flush_ip4_addresses_with_iface (priv->netdev_iface);
nm_system_device_set_up_down_with_iface (priv->netdev_iface, FALSE);
}
+ nm_device_set_ip_iface (device, NULL);
if (NM_DEVICE_CLASS (nm_hso_gsm_device_parent_class)->deactivate)
NM_DEVICE_CLASS (nm_hso_gsm_device_parent_class)->deactivate (device);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]