SHA256
1
0
forked from pool/osmo-iuh

- Add 0001-fix-return-values.patch

OBS-URL: https://build.opensuse.org/package/show/network:telephony/osmo-iuh?expand=0&rev=5
This commit is contained in:
Jan Engelhardt 2018-01-01 23:18:08 +00:00 committed by Git OBS Bridge
parent 507f2a02b7
commit 69eee92d6d
3 changed files with 81 additions and 31 deletions

View File

@ -0,0 +1,55 @@
From 3ec7c947c8a00d180b8e13b13822c8996b2d98e1 Mon Sep 17 00:00:00 2001
From: Jan Engelhardt <jengelh@inai.de>
Date: Tue, 2 Jan 2018 00:08:53 +0100
Subject: [PATCH] fix return values
(fixed in git already - but only partially)
---
asn1/utils/asn1tostruct.py | 2 ++
src/ranap_common_cn.c | 3 +++
2 files changed, 5 insertions(+)
diff --git a/asn1/utils/asn1tostruct.py b/asn1/utils/asn1tostruct.py
index 8364c27..63aea8b 100755
--- a/asn1/utils/asn1tostruct.py
+++ b/asn1/utils/asn1tostruct.py
@@ -384,6 +384,8 @@ for key in iesDefs:
iename = re.sub('id-', '', ie[0])
ienameunderscore = lowerFirstCamelWord(re.sub('-', '_', iename))
f.write(" ASN_STRUCT_FREE_CONTENTS_ONLY(asn_DEF_%s, &%s->%s);\n" % (ietypeunderscore, lowerFirstCamelWord(re.sub('-', '_', key)), ienameunderscore))
+
+ f.write(" return 0;\n")
f.write("}\n\n")
for key in iesDefs:
diff --git a/src/ranap_common_cn.c b/src/ranap_common_cn.c
index d02eb37..cb12d3a 100644
--- a/src/ranap_common_cn.c
+++ b/src/ranap_common_cn.c
@@ -360,6 +360,7 @@ static int cn_ranap_rx_initiating_msg_cl(void *ctx, RANAP_InitiatingMessage_t *i
get_value_string(ranap_procedure_code_vals, imsg->procedureCode));
break;
}
+ return rc;
}
static void cn_ranap_free_initiating_msg_cl(ranap_message *message)
@@ -433,6 +434,7 @@ static int cn_ranap_rx_successful_msg_cl(void *ctx, RANAP_SuccessfulOutcome_t *i
get_value_string(ranap_procedure_code_vals, imsg->procedureCode));
break;
}
+ return rc;
}
static void cn_ranap_free_successful_msg_cl(ranap_message *message)
@@ -488,6 +490,7 @@ static int _cn_ranap_rx_cl(void *ctx, RANAP_RANAP_PDU_t *pdu, ranap_message *mes
get_value_string(ranap_presence_vals, pdu->present));
break;
}
+ return rc;
}
static void _cn_ranap_free_cl(ranap_message *message)
--
2.15.1

View File

@ -1,3 +1,8 @@
-------------------------------------------------------------------
Mon Jan 1 23:09:44 UTC 2018 - jengelh@inai.de
- Add 0001-fix-return-values.patch
-------------------------------------------------------------------
Wed Dec 27 11:08:55 UTC 2017 - mardnh@gmx.de

View File

@ -22,22 +22,22 @@ Summary: Osmocom code for the Iuh interface (HNBAP, RUA, RANAP)
License: AGPL-3.0+ AND GPL-2.0+
Group: Hardware/Mobile
URL: https://osmocom.org/projects/osmohnbgw/wiki
Source: %{name}-%{version}.tar.xz
Patch0: 0001-fix-compiler-warning-implicit-function-declaration-i.patch
Source: %name-%version.tar.xz
Patch1: 0001-fix-compiler-warning-implicit-function-declaration-i.patch
Patch2: 0001-fix-return-values.patch
BuildRequires: automake >= 1.9
BuildRequires: libtool >= 2
BuildRequires: lksctp-tools-devel
BuildRequires: pkgconfig
BuildRequires: pkg-config >= 0.20
# python2 for asn1tostruct.py
BuildRequires: python2
BuildRequires: xz
BuildRequires: pkgconfig(libasn1c)
BuildRequires: pkgconfig(libosmo-netif)
BuildRequires: pkgconfig(libosmo-sigtran)
BuildRequires: pkgconfig(libosmocore)
BuildRequires: pkgconfig(libosmogb)
BuildRequires: pkgconfig(libosmogsm)
BuildRequires: pkgconfig(libosmovty)
BuildRequires: pkgconfig(libasn1c) >= 0.9.28
BuildRequires: pkgconfig(libosmo-netif) >= 0.1.0
BuildRequires: pkgconfig(libosmo-sigtran) >= 0.8.0
BuildRequires: pkgconfig(libosmocore) >= 0.10.0
BuildRequires: pkgconfig(libosmogsm) >= 0.10.0
BuildRequires: pkgconfig(libosmovty) >= 0.10.0
%description
Osmocom code for the Iuh interface (HNBAP, RUA, RANAP)
@ -52,7 +52,7 @@ Osmocom code for the Iuh interface (HNBAP, RUA, RANAP)
%package -n libosmo-ranap-devel
Summary: Development files for Osmocom RANAP library
Group: Development/Libraries/C and C++
Requires: libosmo-ranap1 = %{version}
Requires: libosmo-ranap1 = %version
%description -n libosmo-ranap-devel
Osmocom code for the Iuh interface (HNBAP, RUA, RANAP)
@ -62,21 +62,16 @@ applications that want to make use of libosmoranap.
%prep
%setup -q
%patch0 -p1
%patch -P 1 -P 2 -p1
%build
echo "%{version}" >.tarball-version
autoreconf -fi
# FIXME: set CFLAGS for workaround lots of rpm post-build-check errors: "no-return-in-nonvoid-function"
export CFLAGS="%{optflags} -Wno-return-type"
%configure \
--disable-static \
--docdir=%{_docdir}/%{name}
%configure --disable-static --docdir="%_docdir/%name"
make %{?_smp_mflags}
%install
%make_install
find %{buildroot} -type f -name "*.la" -delete -print
find "%buildroot" -type f -name "*.la" -delete -print
%check
make %{?_smp_mflags} check
@ -86,21 +81,16 @@ make %{?_smp_mflags} check
%files
%doc COPYING README.md
%dir %{_docdir}/%{name}/examples
%{_docdir}/%{name}/examples/osmo-hnbgw.cfg
%{_bindir}/osmo-hnbgw
%dir %_docdir/%name/examples
%_docdir/%name/examples/osmo-hnbgw.cfg
%_bindir/osmo-hnbgw
%files -n libosmo-ranap1
%{_libdir}/libosmo-ranap.so.1*
%_libdir/libosmo-ranap.so.1*
%files -n libosmo-ranap-devel
%dir %{_includedir}/osmocom
%dir %{_includedir}/osmocom/ranap
%{_includedir}/osmocom/ranap/RANAP_*.h
%{_includedir}/osmocom/ranap/ranap_*.h
%{_includedir}/osmocom/ranap/iu_helpers.h
%{_includedir}/osmocom/ranap/iu_client.h
%{_libdir}/libosmo-ranap.so
%{_libdir}/pkgconfig/libosmo-ranap.pc
%_includedir/*
%_libdir/libosmo-ranap.so
%_libdir/pkgconfig/*.pc
%changelog