Change in osmo-ggsn[master]: process_pco() const-ify 'apn' argument

Harald Welte gerrit-no-reply at lists.osmocom.org
Thu Apr 11 14:59:51 UTC 2019


Harald Welte has submitted this change and it was merged. ( https://gerrit.osmocom.org/13566 )

Change subject: process_pco() const-ify 'apn' argument
......................................................................

process_pco() const-ify 'apn' argument

Change-Id: I2a96b0fbe077c7c49342553de0880bfc58318669
---
M ggsn/ggsn.c
1 file changed, 4 insertions(+), 4 deletions(-)

Approvals:
  Vadim Yanitskiy: Looks good to me, but someone else must approve
  Pau Espin Pedrol: Looks good to me, approved
  Jenkins Builder: Verified



diff --git a/ggsn/ggsn.c b/ggsn/ggsn.c
index dd723e9..423f0c0 100644
--- a/ggsn/ggsn.c
+++ b/ggsn/ggsn.c
@@ -503,7 +503,7 @@
 }
 
 /* construct an IPCP PCO response from request*/
-static void build_ipcp_pco(struct apn_ctx *apn, struct pdp_t *pdp, struct msgb *msg)
+static void build_ipcp_pco(const struct apn_ctx *apn, struct pdp_t *pdp, struct msgb *msg)
 {
 	const struct in46_addr *dns1 = &apn->v4.cfg.dns[0];
 	const struct in46_addr *dns2 = &apn->v4.cfg.dns[1];
@@ -559,7 +559,7 @@
 }
 
 /* process one PCO request from a MS/UE, putting together the proper responses */
-static void process_pco(struct apn_ctx *apn, struct pdp_t *pdp)
+static void process_pco(const struct apn_ctx *apn, struct pdp_t *pdp)
 {
 	struct msgb *msg = msgb_alloc(256, "PCO");
 	struct ippoolm_t *peer_v4 = pdp_get_peer_ipv(pdp, false);
@@ -573,7 +573,7 @@
 
 	if (pco_contains_proto(&pdp->pco_req, 0, PCO_P_DNS_IPv6_ADDR, 0)) {
 		for (i = 0; i < ARRAY_SIZE(apn->v6.cfg.dns); i++) {
-			struct in46_addr *i46a = &apn->v6.cfg.dns[i];
+			const struct in46_addr *i46a = &apn->v6.cfg.dns[i];
 			if (i46a->len != 16)
 				continue;
 			msgb_t16lv_put(msg, PCO_P_DNS_IPv6_ADDR, i46a->len, i46a->v6.s6_addr);
@@ -582,7 +582,7 @@
 
 	if (pco_contains_proto(&pdp->pco_req, 0, PCO_P_DNS_IPv4_ADDR, 0)) {
 		for (i = 0; i < ARRAY_SIZE(apn->v4.cfg.dns); i++) {
-			struct in46_addr *i46a = &apn->v4.cfg.dns[i];
+			const struct in46_addr *i46a = &apn->v4.cfg.dns[i];
 			if (i46a->len != 4)
 				continue;
 			msgb_t16lv_put(msg, PCO_P_DNS_IPv4_ADDR, i46a->len, (uint8_t *)&i46a->v4);

-- 
To view, visit https://gerrit.osmocom.org/13566
To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings

Gerrit-Project: osmo-ggsn
Gerrit-Branch: master
Gerrit-MessageType: merged
Gerrit-Change-Id: I2a96b0fbe077c7c49342553de0880bfc58318669
Gerrit-Change-Number: 13566
Gerrit-PatchSet: 2
Gerrit-Owner: Harald Welte <laforge at gnumonks.org>
Gerrit-Reviewer: Harald Welte <laforge at gnumonks.org>
Gerrit-Reviewer: Jenkins Builder (1000002)
Gerrit-Reviewer: Pau Espin Pedrol <pespin at sysmocom.de>
Gerrit-Reviewer: Vadim Yanitskiy <axilirator at gmail.com>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osmocom.org/pipermail/gerrit-log/attachments/20190411/63fe0f93/attachment.html>


More information about the gerrit-log mailing list