From patchwork Mon Mar 31 13:11:57 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jacob Erlbeck X-Patchwork-Id: 335308 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from ganesha.gnumonks.org (ganesha.gnumonks.org [IPv6:2001:780:45:1d:225:90ff:fe52:c662]) (using TLSv1 with cipher AES256-SHA (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id C3A201400AE for ; Tue, 1 Apr 2014 00:12:22 +1100 (EST) Received: from localhost ([127.0.0.1] helo=ganesha.gnumonks.org) by ganesha.gnumonks.org with esmtp (Exim 4.72) (envelope-from ) id 1WUc0Y-00010q-KL; Mon, 31 Mar 2014 15:12:10 +0200 Received: from mail.sysmocom.de ([144.76.43.93]) by ganesha.gnumonks.org with esmtp (Exim 4.72) (envelope-from ) id 1WUc0P-00010h-VK for openbsc@lists.osmocom.org; Mon, 31 Mar 2014 15:12:03 +0200 Received: from sysmocom-tmp.lan (p5099b351.dip0.t-ipconnect.de [80.153.179.81]) by mail.sysmocom.de (Postfix) with ESMTPSA id A17874E54B; Mon, 31 Mar 2014 13:12:01 +0000 (UTC) From: Jacob Erlbeck To: openbsc@lists.osmocom.org Subject: [PATCH] oml: Pass all valid state change requests to the model Date: Mon, 31 Mar 2014 15:11:57 +0200 Message-Id: <1396271517-7493-1-git-send-email-jerlbeck@sysmocom.de> X-Mailer: git-send-email 1.7.9.5 X-Spam-Score: 0.0 (/) Cc: Jacob Erlbeck , laforge@gnumonks.org X-BeenThere: openbsc@lists.osmocom.org X-Mailman-Version: 2.1.13 Precedence: list List-Id: Development of the OpenBSC GSM base station controller List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: openbsc-bounces@lists.osmocom.org Errors-To: openbsc-bounces@lists.osmocom.org Currently ADM state change request that tries to set the administrative state to the current value are immediately ACK'ed. Beside the caching problem, this could lead the protocol inconsistencies if two such requests are sent one after the other and the second arrives before the procedure of the first has finished. This patch removes the shortcut in oml_rx_chg_adm_state() which immediately called oml_mo_statechg_ack(mo). Ticket: OW#1132 Sponsored-by: On-Waves ehf --- src/common/oml.c | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/src/common/oml.c b/src/common/oml.c index 9ec773b..b7c12f7 100644 --- a/src/common/oml.c +++ b/src/common/oml.c @@ -765,11 +765,10 @@ static int oml_rx_chg_adm_state(struct gsm_bts *bts, struct msgb *msg) return oml_fom_ack_nack(msg, NM_NACK_OBJINST_UNKN); /* Step 2: Do some global dependency/consistency checking */ - if (mo->nm_state.administrative == adm_state) { - DEBUGP(DOML, "... automatic ACK, ADM state already was %s\n", - get_value_string(abis_nm_adm_state_names, adm_state)); - return oml_mo_statechg_ack(mo); - } + if (mo->nm_state.administrative == adm_state) + LOGP(DOML, LOGL_NOTICE, + "ADM state already was %s\n", + get_value_string(abis_nm_adm_state_names, adm_state)); /* Step 3: Ask BTS driver to apply the state chg */ return bts_model_chg_adm_state(bts, mo, obj, adm_state);