aboutsummaryrefslogtreecommitdiffstats
path: root/src/common/paging.c
diff options
context:
space:
mode:
authorJacob Erlbeck <jerlbeck@sysmocom.de>2014-02-14 14:18:51 +0100
committerHolger Hans Peter Freyther <holger@moiji-mobile.com>2014-03-10 09:22:24 +0100
commit7503540959f421917a702174616655e9fdd11a24 (patch)
tree5c30c3f0ab2ecb501b0110b5055f8a0feb19745b /src/common/paging.c
parent2d725e77f7270550d7173a7c86f30aa1c7b01e5e (diff)
agch/pch: Use PCH for AGCH msgs
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. Ticket: SYS#224 Sponsored-by: On-Waves ehf
Diffstat (limited to 'src/common/paging.c')
-rw-r--r--src/common/paging.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/src/common/paging.c b/src/common/paging.c
index 7c71c6f8..f75f12dc 100644
--- a/src/common/paging.c
+++ b/src/common/paging.c
@@ -377,12 +377,14 @@ static void sort_pr_tmsi_imsi(struct paging_record *pr[], unsigned int n)
}
/* generate paging message for given gsm time */
-int paging_gen_msg(struct paging_state *ps, uint8_t *out_buf, struct gsm_time *gt)
+int paging_gen_msg(struct paging_state *ps, uint8_t *out_buf, struct gsm_time *gt,
+ int *is_empty)
{
struct llist_head *group_q;
int group;
int len;
+ *is_empty = 0;
ps->btsb->load.ccch.pch_total += 1;
group = get_pag_subch_nr(ps, gt);
@@ -400,6 +402,7 @@ int paging_gen_msg(struct paging_state *ps, uint8_t *out_buf, struct gsm_time *g
//DEBUGP(DPAG, "Tx PAGING TYPE 1 (empty)\n");
len = fill_paging_type_1(out_buf, empty_id_lv, 0,
NULL, 0);
+ *is_empty = 1;
} else {
struct paging_record *pr[4];
unsigned int num_pr = 0, imm_ass = 0;