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 7bacb73..7c58b24 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);
-- 
1.9.1

_______________________________________________
ofono mailing list
[email protected]
https://lists.ofono.org/mailman/listinfo/ofono

Reply via email to