diff options
author | John Crispin <blogic@openwrt.org> | 2014-09-08 02:01:58 +0200 |
---|---|---|
committer | John Crispin <blogic@openwrt.org> | 2014-09-08 02:01:58 +0200 |
commit | 4ae19ab4fcdd70dbfc8c303d752502f2da5a7e75 (patch) | |
tree | a14ea1a387e59984b32146165f498d91b1a57359 | |
parent | 7741d88cdfd36f0c4380f660a9ad7109df76b432 (diff) |
cleanup authprotocol handling
Signed-off-by: John Crispin <blogic@openwrt.org>
-rw-r--r-- | cli.c | 8 |
1 files changed, 4 insertions, 4 deletions
@@ -323,11 +323,11 @@ mbim_connect_request(void) c->authprotocol = htole32(MBIM_AUTH_PROTOCOL_CHAP); else if (!strcmp(_argv[1], "mschapv2")) c->authprotocol = htole32(MBIM_AUTH_PROTOCOL_MSCHAPV2); - else - return -1; - mbim_encode_string(&c->username, _argv[2]); - mbim_encode_string(&c->password, _argv[3]); + if (c->authprotocol) { + mbim_encode_string(&c->username, _argv[2]); + mbim_encode_string(&c->password, _argv[3]); + } } return mbim_send_command_msg(); } |