pespin submitted this change.
Replace ipa_prepend_header() with osmo_ipa_msg_push_header(s)()
This is a step further into the transition of having most of the
ipa protocol code in libosmo-netif.
Also, the osmo_ipa_msg_push_headers() is easier to understand than
having 2 API calls prepending 2 headers.
Change-Id: Ic0391ad664c43ea52837e42cea0cc0b82dd961ab
---
M src/ipaccess/ipaccess-config-e1-driver.c
M src/osmo-bsc/bsc_ctrl.c
M src/osmo-bsc/osmo_bsc_mgcp.c
3 files changed, 6 insertions(+), 10 deletions(-)
diff --git a/src/ipaccess/ipaccess-config-e1-driver.c b/src/ipaccess/ipaccess-config-e1-driver.c
index 17a5dde..631e430 100644
--- a/src/ipaccess/ipaccess-config-e1-driver.c
+++ b/src/ipaccess/ipaccess-config-e1-driver.c
@@ -179,8 +179,8 @@
return -EINVAL;
}
- msg->l2h = msg->data;
- ipa_prepend_header(msg, sign_link->tei);
+ /* msg->l2h is set here: */
+ osmo_ipa_msg_push_header(msg, sign_link->tei);
LOGPITS(e1i_ts, DLMI, LOGL_DEBUG, "TX: %s\n", osmo_hexdump(msg->l2h, msgb_l2len(msg)));
osmo_stream_cli_send(cli, msg);
@@ -213,7 +213,7 @@
if (!nmsg2)
return NULL;
msgb_v_put(nmsg2, IPAC_MSGT_ID_ACK);
- ipa_prepend_header(nmsg2, IPAC_PROTO_IPACCESS);
+ osmo_ipa_msg_push_header(nmsg2, IPAC_PROTO_IPACCESS);
return nmsg2;
}
diff --git a/src/osmo-bsc/bsc_ctrl.c b/src/osmo-bsc/bsc_ctrl.c
index 2ba7af8..6c0150b 100644
--- a/src/osmo-bsc/bsc_ctrl.c
+++ b/src/osmo-bsc/bsc_ctrl.c
@@ -689,9 +689,7 @@
if (!msg)
return -1;
- ipa_prepend_header_ext(msg, IPAC_PROTO_EXT_CTRL);
- ipa_prepend_header(msg, IPAC_PROTO_OSMO);
-
+ osmo_ipa_msg_push_headers(msg, IPAC_PROTO_OSMO, IPAC_PROTO_EXT_CTRL);
return osmo_ss7_asp_send(asp, msg);
}
@@ -705,9 +703,7 @@
if (!msg)
return -1;
- ipa_prepend_header_ext(msg, IPAC_PROTO_EXT_CTRL);
- ipa_prepend_header(msg, IPAC_PROTO_OSMO);
-
+ osmo_ipa_msg_push_headers(msg, IPAC_PROTO_OSMO, IPAC_PROTO_EXT_CTRL);
return bsc_sccplite_msc_send(msc, msg);
}
diff --git a/src/osmo-bsc/osmo_bsc_mgcp.c b/src/osmo-bsc/osmo_bsc_mgcp.c
index 4114cc3..978ff8c 100644
--- a/src/osmo-bsc/osmo_bsc_mgcp.c
+++ b/src/osmo-bsc/osmo_bsc_mgcp.c
@@ -195,6 +195,6 @@
msg->l2h[rc] = '\0';
LOGP(DMSC, LOGL_NOTICE, "Received MGCP on UDP proxy socket: %s\n", msg->l2h);
- ipa_prepend_header(msg, IPAC_PROTO_MGCP_OLD);
+ osmo_ipa_msg_push_header(msg, IPAC_PROTO_MGCP_OLD);
return bsc_sccplite_msc_send(msc, msg);
}
To view, visit change 41401. To unsubscribe, or for help writing mail filters, visit settings.