rspro_util: Print error message in case of encoder errror

Change-Id: Ia2eabd86dd143d5241756f406aa5388cf49d3ba1
This commit is contained in:
Harald Welte 2018-08-17 22:09:06 +02:00
parent 6b8d4f82de
commit a2b23c3c50
1 changed files with 1 additions and 0 deletions

View File

@ -37,6 +37,7 @@ struct msgb *rspro_enc_msg(RsproPDU_t *pdu)
rval = der_encode_to_buffer(&asn_DEF_RsproPDU, pdu, msgb_data(msg), msgb_tailroom(msg));
if (rval.encoded < 0) {
fprintf(stderr, "Failed to encode %s\n", rval.failed_type->name);
return NULL;
}
msgb_put(msg, rval.encoded);