From patchwork Tue Jan 5 09:29:19 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jacob Erlbeck X-Patchwork-Id: 563000 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from lists.osmocom.org (tmp.osmocom.org [144.76.43.76]) by ozlabs.org (Postfix) with ESMTP id B44B21402C0 for ; Tue, 5 Jan 2016 20:30:10 +1100 (AEDT) Received: from lists.osmocom.org (lists.osmocom.org [144.76.43.76]) by lists.osmocom.org (Postfix) with ESMTP id 93417BF24; Tue, 5 Jan 2016 09:30:05 +0000 (UTC) X-Original-To: openbsc@lists.osmocom.org Delivered-To: openbsc@lists.osmocom.org Received: from mail.sysmocom.de (mail.sysmocom.de [IPv6:2a01:4f8:191:444c::2:4]) by lists.osmocom.org (Postfix) with ESMTP id 04F34BF14 for ; Tue, 5 Jan 2016 09:30:03 +0000 (UTC) Received: from sysmocom-tmp.am93.sysmocom.de (ip5b418565.dynamic.kabel-deutschland.de [91.65.133.101]) by mail.sysmocom.de (Postfix) with ESMTPSA id BB65E1BAD5; Tue, 5 Jan 2016 09:29:30 +0000 (UTC) From: Jacob Erlbeck To: openbsc@lists.osmocom.org Subject: [PATCH] ns/vty: Only write compliance command if value changed Date: Tue, 5 Jan 2016 10:29:19 +0100 Message-Id: <1451986159-10049-1-git-send-email-jerlbeck@sysmocom.de> X-Mailer: git-send-email 1.9.1 In-Reply-To: <1451931067-7511-1-git-send-email-jerlbeck@sysmocom.de> References: <1451931067-7511-1-git-send-email-jerlbeck@sysmocom.de> X-BeenThere: openbsc@lists.osmocom.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: Development of the OpenBSC GSM base station controller List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: openbsc-bounces@lists.osmocom.org Sender: "OpenBSC" 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 --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,