HTTP_Server::close() added

Signed-off-by: eantwuh <antal.wu-hen-chang@ericsson.com>
diff --git a/IFW_CoAP_Peer_Definitions.ttcn b/IFW_CoAP_Peer_Definitions.ttcn
index e5f9d96..502cb26 100644
--- a/IFW_CoAP_Peer_Definitions.ttcn
+++ b/IFW_CoAP_Peer_Definitions.ttcn
@@ -1,6 +1,6 @@
 ///////////////////////////////////////////////////////////////////////////////
 //
-// Copyright (c) 2000-2019 Ericsson Telecom AB
+// Copyright (c) 2000-2020 Ericsson Telecom AB
 //
 // All rights reserved. This program and the accompanying materials
 // are made available under the terms of the Eclipse Public License v2.0
diff --git a/IFW_CoAP_Peer_Functions.ttcn b/IFW_CoAP_Peer_Functions.ttcn
index e7aacfb..591f6c4 100644
--- a/IFW_CoAP_Peer_Functions.ttcn
+++ b/IFW_CoAP_Peer_Functions.ttcn
@@ -1,6 +1,6 @@
 ///////////////////////////////////////////////////////////////////////////////
 //
-// Copyright (c) 2000-2019 Ericsson Telecom AB
+// Copyright (c) 2000-2020 Ericsson Telecom AB
 //
 // All rights reserved. This program and the accompanying materials
 // are made available under the terms of the Eclipse Public License v2.0
diff --git a/IFW_CoAP_Peer_TestSteps.ttcn b/IFW_CoAP_Peer_TestSteps.ttcn
index c4ec66f..29e9173 100644
--- a/IFW_CoAP_Peer_TestSteps.ttcn
+++ b/IFW_CoAP_Peer_TestSteps.ttcn
@@ -1,6 +1,6 @@
 ///////////////////////////////////////////////////////////////////////////////
 //
-// Copyright (c) 2000-2019 Ericsson Telecom AB
+// Copyright (c) 2000-2020 Ericsson Telecom AB
 //
 // All rights reserved. This program and the accompanying materials
 // are made available under the terms of the Eclipse Public License v2.0
diff --git a/IFW_Common.ttcn b/IFW_Common.ttcn
index 5fa932a..c6288c4 100644
--- a/IFW_Common.ttcn
+++ b/IFW_Common.ttcn
@@ -1,6 +1,6 @@
 ///////////////////////////////////////////////////////////////////////////////
 //
-// Copyright (c) 2000-2019 Ericsson Telecom AB
+// Copyright (c) 2000-2020 Ericsson Telecom AB
 //
 // All rights reserved. This program and the accompanying materials
 // are made available under the terms of the Eclipse Public License v1.0
diff --git a/IFW_HTTP_Client_Definitions.ttcn b/IFW_HTTP_Client_Definitions.ttcn
index 06f7525..e56cc5d 100644
--- a/IFW_HTTP_Client_Definitions.ttcn
+++ b/IFW_HTTP_Client_Definitions.ttcn
@@ -1,6 +1,6 @@
 ///////////////////////////////////////////////////////////////////////////////
 //
-// Copyright (c) 2000-2019 Ericsson Telecom AB
+// Copyright (c) 2000-2020 Ericsson Telecom AB
 //
 // All rights reserved. This program and the accompanying materials
 // are made available under the terms of the Eclipse Public License v2.0
diff --git a/IFW_HTTP_Client_Functions.ttcn b/IFW_HTTP_Client_Functions.ttcn
index 0045d6a..d95ea4a 100644
--- a/IFW_HTTP_Client_Functions.ttcn
+++ b/IFW_HTTP_Client_Functions.ttcn
@@ -1,6 +1,6 @@
 ///////////////////////////////////////////////////////////////////////////////
 //
-// Copyright (c) 2000-2019 Ericsson Telecom AB
+// Copyright (c) 2000-2020 Ericsson Telecom AB
 //
 // All rights reserved. This program and the accompanying materials
 // are made available under the terms of the Eclipse Public License v2.0
diff --git a/IFW_HTTP_Client_TestSteps.ttcn b/IFW_HTTP_Client_TestSteps.ttcn
index 9da55e3..b2d6d43 100644
--- a/IFW_HTTP_Client_TestSteps.ttcn
+++ b/IFW_HTTP_Client_TestSteps.ttcn
@@ -1,6 +1,6 @@
 ///////////////////////////////////////////////////////////////////////////////
 //
-// Copyright (c) 2000-2019 Ericsson Telecom AB
+// Copyright (c) 2000-2020 Ericsson Telecom AB
 //
 // All rights reserved. This program and the accompanying materials
 // are made available under the terms of the Eclipse Public License v2.0
diff --git a/IFW_HTTP_Server_Definitions.ttcn b/IFW_HTTP_Server_Definitions.ttcn
index 4222ce1..5da2ff3 100644
--- a/IFW_HTTP_Server_Definitions.ttcn
+++ b/IFW_HTTP_Server_Definitions.ttcn
@@ -1,6 +1,6 @@
 ///////////////////////////////////////////////////////////////////////////////
 //
-// Copyright (c) 2000-2019 Ericsson Telecom AB
+// Copyright (c) 2000-2020 Ericsson Telecom AB
 //
 // All rights reserved. This program and the accompanying materials
 // are made available under the terms of the Eclipse Public License v2.0
@@ -11,7 +11,7 @@
 //  Description:
 //  Rev:                <RnXnn>
 //  Prodnr:             CNL 113 910
-//  Updated:            2020-02-06
+//  Updated:            2020-03-06
 //  Contact:            http://ttcn.ericsson.se
 ///////////////////////////////////////////////////////////////////////////////
 module IFW_HTTP_Server_Definitions
diff --git a/IFW_HTTP_Server_Functions.ttcn b/IFW_HTTP_Server_Functions.ttcn
index d6f6e4d..df186e3 100644
--- a/IFW_HTTP_Server_Functions.ttcn
+++ b/IFW_HTTP_Server_Functions.ttcn
@@ -1,6 +1,6 @@
 ///////////////////////////////////////////////////////////////////////////////
 //
-// Copyright (c) 2000-2019 Ericsson Telecom AB
+// Copyright (c) 2000-2020 Ericsson Telecom AB
 //
 // All rights reserved. This program and the accompanying materials
 // are made available under the terms of the Eclipse Public License v2.0
@@ -11,7 +11,7 @@
 //  Description:
 //  Rev:                <RnXnn>
 //  Prodnr:             CNL 113 910
-//  Updated:            2020-02-06
+//  Updated:            2020-03-06
 //  Contact:            http://ttcn.ericsson.se
 ///////////////////////////////////////////////////////////////////////////////
 module IFW_HTTP_Server_Functions
@@ -141,6 +141,21 @@
 
     log("CHECK: return true");
     return true;
+  }	
+
+  function f_HTTP_Server_close() runs on IFW_HTTP_Server_CT
+  {
+    log(%definitionId, " started");
+    var Result vl_result;
+
+    log("Closing connection");
+    if (ctx.serverConnId >= 0)
+    {
+      vl_result := f_IPL4_close(IPL4_PCO, ctx.serverConnId, {tcp := {}});
+      //f_checkResult(vl_result);		  
+    }
+
+    log(%definitionId, " finished");
   }
 	
   function f_HTTP_Server_getMessageLength(in octetstring stream, inout ro_integer args)
diff --git a/IFW_HTTP_Server_TestSteps.ttcn b/IFW_HTTP_Server_TestSteps.ttcn
index 5b51502..b6c0e80 100644
--- a/IFW_HTTP_Server_TestSteps.ttcn
+++ b/IFW_HTTP_Server_TestSteps.ttcn
@@ -1,6 +1,6 @@
 ///////////////////////////////////////////////////////////////////////////////
 //
-// Copyright (c) 2000-2019 Ericsson Telecom AB
+// Copyright (c) 2000-2020 Ericsson Telecom AB
 //
 // All rights reserved. This program and the accompanying materials
 // are made available under the terms of the Eclipse Public License v2.0
@@ -11,7 +11,7 @@
 //  Description:
 //  Rev:                <RnXnn>
 //  Prodnr:             CNL 113 910
-//  Updated:            2020-02-06
+//  Updated:            2020-03-06
 //  Contact:            http://ttcn.ericsson.se
 ///////////////////////////////////////////////////////////////////////////////
 module IFW_HTTP_Server_TestSteps 
@@ -126,5 +126,18 @@
     v_server.done(ReturnBoolean:?) -> value v_ret; 
 
     return v_ret;
-  }	
+  }
+	
+  function f_IFW_HttpServer_close(in integer p_serverIdx) runs on IFW_MAIN_CT
+  return boolean
+  {
+    var IFW_HTTP_Server_CT v_server := httpServers[p_serverIdx];
+    if (v_server == null) { log("IFW: No http server found"); return false; }
+    f_isRunningGuard(v_server);
+
+    v_server.start(f_HTTP_Server_close());
+    v_server.done;
+
+    return true;	  
+  }
 }
diff --git a/IFW_MQTT_Client_Definitions.ttcn b/IFW_MQTT_Client_Definitions.ttcn
index f2097b0..2ab4ed5 100644
--- a/IFW_MQTT_Client_Definitions.ttcn
+++ b/IFW_MQTT_Client_Definitions.ttcn
@@ -1,6 +1,6 @@
 ///////////////////////////////////////////////////////////////////////////////
 //
-// Copyright (c) 2000-2019 Ericsson Telecom AB
+// Copyright (c) 2000-2020 Ericsson Telecom AB
 //
 // All rights reserved. This program and the accompanying materials
 // are made available under the terms of the Eclipse Public License v2.0
diff --git a/IFW_MQTT_Client_Functions.ttcn b/IFW_MQTT_Client_Functions.ttcn
index b43b702..fd09f5d 100644
--- a/IFW_MQTT_Client_Functions.ttcn
+++ b/IFW_MQTT_Client_Functions.ttcn
@@ -1,6 +1,6 @@
 ///////////////////////////////////////////////////////////////////////////////
 //
-// Copyright (c) 2000-2019 Ericsson Telecom AB
+// Copyright (c) 2000-2020 Ericsson Telecom AB
 //
 // All rights reserved. This program and the accompanying materials
 // are made available under the terms of the Eclipse Public License v2.0
diff --git a/IFW_MQTT_Client_TestSteps.ttcn b/IFW_MQTT_Client_TestSteps.ttcn
index d23485a..3513457 100644
--- a/IFW_MQTT_Client_TestSteps.ttcn
+++ b/IFW_MQTT_Client_TestSteps.ttcn
@@ -1,6 +1,6 @@
 ///////////////////////////////////////////////////////////////////////////////
 //
-// Copyright (c) 2000-2019 Ericsson Telecom AB
+// Copyright (c) 2000-2020 Ericsson Telecom AB
 //
 // All rights reserved. This program and the accompanying materials
 // are made available under the terms of the Eclipse Public License v2.0
diff --git a/IoT_FT_Framework_Definitions.ttcn b/IoT_FT_Framework_Definitions.ttcn
index 910a74e..6445e36 100644
--- a/IoT_FT_Framework_Definitions.ttcn
+++ b/IoT_FT_Framework_Definitions.ttcn
@@ -1,6 +1,6 @@
 ///////////////////////////////////////////////////////////////////////////////
 //
-// Copyright (c) 2000-2019 Ericsson Telecom AB
+// Copyright (c) 2000-2020 Ericsson Telecom AB
 //
 // All rights reserved. This program and the accompanying materials
 // are made available under the terms of the Eclipse Public License v2.0
diff --git a/IoT_FT_Framework_Functions.ttcn b/IoT_FT_Framework_Functions.ttcn
index e81d578..02681da 100644
--- a/IoT_FT_Framework_Functions.ttcn
+++ b/IoT_FT_Framework_Functions.ttcn
@@ -1,6 +1,6 @@
 ///////////////////////////////////////////////////////////////////////////////
 //
-// Copyright (c) 2000-2019 Ericsson Telecom AB
+// Copyright (c) 2000-2020 Ericsson Telecom AB
 //
 // All rights reserved. This program and the accompanying materials
 // are made available under the terms of the Eclipse Public License v2.0
diff --git a/IoT_Functiontest_Framework.tpd b/IoT_Functiontest_Framework.tpd
index bc7b688..92a4fbe 100644
--- a/IoT_Functiontest_Framework.tpd
+++ b/IoT_Functiontest_Framework.tpd
@@ -1,7 +1,7 @@
 <?xml version="1.0" encoding="UTF-8"?>
 <TITAN_Project_File_Information version="1.0">
 <!--
- Copyright (c) 2000-2019 Ericsson Telecom AB
+ Copyright (c) 2000-2020 Ericsson Telecom AB
  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
diff --git a/tests/CoapTestSuite_Etsi.ttcn b/tests/CoapTestSuite_Etsi.ttcn
index 51b829a..b148a6b 100644
--- a/tests/CoapTestSuite_Etsi.ttcn
+++ b/tests/CoapTestSuite_Etsi.ttcn
@@ -1,6 +1,6 @@
 ///////////////////////////////////////////////////////////////////////////////
 //
-// Copyright (c) 2000-2019 Ericsson Telecom AB
+// Copyright (c) 2000-2020 Ericsson Telecom AB
 //
 // All rights reserved. This program and the accompanying materials
 // are made available under the terms of the Eclipse Public License v2.0
diff --git a/tests/CoapTestSuite_Fw.ttcn b/tests/CoapTestSuite_Fw.ttcn
index b6ab518..45936a4 100644
--- a/tests/CoapTestSuite_Fw.ttcn
+++ b/tests/CoapTestSuite_Fw.ttcn
@@ -1,6 +1,6 @@
 ///////////////////////////////////////////////////////////////////////////////
 //
-// Copyright (c) 2000-2019 Ericsson Telecom AB
+// Copyright (c) 2000-2020 Ericsson Telecom AB
 //
 // All rights reserved. This program and the accompanying materials
 // are made available under the terms of the Eclipse Public License v2.0
diff --git a/tests/LeshanTestSuite.ttcn b/tests/LeshanTestSuite.ttcn
index ad02cb7..adf6e0a 100644
--- a/tests/LeshanTestSuite.ttcn
+++ b/tests/LeshanTestSuite.ttcn
@@ -1,6 +1,6 @@
 ///////////////////////////////////////////////////////////////////////////////
 //
-// Copyright (c) 2000-2019 Ericsson Telecom AB
+// Copyright (c) 2000-2020 Ericsson Telecom AB
 //
 // All rights reserved. This program and the accompanying materials
 // are made available under the terms of the Eclipse Public License v2.0
diff --git a/tests/Lwm2mTestSuite.ttcn b/tests/Lwm2mTestSuite.ttcn
index c908a98..b16fe19 100644
--- a/tests/Lwm2mTestSuite.ttcn
+++ b/tests/Lwm2mTestSuite.ttcn
@@ -1,6 +1,6 @@
 ///////////////////////////////////////////////////////////////////////////////
 //
-// Copyright (c) 2000-2019 Ericsson Telecom AB
+// Copyright (c) 2000-2020 Ericsson Telecom AB
 //
 // All rights reserved. This program and the accompanying materials
 // are made available under the terms of the Eclipse Public License v2.0
@@ -323,33 +323,9 @@
 	  }
 	}
 	
-	testcase tc_json_encdec() runs on IFW_MAIN_CT
-    {
-      log("data: ",t_res);
-    
-      var octetstring v_encoded := f_enc_LwM2M_JSON_Resources(valueof(t_res));
-    
-      log("encoded: ", oct2char(v_encoded), "\n", v_encoded);
-      
-      var LwM2M_JSON_Resources v_decoded := f_dec_LwM2M_JSON_Resources(v_encoded);
-      
-      if (match(v_decoded, t_res)) { setverdict(pass)}
-      else { setverdict(fail) }
-    }
-  
-    template LwM2M_JSON_Resources t_res :=
-    {
-      e := {
-        { n := "0", sv := "sg" },
-        { n := "7/1", bv := true },
-        { n := "11", v := 4.0 }
-      }
-    }
-	
 	control
 	{
 	  execute(tc_client_LightweightM2M_10_int_101_102_103_regdereg());
 	  execute(tc_client_LightweightM2M_10_int_101_102_103_regdereg_lwm2mPDU());
-	  execute(tc_json_encdec());
 	}
 }
diff --git a/tests/MqttTestSuite_Interop.ttcn b/tests/MqttTestSuite_Interop.ttcn
index b3ea348..788a753 100644
--- a/tests/MqttTestSuite_Interop.ttcn
+++ b/tests/MqttTestSuite_Interop.ttcn
@@ -1,6 +1,6 @@
 ///////////////////////////////////////////////////////////////////////////////
 //
-// Copyright (c) 2000-2019 Ericsson Telecom AB
+// Copyright (c) 2000-2020 Ericsson Telecom AB
 //
 // All rights reserved. This program and the accompanying materials
 // are made available under the terms of the Eclipse Public License v2.0