diff options
author | Harald Welte <laforge@gnumonks.org> | 2010-05-28 09:58:27 +0200 |
---|---|---|
committer | Harald Welte <laforge@gnumonks.org> | 2010-05-28 10:03:14 +0200 |
commit | c9531203265d082b6984fef0a10c4982cd331cc3 (patch) | |
tree | a239de192d78b1b8079d9c8b316082af231a4c16 /openbsc | |
parent | 26c325151a7680d41d05a5df67fc4af3eb2b98e6 (diff) |
[GPRS] NS: Start TEST procedure, not ALIVE procedure, on RESET/RESET_ACK
According to the spec, after an incoming RESET or RESET_ACK, we shall start the
TEST procedure, not the ALIVE procedure.
Also, when we start the TEST procedure, we have to always send a NS_ALIVE
packet at the same time (we didn't in the case of incoming RESET).
Furthermore, we now only start TIMER_TNS_ALIVE from within the
TIMER_TNS_RESET callback code, where we also make sure that the
alive_retries counter is reset to zero.
Diffstat (limited to 'openbsc')
-rw-r--r-- | openbsc/src/gprs/gprs_ns.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/openbsc/src/gprs/gprs_ns.c b/openbsc/src/gprs/gprs_ns.c index adb55247..08a7c295 100644 --- a/openbsc/src/gprs/gprs_ns.c +++ b/openbsc/src/gprs/gprs_ns.c @@ -610,7 +610,8 @@ static int gprs_ns_rx_reset(struct gprs_nsvc *nsvc, struct msgb *msg) nsvc->nsvci = ntohs(*nsvci); /* start the test procedure */ - nsvc_start_timer(nsvc, NSVC_TIMER_TNS_ALIVE); + 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 */ @@ -762,7 +763,7 @@ int gprs_ns_rcvmsg(struct gprs_ns_inst *nsi, struct msgb *msg, } /* Initiate TEST proc.: Send ALIVE and start timer */ rc = gprs_ns_tx_simple(nsvc, NS_PDUT_ALIVE); - nsvc_start_timer(nsvc, NSVC_TIMER_TNS_ALIVE); + nsvc_start_timer(nsvc, NSVC_TIMER_TNS_TEST); break; case NS_PDUT_UNBLOCK: /* Section 7.2: unblocking procedure */ |