diff options
author | Neels Hofmeyr <nhofmeyr@sysmocom.de> | 2016-02-16 11:53:22 +0100 |
---|---|---|
committer | Neels Hofmeyr <nhofmeyr@sysmocom.de> | 2016-03-03 16:19:11 +0100 |
commit | be37fbd85d2ebde3bd2c00379b55292028ede2e6 (patch) | |
tree | 4136ed1898e070fe621175de2d5918f2e586410c /openbsc/src/libmsc | |
parent | 3cc0836b1a6dcd2806a4b2c95df5d18dd93677a4 (diff) |
msc: implicitly link to iu_tx, don't have callbacks.
This is more akin to the way openbsc do, as well as less code.
Diffstat (limited to 'openbsc/src/libmsc')
-rw-r--r-- | openbsc/src/libmsc/msc_ifaces.c | 36 |
1 files changed, 6 insertions, 30 deletions
diff --git a/openbsc/src/libmsc/msc_ifaces.c b/openbsc/src/libmsc/msc_ifaces.c index 0b4a554c9..322994608 100644 --- a/openbsc/src/libmsc/msc_ifaces.c +++ b/openbsc/src/libmsc/msc_ifaces.c @@ -24,42 +24,18 @@ #include <openbsc/gsm_data.h> #include <openbsc/msc_ifaces.h> -static int tx_dummy_a(struct msgb *msg, uint8_t sapi) -{ - LOGP(DMSC, LOGL_ERROR, - "attempt to send message via uninitialized A-interface\n"); - return -1; -} - -static int tx_dummy_iu_cs(struct msgb *msg, uint8_t sapi) -{ - LOGP(DMSC, LOGL_ERROR, - "attempt to send message via uninitialized IuCS-interface\n"); - return -1; -} - -struct msc_ifaces global_msc_ifaces = { - .a = { - .tx = tx_dummy_a, - }, - .iu_cs = { - .tx = tx_dummy_iu_cs, - } -}; - - -static int msc_tx(struct msc_ifaces *ifaces, - struct gsm_subscriber_connection *conn, - struct msgb *msg) +int msc_tx(struct gsm_subscriber_connection *conn, struct msgb *msg) { switch (conn->via_iface) { case IFACE_A: - /* TODO: msg->dst = <A-iface token> */ - return ifaces->a.tx(msg, 0); + LOGP(DMSC, LOGL_ERROR, + "attempt to send message via A-interface, which is not yet implemented.\n"); + /* TODO: msg->dst = <A-iface token>; a_tx(msg); */ + return -1; case IFACE_IU: msg->dst = conn->iu.ue_ctx; - return ifaces->iu_cs.tx(msg, 0); + return iu_tx(msg, 0); default: LOGP(DMSC, LOGL_ERROR, |