[Release-17] Upgrade SBI to v17.x.0

This commit is contained in:
Sukchan Lee 2023-03-01 19:56:49 +09:00
parent 969c116e77
commit 4d44b1843e
1687 changed files with 121604 additions and 9310 deletions

View file

@ -5,13 +5,15 @@
#include "pcscf_restoration_notification.h"
OpenAPI_pcscf_restoration_notification_t *OpenAPI_pcscf_restoration_notification_create(
char *supi
char *supi,
OpenAPI_pcscf_address_t *failed_pcscf
)
{
OpenAPI_pcscf_restoration_notification_t *pcscf_restoration_notification_local_var = ogs_malloc(sizeof(OpenAPI_pcscf_restoration_notification_t));
ogs_assert(pcscf_restoration_notification_local_var);
pcscf_restoration_notification_local_var->supi = supi;
pcscf_restoration_notification_local_var->failed_pcscf = failed_pcscf;
return pcscf_restoration_notification_local_var;
}
@ -27,6 +29,10 @@ void OpenAPI_pcscf_restoration_notification_free(OpenAPI_pcscf_restoration_notif
ogs_free(pcscf_restoration_notification->supi);
pcscf_restoration_notification->supi = NULL;
}
if (pcscf_restoration_notification->failed_pcscf) {
OpenAPI_pcscf_address_free(pcscf_restoration_notification->failed_pcscf);
pcscf_restoration_notification->failed_pcscf = NULL;
}
ogs_free(pcscf_restoration_notification);
}
@ -50,6 +56,19 @@ cJSON *OpenAPI_pcscf_restoration_notification_convertToJSON(OpenAPI_pcscf_restor
goto end;
}
if (pcscf_restoration_notification->failed_pcscf) {
cJSON *failed_pcscf_local_JSON = OpenAPI_pcscf_address_convertToJSON(pcscf_restoration_notification->failed_pcscf);
if (failed_pcscf_local_JSON == NULL) {
ogs_error("OpenAPI_pcscf_restoration_notification_convertToJSON() failed [failed_pcscf]");
goto end;
}
cJSON_AddItemToObject(item, "failedPcscf", failed_pcscf_local_JSON);
if (item->child == NULL) {
ogs_error("OpenAPI_pcscf_restoration_notification_convertToJSON() failed [failed_pcscf]");
goto end;
}
}
end:
return item;
}
@ -59,6 +78,8 @@ OpenAPI_pcscf_restoration_notification_t *OpenAPI_pcscf_restoration_notification
OpenAPI_pcscf_restoration_notification_t *pcscf_restoration_notification_local_var = NULL;
OpenAPI_lnode_t *node = NULL;
cJSON *supi = NULL;
cJSON *failed_pcscf = NULL;
OpenAPI_pcscf_address_t *failed_pcscf_local_nonprim = NULL;
supi = cJSON_GetObjectItemCaseSensitive(pcscf_restoration_notificationJSON, "supi");
if (!supi) {
ogs_error("OpenAPI_pcscf_restoration_notification_parseFromJSON() failed [supi]");
@ -69,12 +90,22 @@ OpenAPI_pcscf_restoration_notification_t *OpenAPI_pcscf_restoration_notification
goto end;
}
failed_pcscf = cJSON_GetObjectItemCaseSensitive(pcscf_restoration_notificationJSON, "failedPcscf");
if (failed_pcscf) {
failed_pcscf_local_nonprim = OpenAPI_pcscf_address_parseFromJSON(failed_pcscf);
}
pcscf_restoration_notification_local_var = OpenAPI_pcscf_restoration_notification_create (
ogs_strdup(supi->valuestring)
ogs_strdup(supi->valuestring),
failed_pcscf ? failed_pcscf_local_nonprim : NULL
);
return pcscf_restoration_notification_local_var;
end:
if (failed_pcscf_local_nonprim) {
OpenAPI_pcscf_address_free(failed_pcscf_local_nonprim);
failed_pcscf_local_nonprim = NULL;
}
return NULL;
}