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.c24
1 files changed, 22 insertions, 2 deletions
diff --git a/openbsc/src/libbsc/abis_nm.c b/openbsc/src/libbsc/abis_nm.c
index a41414a98..027a2638b 100644
--- a/openbsc/src/libbsc/abis_nm.c
+++ b/openbsc/src/libbsc/abis_nm.c
@@ -43,7 +43,7 @@
#include <openbsc/abis_nm.h>
#include <openbsc/misdn.h>
#include <openbsc/signal.h>
-#include <openbsc/e1_input.h>
+#include <osmocom/abis/e1_input.h>
#define OM_ALLOC_SIZE 1024
#define OM_HEADROOM_SIZE 128
@@ -114,6 +114,26 @@ static struct msgb *nm_msgb_alloc(void)
"OML");
}
+int _abis_nm_sendmsg(struct msgb *msg, int to_trx_oml)
+{
+ struct e1inp_sign_link *sign_link = msg->dst;
+
+ msg->l2h = msg->data;
+
+ if (!msg->dst) {
+ LOGP(DNM, LOGL_ERROR, "%s: msg->dst == NULL\n", __func__);
+ return -EINVAL;
+ }
+
+ /* Check for TRX-specific OML link first */
+ if (to_trx_oml) {
+ if (!sign_link->trx->oml_link)
+ return -ENODEV;
+ msg->dst = sign_link->trx->oml_link;
+ }
+ return abis_sendmsg(msg);
+}
+
/* Send a OML NM Message from BSC to BTS */
static int abis_nm_queue_msg(struct gsm_bts *bts, struct msgb *msg)
{
@@ -480,7 +500,7 @@ static int abis_nm_rx_lmt_event(struct msgb *mb)
return 0;
}
-static void abis_nm_queue_send_next(struct gsm_bts *bts)
+void abis_nm_queue_send_next(struct gsm_bts *bts)
{
int wait = 0;
struct msgb *msg;