diff options
author | Harald Welte <laforge@gnumonks.org> | 2012-01-31 21:28:24 +0100 |
---|---|---|
committer | Harald Welte <laforge@gnumonks.org> | 2012-01-31 21:28:24 +0100 |
commit | 77d0ee7b13fb33d27a0b6ab78787c7b08307d06b (patch) | |
tree | 94742bbd865bbc5e70c1a2bd00a8973453ee76cc | |
parent | e7540c5c33dd1b6c9d5385aebeafbf3a26a2e7dd (diff) |
CCO: properly convert InvokeID of received components
-rw-r--r-- | TCAP/src/ITU/tcap_cco_server.erl | 17 |
1 files changed, 9 insertions, 8 deletions
diff --git a/TCAP/src/ITU/tcap_cco_server.erl b/TCAP/src/ITU/tcap_cco_server.erl index 610ee76..d8d3f6a 100644 --- a/TCAP/src/ITU/tcap_cco_server.erl +++ b/TCAP/src/ITU/tcap_cco_server.erl @@ -349,7 +349,8 @@ process_rx_components(ISMs, Usap, DlgId, [Head|Tail]) -> process_rx_component(ISMs, Usap, DlgId, Head), process_rx_components(ISMs, Usap, DlgId, Tail). -process_rx_component(ISMs, Usap, DlgId, C={invoke, #'Invoke'{invokeId=InvId}}) -> +process_rx_component(ISMs, Usap, DlgId, C={invoke, #'Invoke'{}}) -> + InvId = get_invoke_id_from_comp(C), {invoke, I} = C, case I#'Invoke'.linkedId of asn1_NOVALUE -> @@ -361,8 +362,8 @@ process_rx_component(ISMs, Usap, DlgId, C={invoke, #'Invoke'{invokeId=InvId}}) - end, Prim = asn_rec_to_uprim(C, DlgId), gen_fsm:send_event(Usap, {'TC','INVOKE',indication,Prim}); -process_rx_component(ISMs, _Usap, DlgId, C={reject, #'Reject'{invokeId=InvId, - problem=Problem}}) -> +process_rx_component(ISMs, _Usap, DlgId, C={reject, #'Reject'{problem=Problem}}) -> + InvId = get_invoke_id_from_comp(C), ISM = lists:keyfind(InvId, 1, ISMs), case Problem of {invoke, _} -> @@ -392,16 +393,16 @@ add_components_to_state(State, CompNew) when is_record(CompNew, component) -> % get the invokeId from the given asn-record component tuple. get_invoke_id_from_comp({invoke, #'Invoke'{invokeId = InvId}}) -> - InvId; + inv_id_to_uprim(InvId); get_invoke_id_from_comp({returnResult, #'ReturnResult'{invokeId = InvId}}) -> - InvId; + inv_id_to_uprim(InvId); get_invoke_id_from_comp({returnResultNotLast, #'ReturnResult'{invokeId = InvId}}) -> - InvId; + inv_id_to_uprim(InvId); get_invoke_id_from_comp({returnError, #'ReturnError'{invokeId = InvId}}) -> - InvId; + inv_id_to_uprim(InvId); get_invoke_id_from_comp({reject, #'Reject'{invokeId = InvId}}) -> - InvId. + inv_id_to_uprim(InvId). |