From a446476f4b5b37bb97ad2cd28aa2533a4548efb1 Mon Sep 17 00:00:00 2001
From: reinaortega <miguelangel.reinaortega@etsi.org>
Date: Mon, 16 Jul 2018 15:08:24 +0200
Subject: [PATCH] Notification response should use RSC = 2000 instead of 2001

Signed-off-by: reinaortega <miguelangel.reinaortega@etsi.org>
---
 LibOneM2M/OneM2M_Functions.ttcn | 11 +++++------
 1 file changed, 5 insertions(+), 6 deletions(-)

diff --git a/LibOneM2M/OneM2M_Functions.ttcn b/LibOneM2M/OneM2M_Functions.ttcn
index dbf69af..ab6ac43 100644
--- a/LibOneM2M/OneM2M_Functions.ttcn
+++ b/LibOneM2M/OneM2M_Functions.ttcn
@@ -1736,7 +1736,7 @@ module OneM2M_Functions {
 								setverdict(fail, __SCOPE__ & ":ERROR: Notification received but the content doesn't match");
 							}
 							//Send response in any case
-							v_responsePrimitive := valueof(m_responseNotification(int2001, omit));
+							v_responsePrimitive := valueof(m_responseNotification(int2000, omit));
 							v_responsePrimitive.requestIdentifier := vc_request.primitive.requestPrimitive.requestIdentifier;
 							mcaPortIn.send(f_getMsgOutPrimitive(m_response(v_responsePrimitive)));
 						}
@@ -1768,14 +1768,14 @@ module OneM2M_Functions {
 						[] mcaPortIn.receive(mw_request(mw_notifyResponsePrimitive(p_responsePrimitive))) -> value vc_request {
 							tc_ac.stop;
 							setverdict(pass, __SCOPE__ & ":INFO: Notification received with the expected content");
-							v_responsePrimitive := valueof(m_responseNotification(int2001, omit));
+							v_responsePrimitive := valueof(m_responseNotification(int2000, omit));
 							v_responsePrimitive.requestIdentifier := vc_request.primitive.requestPrimitive.requestIdentifier;
 							mcaPortIn.send(f_getMsgOutPrimitive(m_response(v_responsePrimitive)));
 						}
 						[] mcaPortIn.receive(mw_request(mw_notifyResponsePrimitive(?))) -> value vc_request {
 							tc_ac.stop;
 							setverdict(fail, __SCOPE__ & ":ERROR: Notification received but the content doesn't match");
-							v_responsePrimitive := valueof(m_responseNotification(int2001, omit));
+							v_responsePrimitive := valueof(m_responseNotification(int2000, omit));
 							v_responsePrimitive.requestIdentifier := vc_request.primitive.requestPrimitive.requestIdentifier;
 							mcaPortIn.send(f_getMsgOutPrimitive(m_response(v_responsePrimitive)));
 						}
@@ -1911,13 +1911,12 @@ module OneM2M_Functions {
 				 */
 				 function f_cse_notifyProcedure_notify(template RequestPrimitive p_requestPrimitive) runs on CseSimu {
 					// Local variables
-					var RequestPrimitive v_request;
 					var ResponsePrimitive v_responsePrimitive;
 					var integer v_resourceIndex := -1;
 				
-					v_request.from_ := PX_CSE1_ID;
+					p_requestPrimitive.from_ := PX_CSE1_ID;
 					
-					mccPort.send(f_getMsgOutPrimitive(m_request(v_request)));
+					mccPort.send(f_getMsgOutPrimitive(m_request(valueof(p_requestPrimitive))));
 					tc_ac.start;
 					alt {
 						[] mccPort.receive(mw_response(mw_responsePrimitive(int2000, mw_primitiveContentNotification(mw_contentNotification_any)))) -> value vc_response {
-- 
GitLab