[PATCH 5/8] agch/pch: Use PCH for AGCH msgs

This is merely a historical archive of years 2008-2021, before the migration to mailman3.

A maintained and still updated list archive can be found at https://lists.osmocom.org/hyperkitty/list/OpenBSC@lists.osmocom.org/.

Holger Hans Peter Freyther holger at freyther.de
Sat Feb 22 08:08:58 UTC 2014


On Sat, Feb 22, 2014 at 12:36:06AM +0100, Jacob Erlbeck wrote:
> This patch extends paging_gen_msg() by adding an output parameter
> is_empty that is true, if only a paging message with dummy entries
> has been placed into buffer. This feature is then used by
> bts_ccch_copy_msg() to insert an AGCH message if is_empty is true
> and there are more entries in the AGCH queue than fit into the
> reserved blocks.

> +	struct gsm48_system_information_type_3 *si3 =
> +		GSM_BTS_SI(bts, SYSINFO_TYPE_3);
> +	int bs_ag_blks_res = si3->control_channel_desc.bs_ag_blks_res;

it is the third place we access bs_ag_blks_res and it will not be the
last one (src/osmo-bts-sysmo/oml.c). Here we don't check if the SI3 is
valid or not. What do you think of creating an accessor method in common
instead that will return a default value? This way even the paging code
could initialize the bs_ag_blks_res to the default?


> +	int agch_res_full = btsb->agch_queue_length > bs_ag_blks_res;



>  
> -	if (!is_ag_res)
> -		return paging_gen_msg(btsb->paging_state, out_buf, gt);
> +	if (!is_ag_res) {
> +		rc = paging_gen_msg(btsb->paging_state, out_buf, gt, &is_empty);
> +
> +		if (!is_empty || !agch_res_full)
> +			return rc;
> +	}

If I understand that correctly. In case we generated an empty paging
message and we have fewer AGCH messages in the queue than reserved blocks,
we do send an empty paging message. What is the reason for that? It
seems to complicate the code, is it a spec requirement?





More information about the OpenBSC mailing list