summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAleksander Morgado <aleksander@aleksander.es>2020-07-06 16:23:57 +0200
committerAleksander Morgado <aleksander@aleksander.es>2020-08-19 09:11:43 +0200
commit44175db16c4ad83a35a0661a3758c90b3cf2ce8c (patch)
tree7c26a8455d04cd3a13f79794ff3ab186c6f59138
parentd544b93d484b315a7e04bd93343d30963ca04a92 (diff)
cinterion: if user OR password given, don't set the other as (null)
[modem2/ttyACM1/at] --> 'AT^SGAUTH=8,1,t-d1,(null)<CR>' [modem2/ttyACM1/at] <-- '<CR><LF>+CME ERROR: 4<CR><LF>' We should use an empty string instead. (cherry picked from commit 0a89a9ae4ee62ba36b616fc444a866d61c203696)
-rw-r--r--plugins/cinterion/mm-broadband-bearer-cinterion.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/plugins/cinterion/mm-broadband-bearer-cinterion.c b/plugins/cinterion/mm-broadband-bearer-cinterion.c
index ff9d008c..a4ee87d2 100644
--- a/plugins/cinterion/mm-broadband-bearer-cinterion.c
+++ b/plugins/cinterion/mm-broadband-bearer-cinterion.c
@@ -236,7 +236,11 @@ build_auth_string (MMBroadbandBearerCinterion *self,
encoded_auth = BEARER_CINTERION_AUTH_PAP;
}
- return g_strdup_printf ("^SGAUTH=%u,%d,%s,%s", cid, encoded_auth, passwd, user);
+ return g_strdup_printf ("^SGAUTH=%u,%d,%s,%s",
+ cid,
+ encoded_auth,
+ passwd ? passwd : "",
+ user ? user : "");
}
/******************************************************************************/