From 05395a63b77e97217fc5ffa84ab375adfcaca244 Mon Sep 17 00:00:00 2001 From: Jacob Erlbeck Date: Tue, 8 Oct 2013 12:04:45 +0200 Subject: gb: Fix NS-RESET response message order According to 3GPP TS 08.16, 7.3 "Reset procedure" the entity receiving a NS-RESET PDU responds with a NS-RESET-ACK and 'then' starts the test procedure which essentially means, that a NS-ALIVE gets sent and a timer is started. Currently the NS-ALIVE is sent before the NS-RESET-ACK. This patch fixes the implementation by reversing the order in which these messages are sent. Sponsored-by: On-Waves ehf --- src/gb/gprs_ns.c | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) (limited to 'src') diff --git a/src/gb/gprs_ns.c b/src/gb/gprs_ns.c index b3bb77de..0fed43c5 100644 --- a/src/gb/gprs_ns.c +++ b/src/gb/gprs_ns.c @@ -684,15 +684,17 @@ static int gprs_ns_rx_reset(struct gprs_nsvc *nsvc, struct msgb *msg) nsvc->nsei = ntohs(*nsei); nsvc->nsvci = ntohs(*nsvci); - /* start the test procedure */ - gprs_ns_tx_simple(nsvc, NS_PDUT_ALIVE); - nsvc_start_timer(nsvc, NSVC_TIMER_TNS_TEST); - /* inform interested parties about the fact that this NSVC * has received RESET */ ns_osmo_signal_dispatch(nsvc, S_NS_RESET, *cause); - return gprs_ns_tx_reset_ack(nsvc); + rc = gprs_ns_tx_reset_ack(nsvc); + + /* start the test procedure */ + gprs_ns_tx_simple(nsvc, NS_PDUT_ALIVE); + nsvc_start_timer(nsvc, NSVC_TIMER_TNS_TEST); + + return rc; } static int gprs_ns_rx_block(struct gprs_nsvc *nsvc, struct msgb *msg) -- cgit v1.2.3