Added missing response to [itss]
This commit is contained in:
parent
7136fe195c
commit
dec270f337
|
|
@ -116,7 +116,8 @@ static int facilities_request(facilities_t *facilities, uint8_t *msg, uint32_t m
|
|||
int code = 0;
|
||||
|
||||
uint8_t *fdres_oer = NULL;
|
||||
|
||||
asn_enc_rval_t enc;
|
||||
|
||||
FacilitiesDataRequest_t *fdreq = calloc(1, sizeof(FacilitiesDataRequest_t));
|
||||
FacilitiesDataResult_t *fdres = calloc(1, sizeof(FacilitiesDataResult_t));
|
||||
BTPDataRequest_t *bdr = calloc(1, sizeof(BTPDataRequest_t));
|
||||
|
|
@ -158,6 +159,17 @@ static int facilities_request(facilities_t *facilities, uint8_t *msg, uint32_t m
|
|||
goto cleanup;
|
||||
}
|
||||
|
||||
// Respond to [itss]
|
||||
fdres->code = ResultCode_accepted;
|
||||
fdres_oer = malloc(16);
|
||||
enc = oer_encode_to_buffer(&asn_DEF_FacilitiesDataResult, NULL, fdres, fdres_oer, 16);
|
||||
if (enc.encoded == -1) {
|
||||
syslog_err("[facilities] failed encoding FDResult (%s)", enc.failed_type->name);
|
||||
rv = 1;
|
||||
goto cleanup;
|
||||
}
|
||||
zmq_send(facilities->responder, fdres_oer, enc.encoded, 0);
|
||||
|
||||
// Forward message to [transport]
|
||||
if (fwd) {
|
||||
bdr->btpType = BTPType_btpB;
|
||||
|
|
@ -173,7 +185,7 @@ static int facilities_request(facilities_t *facilities, uint8_t *msg, uint32_t m
|
|||
// Encode ITS message into OER
|
||||
uint8_t bdr_oer[384];
|
||||
bdr_oer[0] = 4; // [facilities] service id
|
||||
asn_enc_rval_t enc = oer_encode_to_buffer(&asn_DEF_BTPDataRequest, NULL, bdr, bdr_oer + 1, 383);
|
||||
enc = oer_encode_to_buffer(&asn_DEF_BTPDataRequest, NULL, bdr, bdr_oer + 1, 383);
|
||||
if (enc.encoded == -1) {
|
||||
syslog_err("[facilities] failed encoding BDR (%s)", enc.failed_type->name);
|
||||
rv = 1;
|
||||
|
|
|
|||
Loading…
Reference in New Issue