NOTIFY request to be caught in default + NOTIFY response status code changed to 2000

Signed-off-by: Miguel Angel Reina Ortega's avatarreinaortega <miguelangel.reinaortega@etsi.org>
parent 536ed7d2
......@@ -1420,7 +1420,7 @@ module OneM2M_Functions {
setverdict(pass, __SCOPE__ & ":INFO: Notification received");
//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)));
tc_ac.start;
......@@ -1459,7 +1459,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)));
}
......@@ -1503,7 +1503,7 @@ module OneM2M_Functions {
setverdict(fail, __SCOPE__ & ": Number of Notification in Aggregatednotification isn't right");
}
//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)));
}
......@@ -1516,7 +1516,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)));
v_notificationsReceived := v_notificationsReceived + 1;
......@@ -1551,7 +1551,7 @@ module OneM2M_Functions {
alt {
[] mcaPortIn.receive(mw_request(mw_notifyNotification(p_notification))) -> value vc_request {
tc_ac.stop;
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)));
if(not(match(vc_request.primitive.requestPrimitive.primitiveContent.notification.subscriptionDeletion, true))) {
......@@ -2413,6 +2413,17 @@ module OneM2M_Functions {
tc_ac.start(10.0);
repeat;
}
[] mccPortIn.receive(mw_request(mw_notify)) -> value v_request {
tc_ac.stop;
log(__SCOPE__&": WARNING: Unexpected NOTIFY message received");
//Send response in any case
v_response := valueof(m_responseNotification(int2000, omit));
v_response.requestIdentifier := vc_request.primitive.requestPrimitive.requestIdentifier;
mcaPortIn.send(f_getMsgOutPrimitive(m_response(v_response)));
tc_ac.start(10.0);
repeat;
}
[] mccPortIn.receive (mw_request(?)){
log(__SCOPE__&": WARNING: Unexpected message received");
repeat;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment