aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorNeels Hofmeyr <neels@hofmeyr.de>2018-01-18 19:01:09 +0100
committerNeels Hofmeyr <neels@hofmeyr.de>2018-01-18 19:01:09 +0100
commit2293df070c8bcdbc1445ddd6ff09b58708136575 (patch)
tree431827873eb420437e07570caaf51849503cb2c4
parent8a2b6e2b6f35c8a4a8f43afd3e8ce1a02d49a61a (diff)
hnbap: log errors on decoding/encoding HNB-REGISTER msgs
-rw-r--r--src/hnbgw_hnbap.c7
1 files changed, 6 insertions, 1 deletions
diff --git a/src/hnbgw_hnbap.c b/src/hnbgw_hnbap.c
index 2746c21..8fba13c 100644
--- a/src/hnbgw_hnbap.c
+++ b/src/hnbgw_hnbap.c
@@ -63,6 +63,8 @@ static int hnbgw_tx_hnb_register_acc(struct hnb_context *ctx)
memset(&accept_out, 0, sizeof(accept_out));
rc = hnbap_encode_hnbregisteraccepties(&accept_out, &accept);
if (rc < 0) {
+ LOGP(DHNBAP, LOGL_ERROR, "Failure to encode HNB-REGISTER-ACCEPT to %s: rc=%d\n",
+ ctx->identity_info, rc);
return rc;
}
@@ -370,8 +372,11 @@ static int hnbgw_rx_hnb_register_req(struct hnb_context *ctx, ANY_t *in)
int rc;
rc = hnbap_decode_hnbregisterrequesties(&ies, in);
- if (rc < 0)
+ if (rc < 0) {
+ LOGP(DHNBAP, LOGL_ERROR, "Failure to decode HNB-REGISTER-REQ from %s: rc=%d\n",
+ ctx->identity_info, rc);
return rc;
+ }
/* copy all identity parameters from the message to ctx */
asn1_strncpy(ctx->identity_info, &ies.hnB_Identity.hNB_Identity_Info,