Change in osmo-bsc-nat[master]: bssap: name bssmap functions properly
osmith has submitted this change. ( https://gerrit.osmocom.org/c/osmo-bsc-nat/+/27703 ) Change subject: bssap: name bssmap functions properly ...................................................................... bssap: name bssmap functions properly Almost all functions in bssap.c actually handle bssmap, so name them accordingly. Related: SYS#5560 Change-Id: Ib583b64187bcf3138399e7a099248ee79492bb03 --- M include/osmocom/bsc_nat/bssap.h M src/osmo-bsc-nat/bssap.c M src/osmo-bsc-nat/msc_fsm.c 3 files changed, 13 insertions(+), 13 deletions(-) Approvals: Jenkins Builder: Verified pespin: Looks good to me, but someone else must approve fixeria: Looks good to me, approved laforge: Looks good to me, approved diff --git a/include/osmocom/bsc_nat/bssap.h b/include/osmocom/bsc_nat/bssap.h index ca387c2..f474909 100644 --- a/include/osmocom/bsc_nat/bssap.h +++ b/include/osmocom/bsc_nat/bssap.h @@ -24,4 +24,4 @@ int bssap_handle_udt(struct bsc_nat_sccp_inst *sccp_inst, struct osmo_sccp_addr *addr, struct msgb *msgb, unsigned int length); -int bssap_tx_reset(struct bsc_nat_sccp_inst *sccp_inst, struct osmo_sccp_addr *addr); +int bssmap_tx_reset(struct bsc_nat_sccp_inst *sccp_inst, struct osmo_sccp_addr *addr); diff --git a/src/osmo-bsc-nat/bssap.c b/src/osmo-bsc-nat/bssap.c index 67a06fb..94a450a 100644 --- a/src/osmo-bsc-nat/bssap.c +++ b/src/osmo-bsc-nat/bssap.c @@ -27,7 +27,7 @@ #include <osmocom/bsc_nat/logging.h> #include <osmocom/bsc_nat/msc.h> -int bssap_tx_reset(struct bsc_nat_sccp_inst *sccp_inst, struct osmo_sccp_addr *addr) +int bssmap_tx_reset(struct bsc_nat_sccp_inst *sccp_inst, struct osmo_sccp_addr *addr) { enum bsc_nat_net net = sccp_inst == g_bsc_nat->cn.sccp_inst ? BSC_NAT_NET_CN : BSC_NAT_NET_RAN; @@ -38,7 +38,7 @@ return osmo_sccp_tx_unitdata_msg(sccp_inst->scu, &sccp_inst->addr, addr, msg); } -static int bssap_cn_handle_reset_ack(struct osmo_sccp_addr *addr, struct msgb *msg, unsigned int length) +static int bssmap_cn_handle_reset_ack(struct osmo_sccp_addr *addr, struct msgb *msg, unsigned int length) { struct msc *msc = msc_get(); @@ -54,13 +54,13 @@ return 0; } -static int bssap_cn_rcvmsg_udt(struct osmo_sccp_addr *addr, struct msgb *msg, unsigned int length) +static int bssmap_cn_rcvmsg_udt(struct osmo_sccp_addr *addr, struct msgb *msg, unsigned int length) { int ret = 0; switch (msg->l3h[0]) { case BSS_MAP_MSG_RESET_ACKNOWLEDGE: - ret = bssap_cn_handle_reset_ack(addr, msg, length); + ret = bssmap_cn_handle_reset_ack(addr, msg, length); break; default: LOGP(DMAIN, LOGL_ERROR, "%s(%s) is not implemented!\n", __func__, gsm0808_bssmap_name(msg->l3h[0])); @@ -70,7 +70,7 @@ return ret; } -static int bssap_ran_handle_reset(struct osmo_sccp_addr *addr, struct msgb *msg, unsigned int length) +static int bssmap_ran_handle_reset(struct osmo_sccp_addr *addr, struct msgb *msg, unsigned int length) { struct bsc_nat_sccp_inst *sccp_inst = g_bsc_nat->ran.sccp_inst; struct bsc *bsc; @@ -87,13 +87,13 @@ return osmo_sccp_tx_unitdata_msg(sccp_inst->scu, &sccp_inst->addr, addr, msg); } -static int bssap_ran_rcvmsg_udt(struct osmo_sccp_addr *addr, struct msgb *msg, unsigned int length) +static int bssmap_ran_rcvmsg_udt(struct osmo_sccp_addr *addr, struct msgb *msg, unsigned int length) { int ret = 0; switch (msg->l3h[0]) { case BSS_MAP_MSG_RESET: - ret = bssap_ran_handle_reset(addr, msg, length); + ret = bssmap_ran_handle_reset(addr, msg, length); break; default: LOGP(DMAIN, LOGL_ERROR, "%s(%s) is not implemented!\n", __func__, gsm0808_bssmap_name(msg->l3h[0])); @@ -103,7 +103,7 @@ return ret; } -static int bssap_rcvmsg_udt(struct bsc_nat_sccp_inst *sccp_inst, struct osmo_sccp_addr *addr, struct msgb *msg, +static int bssmap_rcvmsg_udt(struct bsc_nat_sccp_inst *sccp_inst, struct osmo_sccp_addr *addr, struct msgb *msg, unsigned int length) { if (length < 1) { @@ -114,8 +114,8 @@ LOGP(DMAIN, LOGL_NOTICE, "Rx UDT BSSMAP %s\n", gsm0808_bssmap_name(msg->l3h[0])); if (sccp_inst == g_bsc_nat->cn.sccp_inst) - return bssap_cn_rcvmsg_udt(addr, msg, length); - return bssap_ran_rcvmsg_udt(addr, msg, length); + return bssmap_cn_rcvmsg_udt(addr, msg, length); + return bssmap_ran_rcvmsg_udt(addr, msg, length); } int bssap_handle_udt(struct bsc_nat_sccp_inst *sccp_inst, struct osmo_sccp_addr *addr, struct msgb *msgb, @@ -140,7 +140,7 @@ switch (bs->type) { case BSSAP_MSG_BSS_MANAGEMENT: msgb->l3h = &msgb->l2h[sizeof(*bs)]; - rc = bssap_rcvmsg_udt(sccp_inst, addr, msgb, length - sizeof(*bs)); + rc = bssmap_rcvmsg_udt(sccp_inst, addr, msgb, length - sizeof(*bs)); break; default: LOGP(DMAIN, LOGL_ERROR, "%s(%s) is not implemented!\n", __func__, gsm0808_bssap_name(bs->type)); diff --git a/src/osmo-bsc-nat/msc_fsm.c b/src/osmo-bsc-nat/msc_fsm.c index e660c57..fc8beaf 100644 --- a/src/osmo-bsc-nat/msc_fsm.c +++ b/src/osmo-bsc-nat/msc_fsm.c @@ -63,7 +63,7 @@ case MSC_FSM_EV_TX_RESET: LOGP(DMAIN, LOGL_DEBUG, "Tx RESET to %s\n", talloc_get_name(msc)); - if (bssap_tx_reset(g_bsc_nat->cn.sccp_inst, &msc->addr) < 0) { + if (bssmap_tx_reset(g_bsc_nat->cn.sccp_inst, &msc->addr) < 0) { LOGP(DMAIN, LOGL_ERROR, "Could not send RESET to MSC (SCCP not up yet?)\n"); } -- To view, visit https://gerrit.osmocom.org/c/osmo-bsc-nat/+/27703 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-bsc-nat Gerrit-Branch: master Gerrit-Change-Id: Ib583b64187bcf3138399e7a099248ee79492bb03 Gerrit-Change-Number: 27703 Gerrit-PatchSet: 1 Gerrit-Owner: osmith <osmith@sysmocom.de> Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: fixeria <vyanitskiy@sysmocom.de> Gerrit-Reviewer: laforge <laforge@osmocom.org> Gerrit-Reviewer: osmith <osmith@sysmocom.de> Gerrit-Reviewer: pespin <pespin@sysmocom.de> Gerrit-MessageType: merged
participants (1)
-
osmith