diff options
author | Harald Welte <laforge@gnumonks.org> | 2018-09-24 14:55:34 +0200 |
---|---|---|
committer | Harald Welte <laforge@gnumonks.org> | 2018-09-24 14:55:34 +0200 |
commit | 7585286466d61937e34e7c5d3909b093c801a6eb (patch) | |
tree | ead8e30a3f201cb5660a45f24815030115359fe0 /src | |
parent | e1176cf510967f305ee2072ee2bef02e75698bf5 (diff) |
rspro_util: More error messages
Change-Id: I5006bbf88df17a6e76954ca51af7f443dcc526f9
Diffstat (limited to 'src')
-rw-r--r-- | src/rspro_util.c | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/src/rspro_util.c b/src/rspro_util.c index d6bdd0f..3f5e70a 100644 --- a/src/rspro_util.c +++ b/src/rspro_util.c @@ -54,9 +54,12 @@ RsproPDU_t *rspro_dec_msg(struct msgb *msg) RsproPDU_t *pdu; asn_dec_rval_t rval; - rval = ber_decode(NULL, &asn_DEF_RsproPDU, (void **) &pdu, msgb_data(msg), msgb_length(msg)); + printf("decoding %s\n", msgb_hexdump(msg)); + rval = ber_decode(NULL, &asn_DEF_RsproPDU, (void **) &pdu, msgb_l2(msg), msgb_l2len(msg)); if (rval.code != RC_OK) { - /* FIXME */ + fprintf(stderr, "Failed to decode: %d. Consumed %lu of %u bytes\n", + rval.code, rval.consumed, msgb_length(msg)); + msgb_free(msg); return NULL; } |