From f3a5016a6737b4cb40d33815e2d9aa2977380e01 Mon Sep 17 00:00:00 2001 From: Antara Borwankar Date: Wed, 18 Sep 2019 18:23:27 +0530 Subject: [PATCH] xmm7modem: Fix to set gateway in pdp context gateway was not being listed in context settings. Fixed teh bug to show correct gateway address. --- drivers/ifxmodem/gprs-context.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/drivers/ifxmodem/gprs-context.c b/drivers/ifxmodem/gprs-context.c index 7bacb738..7c58b24d 100644 --- a/drivers/ifxmodem/gprs-context.c +++ b/drivers/ifxmodem/gprs-context.c @@ -354,6 +354,9 @@ static void cgcontrdp_cb(gboolean ok, GAtResult *result, gpointer user_data) DBG("DNS: %s, %s\n", gcd->dns1, gcd->dns2); + if (gw) + l_strlcpy(gcd->gateway, gw, sizeof(gcd->gateway)); + if (gcd->proto == OFONO_GPRS_PROTO_IP) { if (!laddrnetmask || at_util_get_ipv4_address_and_netmask(laddrnetmask, @@ -391,9 +394,6 @@ static void cgcontrdp_cb(gboolean ok, GAtResult *result, gpointer user_data) IPV6_DEFAULT_PREFIX_LEN); } - if (gw) - l_strlcpy(gcd->gateway, gw, sizeof(gcd->gateway)); - gcd->state = STATE_ACTIVE; DBG("address: %s\n", gcd->address);