summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAleksander Morgado <aleksander@aleksander.es>2018-09-08 10:04:58 +0200
committerAleksander Morgado <aleksander@aleksander.es>2018-09-08 10:04:58 +0200
commit47ed19d5be68f139d4fbb00c997cd2805488ace7 (patch)
tree6e7ccebb9ac42c0774b7a23141ef94f27355036b
parent21420e450db9c688859e7fd7fd71cd452f075f12 (diff)
downloadModemManager-47ed19d5be68f139d4fbb00c997cd2805488ace7.tar.gz
broadband-bearer: don't do connection checks on CDMA
On CDMA-only connections we won't have a CID defined, so instead of getting in a loop of warnings reporting "cid not defined", early error out with an UNSUPPORTED error so that the connection check isn't tried any more. https://gitlab.freedesktop.org/mobile-broadband/ModemManager/issues/83
-rw-r--r--src/mm-broadband-bearer.c8
1 files changed, 8 insertions, 0 deletions
diff --git a/src/mm-broadband-bearer.c b/src/mm-broadband-bearer.c
index 6321de25a..779cd9a35 100644
--- a/src/mm-broadband-bearer.c
+++ b/src/mm-broadband-bearer.c
@@ -1992,6 +1992,14 @@ load_connection_status (MMBaseBearer *self,
MM_BASE_BEARER_MODEM, &modem,
NULL);
+ /* No connection status checks on CDMA-only */
+ if (MM_BROADBAND_BEARER (self)->priv->connection_type == CONNECTION_TYPE_CDMA) {
+ g_task_return_new_error (task, MM_CORE_ERROR, MM_CORE_ERROR_UNSUPPORTED,
+ "Couldn't load connection status: unsupported in CDMA");
+ g_object_unref (task);
+ goto out;
+ }
+
/* If CID not defined, error out */
if (!MM_BROADBAND_BEARER (self)->priv->cid) {
g_task_return_new_error (task, MM_CORE_ERROR, MM_CORE_ERROR_FAILED,