IPL4 init with HTTP msg length getter function
Change-Id: I0aa67693f52c9b0e0b6acfcc36d8b5329fdd3733
Signed-off-by: Balazs Barcsik <balazs.barcsik@gmail.com>
diff --git a/src/DsRestAPI/EPTF_CLL_DsRestAPI.tpd b/src/DsRestAPI/EPTF_CLL_DsRestAPI.tpd
index 6fd99eb..b94e887 100644
--- a/src/DsRestAPI/EPTF_CLL_DsRestAPI.tpd
+++ b/src/DsRestAPI/EPTF_CLL_DsRestAPI.tpd
@@ -14,6 +14,7 @@
<ReferencedProject name="EPTF_CLL_DataSource" projectLocationURI="../DataSource/EPTF_CLL_DataSource.tpd"/>
<ReferencedProject name="IPL4asp_CNL113531" projectLocationURI="../../../../TestPorts/IPL4asp_CNL113531/IPL4asp_CNL113531.tpd"/>
<ReferencedProject name="TCCUsefulFunctions_CNL113472_Common" projectLocationURI="../../../TCCUsefulFunctions_CNL113472/TCCUsefulFunctions_CNL113472_Common.tpd"/>
+ <ReferencedProject name="HTTPmsg_CNL113312" projectLocationURI="../../../../TestPorts/HTTPmsg_CNL113312/HTTPmsg_CNL113312.tpd"/>
</ReferencedProjects>
<Files>
<FileResource projectRelativePath="EPTF_CLL_DsRestAPI_Definitions.ttcn" relativeURI="EPTF_CLL_DsRestAPI_Definitions.ttcn"/>
diff --git a/src/DsRestAPI/EPTF_CLL_DsRestAPI_Dep.grp b/src/DsRestAPI/EPTF_CLL_DsRestAPI_Dep.grp
index 3c09d3e..becdc84 100644
--- a/src/DsRestAPI/EPTF_CLL_DsRestAPI_Dep.grp
+++ b/src/DsRestAPI/EPTF_CLL_DsRestAPI_Dep.grp
@@ -1,4 +1,4 @@
-<!--
+<!--
///////////////////////////////////////////////////////////////////////////////
// //
// Copyright (c) 2000-2018 Ericsson Telecom AB //
@@ -6,7 +6,7 @@
// All rights reserved. This program and the accompanying materials //
// are made available under the terms of the Eclipse Public License v2.0 //
// which accompanies this distribution, and is available at //
-// https://www.eclipse.org/org/documents/epl-2.0/EPL-2.0.html //
+// https://www.eclipse.org/org/documents/epl-2.0/EPL-2.0.html //
// //
///////////////////////////////////////////////////////////////////////////////
-->
@@ -18,5 +18,14 @@
<File_Group path="../Common/EPTF_CLL_Common_Dep.grp" />
<File_Group path="../Variable/EPTF_CLL_Variable_Dep.grp" />
<File_Group path="../DataSource/EPTF_CLL_DataSource_Dep.grp" />
+ <File_Group name="HTTPmsg_CNL113312" >
+ <File path="../../../../TestPorts/HTTPmsg_CNL113312/src/HTTPmsg_MessageLen.ttcn"/>
+ <File path="../../../../TestPorts/HTTPmsg_CNL113312/src/HTTPmsg_MessageLen_Function.cc"/>
+ <File path="../../../../TestPorts/HTTPmsg_CNL113312/src/HTTPmsg_PT.cc"/>
+ <File path="../../../../TestPorts/HTTPmsg_CNL113312/src/HTTPmsg_PT.hh"/>
+ <File path="../../../../TestPorts/HTTPmsg_CNL113312/src/HTTPmsg_PortType.ttcn"/>
+ <File path="../../../../TestPorts/HTTPmsg_CNL113312/src/HTTPmsg_Types.ttcn"/>
+ </File_Group>
+ <File_Group path="../../../../TestPorts/Common_Components/Abstract_Socket_CNL113384/src/Abstract_Socket.grp"/>
</File_Group>
</FileGroup>
diff --git a/src/DsRestAPI/EPTF_CLL_DsRestAPI_HTTPServer_Functions.ttcn b/src/DsRestAPI/EPTF_CLL_DsRestAPI_HTTPServer_Functions.ttcn
index 2ce96e6..a1bb152 100644
--- a/src/DsRestAPI/EPTF_CLL_DsRestAPI_HTTPServer_Functions.ttcn
+++ b/src/DsRestAPI/EPTF_CLL_DsRestAPI_HTTPServer_Functions.ttcn
@@ -26,6 +26,7 @@
// <EPTF_CLL_FBQ_Functions>
// <EPTF_CLL_Common_Definitions>
// <EPTF_CLL_Common_Functions>
+// <HTTPmsg_MessageLen>
//
// Current Owner:
// Tamas Kis (ekistam)
@@ -54,6 +55,7 @@
import from EPTF_CLL_FBQ_Functions all;
import from EPTF_CLL_Common_Definitions all;
import from EPTF_CLL_Common_Functions all;
+import from HTTPmsg_MessageLen all;
friend module EPTF_CLL_DsRestAPI_Functions;
@@ -74,6 +76,8 @@
v_EPTF_DsRestAPI_HTTPServer_directory := "";
v_EPTF_DsRestAPI_HTTPServer_path := "";
map(self:v_DsRestAPI_HTTPServer_IPL4_PCO_PT, system:v_DsRestAPI_HTTPServer_IPL4_PCO_PT);
+ var f_IPL4_getMsgLen v_getMsg_Func := refers(f_EPTF_DsRestAPI_HTTPServer_GetMsgLen);
+ f_IPL4_setGetMsgLen(v_DsRestAPI_HTTPServer_IPL4_PCO_PT,-1, v_getMsg_Func, {});
t_bufferTimer.start;
v_DsRestAPI_HTTPServer_mainHandler := activate(as_EPTF_DsRestAPI_HTTPServer_mainHandler());
v_DsRestAPI_HTTPServer_initialized := true;
@@ -132,6 +136,13 @@
}
}
+ private function f_EPTF_DsRestAPI_HTTPServer_GetMsgLen(
+ in octetstring stream,
+ inout ro_integer args)
+ return integer {
+ return f_HTTPMessage_len(stream);
+ };
+
private function f_EPTF_DsRestAPI_HTTPServer_getExtension(in charstring pl_inputStr) return charstring {
var integer vl_extensionStarts := -1;
var integer vl_searchOffset := 0;