broadband-bearer: multiplexing is not supported in generic AT based bearer

This commit is contained in:
Aleksander Morgado
2021-07-13 15:46:28 +02:00
parent 3e037dc158
commit c4b5879e45

View File

@@ -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))) {