tests/gmm: Avoid printing rej_cause if GMMSM-Establish.cnf outcome is accepted

Otherwise it prints memory regions not really filled in.

Change-Id: I9c46e5a42e6b002f51ab19bc5d85b7bdd7da2a4f
This commit is contained in:
Pau Espin 2023-05-05 14:37:35 +02:00
parent f9f7bd31c3
commit a76164cd6e
2 changed files with 8 additions and 5 deletions

View File

@ -199,10 +199,13 @@ int test_gmm_prim_up_cb(struct osmo_gprs_gmm_prim *gmm_prim, void *user_data)
case OSMO_GPRS_GMM_SAP_GMMSM:
switch (OSMO_PRIM_HDR(&gmm_prim->oph)) {
case OSMO_PRIM(OSMO_GPRS_GMM_GMMSM_ESTABLISH, PRIM_OP_CONFIRM):
printf("%s(): Rx %s sess_id=%u accepted=%u rej_cause=%u\n", __func__, pdu_name,
gmm_prim->gmmsm.sess_id,
gmm_prim->gmmsm.establish_cnf.accepted,
gmm_prim->gmmsm.establish_cnf.rej.cause);
if (gmm_prim->gmmsm.establish_cnf.accepted)
printf("%s(): Rx %s sess_id=%u accepted\n", __func__, pdu_name,
gmm_prim->gmmsm.sess_id);
else
printf("%s(): Rx %s sess_id=%u rejected cause=%u\n", __func__, pdu_name,
gmm_prim->gmmsm.sess_id,
gmm_prim->gmmsm.establish_cnf.rej.cause);
break;
case OSMO_PRIM(OSMO_GPRS_GMM_GMMSM_UNITDATA, PRIM_OP_INDICATION):
printf("%s(): Rx %s sess_id=%u sm_pdu=%s\n", __func__, pdu_name,

View File

@ -21,7 +21,7 @@ test_gmm_prim_llc_down_cb(): Rx LL-UNITDATA.request TLLI=0x80001234 SAPI=GMM l3=
test_gmm_prim_llc_down_cb(): Rx LLGMM-ASSIGN.request old_TLLI=0x80001234 new_TLLI=0xea711b41
test_gmm_prim_down_cb(): Rx GMRR-ASSIGN.request old_tlli=0x80001234 new_tlli=0xea711b41
test_gmm_prim_llc_down_cb(): Rx LL-UNITDATA.request TLLI=0xea711b41 SAPI=GMM l3=[08 03 ]
test_gmm_prim_up_cb(): Rx GMMSM-ESTABLISH.confirm sess_id=1234 accepted=1 rej_cause=0
test_gmm_prim_up_cb(): Rx GMMSM-ESTABLISH.confirm sess_id=1234 accepted
test_gmm_prim_llc_down_cb(): Rx LL-UNITDATA.request TLLI=0xea711b41 SAPI=GMM l3=[0a 28 29 30 ]
test_gmm_prim_up_cb(): Rx GMMSM-UNITDATA.indication sess_id=1234 sm_pdu=0a 28 29 30
==== test_gmm_prim_ms_gmmsm() [end] ====