From patchwork Tue Jul 21 14:23:30 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Pablo Neira Ayuso X-Patchwork-Id: 498259 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from lists.osmocom.org (tmp.osmocom.org [144.76.43.76]) by ozlabs.org (Postfix) with ESMTP id D019A140777 for ; Wed, 22 Jul 2015 00:25:20 +1000 (AEST) Received: from lists.osmocom.org (lists.osmocom.org [144.76.43.76]) by lists.osmocom.org (Postfix) with ESMTP id 9A79A8556; Tue, 21 Jul 2015 14:25:19 +0000 (UTC) X-Original-To: openbsc@lists.osmocom.org Delivered-To: openbsc@lists.osmocom.org Received: from mail.us.es (mail.us.es [193.147.175.20]) by lists.osmocom.org (Postfix) with ESMTP id 6087684F3 for ; Tue, 21 Jul 2015 14:24:51 +0000 (UTC) Received: (qmail 7982 invoked from network); 21 Jul 2015 16:18:11 +0200 Received: from unknown (HELO us.es) (192.168.2.12) by us.es with SMTP; 21 Jul 2015 16:18:11 +0200 Received: (qmail 3975 invoked by uid 507); 21 Jul 2015 14:18:11 -0000 X-Qmail-Scanner-Diagnostics: from 127.0.0.1 by antivirus2 (envelope-from , uid 501) with qmail-scanner-2.10 (clamdscan: 0.98.7/20703. spamassassin: 3.4.0. Clear:RC:1(127.0.0.1):SA:0(-103.2/7.5):. Processed in 5.191627 secs); 21 Jul 2015 14:18:11 -0000 X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on antivirus2 X-Spam-Level: X-Spam-Status: No, score=-103.2 required=7.5 tests=BAYES_50,SMTPAUTH_US, USER_IN_WHITELIST autolearn=disabled version=3.4.0 X-Spam-ASN: AS12715 87.216.0.0/16 X-Envelope-From: pablo@gnumonks.org Received: from unknown (HELO antivirus2) (127.0.0.1) by us.es with SMTP; 21 Jul 2015 14:18:06 -0000 Received: from 192.168.1.13 (192.168.1.13) by antivirus2 (F-Secure/fsigk_smtp/412/antivirus2); Tue, 21 Jul 2015 16:18:06 +0200 (CEST) X-Virus-Status: clean(F-Secure/fsigk_smtp/412/antivirus2) Received: (qmail 12939 invoked from network); 21 Jul 2015 16:18:05 +0200 Received: from 129.166.216.87.static.jazztel.es (HELO salvia.here) (pneira@us.es@87.216.166.129) by mail.us.es with SMTP; 21 Jul 2015 16:18:05 +0200 From: pablo@gnumonks.org To: openbsc@lists.osmocom.org Subject: [PATCH libosmo-netif 15/18] osmux: kill osmux_get_hdr() Date: Tue, 21 Jul 2015 16:23:30 +0200 Message-Id: <1437488613-3943-16-git-send-email-pablo@gnumonks.org> X-Mailer: git-send-email 1.7.10.4 In-Reply-To: <1437488613-3943-1-git-send-email-pablo@gnumonks.org> References: <1437488613-3943-1-git-send-email-pablo@gnumonks.org> X-BeenThere: openbsc@lists.osmocom.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: Development of the OpenBSC GSM base station controller List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: openbsc-bounces@lists.osmocom.org Sender: "OpenBSC" From: Pablo Neira Ayuso 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);