aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorPhilipp Maier <pmaier@sysmocom.de>2017-07-03 11:12:17 +0200
committerNeels Hofmeyr <nhofmeyr@sysmocom.de>2017-07-12 23:42:47 +0200
commitc808db4afc664fa9740852ced79d05986efa0492 (patch)
treea2f820a952e5fcc0c0cee1ab873abbfa98139092
parent85b22fefb4ebd88bcc80664c4e8cff75e13dd013 (diff)
osmo-msc: rename called/calling address in struct a_conn_info
-rw-r--r--include/openbsc/a_iface_bssap.h4
-rw-r--r--src/libmsc/a_iface.c10
-rw-r--r--src/libmsc/a_iface_bssap.c16
3 files changed, 15 insertions, 15 deletions
diff --git a/include/openbsc/a_iface_bssap.h b/include/openbsc/a_iface_bssap.h
index f0a2187e..9abb29bb 100644
--- a/include/openbsc/a_iface_bssap.h
+++ b/include/openbsc/a_iface_bssap.h
@@ -26,8 +26,8 @@
/* A structure to hold tha most basic information about a sigtran connection
* we use this struct internally here to pass connection data around */
struct a_conn_info {
- struct osmo_sccp_addr *called_addr;
- struct osmo_sccp_addr *calling_addr;
+ struct osmo_sccp_addr *msc_addr;
+ struct osmo_sccp_addr *bsc_addr;
uint32_t conn_id;
struct gsm_network *network;
struct a_reset_ctx *reset;
diff --git a/src/libmsc/a_iface.c b/src/libmsc/a_iface.c
index dcbb5aad..d7ec6cb8 100644
--- a/src/libmsc/a_iface.c
+++ b/src/libmsc/a_iface.c
@@ -458,12 +458,12 @@ static int sccp_sap_up(struct osmo_prim_hdr *oph, void *_scu)
/* Handle inbound connection indication */
add_bsc(&scu_prim->u.connect.called_addr, &scu_prim->u.connect.calling_addr, scu);
a_conn_info.conn_id = scu_prim->u.connect.conn_id;
- a_conn_info.called_addr = &scu_prim->u.connect.called_addr;
- a_conn_info.calling_addr = &scu_prim->u.connect.calling_addr;
+ a_conn_info.msc_addr = &scu_prim->u.connect.called_addr;
+ a_conn_info.bsc_addr = &scu_prim->u.connect.calling_addr;
a_conn_info.reset = get_reset_ctx_by_sccp_addr(&scu_prim->u.unitdata.calling_addr);
if (a_reset_conn_ready(a_conn_info.reset) == false) {
- rc = osmo_sccp_tx_disconn(scu, a_conn_info.conn_id, a_conn_info.called_addr,
+ rc = osmo_sccp_tx_disconn(scu, a_conn_info.conn_id, a_conn_info.msc_addr,
SCCP_RETURN_CAUSE_UNQUALIFIED);
break;
}
@@ -491,8 +491,8 @@ static int sccp_sap_up(struct osmo_prim_hdr *oph, void *_scu)
case OSMO_PRIM(OSMO_SCU_PRIM_N_UNITDATA, PRIM_OP_INDICATION):
/* Handle inbound UNITDATA */
add_bsc(&scu_prim->u.unitdata.called_addr, &scu_prim->u.unitdata.calling_addr, scu);
- a_conn_info.called_addr = &scu_prim->u.unitdata.called_addr;
- a_conn_info.calling_addr = &scu_prim->u.unitdata.calling_addr;
+ a_conn_info.msc_addr = &scu_prim->u.unitdata.called_addr;
+ a_conn_info.bsc_addr = &scu_prim->u.unitdata.calling_addr;
a_conn_info.reset = get_reset_ctx_by_sccp_addr(&scu_prim->u.unitdata.calling_addr);
DEBUGP(DMSC, "N-UNITDATA.ind(%s)\n", osmo_hexdump(msgb_l2(oph->msg), msgb_l2len(oph->msg)));
sccp_rx_udt(scu, &a_conn_info, oph->msg);
diff --git a/src/libmsc/a_iface_bssap.c b/src/libmsc/a_iface_bssap.c
index d00ad3f3..3ff82651 100644
--- a/src/libmsc/a_iface_bssap.c
+++ b/src/libmsc/a_iface_bssap.c
@@ -64,7 +64,7 @@ static struct gsm_subscriber_connection *subscr_conn_allocate_a(struct a_conn_in
/* Also backup the calling address of the BSC, this allows us to
* identify later which BSC is responsible for this subscriber connection */
- memcpy(&conn->a.bsc_addr, a_conn_info->calling_addr, sizeof(conn->a.bsc_addr));
+ memcpy(&conn->a.bsc_addr, a_conn_info->bsc_addr, sizeof(conn->a.bsc_addr));
llist_add_tail(&conn->entry, &network->subscr_conns);
LOGP(DMSC, LOGL_NOTICE, "A-Interface subscriber connection successfully allocated!\n");
@@ -100,11 +100,11 @@ struct gsm_subscriber_connection *subscr_conn_lookup_a(struct gsm_network *netwo
/* Endpoint to handle BSSMAP reset */
static void bssmap_rx_reset(struct osmo_sccp_user *scu, struct a_conn_info *a_conn_info, struct msgb *msg)
{
- LOGP(DMSC, LOGL_NOTICE, "Rx RESET from BSC %s, sending RESET ACK\n", osmo_sccp_addr_dump(a_conn_info->calling_addr));
- osmo_sccp_tx_unitdata_msg(scu, a_conn_info->called_addr, a_conn_info->calling_addr, gsm0808_create_reset_ack());
+ LOGP(DMSC, LOGL_NOTICE, "Rx RESET from BSC %s, sending RESET ACK\n", osmo_sccp_addr_dump(a_conn_info->bsc_addr));
+ osmo_sccp_tx_unitdata_msg(scu, a_conn_info->msc_addr, a_conn_info->bsc_addr, gsm0808_create_reset_ack());
/* Make sure all orphand subscriber connections will be cleard */
- a_clear_all(scu, a_conn_info->calling_addr);
+ a_clear_all(scu, a_conn_info->bsc_addr);
msgb_free(msg);
}
@@ -114,12 +114,12 @@ static void bssmap_rx_reset_ack(struct osmo_sccp_user *scu, struct a_conn_info *
{
if (a_conn_info->reset == NULL) {
LOGP(DMSC, LOGL_ERROR, "Received RESET ACK from an unknown BSC %s, ignoring...\n",
- osmo_sccp_addr_dump(a_conn_info->calling_addr));
+ osmo_sccp_addr_dump(a_conn_info->bsc_addr));
goto fail;
}
LOGP(DMSC, LOGL_NOTICE, "Received RESET ACK from BSC %s\n",
- osmo_sccp_addr_dump(a_conn_info->calling_addr));
+ osmo_sccp_addr_dump(a_conn_info->bsc_addr));
/* Confirm that we managed to get the reset ack message
* towards the connection reset logic */
@@ -238,7 +238,7 @@ static int bssmap_rx_clear_complete(struct osmo_sccp_user *scu, struct a_conn_in
LOGP(DMSC, LOGL_NOTICE, "Releasing connection (conn_id=%i)\n", a_conn_info->conn_id);
rc = osmo_sccp_tx_disconn(scu, a_conn_info->conn_id,
- a_conn_info->called_addr, SCCP_RELEASE_CAUSE_END_USER_ORIGINATED);
+ a_conn_info->msc_addr, SCCP_RELEASE_CAUSE_END_USER_ORIGINATED);
/* Remove the record from the list with active connections. */
a_delete_bsc_con(a_conn_info->conn_id);
@@ -308,7 +308,7 @@ static int bssmap_rx_l3_compl(struct osmo_sccp_user *scu, struct a_conn_info *a_
msg->tail = msg->l3h + TLVP_LEN(&tp, GSM0808_IE_LAYER_3_INFORMATION);
/* Create new subscriber context */
- ue = ue_conn_ctx_alloc(a_conn_info->calling_addr, a_conn_info->conn_id);
+ ue = ue_conn_ctx_alloc(a_conn_info->bsc_addr, a_conn_info->conn_id);
conn = subscr_conn_allocate_a(a_conn_info, network, ue, lac, scu, a_conn_info->conn_id);
/* Handover location update to the MSC code */