summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorHarald Welte <laforge@gnumonks.org>2013-06-24 14:40:19 +0200
committerHarald Welte <laforge@gnumonks.org>2013-06-24 14:40:19 +0200
commitcb55abc0f792613a3e2f684bb043a9f78828ff75 (patch)
tree92c204d58530729bc7ee19a697ebf7e6c88fa0c9
parent8d321888966f7fb4068d850b556bcb45d835e4de (diff)
TCAP CCO: Handle case where ReturnResult.result is asn1_NOVALUE
-rw-r--r--TCAP/src/ITU/tcap_cco_server.erl16
1 files changed, 14 insertions, 2 deletions
diff --git a/TCAP/src/ITU/tcap_cco_server.erl b/TCAP/src/ITU/tcap_cco_server.erl
index 13732c0..ee93a5a 100644
--- a/TCAP/src/ITU/tcap_cco_server.erl
+++ b/TCAP/src/ITU/tcap_cco_server.erl
@@ -319,14 +319,26 @@ asn_rec_to_uprim({invoke, AsnRec}, DlgId, Last) when is_record(AsnRec, 'Invoke')
parameters = AsnRec#'Invoke'.argument,
lastComponent = Last};
asn_rec_to_uprim({returnResultNotLast, AsnRec}, DlgId, Last) when is_record(AsnRec, 'ReturnResult') ->
- #'ReturnResult_result'{opcode = Op, result = Result} = AsnRec#'ReturnResult'.result,
+ case AsnRec#'ReturnResult'.result of
+ #'ReturnResult_result'{opcode = Op, result = Result} ->
+ ok;
+ asn1_NOVALUE ->
+ Op = undefined,
+ Result = undefined
+ end,
#'TC-RESULT-NL'{dialogueID = DlgId,
invokeID = inv_id_to_uprim(AsnRec#'ReturnResult'.invokeId),
operation = Op,
parameters = Result,
lastComponent = Last};
asn_rec_to_uprim({returnResult, AsnRec}, DlgId, Last) when is_record(AsnRec, 'ReturnResult') ->
- #'ReturnResult_result'{opcode = Op, result = Result} = AsnRec#'ReturnResult'.result,
+ case AsnRec#'ReturnResult'.result of
+ #'ReturnResult_result'{opcode = Op, result = Result} ->
+ ok;
+ asn1_NOVALUE ->
+ Op = undefined,
+ Result = undefined
+ end,
#'TC-RESULT-L'{dialogueID = DlgId,
invokeID = inv_id_to_uprim(AsnRec#'ReturnResult'.invokeId),
operation = Op,