diff --git a/home/michal/Plocha/gprs_ns_before_patch.c b/home/michal/Plocha/gprs_ns_patch.c index c939003..1bc965e 100644 --- a/home/michal/Plocha/gprs_ns_before_patch.c +++ b/home/michal/Plocha/gprs_ns_patch.c @@ -1217,16 +1217,14 @@ int gprs_ns_process_msg(struct gprs_ns_inst *nsi, struct msgb *msg, switch (nsh->pdu_type) { case NS_PDUT_ALIVE: - /* If we're dead and blocked and suddenly receive a - * NS-ALIVE out of the blue, we might have been re-started - * and should send a NS-RESET to make sure everything recovers - * fine. */ - -LOGP(DNS, LOGL_INFO, "Rx NS ALIVE\n"); -if ((*nsvc)->state == NSE_S_BLOCKED) - rc = gprs_ns_tx_reset((*nsvc), NS_CAUSE_PDU_INCOMP_PSTATE); - else - rc = gprs_ns_tx_alive_ack(*nsvc); + LOGP(DNS, LOGL_INFO, "Rx NS ALIVE\n"); + rc = gprs_ns_tx_alive_ack(*nsvc); + /*mark NS-VC as unblocked and active*/ + (*nsvc)->state = NSE_S_ALIVE; + (*nsvc)->remote_state = NSE_S_ALIVE; + /*Initiate TEST proc.: Send ALIVE_ACK and start timer*/ + rc = gprs_ns_tx_simple((*nsvc), NS_PDUT_ALIVE_ACK); + nsvc_start_timer((*nsvc), NSVC_TIMER_TNS_TEST); break; case NS_PDUT_ALIVE_ACK: /* stop Tns-alive and start Tns-test */