[SBI] Crash occurs when ENUM in the MAP (#2103)

This commit is contained in:
Sukchan Lee 2023-03-01 17:50:25 +09:00
parent ce668c556c
commit 969c116e77
1097 changed files with 266728 additions and 42047 deletions

View file

@ -28,16 +28,18 @@ OpenAPI_exemption_ind_t *OpenAPI_exemption_ind_create(
void OpenAPI_exemption_ind_free(OpenAPI_exemption_ind_t *exemption_ind)
{
OpenAPI_lnode_t *node = NULL;
if (NULL == exemption_ind) {
return;
}
OpenAPI_lnode_t *node;
ogs_free(exemption_ind);
}
cJSON *OpenAPI_exemption_ind_convertToJSON(OpenAPI_exemption_ind_t *exemption_ind)
{
cJSON *item = NULL;
OpenAPI_lnode_t *node = NULL;
if (exemption_ind == NULL) {
ogs_error("OpenAPI_exemption_ind_convertToJSON() failed [ExemptionInd]");
@ -73,8 +75,11 @@ end:
OpenAPI_exemption_ind_t *OpenAPI_exemption_ind_parseFromJSON(cJSON *exemption_indJSON)
{
OpenAPI_exemption_ind_t *exemption_ind_local_var = NULL;
cJSON *dnn_congestion = cJSON_GetObjectItemCaseSensitive(exemption_indJSON, "dnnCongestion");
OpenAPI_lnode_t *node = NULL;
cJSON *dnn_congestion = NULL;
cJSON *snssai_only_congestion = NULL;
cJSON *snssai_dnn_congestion = NULL;
dnn_congestion = cJSON_GetObjectItemCaseSensitive(exemption_indJSON, "dnnCongestion");
if (dnn_congestion) {
if (!cJSON_IsBool(dnn_congestion)) {
ogs_error("OpenAPI_exemption_ind_parseFromJSON() failed [dnn_congestion]");
@ -82,8 +87,7 @@ OpenAPI_exemption_ind_t *OpenAPI_exemption_ind_parseFromJSON(cJSON *exemption_in
}
}
cJSON *snssai_only_congestion = cJSON_GetObjectItemCaseSensitive(exemption_indJSON, "snssaiOnlyCongestion");
snssai_only_congestion = cJSON_GetObjectItemCaseSensitive(exemption_indJSON, "snssaiOnlyCongestion");
if (snssai_only_congestion) {
if (!cJSON_IsBool(snssai_only_congestion)) {
ogs_error("OpenAPI_exemption_ind_parseFromJSON() failed [snssai_only_congestion]");
@ -91,8 +95,7 @@ OpenAPI_exemption_ind_t *OpenAPI_exemption_ind_parseFromJSON(cJSON *exemption_in
}
}
cJSON *snssai_dnn_congestion = cJSON_GetObjectItemCaseSensitive(exemption_indJSON, "snssaiDnnCongestion");
snssai_dnn_congestion = cJSON_GetObjectItemCaseSensitive(exemption_indJSON, "snssaiDnnCongestion");
if (snssai_dnn_congestion) {
if (!cJSON_IsBool(snssai_dnn_congestion)) {
ogs_error("OpenAPI_exemption_ind_parseFromJSON() failed [snssai_dnn_congestion]");