aboutsummaryrefslogtreecommitdiffstats
path: root/src/common/cbch.c
AgeCommit message (Collapse)AuthorFilesLines
2023-02-10common: Fix memleak in get_smscb_block()arehbein1-6/+2
Fix condition `block_nr == 4`, which was never reached, by effectively replacing - `4` by `msg->num_segs`, so we truly check if the current block is the last of this message - the index `block_nr` (which starts at zero) by `block_nr + 1`, so it is comparable to `msg->num_segs` Related: OS#5354 Change-Id: I3dc116d6c16c80b31712b2a969f0b2a6998b03f0
2021-12-12cbch: cosmetic: use talloc_zero() in bts_process_smscb_cmd()Vadim Yanitskiy1-1/+1
Change-Id: Ibb5090b7cd53c1a485d0b9474c6470fa5831de67
2021-11-24cbch: Fix dangling cur_msg leading to double-free in bts_cbch_reset()Harald Welte1-3/+3
If a new default message is installed via RSL, and the old default message is currently being transmitted, we must set cur_msg to NULL. The old default message must be talloc_free()d unconditionally whenever a new default message is being set. We can do that by using the TALLOC_FREE macro. Change-Id: Id32c2074b61cd1f09957b9d1558ffb3a7691a8e0 Related: OS#5325
2021-11-24cbch: Fix bts_smscb_state_reset() to avoid double-freeHarald Welte1-1/+4
If the currently transmitted message is the default message, bts_ss->cur_msg == bts_ss->derfault_msg. In this case we cannot simply talloc_free() both of them, as it would result in a boudle-free. Change-Id: I2d3645e34d31507b012a53ffe12d14223682f808 Closes: OS#5325 Fixes: Ib01d38c59ba9fa083fcc0682009c13d2db3664fe
2021-10-20Reset CBCH state after BTS shutdownPau Espin Pedrol1-0/+19
Related: OS#5273 Change-Id: Ib01d38c59ba9fa083fcc0682009c13d2db3664fe
2019-10-17Fix common misspellings and typosMartin Hauke1-1/+1
Change-Id: I403b9029f57fec3fdec2c1e2cbeac0f6eab53f24
2019-05-23cbch: Improve verbosity and extend logging; Always indicate BASIC/EXTD CBCHHarald Welte1-19/+35
Change-Id: I6c8f9fc6215b616371e46c1f4ca4e44b8c7ac096
2019-05-23cbch: Add counters; queue length limits and CBCH LOAD reportingHarald Welte1-2/+37
This adds the final missing part to full CBCH support: * keep a tab on the current queue length for basic + extended CBCH * keep rate counters about the number of sent / transmitted SMSCB * send CBCH LOAD information via RSL to the BSC Change-Id: I7068c7937a60a900c40439115bb84dc3ee0d061f
2019-05-21cbch: Keep SMSCB queue length counterHarald Welte1-0/+2
This avoids having to iterate the list to count the number of elements. Change-Id: I72c47affeb87c9b898bc2290dc7ed113945f1805
2019-05-21cbch: Support Extended CBCHHarald Welte1-24/+44
The logic for Extended CBCH are the same as for the Basic CBCH, we just need to * duplicate our related state * parse the optional RSL_IE_SMSCB_CHAN_INDICATOR IE * start to send data on the Extended CBCH (TB=4..7) Change-Id: If2c6dc7da1e2185ab75fc957f8d305ad8db22429 Closes: OS#3535
2019-05-21cbch: Fix memory leak and send error message on invalid SMSCB commandHarald Welte1-0/+3
Change-Id: I411d1fb3693a2f7cf7bba3d38b1aaf276a4137ba Related: OS#4011
2019-05-21cbch: Implement support for DEFAULT messageHarald Welte1-13/+37
The BSC can not only send us each to-be-sent message separately, but it can also configure a DEFAULT message, which is then to be sent instead of the NULL message. Let's add support for this Change-Id: I65a79215b54155d128c26d2ca11ff9ff3ed2cdba Closes: OS#4013
2019-05-21cbch: Log every RSL SMSCB COMMAND with type and number of blocksHarald Welte1-3/+15
Change-Id: I20efe0aa5a67f011d6b6bead57236366c2f45ecf
2019-05-21cbch: Refactor get_smscb_block() / remove smscb_msg.next_segHarald Welte1-19/+25
There's no need to keep around a pointer to the next segment in a SMSCB message. The way how the multiframe structure is laid out (and how the tb number works), we can use the result of a modulo-division on the frame number to determine which of the segments/blocks inside a SMSCB message (page) we have to transmit. This also acts as a simplification in preparation of support for the SMSCB DEFAULT type. Change-Id: I48faa19fec4a0852e6112ca2faa98960c678d4c5 Related: OS#4013
2019-05-21cbch: Implement handling of "Schedule" messageHarald Welte1-2/+10
The first block of "schedule" messages must be advertised with a special sequence number coding, see Table 1 of 3GPP TS 44.012. Change-Id: I473edf698eba7ff5008f2fd1ec1776f0aa013858 Closes: OS#4012
2018-09-17CBCH: sprinkle some OMSO_ASSERT() and guard against talloc failureHarald Welte1-0/+5
Change-Id: I85fdecbf20de83a6f925765a46b5cd14765da03e
2018-09-17CBCH: Add FIXME comments on queue overflow/underflow handlingHarald Welte1-1/+4
Change-Id: Ida97f25ab4bf7e4d0f03b13396cb37cdfe99ef40
2018-09-09CBCH: Use llist_first_entry_or_null() instead of reinventing itHarald Welte1-4/+2
Change-Id: I376111e71d1c7be35a8fd7e392488adc34e21941
2018-03-17Get rid of 'struct gsm_bts_role_bts'Harald Welte1-11/+7
gsm_bts_role_bts was introduced at a time when we still shared gsm_data_shared.[ch] between BSC and BTS, and where we then subsequently needed a BTS-private structure. Since that sharing was abandoned quite some time ago, we can merge gsm_bts_role_bts into gsm_bts and do away with the bts/btsb dualism in a lot of the code. Change-Id: I4fdd601ea873d9697f89a748cc77bcf7c978fa3e
2016-06-17fix compiler warning: printf format for sizeof()Neels Hofmeyr1-1/+1
Change-Id: Id600c5a34ab261736f7595ab2e36e3a30d434175
2014-12-30SMS-CB: Clean up + centralize generation of NULL blockHarald Welte1-11/+22
2014-12-30SMS-CB: Use GSM412_SEQ_NULL_MSG rather than 0xfHarald Welte1-1/+1
2014-12-30SMS-CB: use gsm412_block_type from libosmocoreHarald Welte1-9/+1
.. and not our own local re-definition of the structure.
2014-12-30SMS-CB: Use GSM412_ #defines from libosmocore rather than our ownHarald Welte1-10/+8
2014-12-30CBCH: Implement CBCH block segmentation and RSL_MT_SMS_BC_CMDHarald Welte1-2/+189
* CBCH load indications are not yet sent * The queue length is not yet limited!
2014-12-30Initial CBCH supportHarald Welte1-0/+8
This should handle OML channel combinations with CBCH and activate the CBCH SAPI towards the DSP correspondingly. What is still missing is sending any actual information over the CBCH in respons to the PH-RTS.ind coming up from L1.