implement TC-U-CANCEL.req
This commit is contained in:
parent
fead1fffd4
commit
e7c849d4f0
|
@ -122,6 +122,20 @@ int tcap_cha_tc_invoke_req(struct tcap_dialogue *td, uint8_t op_class, int8_t in
|
|||
}
|
||||
|
||||
/* TC-U-CANCEL.req (TCU -> CHA) */
|
||||
int tcap_cha_tc_cancel_req(struct tcap_dialogue *td, int8_t inv_id)
|
||||
{
|
||||
struct tcap_invocation *ti = tcap_ism_lookup(td, inv_id);
|
||||
|
||||
if (!ti || ti->state != TCAP_IS_IDLE)
|
||||
return -EINVAL;
|
||||
|
||||
/* FIXME: Iterate over Component list of this dialogue
|
||||
* and evict any INVOKE component */
|
||||
|
||||
tcap_ism_terminate(ti);
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
/* Dialogue Terminated (CHA <- DHA) */
|
||||
int tcap_cha_dialg_term(struct tcap_dialogue *td)
|
||||
|
|
|
@ -151,9 +151,12 @@ int tcap_cha_tc_u_error_req(struct tcap_dialogue *td, int8_t inv_id,
|
|||
/* Dialogue Terminated (CHA <- DHA) */
|
||||
int tcap_cha_dialg_term(struct tcap_dialogue *td);
|
||||
|
||||
/* TC-U-CANCEL.req (TCU -> CHA) */
|
||||
int tcap_cha_tc_cancel_req(struct tcap_dialogue *td, int8_t inv_id);
|
||||
|
||||
/* TC-RESULT-NL / TC-RESULT-L req (TCL -> CHA) */
|
||||
int tcap_cha_tc_result_l_req(struct tcap_dialogue *td, int8_t inv_id, int last,
|
||||
struct OPERATION *op, uint8_t *param, uint32_t param_len);
|
||||
int tcap_cha_tc_result_req(struct tcap_dialogue *td, int8_t inv_id, int last,
|
||||
struct OPERATION *op, uint8_t *param, uint32_t param_len);
|
||||
|
||||
/* TC-U-REJECT.req (TCU -> CHA) */
|
||||
int tcap_cha_tc_u_rej_req(struct tcap_dialogue *td, int8_t *invoke_id,
|
||||
|
|
|
@ -387,7 +387,7 @@ LIB_EXPORTED int tcap_user_req_comp(enum tcap_primitive prim, struct tcap_compon
|
|||
case TCAP_PR_TC_RESULT_L:
|
||||
op = generate_op(td, tcci);
|
||||
rc = tcap_cha_tc_result_req(td, tcci->invoke_id, 1, op,
|
||||
&tcci->parameter.data, tcci->parameter.data_len);
|
||||
tcci->parameter.data, tcci->parameter.data_len);
|
||||
break;
|
||||
case TCAP_PR_TC_RESULT_NL:
|
||||
op = generate_op(td, tcci);
|
||||
|
@ -403,6 +403,8 @@ LIB_EXPORTED int tcap_user_req_comp(enum tcap_primitive prim, struct tcap_compon
|
|||
tcci->reject.problem_code);
|
||||
break;
|
||||
case TCAP_PR_TC_CANCEL:
|
||||
rc = tcap_cha_tc_cancel_req(td, tcci->invoke_id);
|
||||
break;
|
||||
case TCAP_PR_TC_TIMER_RESET:
|
||||
default:
|
||||
fprintf(stderr, "unsupported dialogue primitive %s\n", tcap_prim_name(prim));
|
||||
|
|
Loading…
Reference in New Issue