aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAleksander Morgado <aleksander@aleksander.es>2021-07-13 15:46:28 +0200
committerAleksander Morgado <aleksander@aleksander.es>2021-07-13 15:46:28 +0200
commitc4b5879e45cce3eed6136131cefcdfd3f9590916 (patch)
tree74df648801f74712d3a5694e5bb8cd3de80e1727
parent3e037dc158c6beb8372dc0027943e5c391cf0196 (diff)
broadband-bearer: multiplexing is not supported in generic AT based bearer
-rw-r--r--src/mm-broadband-bearer.c20
1 files changed, 15 insertions, 5 deletions
diff --git a/src/mm-broadband-bearer.c b/src/mm-broadband-bearer.c
index 285bb573..0b2d85bb 100644
--- a/src/mm-broadband-bearer.c
+++ b/src/mm-broadband-bearer.c
@@ -930,11 +930,12 @@ connect (MMBaseBearer *self,
GAsyncReadyCallback callback,
gpointer user_data)
{
- MMPortSerialAt *primary;
- const gchar *apn;
- gint profile_id;
- GTask *task;
- g_autoptr(MMBaseModem) modem = NULL;
+ MMPortSerialAt *primary;
+ const gchar *apn;
+ gint profile_id;
+ MMBearerMultiplexSupport multiplex;
+ GTask *task;
+ g_autoptr(MMBaseModem) modem = NULL;
task = g_task_new (self, cancellable, callback, user_data);
@@ -1010,6 +1011,15 @@ connect (MMBaseBearer *self,
return;
}
+ /* The generic broadband bearer doesn't support multiplexing */
+ multiplex = mm_bearer_properties_get_multiplex (mm_base_bearer_peek_config (MM_BASE_BEARER (self)));
+ if (multiplex == MM_BEARER_MULTIPLEX_SUPPORT_REQUIRED) {
+ g_task_return_new_error (task, MM_CORE_ERROR, MM_CORE_ERROR_UNSUPPORTED,
+ "Multiplexing required but not supported");
+ g_object_unref (task);
+ return;
+ }
+
/* If the modem has 3GPP capabilities and an APN, launch 3GPP-based connection */
if (mm_iface_modem_is_3gpp (MM_IFACE_MODEM (modem)) &&
(apn || (profile_id != MM_3GPP_PROFILE_ID_UNKNOWN))) {