make sure TC-END.req TCMessage contains destination trans_id

This commit is contained in:
Harald Welte 2010-07-20 12:22:50 +02:00
parent 48ac4af172
commit 933af61ba5
1 changed files with 7 additions and 0 deletions

View File

@ -410,6 +410,7 @@ int tcap_csl_tc_end_req(struct tcap_dialogue *td, OBJECT_IDENTIFIER_t *app_ctx,
struct TCMessage tcm;
ANY_t *any = NULL;
int rc = 0;
uint32_t trans_id;
memset(&tcm, 0, sizeof(tcm));
tcm.present = TCMessage_PR_end;
@ -448,6 +449,12 @@ int tcap_csl_tc_end_req(struct tcap_dialogue *td, OBJECT_IDENTIFIER_t *app_ctx,
/* Process components */
/* Assemble TLS user data */
tcm.choice.end.components = tcap_cha_req_components(td);
/* Assign remote transaction ID */
trans_id = htonl(td->trans.tid_remote);
OCTET_STRING_fromBuf(&tcm.choice.end.dtid,
(const char *) &trans_id, sizeof(trans_id));
/* TR-END.req to TSL */
rc = tcap_tco_tr_end_req(&td->trans, &tcm);
asn_DEF_ANY.free_struct(&asn_DEF_ANY, any, 0);