When the receive multiple extras in the message from notification provider,
consuemr service misparse as parsing just one extras for incorrect operation of pointers.
In this patch, incorrect operation of pointers is fixed.
Change-Id: Ifacaf247ca836d81031ffe93b0b72d2b46db65f3
Signed-off-by: KIM JungYong <jyong2.kim@samsung.com>
Reviewed-on: https://gerrit.iotivity.org/gerrit/12745
Tested-by: jenkins-iotivity <jenkins-iotivity@opendaylight.org>
Reviewed-by: Uze Choi <uzchoi@samsung.com>
(cherry picked from commit
cb699f9e7b6fede0c32c254aa5572e349854ea30)
Reviewed-on: https://gerrit.iotivity.org/gerrit/12901
if (isFirstExtra)
{
headValue = curValue;
+ extraInfo->values = headValue;
isFirstExtra = false;
}
- curValue = curValue->next;
+ else
+ {
+ headValue->next = curValue;
+ headValue = curValue;
+ }
curValue = NULL;
}
value = value->next;
}
OCRepPayloadDestroy(origin);
- extraInfo->values = headValue;
- if (extraInfo->values)
+ if (!isFirstExtra && extraInfo->values)
{
return extraInfo;
}