gsm/cdma: mark netdev as data device if it was found first
This commit is contained in:
@@ -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);
|
||||||
|
@@ -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);
|
||||||
|
Reference in New Issue
Block a user