Fix: Send username and password properly
authorDenis Kenzior <denkenz@gmail.com>
Wed, 18 Nov 2009 22:34:06 +0000 (16:34 -0600)
committerDenis Kenzior <denkenz@gmail.com>
Thu, 19 Nov 2009 00:07:10 +0000 (18:07 -0600)
drivers/hsomodem/gprs-context.c

index 52b7e91..a08dc8b 100644 (file)
@@ -145,10 +145,10 @@ static void hso_gprs_activate_primary(struct ofono_gprs_context *gc,
 
        cbd->user = gc;
 
-       if (ctx->username && ctx->password)
+       if (ctx->username[0] && ctx->password[0])
                sprintf(buf, "AT$QCPDPP=%u,1,\"%s\",\"%s\"",
                        ctx->cid, ctx->username, ctx->password);
-       else if (ctx->password)
+       else if (ctx->password[0])
                sprintf(buf, "AT$QCPDPP=%u,2,,\"%s\"",
                        ctx->cid, ctx->password);
        else