Skip to content
Snippets Groups Projects
Commit 02d6bd74 authored by Miguel Angel Reina Ortega's avatar Miguel Angel Reina Ortega
Browse files

Merge branch 'fix/checkvalue_f_check_notificationContent_2' into 'Release1'

fix for accessing not present values in f_check_notificationContent



See merge request !34
parents 5935e347 a35ea640
No related branches found
No related tags found
No related merge requests found
...@@ -1600,23 +1600,23 @@ module OneM2M_Functions { ...@@ -1600,23 +1600,23 @@ module OneM2M_Functions {
if (ischosen(p_primitiveContent.aE)){ if (ischosen(p_primitiveContent.aE)){
log("Representation contains AE resource representation"); log("Representation contains AE resource representation");
if(ischosen(p_requestPrimitive.primitiveContent.notification.notificationEvent.representation.resource.aE)) { if(isvalue(p_requestPrimitive.primitiveContent.notification.notificationEvent.representation.resource.aE)) {
v_matchResult := match(p_requestPrimitive.primitiveContent.notification.notificationEvent.representation.resource.aE, p_primitiveContent.aE); v_matchResult := match(p_requestPrimitive.primitiveContent.notification.notificationEvent.representation.resource.aE, p_primitiveContent.aE);
log("Expected primitiveContent"); log("Expected primitiveContent");
} }
else if(ischosen(p_requestPrimitive.primitiveContent.notification.notificationEvent.representation.responsePrimitive)) { else if(isvalue(p_requestPrimitive.primitiveContent.notification.notificationEvent.representation.responsePrimitive.primitiveContent.aE)) {
v_matchResult :=match(p_requestPrimitive.primitiveContent.notification.notificationEvent.representation.responsePrimitive.primitiveContent.aE, p_primitiveContent.aE); v_matchResult :=match(p_requestPrimitive.primitiveContent.notification.notificationEvent.representation.responsePrimitive.primitiveContent.aE, p_primitiveContent.aE);
} }
else if (ischosen(p_requestPrimitive.primitiveContent.aggregatedNotification)) { else if (isvalue(p_requestPrimitive.primitiveContent.aggregatedNotification.notification_list)) {
v_matchResult := true; v_matchResult := true;
v_numberOfAggregatedNotification := lengthof(p_requestPrimitive.primitiveContent.aggregatedNotification.notification_list); v_numberOfAggregatedNotification := lengthof(p_requestPrimitive.primitiveContent.aggregatedNotification.notification_list);
for(i := 0; i< v_numberOfAggregatedNotification; i := i + 1){ for(i := 0; i< v_numberOfAggregatedNotification; i := i + 1){
if(ischosen(p_requestPrimitive.primitiveContent.aggregatedNotification.notification_list[i].notificationEvent.representation.resource)) { if(isvalue(p_requestPrimitive.primitiveContent.aggregatedNotification.notification_list[i].notificationEvent.representation.resource.aE)) {
if(not (match(p_requestPrimitive.primitiveContent.aggregatedNotification.notification_list[i].notificationEvent.representation.resource.aE, p_primitiveContent.aE))){ if(not (match(p_requestPrimitive.primitiveContent.aggregatedNotification.notification_list[i].notificationEvent.representation.resource.aE, p_primitiveContent.aE))){
v_matchResult := false; v_matchResult := false;
} }
} }
else if(ischosen(p_requestPrimitive.primitiveContent.aggregatedNotification.notification_list[i].notificationEvent.representation.responsePrimitive)) { else if(isvalue(p_requestPrimitive.primitiveContent.aggregatedNotification.notification_list[i].notificationEvent.representation.responsePrimitive.primitiveContent.aE)) {
if(not (match(p_requestPrimitive.primitiveContent.aggregatedNotification.notification_list[i].notificationEvent.representation.responsePrimitive.primitiveContent.aE, p_primitiveContent.aE))){ if(not (match(p_requestPrimitive.primitiveContent.aggregatedNotification.notification_list[i].notificationEvent.representation.responsePrimitive.primitiveContent.aE, p_primitiveContent.aE))){
v_matchResult := false; v_matchResult := false;
} }
...@@ -1630,10 +1630,10 @@ module OneM2M_Functions { ...@@ -1630,10 +1630,10 @@ module OneM2M_Functions {
} }
if (ischosen(p_primitiveContent.container)){ if (ischosen(p_primitiveContent.container)){
if(ischosen(p_requestPrimitive.primitiveContent.notification.notificationEvent.representation.resource.container)) { if(isvalue(p_requestPrimitive.primitiveContent.notification.notificationEvent.representation.resource.container)) {
v_matchResult := match(p_requestPrimitive.primitiveContent.notification.notificationEvent.representation.resource.container, p_primitiveContent.container) v_matchResult := match(p_requestPrimitive.primitiveContent.notification.notificationEvent.representation.resource.container, p_primitiveContent.container)
} }
else if(ischosen(p_requestPrimitive.primitiveContent.notification.notificationEvent.representation.responsePrimitive)) { else if(isvalue(p_requestPrimitive.primitiveContent.notification.notificationEvent.representation.responsePrimitive.primitiveContent.container)) {
v_matchResult := match(p_requestPrimitive.primitiveContent.notification.notificationEvent.representation.responsePrimitive.primitiveContent.container, p_primitiveContent.container) v_matchResult := match(p_requestPrimitive.primitiveContent.notification.notificationEvent.representation.responsePrimitive.primitiveContent.container, p_primitiveContent.container)
} }
} }
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment