[PATCH libosmo-netif 15/18] osmux: kill osmux_get_hdr()

This is merely a historical archive of years 2008-2021, before the migration to mailman3.

A maintained and still updated list archive can be found at https://lists.osmocom.org/hyperkitty/list/OpenBSC@lists.osmocom.org/.

pablo at gnumonks.org pablo at gnumonks.org
Tue Jul 21 14:23:30 UTC 2015


From: Pablo Neira Ayuso <pablo at soleta.eu>

Never used, so let's get rid of this function. We can recover it later on in
case we need it.
---
 include/osmocom/netif/osmux.h |    2 --
 src/osmux.c                   |   12 ------------
 2 files changed, 14 deletions(-)

diff --git a/include/osmocom/netif/osmux.h b/include/osmocom/netif/osmux.h
index c1f527a..83bb2e1 100644
--- a/include/osmocom/netif/osmux.h
+++ b/include/osmocom/netif/osmux.h
@@ -70,8 +70,6 @@ struct osmux_out_handle {
 	uint32_t rtp_ssrc;
 };
 
-struct osmux_hdr *osmux_get_hdr(struct msgb *msg);
-
 static inline uint8_t *osmux_get_payload(struct osmux_hdr *osmuxh)
 {
 	return (uint8_t *)osmuxh + sizeof(struct osmux_hdr);
diff --git a/src/osmux.c b/src/osmux.c
index 74883d9..eedae69 100644
--- a/src/osmux.c
+++ b/src/osmux.c
@@ -39,18 +39,6 @@
 
 static void *osmux_ctx;
 
-struct osmux_hdr *osmux_get_hdr(struct msgb *msg)
-{
-	struct osmux_hdr *osmuxh = (struct osmux_hdr *)msg->data;
-
-	if (msg->len < sizeof(struct osmux_hdr)) {
-		DEBUGPC(DLMUX, "received OSMUX frame too short (len = %d)\n",
-			msg->len);
-		return NULL;
-	}
-	return osmuxh;
-}
-
 static uint32_t osmux_get_payload_len(struct osmux_hdr *osmuxh)
 {
 	return osmo_amr_bytes(osmuxh->amr_ft) * (osmuxh->ctr+1);
-- 
1.7.10.4




More information about the OpenBSC mailing list