Change in osmo-ggsn[master]: ggsn: Drop unused param force in apn_stop()

Harald Welte gerrit-no-reply at lists.osmocom.org
Wed May 29 18:25:59 UTC 2019


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

Change subject: ggsn: Drop unused param force in apn_stop()
......................................................................

ggsn: Drop unused param force in apn_stop()

Change-Id: I920679c7062d480c1cfaa3d89c90a0ed4a2ef58b
---
M ggsn/ggsn.c
M ggsn/ggsn.h
M ggsn/ggsn_vty.c
3 files changed, 12 insertions(+), 12 deletions(-)

Approvals:
  Jenkins Builder: Verified
  Harald Welte: Looks good to me, approved



diff --git a/ggsn/ggsn.c b/ggsn/ggsn.c
index bd8647f..6306924 100644
--- a/ggsn/ggsn.c
+++ b/ggsn/ggsn.c
@@ -111,9 +111,9 @@
 	}
 }
 
-int apn_stop(struct apn_ctx *apn, bool force)
+int apn_stop(struct apn_ctx *apn)
 {
-	LOGPAPN(LOGL_NOTICE, apn, "%sStopping\n", force ? "FORCED " : "");
+	LOGPAPN(LOGL_NOTICE, apn, "Stopping\n");
 	/* check if pools have any active PDP contexts and bail out */
 	pool_close_all_pdp(apn->v4.pool);
 	pool_close_all_pdp(apn->v6.pool);
@@ -223,7 +223,7 @@
 		LOGPAPN(LOGL_INFO, apn, "Opening Kernel GTP device %s\n", apn->tun.cfg.dev_name);
 		if (apn->cfg.apn_type_mask & (APN_TYPE_IPv6|APN_TYPE_IPv4v6)) {
 			LOGPAPN(LOGL_ERROR, apn, "Kernel GTP currently supports only IPv4\n");
-			apn_stop(apn, false);
+			apn_stop(apn);
 			return -1;
 		}
 		if (gsn == NULL) {
@@ -257,7 +257,7 @@
 				apn->v4.cfg.ifconfig_prefix.prefixlen)) {
 			LOGPAPN(LOGL_ERROR, apn, "Failed to set tun IPv4 address %s: %s\n",
 				in46p_ntoa(&apn->v4.cfg.ifconfig_prefix), strerror(errno));
-			apn_stop(apn, false);
+			apn_stop(apn);
 			return -1;
 		}
 	}
@@ -270,7 +270,7 @@
 			LOGPAPN(LOGL_ERROR, apn, "Failed to set tun IPv6 address %s: %s. "
 				"Ensure you have ipv6 support and not used the disable_ipv6 sysctl?\n",
 				in46p_ntoa(&apn->v6.cfg.ifconfig_prefix), strerror(errno));
-			apn_stop(apn, false);
+			apn_stop(apn);
 			return -1;
 		}
 	}
@@ -283,7 +283,7 @@
 			LOGPAPN(LOGL_ERROR, apn, "Failed to set tun IPv6 link-local address %s: %s. "
 				"Ensure you have ipv6 support and not used the disable_ipv6 sysctl?\n",
 				in46p_ntoa(&apn->v6.cfg.ll_prefix), strerror(errno));
-			apn_stop(apn, false);
+			apn_stop(apn);
 			return -1;
 		}
 		apn->v6_lladdr = apn->v6.cfg.ll_prefix.addr.v6;
@@ -301,7 +301,7 @@
 		if (rc < 1) {
 			LOGPAPN(LOGL_ERROR, apn, "Cannot obtain IPv6 link-local address of interface: %s\n",
 				rc ? strerror(errno) : "tun interface has no link-local IP assigned");
-			apn_stop(apn, false);
+			apn_stop(apn);
 			return -1;
 		}
 		apn->v6_lladdr = ipv6_tun_linklocal_ip.addr.v6;
@@ -318,7 +318,7 @@
 				blacklist, blacklist_size)) {
 			LOGPAPN(LOGL_ERROR, apn, "Failed to create IPv4 pool\n");
 			talloc_free(blacklist);
-			apn_stop(apn, false);
+			apn_stop(apn);
 			return -1;
 		}
 		talloc_free(blacklist);
@@ -335,7 +335,7 @@
 				blacklist, blacklist_size)) {
 			LOGPAPN(LOGL_ERROR, apn, "Failed to create IPv6 pool\n");
 			talloc_free(blacklist);
-			apn_stop(apn, false);
+			apn_stop(apn);
 			return -1;
 		}
 		talloc_free(blacklist);
@@ -1046,7 +1046,7 @@
 
 	/* iterate over all APNs and stop them */
 	llist_for_each_entry(apn, &ggsn->apn_list, list)
-		apn_stop(apn, true);
+		apn_stop(apn);
 
 	osmo_timer_del(&ggsn->gtp_timer);
 
diff --git a/ggsn/ggsn.h b/ggsn/ggsn.h
index e252548..09cd0f6 100644
--- a/ggsn/ggsn.h
+++ b/ggsn/ggsn.h
@@ -140,4 +140,4 @@
 extern int ggsn_start(struct ggsn_ctx *ggsn);
 extern int ggsn_stop(struct ggsn_ctx *ggsn);
 extern int apn_start(struct apn_ctx *apn);
-extern int apn_stop(struct apn_ctx *apn, bool force);
+extern int apn_stop(struct apn_ctx *apn);
diff --git a/ggsn/ggsn_vty.c b/ggsn/ggsn_vty.c
index c6dc0d9..3f012d2 100644
--- a/ggsn/ggsn_vty.c
+++ b/ggsn/ggsn_vty.c
@@ -604,7 +604,7 @@
 	struct apn_ctx *apn = (struct apn_ctx *) vty->index;
 
 	if (!apn->cfg.shutdown) {
-		if (apn_stop(apn, false)) {
+		if (apn_stop(apn)) {
 			vty_out(vty, "%% Failed to Stop APN%s", VTY_NEWLINE);
 			return CMD_WARNING;
 		}

-- 
To view, visit https://gerrit.osmocom.org/14265
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: I920679c7062d480c1cfaa3d89c90a0ed4a2ef58b
Gerrit-Change-Number: 14265
Gerrit-PatchSet: 2
Gerrit-Owner: Pau Espin Pedrol <pespin at sysmocom.de>
Gerrit-Reviewer: Harald Welte <laforge at gnumonks.org>
Gerrit-Reviewer: Jenkins Builder (1000002)
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osmocom.org/pipermail/gerrit-log/attachments/20190529/7faff618/attachment.html>


More information about the gerrit-log mailing list