mbm: don't pass (null) as string when either user or password is empty

E.g. instead of:
  (ttyACM1): --> 'AT*EIAAUW=2,1,"(null)","vodafone"<CR>'
  (ttyACM1): <-- '<CR><LF>OK<CR><LF>'

Better pass:
  (ttyACM1): --> 'AT*EIAAUW=2,1,"","vodafone"<CR>'
  (ttyACM1): <-- '<CR><LF>OK<CR><LF>'
This commit is contained in:
Aleksander Morgado
2013-04-05 09:43:38 +02:00
parent 1cb5831af3
commit 30e2a0f4d0

View File

@@ -394,8 +394,8 @@ authenticate (Dial3gppContext *ctx)
command = g_strdup_printf ("AT*EIAAUW=%d,1,\"%s\",\"%s\"",
ctx->cid,
encoded_user,
encoded_password);
encoded_user ? encoded_user : "",
encoded_password ? encoded_password : "");
mm_base_modem_at_command_full (ctx->modem,
ctx->primary,
@@ -410,6 +410,7 @@ authenticate (Dial3gppContext *ctx)
return;
}
mm_dbg ("Authentication not needed");
activate (ctx);
}