aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAleksander Morgado <aleksander@aleksander.es>2020-07-06 16:23:57 +0200
committerAleksander Morgado <aleksander@aleksander.es>2020-07-06 16:23:57 +0200
commit0a89a9ae4ee62ba36b616fc444a866d61c203696 (patch)
tree3fb9706354e26b29bf274dd0b0d68fdb4629fa76
parente933fe14130b20785b6ddd2993a8fc982976c7af (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.
-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 : "");
}
/******************************************************************************/