include 'id-as-dialogue' OID in AARQ and AARE dialogue portions

This commit is contained in:
Harald Welte 2010-07-20 18:18:11 +02:00
parent 8acf717566
commit 19070cb104
1 changed files with 14 additions and 0 deletions

View File

@ -24,6 +24,7 @@
#include <osmocore/talloc.h>
#include <osmocore/msgb.h>
#include <osmocore/utils.h>
#include <asn1c/OBJECT_IDENTIFIER.h>
@ -43,6 +44,8 @@ static BIT_STRING_t dial_version1 = {
.bits_unused = 7,
};
static const uint8_t tcap_id_as_dialogue[] = { 0, 4, 0, 0, 1, 0, 1, 3 };
/* Extract the Application Context Name and User Info from a DialoguePDU */
static int extract_appctx_uinfo(OBJECT_IDENTIFIER_t **app_ctx_name, struct user_information **user_info,
struct DialoguePDU *dial_pdu)
@ -150,6 +153,11 @@ int tcap_csl_tc_begin_req(struct tcap_dialogue *td, OBJECT_IDENTIFIER_t *app_ctx
dial = talloc_zero(ext, DialoguePDU_t);
dial->present = DialoguePDU_PR_dialogueRequest;
OBJECT_IDENTIFIER_set_arcs(&ext->oid,
&tcap_id_as_dialogue,
sizeof(tcap_id_as_dialogue[0]),
ARRAY_SIZE(tcap_id_as_dialogue));
aarq = &dial->choice.dialogueRequest;
if (user_info)
aarq->user_information = user_info;
@ -329,6 +337,12 @@ static ANY_t *gen_ext_AARE(struct tcap_dialogue *td, OBJECT_IDENTIFIER_t *app_ct
dial = talloc_zero(ext, DialoguePDU_t);
dial->present = DialoguePDU_PR_dialogueResponse;
OBJECT_IDENTIFIER_set_arcs(&ext->oid,
&tcap_id_as_dialogue,
sizeof(tcap_id_as_dialogue[0]),
ARRAY_SIZE(tcap_id_as_dialogue));
aare = &dial->choice.dialogueResponse;
/* Set protocol version 1 */
aare->protocol_version = &dial_version1;