aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorHarald Welte <laforge@osmocom.org>2020-07-29 20:11:36 +0200
committerHarald Welte <laforge@osmocom.org>2020-07-29 20:11:36 +0200
commit4f18ce1ecc87c0db7e49c12817c8988c4ed95aef (patch)
tree62ae8482b9cb78256fe057dd29ea50b642edcc9e /src
parentc8799757423efa88fcddbf60ae36eed4fd2c0e2d (diff)
Provide more context when logging "Error in ANY_fromType_aper"
Let's add the type name whose encoding failed to give us some kind of a clue what's happening in those situations. Change-Id: I802677ba7164a4d3382d4bc00f5e1c7ab7067d89
Diffstat (limited to 'src')
-rw-r--r--src/ranap_common.c14
-rw-r--r--src/rua_common.c8
-rw-r--r--src/sabp_common.c8
3 files changed, 15 insertions, 15 deletions
diff --git a/src/ranap_common.c b/src/ranap_common.c
index 46203e0..4ada7ff 100644
--- a/src/ranap_common.c
+++ b/src/ranap_common.c
@@ -331,7 +331,7 @@ struct msgb *ranap_generate_initiating_message(e_RANAP_ProcedureCode procedureCo
pdu.choice.initiatingMessage.criticality = criticality;
rc = ANY_fromType_aper(&pdu.choice.initiatingMessage.value, td, sptr);
if (rc < 0) {
- LOGP(DRANAP, LOGL_ERROR, "Error in ANY_fromType_aper\n");
+ LOGP(DRANAP, LOGL_ERROR, "Error in ANY_fromType_aper (%s)\n", td->name);
return NULL;
}
@@ -358,7 +358,7 @@ struct msgb *ranap_generate_successful_outcome(
pdu.choice.successfulOutcome.criticality = criticality;
rc = ANY_fromType_aper(&pdu.choice.successfulOutcome.value, td, sptr);
if (rc < 0) {
- LOGP(DRANAP, LOGL_ERROR, "Error in ANY_fromType_aper\n");
+ LOGP(DRANAP, LOGL_ERROR, "Error in ANY_fromType_aper (%s)\n", td->name);
return NULL;
}
@@ -385,7 +385,7 @@ struct msgb *ranap_generate_unsuccessful_outcome(
pdu.choice.unsuccessfulOutcome.criticality = criticality;
rc = ANY_fromType_aper(&pdu.choice.unsuccessfulOutcome.value, td, sptr);
if (rc < 0) {
- LOGP(DRANAP, LOGL_ERROR, "Error in ANY_fromType_aper\n");
+ LOGP(DRANAP, LOGL_ERROR, "Error in ANY_fromType_aper (%s)\n", td->name);
return NULL;
}
@@ -412,7 +412,7 @@ struct msgb *ranap_generate_outcome(
pdu.choice.outcome.criticality = criticality;
rc = ANY_fromType_aper(&pdu.choice.outcome.value, td, sptr);
if (rc < 0) {
- LOGP(DRANAP, LOGL_ERROR, "Error in ANY_fromType_aper\n");
+ LOGP(DRANAP, LOGL_ERROR, "Error in ANY_fromType_aper (%s)\n", td->name);
return NULL;
}
@@ -440,7 +440,7 @@ RANAP_IE_t *ranap_new_ie(RANAP_ProtocolIE_ID_t id,
rc = ANY_fromType_aper(&buff->value, type, sptr);
if (rc < 0) {
- LOGP(DRANAP, LOGL_ERROR, "Error in ANY_fromType_aper\n");
+ LOGP(DRANAP, LOGL_ERROR, "Error in ANY_fromType_aper (%s)\n", type->name);
FREEMEM(buff);
return NULL;
}
@@ -474,14 +474,14 @@ RANAP_ProtocolIE_FieldPair_t *ranap_new_ie_pair(RANAP_ProtocolIE_ID_t id,
rc = ANY_fromType_aper(&buff->firstValue, type1, sptr1);
if (rc < 0) {
- LOGP(DRANAP, LOGL_ERROR, "Error in ANY_fromType_aper\n");
+ LOGP(DRANAP, LOGL_ERROR, "Error in ANY_fromType_aper (%s)\n", type1->name);
FREEMEM(buff);
return NULL;
}
rc = ANY_fromType_aper(&buff->secondValue, type2, sptr2);
if (rc < 0) {
- LOGP(DRANAP, LOGL_ERROR, "Error in ANY_fromType_aper\n");
+ LOGP(DRANAP, LOGL_ERROR, "Error in ANY_fromType_aper (%s)\n", type2->name);
ASN_STRUCT_FREE(asn_DEF_RANAP_ProtocolIE_FieldPair, buff);
return NULL;
}
diff --git a/src/rua_common.c b/src/rua_common.c
index 3c9d773..77ac591 100644
--- a/src/rua_common.c
+++ b/src/rua_common.c
@@ -140,7 +140,7 @@ struct msgb *rua_generate_initiating_message(
pdu.choice.initiatingMessage.criticality = criticality;
rc = ANY_fromType_aper(&pdu.choice.initiatingMessage.value, td, sptr);
if (rc < 0) {
- LOGP(DRUA, LOGL_ERROR, "Error in ANY_fromType_aper\n");
+ LOGP(DRUA, LOGL_ERROR, "Error in ANY_fromType_aper (%s)\n", td->name);
return NULL;
}
@@ -163,7 +163,7 @@ struct msgb *rua_generate_successful_outcome(
pdu.choice.successfulOutcome.criticality = criticality;
rc = ANY_fromType_aper(&pdu.choice.successfulOutcome.value, td, sptr);
if (rc < 0) {
- LOGP(DRUA, LOGL_ERROR, "Error in ANY_fromType_aper\n");
+ LOGP(DRUA, LOGL_ERROR, "Error in ANY_fromType_aper (%s)\n", td->name);
return NULL;
}
@@ -186,7 +186,7 @@ struct msgb *rua_generate_unsuccessful_outcome(
pdu.choice.unsuccessfulOutcome.criticality = criticality;
rc = ANY_fromType_aper(&pdu.choice.unsuccessfulOutcome.value, td, sptr);
if (rc < 0) {
- LOGP(DRUA, LOGL_ERROR, "Error in ANY_fromType_aper\n");
+ LOGP(DRUA, LOGL_ERROR, "Error in ANY_fromType_aper (%s)\n", td->name);
return NULL;
}
@@ -211,7 +211,7 @@ RUA_IE_t *rua_new_ie(RUA_ProtocolIE_ID_t id,
rc = ANY_fromType_aper(&buff->value, type, sptr);
if (rc < 0) {
- LOGP(DRUA, LOGL_ERROR, "Error in ANY_fromType_aper\n");
+ LOGP(DRUA, LOGL_ERROR, "Error in ANY_fromType_aper (%s)\n", type->name);
FREEMEM(buff);
return NULL;
}
diff --git a/src/sabp_common.c b/src/sabp_common.c
index cdb0e32..7aee4b7 100644
--- a/src/sabp_common.c
+++ b/src/sabp_common.c
@@ -114,7 +114,7 @@ struct msgb *sabp_generate_initiating_message(e_SABP_ProcedureCode procedureCode
pdu.choice.initiatingMessage.criticality = criticality;
rc = ANY_fromType_aper(&pdu.choice.initiatingMessage.value, td, sptr);
if (rc < 0) {
- LOGP(DSABP, LOGL_ERROR, "Error in ANY_fromType_aper\n");
+ LOGP(DSABP, LOGL_ERROR, "Error in ANY_fromType_aper (%s)\n", td->name);
return NULL;
}
@@ -141,7 +141,7 @@ struct msgb *sabp_generate_successful_outcome(
pdu.choice.successfulOutcome.criticality = criticality;
rc = ANY_fromType_aper(&pdu.choice.successfulOutcome.value, td, sptr);
if (rc < 0) {
- LOGP(DSABP, LOGL_ERROR, "Error in ANY_fromType_aper\n");
+ LOGP(DSABP, LOGL_ERROR, "Error in ANY_fromType_aper (%s)\n", td->name);
return NULL;
}
@@ -168,7 +168,7 @@ struct msgb *sabp_generate_unsuccessful_outcome(
pdu.choice.unsuccessfulOutcome.criticality = criticality;
rc = ANY_fromType_aper(&pdu.choice.unsuccessfulOutcome.value, td, sptr);
if (rc < 0) {
- LOGP(DSABP, LOGL_ERROR, "Error in ANY_fromType_aper\n");
+ LOGP(DSABP, LOGL_ERROR, "Error in ANY_fromType_aper (%s)\n", td->name);
return NULL;
}
@@ -195,7 +195,7 @@ SABP_IE_t *sabp_new_ie(SABP_ProtocolIE_ID_t id,
rc = ANY_fromType_aper(&buff->value, type, sptr);
if (rc < 0) {
- LOGP(DSABP, LOGL_ERROR, "Error in ANY_fromType_aper\n");
+ LOGP(DSABP, LOGL_ERROR, "Error in ANY_fromType_aper (%s)\n", type->name);
FREEMEM(buff);
return NULL;
}