Skip to contentSkip to conversation

xmm7modem: Fix to set gateway in pdp context

PATCH Applied Antara Borwankar 2 participants 2 messages Sep 18, 2019 – Sep 20, 2019

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 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(-)
drivers/ifxmodem/gprs-context.c +3 -3
index 7bacb73..7c58b24 100644
@@ -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);
Signature · 1 line
1.9.1
#1 lore raw

Hi Antara,

Quoted 6 lines · Antara Borwankar

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(-)

Applied, thanks.

Regards,
-Denis