diff mbox

ns/vty: Only write compliance command if value changed

Message ID 1451986159-10049-1-git-send-email-jerlbeck@sysmocom.de
State New
Headers show

Commit Message

Jacob Erlbeck Jan. 5, 2016, 9:29 a.m. UTC
Currently the 'compliance' command is always written on 'write'.

This commit changes this to only write it, if the compliance
value has been set to 'ts48.016'. Thus it is not written if
the default value is used.

Sponsored-by: On-Waves ehf
---
 src/gb/gprs_ns_vty.c | 8 +++-----
 1 file changed, 3 insertions(+), 5 deletions(-)
diff mbox

Patch

diff --git a/src/gb/gprs_ns_vty.c b/src/gb/gprs_ns_vty.c
index 1353bf3..0382e10 100644
--- a/src/gb/gprs_ns_vty.c
+++ b/src/gb/gprs_ns_vty.c
@@ -91,11 +91,9 @@  static int config_write_ns(struct vty *vty)
 		vty_out(vty, " nse %u remote-role %s%s",
 			nsvc->nsei, nsvc->remote_end_is_sgsn ? "sgsn" : "bss",
 			VTY_NEWLINE);
-		vty_out(vty, " nse %u compliance %s%s",
-			nsvc->nsei,
-			nsvc->compliance == GPRS_NS_TS_08_16 ?
-				"ts08.16" : "ts48.016",
-			VTY_NEWLINE);
+		if (nsvc->compliance == GPRS_NS_TS_48_016)
+			vty_out(vty, " nse %u compliance ts48.016%s",
+				nsvc->nsei, VTY_NEWLINE);
 		switch (nsvc->ll) {
 		case GPRS_NS_LL_UDP:
 			vty_out(vty, " nse %u encapsulation udp%s", nsvc->nsei,