osmith has uploaded this change for review.

View Change

bssap: drop tx_reset_ack

Merge with bssap_ran_handle_reset() since it makes upcoming refactoring
of bsc_nat_print_addr less complicated.

Related: SYS#5560
Change-Id: Ie1a967fb397f3ea1c3bb7bedbdd0a3a324d0996f
---
M src/osmo-bsc-nat/bssap.c
1 file changed, 7 insertions(+), 11 deletions(-)

git pull ssh://gerrit.osmocom.org:29418/osmo-bsc-nat refs/changes/45/27545/1
diff --git a/src/osmo-bsc-nat/bssap.c b/src/osmo-bsc-nat/bssap.c
index 5e15ecc..c054db6 100644
--- a/src/osmo-bsc-nat/bssap.c
+++ b/src/osmo-bsc-nat/bssap.c
@@ -25,19 +25,15 @@
#include <osmocom/bsc_nat/bsc_nat.h>
#include <osmocom/bsc_nat/logging.h>

-static int tx_reset_ack(struct bsc_nat_sccp_inst *sccp_inst, struct osmo_sccp_addr *addr)
-{
- LOGP(DMAIN, LOGL_NOTICE, "Tx RESET ACK to %s\n", bsc_nat_print_addr(sccp_inst, addr));
-
- struct msgb *msg = gsm0808_create_reset_ack();
-
- return osmo_sccp_tx_unitdata_msg(sccp_inst->scu, &sccp_inst->addr, addr, msg);
-}
-
static int bssap_ran_handle_reset(struct osmo_sccp_addr *addr, struct msgb *msg, unsigned int length)
{
- LOGP(DMAIN, LOGL_NOTICE, "Rx RESET from %s\n", bsc_nat_print_addr(g_bsc_nat->ran, addr));
- return tx_reset_ack(g_bsc_nat->ran, addr);
+ struct bsc_nat_sccp_inst *sccp_inst = g_bsc_nat->ran;
+
+ LOGP(DMAIN, LOGL_NOTICE, "Rx RESET from %s\n", bsc_nat_print_addr(sccp_inst, addr));
+
+ LOGP(DMAIN, LOGL_NOTICE, "Tx RESET ACK to %s\n", bsc_nat_print_addr(sccp_inst, addr));
+ msg = gsm0808_create_reset_ack();
+ 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)

To view, visit change 27545. To unsubscribe, or for help writing mail filters, visit settings.

Gerrit-Project: osmo-bsc-nat
Gerrit-Branch: master
Gerrit-Change-Id: Ie1a967fb397f3ea1c3bb7bedbdd0a3a324d0996f
Gerrit-Change-Number: 27545
Gerrit-PatchSet: 1
Gerrit-Owner: osmith <osmith@sysmocom.de>
Gerrit-MessageType: newchange