mirror of git://git.sysmocom.de/ofono
mbmmodem: Remove unneeded if
This commit is contained in:
parent
4bb6e09661
commit
b126407632
|
@ -367,7 +367,6 @@ static void mbm_gprs_activate_primary(struct ofono_gprs_context *gc,
|
||||||
struct gprs_context_data *gcd = ofono_gprs_context_get_data(gc);
|
struct gprs_context_data *gcd = ofono_gprs_context_get_data(gc);
|
||||||
struct cb_data *cbd = cb_data_new(cb, data);
|
struct cb_data *cbd = cb_data_new(cb, data);
|
||||||
char buf[AUTH_BUF_LENGTH];
|
char buf[AUTH_BUF_LENGTH];
|
||||||
int len;
|
|
||||||
|
|
||||||
/* IPv6 support not implemented */
|
/* IPv6 support not implemented */
|
||||||
if (ctx->proto != OFONO_GPRS_PROTO_IP)
|
if (ctx->proto != OFONO_GPRS_PROTO_IP)
|
||||||
|
@ -376,14 +375,10 @@ static void mbm_gprs_activate_primary(struct ofono_gprs_context *gc,
|
||||||
DBG("cid %u", ctx->cid);
|
DBG("cid %u", ctx->cid);
|
||||||
|
|
||||||
gcd->active_context = ctx->cid;
|
gcd->active_context = ctx->cid;
|
||||||
|
|
||||||
cbd->user = gc;
|
cbd->user = gc;
|
||||||
|
|
||||||
len = snprintf(buf, sizeof(buf), "AT+CGDCONT=%u,\"IP\"", ctx->cid);
|
snprintf(buf, sizeof(buf), "AT+CGDCONT=%u,\"IP\",\"%s\"",
|
||||||
|
ctx->cid, ctx->apn);
|
||||||
if (ctx->apn)
|
|
||||||
snprintf(buf + len, sizeof(buf) - len - 3, ",\"%s\"",
|
|
||||||
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)
|
||||||
|
|
Loading…
Reference in New Issue