summaryrefslogtreecommitdiff
path: root/src/mbimcli
diff options
context:
space:
mode:
authorAleksander Morgado <aleksander@aleksander.es>2021-10-09 00:24:13 +0200
committerAleksander Morgado <aleksander@aleksander.es>2021-10-12 22:27:12 +0200
commit9f60c777c3fb9602fcf315c0b89a5a7ceb8f04fc (patch)
treeaecef0b0dc99e41f77d4299f4f91bc28616236db /src/mbimcli
parentb7432fc01a994bc135c70e715b755264f5706ed7 (diff)
downloadlibmbim-9f60c777c3fb9602fcf315c0b89a5a7ceb8f04fc.tar.gz
mbimcli,basic-connect: avoid updating connect positional arguments logic
The supported way to use the connect operation is through key-value pairs; the positional arguments method is fully deprecated and should no longer be used or updated.
Diffstat (limited to 'src/mbimcli')
-rw-r--r--src/mbimcli/mbimcli-basic-connect.c23
1 files changed, 4 insertions, 19 deletions
diff --git a/src/mbimcli/mbimcli-basic-connect.c b/src/mbimcli/mbimcli-basic-connect.c
index 11b844d..b646496 100644
--- a/src/mbimcli/mbimcli-basic-connect.c
+++ b/src/mbimcli/mbimcli-basic-connect.c
@@ -1157,7 +1157,7 @@ connect_activate_properties_handle (const gchar *key,
static gboolean
set_connect_activate_parse (const gchar *str,
ConnectActivateProperties *props,
- MbimDevice *device)
+ MbimDevice *device)
{
g_auto(GStrv) split = NULL;
g_autoptr(GError) error = NULL;
@@ -1178,17 +1178,10 @@ set_connect_activate_parse (const gchar *str,
g_printerr ("warning: positional input arguments format is deprecated, use key-value format instead\n");
split = g_strsplit (str, ",", -1);
- if (mbim_device_check_ms_mbimex_version (device, 3, 0)) {
- if (g_strv_length (split) > 5) {
- g_printerr ("error: couldn't parse input string, too many arguments\n");
- return FALSE;
- }
- } else {
- if (g_strv_length (split) > 4) {
- g_printerr ("error: couldn't parse input string, too many arguments\n");
- return FALSE;
+ if (g_strv_length (split) > 4) {
+ g_printerr ("error: couldn't parse input string, too many arguments\n");
+ return FALSE;
}
- }
if (g_strv_length (split) > 0) {
/* APN */
@@ -1206,14 +1199,6 @@ set_connect_activate_parse (const gchar *str,
/* Password */
props->password = g_strdup (split[3]);
}
- if (mbim_device_check_ms_mbimex_version (device, 3, 0)) {
- if (split[4]) {
- if (!mbimcli_read_access_media_type_from_string (split[4], &props->media_type)) {
- g_printerr ("error: couldn't parse input string, unknown media type '%s'\n", split[4]);
- return FALSE;
- }
- }
- }
}
}