pespin has uploaded this change for review. ( https://gerrit.osmocom.org/c/libosmo-abis/+/38814?usp=email )
Change subject: ipaccess: Replace ipa_msg_push_header() with libosmocore ipa_prepend_header() ......................................................................
ipaccess: Replace ipa_msg_push_header() with libosmocore ipa_prepend_header()
Change-Id: I59b216c8a5e5a8744d337773ccf6f8d674b9513d --- M include/osmocom/abis/ipa.h M src/input/ipa.c M src/input/ipa_keepalive.c 3 files changed, 1 insertion(+), 13 deletions(-)
git pull ssh://gerrit.osmocom.org:29418/libosmo-abis refs/changes/14/38814/1
diff --git a/include/osmocom/abis/ipa.h b/include/osmocom/abis/ipa.h index 0a36d78..62d45d3 100644 --- a/include/osmocom/abis/ipa.h +++ b/include/osmocom/abis/ipa.h @@ -114,8 +114,6 @@ int ipaccess_bts_handle_ccm(struct ipa_client_conn *link, struct ipaccess_unit *dev, struct msgb *msg);
-void ipa_msg_push_header(struct msgb *msg, uint8_t proto); -
/*********************************************************************** * IPA Keep-Alive FSM diff --git a/src/input/ipa.c b/src/input/ipa.c index 5b064e0..a42ee6c 100644 --- a/src/input/ipa.c +++ b/src/input/ipa.c @@ -26,16 +26,6 @@
#define LOGIPA(link, level, fmt, args...) LOGP(DLINP, level, "%s:%u " fmt, link->addr, link->port, ## args)
-void ipa_msg_push_header(struct msgb *msg, uint8_t proto) -{ - struct ipaccess_head *hh; - - msg->l2h = msg->data; - hh = (struct ipaccess_head *) msgb_push(msg, sizeof(*hh)); - hh->proto = proto; - hh->len = htons(msgb_l2len(msg)); -} - void ipa_client_conn_close(struct ipa_client_conn *link) { osmo_timer_del(&link->timer); diff --git a/src/input/ipa_keepalive.c b/src/input/ipa_keepalive.c index 6a8ae93..f105ded 100644 --- a/src/input/ipa_keepalive.c +++ b/src/input/ipa_keepalive.c @@ -38,7 +38,7 @@ return NULL;
msgb_put_u8(msg, IPAC_MSGT_PING); - ipa_msg_push_header(msg, IPAC_PROTO_IPACCESS); + ipa_prepend_header(msg, IPAC_PROTO_IPACCESS);
return msg; }