[SBI] Fixed a bug with encoder/decoder of scpPorts

(#2310, #2274)
This commit is contained in:
Sukchan Lee 2023-05-14 07:00:22 +09:00
parent 1ba7a73abd
commit 63df530bb4
123 changed files with 2132 additions and 42 deletions

View file

@ -585,7 +585,11 @@ cJSON *OpenAPI_event_subscription_convertToJSON(OpenAPI_event_subscription_t *ev
goto end;
}
OpenAPI_list_for_each(event_subscription->nsi_level_thrds, node) {
if (cJSON_AddNumberToObject(nsi_level_thrdsList, "", (uintptr_t)node->data) == NULL) {
if (node->data == NULL) {
ogs_error("OpenAPI_event_subscription_convertToJSON() failed [nsi_level_thrds]");
goto end;
}
if (cJSON_AddNumberToObject(nsi_level_thrdsList, "", *(double *)node->data) == NULL) {
ogs_error("OpenAPI_event_subscription_convertToJSON() failed [nsi_level_thrds]");
goto end;
}