forked from erlang/signerl
CCO: TCAP 'Invoke' parameters are not OPTIONAL
... so we cannot feed asn1_NOVALUE into the encoder, but have to pass an empty list instead. sigh.
This commit is contained in:
parent
f319881540
commit
0637b91934
|
@ -277,12 +277,19 @@ terminate_ISMs([{_Id, ISM}|Tail]) ->
|
||||||
gen_fsm:send_event(ISM, terminate),
|
gen_fsm:send_event(ISM, terminate),
|
||||||
terminate_ISMs(Tail).
|
terminate_ISMs(Tail).
|
||||||
|
|
||||||
|
undef2empty(undefined) ->
|
||||||
|
[];
|
||||||
|
undef2empty(asn1_NOVALUE) ->
|
||||||
|
[];
|
||||||
|
undef2empty(Foo) ->
|
||||||
|
Foo.
|
||||||
|
|
||||||
% Convert from user-visible primitive records to asn1ct-generated record
|
% Convert from user-visible primitive records to asn1ct-generated record
|
||||||
uprim_to_asn_rec(Uprim) when is_record(Uprim, 'TC-INVOKE') ->
|
uprim_to_asn_rec(Uprim) when is_record(Uprim, 'TC-INVOKE') ->
|
||||||
{invoke, #'Invoke'{invokeId = inv_id_to_asn_rec(Uprim#'TC-INVOKE'.invokeID),
|
{invoke, #'Invoke'{invokeId = inv_id_to_asn_rec(Uprim#'TC-INVOKE'.invokeID),
|
||||||
linkedId = inv_id_to_asn_rec(Uprim#'TC-INVOKE'.linkedID),
|
linkedId = inv_id_to_asn_rec(Uprim#'TC-INVOKE'.linkedID),
|
||||||
opcode = osmo_util:asn_val(Uprim#'TC-INVOKE'.operation),
|
opcode = osmo_util:asn_val(Uprim#'TC-INVOKE'.operation),
|
||||||
argument = osmo_util:asn_val(Uprim#'TC-INVOKE'.parameters)}};
|
argument = undef2empty(Uprim#'TC-INVOKE'.parameters)}};
|
||||||
uprim_to_asn_rec(#'TC-RESULT-NL'{invokeID = InvId, operation = Op,
|
uprim_to_asn_rec(#'TC-RESULT-NL'{invokeID = InvId, operation = Op,
|
||||||
parameters = Params}) ->
|
parameters = Params}) ->
|
||||||
ResRes = #'ReturnResult_result'{opcode = osmo_util:asn_val(Op),
|
ResRes = #'ReturnResult_result'{opcode = osmo_util:asn_val(Op),
|
||||||
|
|
Loading…
Reference in New Issue