mirror of https://gerrit.osmocom.org/libosmocore
[gprs] NS: If we are the BSS side, UNBLOCK the connection after it is ALIVE
After RESET / RESET-ACK and ALIVE / ALIVE-ACK, the connection needs to be unblocked from the BSS side to the SGSN.
This commit is contained in:
parent
570fb83fd5
commit
7fb7e6154c
|
@ -433,6 +433,11 @@ int gprs_ns_rcvmsg(struct gprs_ns_inst *nsi, struct msgb *msg,
|
||||||
bsc_del_timer(&nsvc->timer);
|
bsc_del_timer(&nsvc->timer);
|
||||||
/* start Tns-test */
|
/* start Tns-test */
|
||||||
nsvc_start_timer(nsvc, NSVC_TIMER_TNS_TEST);
|
nsvc_start_timer(nsvc, NSVC_TIMER_TNS_TEST);
|
||||||
|
if (nsvc->remote_end_is_sgsn) {
|
||||||
|
/* FIXME: this should be one level higher */
|
||||||
|
if (nsvc->state & NSE_S_BLOCKED)
|
||||||
|
rc = gprs_ns_tx_simple(nsvc, NS_PDUT_UNBLOCK);
|
||||||
|
}
|
||||||
break;
|
break;
|
||||||
case NS_PDUT_UNITDATA:
|
case NS_PDUT_UNITDATA:
|
||||||
/* actual user data */
|
/* actual user data */
|
||||||
|
@ -454,6 +459,8 @@ int gprs_ns_rcvmsg(struct gprs_ns_inst *nsi, struct msgb *msg,
|
||||||
/* send ALIVE PDU */
|
/* send ALIVE PDU */
|
||||||
rc = gprs_ns_tx_simple(nsvc, NS_PDUT_ALIVE);
|
rc = gprs_ns_tx_simple(nsvc, NS_PDUT_ALIVE);
|
||||||
nsvc_start_timer(nsvc, NSVC_TIMER_TNS_ALIVE);
|
nsvc_start_timer(nsvc, NSVC_TIMER_TNS_ALIVE);
|
||||||
|
/* mark local state as BLOCKED + ALIVE */
|
||||||
|
nsvc->state = NSE_S_BLOCKED | NSE_S_ALIVE;
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
case NS_PDUT_UNBLOCK:
|
case NS_PDUT_UNBLOCK:
|
||||||
|
@ -466,6 +473,8 @@ int gprs_ns_rcvmsg(struct gprs_ns_inst *nsi, struct msgb *msg,
|
||||||
DEBUGP(DGPRS, "NSEI=%u Rx NS UNBLOCK ACK\n", nsvc->nsei);
|
DEBUGP(DGPRS, "NSEI=%u Rx NS UNBLOCK ACK\n", nsvc->nsei);
|
||||||
/* mark remote NS-VC as unblocked + active */
|
/* mark remote NS-VC as unblocked + active */
|
||||||
nsvc->remote_state = NSE_S_ALIVE;
|
nsvc->remote_state = NSE_S_ALIVE;
|
||||||
|
if (nsvc->remote_end_is_sgsn)
|
||||||
|
nsvc->state = NSE_S_ALIVE;
|
||||||
break;
|
break;
|
||||||
case NS_PDUT_BLOCK:
|
case NS_PDUT_BLOCK:
|
||||||
DEBUGP(DGPRS, "NSEI=%u Rx NS BLOCK\n", nsvc->nsei);
|
DEBUGP(DGPRS, "NSEI=%u Rx NS BLOCK\n", nsvc->nsei);
|
||||||
|
|
Loading…
Reference in New Issue