gsm/cdma: mark netdev as data device if it was found first

This commit is contained in:
Dan Williams
2009-06-29 10:15:14 -04:00
parent 8ae41eeee3
commit b79ebbac35
2 changed files with 2 additions and 2 deletions

View File

@@ -123,7 +123,7 @@ grab_port (MMModem *modem,
priv->secondary = MM_SERIAL_PORT (port); priv->secondary = MM_SERIAL_PORT (port);
} else { } else {
/* Net device (if any) is the preferred data port */ /* Net device (if any) is the preferred data port */
if (priv->data && MM_IS_SERIAL_PORT (priv->data)) { if (!priv->data || MM_IS_SERIAL_PORT (priv->data)) {
priv->data = port; priv->data = port;
g_object_notify (G_OBJECT (self), MM_MODEM_DATA_DEVICE); g_object_notify (G_OBJECT (self), MM_MODEM_DATA_DEVICE);
check_valid (self); check_valid (self);

View File

@@ -238,7 +238,7 @@ mm_generic_gsm_grab_port (MMGenericGsm *self,
priv->secondary = MM_SERIAL_PORT (port); priv->secondary = MM_SERIAL_PORT (port);
} else { } else {
/* Net device (if any) is the preferred data port */ /* Net device (if any) is the preferred data port */
if (priv->data && MM_IS_SERIAL_PORT (priv->data)) { if (!priv->data || MM_IS_SERIAL_PORT (priv->data)) {
priv->data = port; priv->data = port;
g_object_notify (G_OBJECT (self), MM_MODEM_DATA_DEVICE); g_object_notify (G_OBJECT (self), MM_MODEM_DATA_DEVICE);
check_valid (self); check_valid (self);