mirror of
https://github.com/open5gs/open5gs.git
synced 2026-05-04 22:30:09 +00:00
[SBI] Crash occurs when ENUM in the MAP (#2103)
This commit is contained in:
parent
ce668c556c
commit
969c116e77
1097 changed files with 266728 additions and 42047 deletions
|
|
@ -26,18 +26,26 @@ OpenAPI_point_altitude_uncertainty_all_of_t *OpenAPI_point_altitude_uncertainty_
|
|||
|
||||
void OpenAPI_point_altitude_uncertainty_all_of_free(OpenAPI_point_altitude_uncertainty_all_of_t *point_altitude_uncertainty_all_of)
|
||||
{
|
||||
OpenAPI_lnode_t *node = NULL;
|
||||
|
||||
if (NULL == point_altitude_uncertainty_all_of) {
|
||||
return;
|
||||
}
|
||||
OpenAPI_lnode_t *node;
|
||||
OpenAPI_geographical_coordinates_free(point_altitude_uncertainty_all_of->point);
|
||||
OpenAPI_uncertainty_ellipse_free(point_altitude_uncertainty_all_of->uncertainty_ellipse);
|
||||
if (point_altitude_uncertainty_all_of->point) {
|
||||
OpenAPI_geographical_coordinates_free(point_altitude_uncertainty_all_of->point);
|
||||
point_altitude_uncertainty_all_of->point = NULL;
|
||||
}
|
||||
if (point_altitude_uncertainty_all_of->uncertainty_ellipse) {
|
||||
OpenAPI_uncertainty_ellipse_free(point_altitude_uncertainty_all_of->uncertainty_ellipse);
|
||||
point_altitude_uncertainty_all_of->uncertainty_ellipse = NULL;
|
||||
}
|
||||
ogs_free(point_altitude_uncertainty_all_of);
|
||||
}
|
||||
|
||||
cJSON *OpenAPI_point_altitude_uncertainty_all_of_convertToJSON(OpenAPI_point_altitude_uncertainty_all_of_t *point_altitude_uncertainty_all_of)
|
||||
{
|
||||
cJSON *item = NULL;
|
||||
OpenAPI_lnode_t *node = NULL;
|
||||
|
||||
if (point_altitude_uncertainty_all_of == NULL) {
|
||||
ogs_error("OpenAPI_point_altitude_uncertainty_all_of_convertToJSON() failed [PointAltitudeUncertainty_allOf]");
|
||||
|
|
@ -45,6 +53,10 @@ cJSON *OpenAPI_point_altitude_uncertainty_all_of_convertToJSON(OpenAPI_point_alt
|
|||
}
|
||||
|
||||
item = cJSON_CreateObject();
|
||||
if (!point_altitude_uncertainty_all_of->point) {
|
||||
ogs_error("OpenAPI_point_altitude_uncertainty_all_of_convertToJSON() failed [point]");
|
||||
return NULL;
|
||||
}
|
||||
cJSON *point_local_JSON = OpenAPI_geographical_coordinates_convertToJSON(point_altitude_uncertainty_all_of->point);
|
||||
if (point_local_JSON == NULL) {
|
||||
ogs_error("OpenAPI_point_altitude_uncertainty_all_of_convertToJSON() failed [point]");
|
||||
|
|
@ -61,6 +73,10 @@ cJSON *OpenAPI_point_altitude_uncertainty_all_of_convertToJSON(OpenAPI_point_alt
|
|||
goto end;
|
||||
}
|
||||
|
||||
if (!point_altitude_uncertainty_all_of->uncertainty_ellipse) {
|
||||
ogs_error("OpenAPI_point_altitude_uncertainty_all_of_convertToJSON() failed [uncertainty_ellipse]");
|
||||
return NULL;
|
||||
}
|
||||
cJSON *uncertainty_ellipse_local_JSON = OpenAPI_uncertainty_ellipse_convertToJSON(point_altitude_uncertainty_all_of->uncertainty_ellipse);
|
||||
if (uncertainty_ellipse_local_JSON == NULL) {
|
||||
ogs_error("OpenAPI_point_altitude_uncertainty_all_of_convertToJSON() failed [uncertainty_ellipse]");
|
||||
|
|
@ -89,52 +105,53 @@ end:
|
|||
OpenAPI_point_altitude_uncertainty_all_of_t *OpenAPI_point_altitude_uncertainty_all_of_parseFromJSON(cJSON *point_altitude_uncertainty_all_ofJSON)
|
||||
{
|
||||
OpenAPI_point_altitude_uncertainty_all_of_t *point_altitude_uncertainty_all_of_local_var = NULL;
|
||||
cJSON *point = cJSON_GetObjectItemCaseSensitive(point_altitude_uncertainty_all_ofJSON, "point");
|
||||
OpenAPI_lnode_t *node = NULL;
|
||||
cJSON *point = NULL;
|
||||
OpenAPI_geographical_coordinates_t *point_local_nonprim = NULL;
|
||||
cJSON *altitude = NULL;
|
||||
cJSON *uncertainty_ellipse = NULL;
|
||||
OpenAPI_uncertainty_ellipse_t *uncertainty_ellipse_local_nonprim = NULL;
|
||||
cJSON *uncertainty_altitude = NULL;
|
||||
cJSON *confidence = NULL;
|
||||
point = cJSON_GetObjectItemCaseSensitive(point_altitude_uncertainty_all_ofJSON, "point");
|
||||
if (!point) {
|
||||
ogs_error("OpenAPI_point_altitude_uncertainty_all_of_parseFromJSON() failed [point]");
|
||||
goto end;
|
||||
}
|
||||
|
||||
OpenAPI_geographical_coordinates_t *point_local_nonprim = NULL;
|
||||
point_local_nonprim = OpenAPI_geographical_coordinates_parseFromJSON(point);
|
||||
|
||||
cJSON *altitude = cJSON_GetObjectItemCaseSensitive(point_altitude_uncertainty_all_ofJSON, "altitude");
|
||||
altitude = cJSON_GetObjectItemCaseSensitive(point_altitude_uncertainty_all_ofJSON, "altitude");
|
||||
if (!altitude) {
|
||||
ogs_error("OpenAPI_point_altitude_uncertainty_all_of_parseFromJSON() failed [altitude]");
|
||||
goto end;
|
||||
}
|
||||
|
||||
if (!cJSON_IsNumber(altitude)) {
|
||||
ogs_error("OpenAPI_point_altitude_uncertainty_all_of_parseFromJSON() failed [altitude]");
|
||||
goto end;
|
||||
}
|
||||
|
||||
cJSON *uncertainty_ellipse = cJSON_GetObjectItemCaseSensitive(point_altitude_uncertainty_all_ofJSON, "uncertaintyEllipse");
|
||||
uncertainty_ellipse = cJSON_GetObjectItemCaseSensitive(point_altitude_uncertainty_all_ofJSON, "uncertaintyEllipse");
|
||||
if (!uncertainty_ellipse) {
|
||||
ogs_error("OpenAPI_point_altitude_uncertainty_all_of_parseFromJSON() failed [uncertainty_ellipse]");
|
||||
goto end;
|
||||
}
|
||||
|
||||
OpenAPI_uncertainty_ellipse_t *uncertainty_ellipse_local_nonprim = NULL;
|
||||
uncertainty_ellipse_local_nonprim = OpenAPI_uncertainty_ellipse_parseFromJSON(uncertainty_ellipse);
|
||||
|
||||
cJSON *uncertainty_altitude = cJSON_GetObjectItemCaseSensitive(point_altitude_uncertainty_all_ofJSON, "uncertaintyAltitude");
|
||||
uncertainty_altitude = cJSON_GetObjectItemCaseSensitive(point_altitude_uncertainty_all_ofJSON, "uncertaintyAltitude");
|
||||
if (!uncertainty_altitude) {
|
||||
ogs_error("OpenAPI_point_altitude_uncertainty_all_of_parseFromJSON() failed [uncertainty_altitude]");
|
||||
goto end;
|
||||
}
|
||||
|
||||
if (!cJSON_IsNumber(uncertainty_altitude)) {
|
||||
ogs_error("OpenAPI_point_altitude_uncertainty_all_of_parseFromJSON() failed [uncertainty_altitude]");
|
||||
goto end;
|
||||
}
|
||||
|
||||
cJSON *confidence = cJSON_GetObjectItemCaseSensitive(point_altitude_uncertainty_all_ofJSON, "confidence");
|
||||
confidence = cJSON_GetObjectItemCaseSensitive(point_altitude_uncertainty_all_ofJSON, "confidence");
|
||||
if (!confidence) {
|
||||
ogs_error("OpenAPI_point_altitude_uncertainty_all_of_parseFromJSON() failed [confidence]");
|
||||
goto end;
|
||||
}
|
||||
|
||||
if (!cJSON_IsNumber(confidence)) {
|
||||
ogs_error("OpenAPI_point_altitude_uncertainty_all_of_parseFromJSON() failed [confidence]");
|
||||
goto end;
|
||||
|
|
@ -153,6 +170,14 @@ OpenAPI_point_altitude_uncertainty_all_of_t *OpenAPI_point_altitude_uncertainty_
|
|||
|
||||
return point_altitude_uncertainty_all_of_local_var;
|
||||
end:
|
||||
if (point_local_nonprim) {
|
||||
OpenAPI_geographical_coordinates_free(point_local_nonprim);
|
||||
point_local_nonprim = NULL;
|
||||
}
|
||||
if (uncertainty_ellipse_local_nonprim) {
|
||||
OpenAPI_uncertainty_ellipse_free(uncertainty_ellipse_local_nonprim);
|
||||
uncertainty_ellipse_local_nonprim = NULL;
|
||||
}
|
||||
return NULL;
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue