diff options
author | Aleksander Morgado <aleksander@lanedo.com> | 2013-02-19 09:50:52 +0100 |
---|---|---|
committer | Aleksander Morgado <aleksander@lanedo.com> | 2013-02-19 09:50:52 +0100 |
commit | 1a11af0f86cee0ca24861a8369782627906363d1 (patch) | |
tree | 34927ab935f85763ba9523e217196e9f13789c57 /src | |
parent | d593116d68ecda7fc0ef67e7399d0588cde60a38 (diff) |
broadband-bearer: fallback to primary AT port if no data AT port available
Spotted by Dan Williams <dcbw@redhat.com> with his ADU960S.
Diffstat (limited to 'src')
-rw-r--r-- | src/mm-broadband-bearer.c | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/src/mm-broadband-bearer.c b/src/mm-broadband-bearer.c index 61dedbd9..eeaebd07 100644 --- a/src/mm-broadband-bearer.c +++ b/src/mm-broadband-bearer.c @@ -183,11 +183,11 @@ common_get_at_data_port (MMBaseModem *modem, /* Look for best data port, NULL if none available. */ data = mm_base_modem_peek_best_data_port (modem, MM_PORT_TYPE_AT); if (!data) { - g_set_error (error, - MM_CORE_ERROR, - MM_CORE_ERROR_CONNECTED, - "Couldn't connect: no port available"); - return NULL; + /* It may happen that the desired data port grabbed during probing was + * actually a 'net' port, which the generic logic cannot handle, so if + * that is the case, and we have no AT data ports specified, just + fallback to the primary AT port. */ + data = (MMPort *) mm_base_modem_peek_port_primary (modem); } g_assert (MM_IS_AT_SERIAL_PORT (data)); |