mirror of git://git.sysmocom.de/ofono
Fix: Send *EIAAUW after CGDCONT for STE and MBM
Otherwise the EIAAUW might fail.
This commit is contained in:
parent
8268c4fe62
commit
bfeef21a9d
|
@ -350,13 +350,6 @@ static void mbm_gprs_activate_primary(struct ofono_gprs_context *gc,
|
||||||
|
|
||||||
cbd->user = gc;
|
cbd->user = gc;
|
||||||
|
|
||||||
snprintf(buf, sizeof(buf), "AT*EIAAUW=%d,1,\"%s\",\"%s\"",
|
|
||||||
ctx->cid, ctx->username, ctx->password);
|
|
||||||
|
|
||||||
if (g_at_chat_send(gcd->chat, buf, none_prefix,
|
|
||||||
NULL, NULL, NULL) == 0)
|
|
||||||
goto error;
|
|
||||||
|
|
||||||
len = snprintf(buf, sizeof(buf), "AT+CGDCONT=%u,\"IP\"", ctx->cid);
|
len = snprintf(buf, sizeof(buf), "AT+CGDCONT=%u,\"IP\"", ctx->cid);
|
||||||
|
|
||||||
if (ctx->apn)
|
if (ctx->apn)
|
||||||
|
@ -364,8 +357,21 @@ static void mbm_gprs_activate_primary(struct ofono_gprs_context *gc,
|
||||||
ctx->apn);
|
ctx->apn);
|
||||||
|
|
||||||
if (g_at_chat_send(gcd->chat, buf, none_prefix,
|
if (g_at_chat_send(gcd->chat, buf, none_prefix,
|
||||||
mbm_cgdcont_cb, cbd, g_free) > 0)
|
mbm_cgdcont_cb, cbd, g_free) == 0)
|
||||||
return;
|
goto error;
|
||||||
|
|
||||||
|
/*
|
||||||
|
* Set username and password, this should be done after CGDCONT
|
||||||
|
* or an error can occur. We don't bother with error checking
|
||||||
|
* here
|
||||||
|
* */
|
||||||
|
snprintf(buf, sizeof(buf), "AT*EIAAUW=%d,1,\"%s\",\"%s\"",
|
||||||
|
ctx->cid, ctx->username, ctx->password);
|
||||||
|
|
||||||
|
g_at_chat_send(gcd->chat, buf, none_prefix, NULL, NULL, NULL);
|
||||||
|
|
||||||
|
return;
|
||||||
|
|
||||||
error:
|
error:
|
||||||
if (cbd)
|
if (cbd)
|
||||||
g_free(cbd);
|
g_free(cbd);
|
||||||
|
|
|
@ -426,13 +426,6 @@ static void ste_gprs_activate_primary(struct ofono_gprs_context *gc,
|
||||||
gcd->active_context = ctx->cid;
|
gcd->active_context = ctx->cid;
|
||||||
cbd->user = gc;
|
cbd->user = gc;
|
||||||
|
|
||||||
/* Set username and password */
|
|
||||||
snprintf(buf, sizeof(buf), "AT*EIAAUW=%d,1,\"%s\",\"%s\"",
|
|
||||||
ctx->cid, ctx->username, ctx->password);
|
|
||||||
|
|
||||||
if (g_at_chat_send(gcd->chat, buf, none_prefix, NULL, NULL, NULL) == 0)
|
|
||||||
goto error;
|
|
||||||
|
|
||||||
len = snprintf(buf, sizeof(buf), "AT+CGDCONT=%u,\"IP\"", ctx->cid);
|
len = snprintf(buf, sizeof(buf), "AT+CGDCONT=%u,\"IP\"", ctx->cid);
|
||||||
|
|
||||||
if (ctx->apn)
|
if (ctx->apn)
|
||||||
|
@ -440,8 +433,20 @@ static void ste_gprs_activate_primary(struct ofono_gprs_context *gc,
|
||||||
ctx->apn);
|
ctx->apn);
|
||||||
|
|
||||||
if (g_at_chat_send(gcd->chat, buf, none_prefix,
|
if (g_at_chat_send(gcd->chat, buf, none_prefix,
|
||||||
ste_cgdcont_cb, cbd, g_free) > 0)
|
ste_cgdcont_cb, cbd, g_free) == 0)
|
||||||
return;
|
goto error;
|
||||||
|
|
||||||
|
/*
|
||||||
|
* Set username and password, this should be done after CGDCONT
|
||||||
|
* or an error can occur. We don't bother with error checking
|
||||||
|
* here
|
||||||
|
* */
|
||||||
|
snprintf(buf, sizeof(buf), "AT*EIAAUW=%d,1,\"%s\",\"%s\"",
|
||||||
|
ctx->cid, ctx->username, ctx->password);
|
||||||
|
|
||||||
|
g_at_chat_send(gcd->chat, buf, none_prefix, NULL, NULL, NULL);
|
||||||
|
|
||||||
|
return;
|
||||||
|
|
||||||
error:
|
error:
|
||||||
if (cbd)
|
if (cbd)
|
||||||
|
|
Loading…
Reference in New Issue