aboutsummaryrefslogtreecommitdiffstats
path: root/openbsc/src/gsm_04_08_utils.c
diff options
context:
space:
mode:
authorHarald Welte <laforge@netfilter.org>2009-12-17 00:25:18 +0100
committerHarald Welte <laforge@netfilter.org>2009-12-17 00:25:18 +0100
commit7a7a0d54289114e6a49087a555b7a4f1e6cb3016 (patch)
treea59f9fa7a6888fac5f01cc1f83dd708803382eda /openbsc/src/gsm_04_08_utils.c
parent33e65977204c4d35deb7c48069bf504353618da5 (diff)
make handover reference a function call argument
Diffstat (limited to 'openbsc/src/gsm_04_08_utils.c')
-rw-r--r--openbsc/src/gsm_04_08_utils.c9
1 files changed, 5 insertions, 4 deletions
diff --git a/openbsc/src/gsm_04_08_utils.c b/openbsc/src/gsm_04_08_utils.c
index 8497fa842..e96a1ca09 100644
--- a/openbsc/src/gsm_04_08_utils.c
+++ b/openbsc/src/gsm_04_08_utils.c
@@ -541,21 +541,22 @@ static void gsm48_chan_desc(struct gsm48_chan_desc *cd,
}
/* Chapter 9.1.15: Handover Command */
-int gsm48_send_ho_cmd(struct gsm_lchan *old_lchan,
- struct gsm_lchan *new_lchan, u_int8_t power_command)
+int gsm48_send_ho_cmd(struct gsm_lchan *old_lchan, struct gsm_lchan *new_lchan,
+ u_int8_t power_command, u_int8_t ho_ref)
{
struct msgb *msg = gsm48_msgb_alloc();
struct gsm48_hdr *gh = (struct gsm48_hdr *) msgb_put(msg, sizeof(*gh));
struct gsm48_ho_cmd *ho =
(struct gsm48_ho_cmd *) msgb_put(msg, sizeof(*ho));
- static u_int8_t ho_ref;
msg->lchan = old_lchan;
+ gh->proto_discr = GSM48_PDISC_RR;
+ gh->msg_type = GSM48_MT_RR_HANDO_CMD;
/* mandatory bits */
gsm48_cell_desc(&ho->cell_desc, new_lchan->ts->trx->bts);
gsm48_chan_desc(&ho->chan_desc, new_lchan);
- ho->ho_ref = ho_ref++;
+ ho->ho_ref = ho_ref;
ho->power_command = power_command;
/* FIXME: optional bits for type of synchronization? */