SHA256
1
0
forked from pool/osmo-iuh

- Add 0001-fix-return-values.patch,

0001-iu_client-uses-gprs_msgb.h.patch

OBS-URL: https://build.opensuse.org/package/show/network:telephony/osmo-iuh?expand=0&rev=6
This commit is contained in:
Jan Engelhardt 2018-01-02 00:45:55 +00:00 committed by Git OBS Bridge
parent 69eee92d6d
commit 6d19a48150
4 changed files with 201 additions and 6 deletions

View File

@ -1,4 +1,4 @@
From 3ec7c947c8a00d180b8e13b13822c8996b2d98e1 Mon Sep 17 00:00:00 2001
From fc52e9614856ac03294a74c09d485349d33eed6d 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
@ -6,8 +6,14 @@ 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(+)
src/context_map.c | 1 +
src/hnbgw.c | 1 +
src/hnbgw_cn.c | 4 +++-
src/hnbgw_hnbap.c | 9 +++++----
src/hnbgw_ranap.c | 5 ++++-
src/ranap_common_cn.c | 5 ++++-
src/tests/test_common.c | 1 +
8 files changed, 21 insertions(+), 7 deletions(-)
diff --git a/asn1/utils/asn1tostruct.py b/asn1/utils/asn1tostruct.py
index 8364c27..63aea8b 100755
@ -22,8 +28,134 @@ index 8364c27..63aea8b 100755
f.write("}\n\n")
for key in iesDefs:
diff --git a/src/context_map.c b/src/context_map.c
index 0960cb9..8fb2187 100644
--- a/src/context_map.c
+++ b/src/context_map.c
@@ -169,4 +169,5 @@ int context_map_init(struct hnb_gw *gw)
context_map_tmr.cb = context_map_tmr_cb;
context_map_tmr.data = gw;
osmo_timer_schedule(&context_map_tmr, EXPIRY_TIMER_SECS, 0);
+ return 0;
}
diff --git a/src/hnbgw.c b/src/hnbgw.c
index c9fdd53..db4b534 100644
--- a/src/hnbgw.c
+++ b/src/hnbgw.c
@@ -175,6 +175,7 @@ void ue_context_free(struct ue_context *ue)
}
static int hnb_close_cb(struct osmo_stream_srv *conn)
{
+ return 0;
}
static int hnb_read_cb(struct osmo_stream_srv *conn)
diff --git a/src/hnbgw_cn.c b/src/hnbgw_cn.c
index 3b828b4..a8d3ebc 100644
--- a/src/hnbgw_cn.c
+++ b/src/hnbgw_cn.c
@@ -87,6 +87,7 @@ int hnbgw_cnlink_change_state(struct hnbgw_cnlink *cnlink, enum hnbgw_cnlink_sta
osmo_timer_del(&cnlink->T_RafC);
break;
}
+ return 0;
}
/***********************************************************************
@@ -218,6 +219,7 @@ static int _cn_ranap_rx(struct hnbgw_cnlink *cnlink, RANAP_RANAP_PDU_t *pdu,
"presence %u from CN, ignoring\n", pdu->present);
break;
}
+ return rc;
}
static int handle_cn_ranap(struct hnbgw_cnlink *cnlink, const uint8_t *data,
@@ -389,7 +391,7 @@ static int sccp_sap_up(struct osmo_prim_hdr *oph, void *ctx)
case OSMO_PRIM(OSMO_SCU_PRIM_N_DISCONNECT, PRIM_OP_INDICATION):
rc = handle_cn_disc_ind(cnlink, &prim->u.disconnect, oph);
break;
- defualt:
+ default:
LOGP(DMAIN, LOGL_ERROR,
"Received unknown prim %u from SCCP USER SAP\n",
OSMO_PRIM_HDR(oph));
diff --git a/src/hnbgw_hnbap.c b/src/hnbgw_hnbap.c
index 0473482..d13e0a8 100644
--- a/src/hnbgw_hnbap.c
+++ b/src/hnbgw_hnbap.c
@@ -517,16 +517,17 @@ static int hnbgw_rx_initiating_msg(struct hnb_context *hnb, InitiatingMessage_t
imsg->procedureCode);
break;
}
+ return rc;
}
static int hnbgw_rx_successful_outcome_msg(struct hnb_context *hnb, SuccessfulOutcome_t *msg)
{
-
+ return -1;
}
static int hnbgw_rx_unsuccessful_outcome_msg(struct hnb_context *hnb, UnsuccessfulOutcome_t *msg)
{
-
+ return -1;
}
@@ -559,7 +560,7 @@ int hnbgw_hnbap_rx(struct hnb_context *hnb, struct msgb *msg)
{
HNBAP_PDU_t _pdu, *pdu = &_pdu;
asn_dec_rval_t dec_ret;
- int rc;
+ int rc = 0;
/* decode and handle to _hnbgw_hnbap_rx() */
@@ -581,5 +582,5 @@ int hnbgw_hnbap_rx(struct hnb_context *hnb, struct msgb *msg)
int hnbgw_hnbap_init(void)
{
-
+ return 0;
}
diff --git a/src/hnbgw_ranap.c b/src/hnbgw_ranap.c
index 7fd6d0a..1f3246b 100644
--- a/src/hnbgw_ranap.c
+++ b/src/hnbgw_ranap.c
@@ -151,6 +151,7 @@ static int ranap_rx_initiating_msg(struct hnb_context *hnb, RANAP_InitiatingMess
"Procedure %u from HNB, ignoring\n", imsg->procedureCode);
break;
}
+ return rc;
}
static int ranap_rx_successful_msg(struct hnb_context *hnb, RANAP_SuccessfulOutcome_t *imsg)
@@ -179,6 +180,7 @@ static int ranap_rx_successful_msg(struct hnb_context *hnb, RANAP_SuccessfulOutc
"Procedure %u from HNB, ignoring\n", imsg->procedureCode);
break;
}
+ return rc;
}
@@ -204,6 +206,7 @@ static int _hnbgw_ranap_rx(struct hnb_context *hnb, RANAP_RANAP_PDU_t *pdu)
"presence %u from HNB, ignoring\n", pdu->present);
break;
}
+ return rc;
}
@@ -228,5 +231,5 @@ int hnbgw_ranap_rx(struct msgb *msg, uint8_t *data, size_t len)
int hnbgw_ranap_init(void)
{
-
+ return 0;
}
diff --git a/src/ranap_common_cn.c b/src/ranap_common_cn.c
index d02eb37..cb12d3a 100644
index d02eb37..7c2a743 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
@ -42,6 +174,15 @@ index d02eb37..cb12d3a 100644
}
static void cn_ranap_free_successful_msg_cl(ranap_message *message)
@@ -463,7 +465,7 @@ static void cn_ranap_free_successful_msg_cl(ranap_message *message)
static int _cn_ranap_rx_cl(void *ctx, RANAP_RANAP_PDU_t *pdu, ranap_message *message)
{
- int rc;
+ int rc = 0;
/* Extend _cn_ranap_free_cl as well when extending this function */
@@ -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;
@ -50,6 +191,16 @@ index d02eb37..cb12d3a 100644
}
static void _cn_ranap_free_cl(ranap_message *message)
diff --git a/src/tests/test_common.c b/src/tests/test_common.c
index c8aafdd..9ea48e0 100644
--- a/src/tests/test_common.c
+++ b/src/tests/test_common.c
@@ -84,4 +84,5 @@ int test_common_init(void)
log_set_print_filename(osmo_stderr_target, 0);
log_set_use_color(osmo_stderr_target, 0);
+ return 0;
}
--
2.15.1

View File

@ -0,0 +1,41 @@
From ce3576e41d5a9b9897e704bba69faac643afb1be Mon Sep 17 00:00:00 2001
From: Jan Engelhardt <jengelh@inai.de>
Date: Tue, 2 Jan 2018 00:21:09 +0100
Subject: [PATCH] iu_client uses gprs_msgb.h
---
configure.ac | 1 +
src/Makefile.am | 4 ++--
2 files changed, 3 insertions(+), 2 deletions(-)
diff --git a/configure.ac b/configure.ac
index ff0501a..393ad83 100644
--- a/configure.ac
+++ b/configure.ac
@@ -34,6 +34,7 @@ fi
PKG_PROG_PKG_CONFIG([0.20])
PKG_CHECK_MODULES(OSMOCORE, libosmocore >= 0.10.0)
+PKG_CHECK_MODULES([OSMOGB], [libosmogb])
PKG_CHECK_MODULES(OSMOGSM, libosmogsm >= 0.10.0)
PKG_CHECK_MODULES(OSMOVTY, libosmovty >= 0.10.0)
PKG_CHECK_MODULES(OSMONETIF, libosmo-netif >= 0.1.0)
diff --git a/src/Makefile.am b/src/Makefile.am
index d815394..fe3f90e 100644
--- a/src/Makefile.am
+++ b/src/Makefile.am
@@ -42,9 +42,9 @@ gen_ranap.stamp: $(ASN1_ROOT)/ranap/RANAP-PDU-Contents.asn $(ASN1TOSTRUCT)
ranap_decoder.c ranap_encoder.c: gen_ranap.stamp
-AM_CFLAGS = -I$(top_srcdir)/include -I$(top_builddir)/include \
+AM_CPPFLAGS = -I$(top_srcdir)/include -I$(top_builddir)/include \
$(OSMOCORE_CFLAGS) $(OSMOVTY_CFLAGS) $(OSMOGSM_CFLAGS) \
- $(OSMONETIF_CFLAGS) $(ASN1C_CFLAGS) $(OSMOSIGTRAN_CFLAGS)
+ $(OSMONETIF_CFLAGS) $(ASN1C_CFLAGS) $(OSMOSIGTRAN_CFLAGS) $(OSMOGB_CFLAGS)
COMMON_LDADD = -lsctp
# build the shared RANAP library
--
2.15.1

View File

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

View File

@ -25,6 +25,7 @@ URL: https://osmocom.org/projects/osmohnbgw/wiki
Source: %name-%version.tar.xz
Patch1: 0001-fix-compiler-warning-implicit-function-declaration-i.patch
Patch2: 0001-fix-return-values.patch
Patch3: 0001-iu_client-uses-gprs_msgb.h.patch
BuildRequires: automake >= 1.9
BuildRequires: libtool >= 2
BuildRequires: lksctp-tools-devel
@ -36,6 +37,7 @@ 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(libosmogb)
BuildRequires: pkgconfig(libosmogsm) >= 0.10.0
BuildRequires: pkgconfig(libosmovty) >= 0.10.0
@ -62,7 +64,7 @@ applications that want to make use of libosmoranap.
%prep
%setup -q
%patch -P 1 -P 2 -p1
%patch -P 1 -P 2 -P 3 -p1
%build
autoreconf -fi