* [PATCH] gprs-context: fix set ipv4 netmask for rilmodem
@ 2016-04-18 15:15 Nishanth V
2016-04-20 1:54 ` Denis Kenzior
0 siblings, 1 reply; 2+ messages in thread
From: Nishanth V @ 2016-04-18 15:15 UTC (permalink / raw)
To: ofono
[-- Attachment #1: Type: text/plain, Size: 1314 bytes --]
---
drivers/rilmodem/gprs-context.c | 7 +++++--
1 file changed, 5 insertions(+), 2 deletions(-)
diff --git a/drivers/rilmodem/gprs-context.c b/drivers/rilmodem/gprs-context.c
index f0a687d..2bc6445 100644
--- a/drivers/rilmodem/gprs-context.c
+++ b/drivers/rilmodem/gprs-context.c
@@ -275,6 +275,7 @@ static void ril_setup_data_call_cb(struct ril_msg *message, gpointer user_data)
if (raw_addrs) {
char **ip_addrs = g_strsplit(raw_addrs, " ", 3);
char **split_ip_addr;
+ char *netmask;
if (ip_addrs == NULL || g_strv_length(ip_addrs) == 0) {
g_strfreev(ip_addrs);
@@ -292,6 +293,9 @@ static void ril_setup_data_call_cb(struct ril_msg *message, gpointer user_data)
* explicitly strip any prefix after calculating the netmask
*/
split_ip_addr = g_strsplit(ip_addrs[0], "/", 2);
+
+ netmask = ril_util_get_netmask(ip_addrs[0]);
+
g_strfreev(ip_addrs);
if (split_ip_addr == NULL ||
@@ -300,8 +304,7 @@ static void ril_setup_data_call_cb(struct ril_msg *message, gpointer user_data)
goto error_free;
}
- ofono_gprs_context_set_ipv4_netmask(gc,
- ril_util_get_netmask(split_ip_addr[0]));
+ ofono_gprs_context_set_ipv4_netmask(gc, netmask);
ofono_gprs_context_set_ipv4_address(gc, split_ip_addr[0], TRUE);
}
--
1.9.1
^ permalink raw reply related [flat|nested] 2+ messages in thread
end of thread, other threads:[~2016-04-20 1:54 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2016-04-18 15:15 [PATCH] gprs-context: fix set ipv4 netmask for rilmodem Nishanth V
2016-04-20 1:54 ` Denis Kenzior
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.