Commit 6cf7f32a authored by v0-e's avatar v0-e

jer: BMPString add quotes

parent f766a858
...@@ -79,6 +79,7 @@ BMPString_encode_jer(const asn_TYPE_descriptor_t *td, const void *sptr, ...@@ -79,6 +79,7 @@ BMPString_encode_jer(const asn_TYPE_descriptor_t *td, const void *sptr,
asn_app_consume_bytes_f *cb, void *app_key) { asn_app_consume_bytes_f *cb, void *app_key) {
const BMPString_t *st = (const BMPString_t *)sptr; const BMPString_t *st = (const BMPString_t *)sptr;
asn_enc_rval_t er = {0,0,0}; asn_enc_rval_t er = {0,0,0};
ssize_t ro_encoded = 0;
(void)ilevel; (void)ilevel;
(void)flags; (void)flags;
...@@ -86,8 +87,14 @@ BMPString_encode_jer(const asn_TYPE_descriptor_t *td, const void *sptr, ...@@ -86,8 +87,14 @@ BMPString_encode_jer(const asn_TYPE_descriptor_t *td, const void *sptr,
if(!st || !st->buf) if(!st || !st->buf)
ASN__ENCODE_FAILED; ASN__ENCODE_FAILED;
er.encoded = BMPString__dump(st, cb, app_key); ASN__CALLBACK("\"", 1);
if(er.encoded < 0) ASN__ENCODE_FAILED; ro_encoded = BMPString__dump(st, cb, app_key);
if(ro_encoded < 0) goto cb_failed;
er.encoded += ro_encoded;
ASN__CALLBACK("\"", 1);
ASN__ENCODED_OK(er); ASN__ENCODED_OK(er);
cb_failed:
ASN__ENCODE_FAILED;
} }
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment