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.
This commit is contained in:
Aleksander Morgado
2020-07-06 16:23:57 +02:00
parent e933fe1413
commit 0a89a9ae4e

View File

@@ -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 : "");
}
/******************************************************************************/