aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAlexander Couzens <lynxis@fe80.eu>2020-12-21 18:25:41 +0100
committerAlexander Couzens <lynxis@fe80.eu>2020-12-23 06:32:29 +0100
commit280ed789a868ddf3b2538b31b1ae1350f3a65859 (patch)
treeac8db254567f5415e5cda918751d182fdecc9558
parent6f3b738c74158461387bd3ee40a240ef3d99b1a5 (diff)
gprs_ns2: fix force-unconfigured for IP-SNS NSE
The IP-SNS need to do a reselection of the IP-SNS remote for testing. Freeing all nsvc will force this. Change-Id: I367c215a830c02eae2a470cba314828b5e0fb5c9
-rw-r--r--src/gb/gprs_ns2_vty.c8
-rw-r--r--src/gb/gprs_ns2_vty2.c8
2 files changed, 12 insertions, 4 deletions
diff --git a/src/gb/gprs_ns2_vty.c b/src/gb/gprs_ns2_vty.c
index 9e09f0d9..065f3ad8 100644
--- a/src/gb/gprs_ns2_vty.c
+++ b/src/gb/gprs_ns2_vty.c
@@ -440,8 +440,12 @@ DEFUN_HIDDEN(nsvc_force_unconf, nsvc_force_unconf_cmd,
return CMD_WARNING;
}
- /* Perform the operation for all nsvc */
- gprs_ns2_nse_foreach_nsvc(nse, nsvc_force_unconf_cb, NULL);
+ if (nse->dialect == NS2_DIALECT_SNS) {
+ gprs_ns2_free_nsvcs(nse);
+ } else {
+ /* Perform the operation for all nsvc */
+ gprs_ns2_nse_foreach_nsvc(nse, nsvc_force_unconf_cb, NULL);
+ }
return CMD_SUCCESS;
}
diff --git a/src/gb/gprs_ns2_vty2.c b/src/gb/gprs_ns2_vty2.c
index 2ccc7ed8..e8738c17 100644
--- a/src/gb/gprs_ns2_vty2.c
+++ b/src/gb/gprs_ns2_vty2.c
@@ -1491,8 +1491,12 @@ DEFUN_HIDDEN(nsvc_force_unconf, nsvc_force_unconf_cmd,
return CMD_WARNING;
}
- /* Perform the operation for all nsvc */
- gprs_ns2_nse_foreach_nsvc(nse, nsvc_force_unconf_cb, NULL);
+ if (nse->dialect == NS2_DIALECT_SNS) {
+ gprs_ns2_free_nsvcs(nse);
+ } else {
+ /* Perform the operation for all nsvc */
+ gprs_ns2_nse_foreach_nsvc(nse, nsvc_force_unconf_cb, NULL);
+ }
return CMD_SUCCESS;
}