aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAleksander Morgado <aleksander@lanedo.com>2013-04-05 09:43:38 +0200
committerAleksander Morgado <aleksander@lanedo.com>2013-04-05 10:27:43 +0200
commit30e2a0f4d0eaf632b357c1b1fd17730c932c6e63 (patch)
tree917f6d17ef995bdff51124bde9de19bf688d35e8
parent1cb5831af33237ca8f343410982f44cf8fd2903c (diff)
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>'
-rw-r--r--plugins/mbm/mm-broadband-bearer-mbm.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/plugins/mbm/mm-broadband-bearer-mbm.c b/plugins/mbm/mm-broadband-bearer-mbm.c
index 56c68ff8..f7374757 100644
--- a/plugins/mbm/mm-broadband-bearer-mbm.c
+++ b/plugins/mbm/mm-broadband-bearer-mbm.c
@@ -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);
}