SCCP Emulation: Fix CC optional user data
A SCCP CC can optionally contain userData. The code so far simply
dropped any such data, and didn't pass it along in the N-CONNCET.cfm
primitive. Let's fix that.
diff --git a/SCCP_CNL113341/src/SCCP_Emulation.ttcn b/SCCP_CNL113341/src/SCCP_Emulation.ttcn
index 5e269cc..af423a5 100644
--- a/SCCP_CNL113341/src/SCCP_Emulation.ttcn
+++ b/SCCP_CNL113341/src/SCCP_Emulation.ttcn
@@ -3768,6 +3768,16 @@
log(pl_PDU_SCCP_ConnectionConfirm);
+ //Store data parameter
+ var template SCCP_PAR_UserData tl_data := omit;
+ if (ispresent(pl_PDU_SCCP_ConnectionConfirm.optionalPart))
+ {
+ if (ispresent(pl_PDU_SCCP_ConnectionConfirm.optionalPart.data))
+ {
+ tl_data := pl_PDU_SCCP_ConnectionConfirm.optionalPart.data.data;
+ }
+ }
+
//check if connection already established
if (ConnectionAlreadyEstablished(pl_PDU_SCCP_ConnectionConfirm.destLocRef))
{//startif2
@@ -3808,7 +3818,7 @@
SCCP_SP_PORT.send( t_ASP_N_CONNECT_cfm(
omit,
omit,
- omit,
+ tl_data,
vl_N_CONNECT_cfm.connectionId,
omit
));//send ASP_SCCP_N_CONNECT_confirm