aboutsummaryrefslogtreecommitdiffstats
path: root/openbsc/src/libbsc/abis_nm.c
diff options
context:
space:
mode:
Diffstat (limited to 'openbsc/src/libbsc/abis_nm.c')
-rw-r--r--openbsc/src/libbsc/abis_nm.c8
1 files changed, 5 insertions, 3 deletions
diff --git a/openbsc/src/libbsc/abis_nm.c b/openbsc/src/libbsc/abis_nm.c
index c29e21b3d..3bf55ec56 100644
--- a/openbsc/src/libbsc/abis_nm.c
+++ b/openbsc/src/libbsc/abis_nm.c
@@ -93,7 +93,7 @@ static void fill_om_hdr(struct abis_om_hdr *oh, uint8_t len)
oh->length = len;
}
-static void fill_om_fom_hdr(struct abis_om_hdr *oh, uint8_t len,
+static struct abis_om_fom_hdr *fill_om_fom_hdr(struct abis_om_hdr *oh, uint8_t len,
uint8_t msg_type, uint8_t obj_class,
uint8_t bts_nr, uint8_t trx_nr, uint8_t ts_nr)
{
@@ -106,6 +106,7 @@ static void fill_om_fom_hdr(struct abis_om_hdr *oh, uint8_t len,
foh->obj_inst.bts_nr = bts_nr;
foh->obj_inst.trx_nr = trx_nr;
foh->obj_inst.ts_nr = ts_nr;
+ return foh;
}
static struct msgb *nm_msgb_alloc(void)
@@ -1753,12 +1754,13 @@ static int __simple_cmd(struct gsm_bts *bts, uint8_t msg_type)
int abis_nm_opstart(struct gsm_bts *bts, uint8_t obj_class, uint8_t i0, uint8_t i1, uint8_t i2)
{
struct abis_om_hdr *oh;
+ struct abis_om_fom_hdr *foh;
struct msgb *msg = nm_msgb_alloc();
oh = (struct abis_om_hdr *) msgb_put(msg, ABIS_OM_FOM_HDR_SIZE);
- fill_om_fom_hdr(oh, 0, NM_MT_OPSTART, obj_class, i0, i1, i2);
+ foh = fill_om_fom_hdr(oh, 0, NM_MT_OPSTART, obj_class, i0, i1, i2);
- abis_nm_debugp_foh(DNM, (struct abis_om_fom_hdr *) oh->data);
+ abis_nm_debugp_foh(DNM, foh);
DEBUGPC(DNM, "Sending OPSTART\n");
return abis_nm_sendmsg(bts, msg);