Sign Up
Log In
Log In
or
Sign Up
Places
All Projects
Status Monitor
Collapse sidebar
openSUSE:Backports:SLE-15:Update
osmo-iuh
0001-fix-return-values.patch
Overview
Repositories
Revisions
Requests
Users
Attributes
Meta
File 0001-fix-return-values.patch of Package osmo-iuh
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 (fixed in git already - but only partially) --- asn1/utils/asn1tostruct.py | 2 ++ 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 --- 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/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..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 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) @@ -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; } + return rc; } 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
Locations
Projects
Search
Status Monitor
Help
OpenBuildService.org
Documentation
API Documentation
Code of Conduct
Contact
Support
@OBShq
Terms
openSUSE Build Service is sponsored by
The Open Build Service is an
openSUSE project
.
Sign Up
Log In
Places
Places
All Projects
Status Monitor