pespin submitted this change.

View Change


Approvals: Jenkins Builder: Verified pespin: Looks good to me, approved
sndcp: Initiate LL-XID.req only if we have something to send at L3

Change-Id: I324d841ae4d725d55d2807067cdd56c4457fa941
---
M src/sndcp/sndcp_prim.c
M tests/sndcp/sndcp_prim_test.ok
2 files changed, 17 insertions(+), 4 deletions(-)

diff --git a/src/sndcp/sndcp_prim.c b/src/sndcp/sndcp_prim.c
index 0472d17..3c4ced3 100644
--- a/src/sndcp/sndcp_prim.c
+++ b/src/sndcp/sndcp_prim.c
@@ -637,9 +637,14 @@
* return rc;
*/

- /* TS 24.007 C.6 "LLC link exists already, only XID exchange" */
- sne->xid_req_in_transit_orig_snsm_activate_ind = true;
- rc = gprs_sndcp_sne_submit_llc_ll_xid_req(sne);
+ if (sne->l3xid_req && sne->l3xid_req_len > 0) {
+ /* TS 24.007 C.6 "LLC link exists already, only XID exchange" */
+ sne->xid_req_in_transit_orig_snsm_activate_ind = true;
+ rc = gprs_sndcp_sne_submit_llc_ll_xid_req(sne);
+ } else {
+ /* TS 24.007 C.6 "LLC link exists already, no XID exchange"*/
+ rc = gprs_sndcp_sne_submit_snsm_activate_rsp(sne);
+ }
return rc;
}

diff --git a/tests/sndcp/sndcp_prim_test.ok b/tests/sndcp/sndcp_prim_test.ok
index 621aea7..9476e44 100644
--- a/tests/sndcp/sndcp_prim_test.ok
+++ b/tests/sndcp/sndcp_prim_test.ok
@@ -5,7 +5,6 @@
test_sndcp_prim_down_cb(): Rx LL-UNITDATA.request TLLI=0xe1c5d364 SAPI=SNDCP3 L3=[65 00 00 00 73 6f 6d 65 2d 6e 70 64 75 2d 64 61 74 61 2d 6c 69 6b 65 2d 61 6e 2d 69 70 2d 70 6b 74 00 ]
==== test_sndcp_prim_net() [end] ====
==== test_sndcp_prim_ms() [start] ====
-test_sndcp_prim_down_cb(): Rx LL-XID.request
test_sndcp_prim_snsm_cb(): Rx SNSM-ACTIVATE.response
test_sndcp_prim_down_cb(): Rx LL-XID.request
test_sndcp_prim_up_cb(): Rx SN-XID.confirm

To view, visit change 32591. To unsubscribe, or for help writing mail filters, visit settings.

Gerrit-Project: libosmo-gprs
Gerrit-Branch: master
Gerrit-Change-Id: I324d841ae4d725d55d2807067cdd56c4457fa941
Gerrit-Change-Number: 32591
Gerrit-PatchSet: 2
Gerrit-Owner: pespin <pespin@sysmocom.de>
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: pespin <pespin@sysmocom.de>
Gerrit-MessageType: merged