Do not decode UPF packets
This commit is contained in:
parent
2232d847ab
commit
1d183363dc
|
|
@ -337,15 +337,21 @@ int facilities_request_single_message(void *responder, FacilitiesMessageRequest_
|
||||||
npr->transport.choice.btp.btpType = BTPType_btpB;
|
npr->transport.choice.btp.btpType = BTPType_btpB;
|
||||||
|
|
||||||
npr->id = id;
|
npr->id = id;
|
||||||
|
|
||||||
npr->data.buf = malloc(2048);
|
npr->data.buf = malloc(2048);
|
||||||
asn_enc_rval_t enc = uper_encode_to_buffer(its_msg_def, NULL, its_msg, npr->data.buf, 2048);
|
|
||||||
|
asn_enc_rval_t enc;
|
||||||
|
if (process_msg) {
|
||||||
|
enc = uper_encode_to_buffer(its_msg_def, NULL, its_msg, npr->data.buf, 2048);
|
||||||
if (enc.encoded == -1) {
|
if (enc.encoded == -1) {
|
||||||
log_error("failed encoding ITS message into UPER (%s)", enc.failed_type->name);
|
log_error("failed encoding ITS message into UPER (%s)", enc.failed_type->name);
|
||||||
rv = 1;
|
rv = 1;
|
||||||
goto cleanup;
|
goto cleanup;
|
||||||
}
|
}
|
||||||
npr->data.size = (enc.encoded + 7) / 8;
|
npr->data.size = (enc.encoded + 7) / 8;
|
||||||
|
} else {
|
||||||
|
memcpy(npr->data.buf, frm->data.buf, frm->data.size);
|
||||||
|
npr->data.size = frm->data.size;
|
||||||
|
}
|
||||||
|
|
||||||
npr->network.choice.gn.destinationAddress.buf = malloc(6);
|
npr->network.choice.gn.destinationAddress.buf = malloc(6);
|
||||||
for (int i = 0; i < 6; ++i)
|
for (int i = 0; i < 6; ++i)
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue