[PATCH] libosmocore[master]: lapd_core: Fix MDL-ERROR ind after RELEASE ind

dexter gerrit-no-reply at lists.osmocom.org
Thu Feb 2 17:03:12 UTC 2017


Review at  https://gerrit.osmocom.org/1727

lapd_core: Fix MDL-ERROR ind after RELEASE ind

in lapd_t200_cb() The RELEASE INDICATION is transmitted before
the MDL ERROR INIDCATION, this prevents the MDL ERROR INDICATION
from being sent because the RELASE INDICATION close to connection
eraly. This commit puts the messages into the correct order.

Change-Id: Iae74777138fc27828f511e3aa321d1981861f4a5
---
M src/gsm/lapd_core.c
1 file changed, 4 insertions(+), 4 deletions(-)


  git pull ssh://gerrit.osmocom.org:29418/libosmocore refs/changes/27/1727/1

diff --git a/src/gsm/lapd_core.c b/src/gsm/lapd_core.c
index 5af82aa..5ee88a4 100644
--- a/src/gsm/lapd_core.c
+++ b/src/gsm/lapd_core.c
@@ -564,11 +564,11 @@
 			/* NOTE: we must not change any other states or buffers
 			 * and queues, since we may reconnect after handover
 			 * failure. the buffered messages is replaced there */
+			/* send MDL ERROR INIDCATION to L3 */
+			mdl_error(MDL_CAUSE_T200_EXPIRED, &dl->lctx);
 			/* send RELEASE INDICATION to L3 */
 			send_dl_simple(PRIM_DL_REL, PRIM_OP_INDICATION,
 				&dl->lctx);
-			/* send MDL ERROR INIDCATION to L3 */
-			mdl_error(MDL_CAUSE_T200_EXPIRED, &dl->lctx);
 			break;
 		}
 		/* retransmit SABM command */
@@ -581,10 +581,10 @@
 	case LAPD_STATE_DISC_SENT:
 		/* 5.4.4.3 */
 		if (dl->retrans_ctr + 1 >= dl->n200_est_rel + 1) {
-			/* send RELEASE INDICATION to L3 */
-			send_dl_simple(PRIM_DL_REL, PRIM_OP_CONFIRM, &dl->lctx);
 			/* send MDL ERROR INIDCATION to L3 */
 			mdl_error(MDL_CAUSE_T200_EXPIRED, &dl->lctx);
+			/* send RELEASE INDICATION to L3 */
+			send_dl_simple(PRIM_DL_REL, PRIM_OP_CONFIRM, &dl->lctx);
 			/* flush tx and send buffers */
 			lapd_dl_flush_tx(dl);
 			lapd_dl_flush_send(dl);

-- 
To view, visit https://gerrit.osmocom.org/1727
To unsubscribe, visit https://gerrit.osmocom.org/settings

Gerrit-MessageType: newchange
Gerrit-Change-Id: Iae74777138fc27828f511e3aa321d1981861f4a5
Gerrit-PatchSet: 1
Gerrit-Project: libosmocore
Gerrit-Branch: master
Gerrit-Owner: dexter <pmaier at sysmocom.de>


More information about the gerrit-log mailing list