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
|
|
@ -20,17 +20,22 @@ OpenAPI_point_uncertainty_circle_all_of_t *OpenAPI_point_uncertainty_circle_all_
|
|||
|
||||
void OpenAPI_point_uncertainty_circle_all_of_free(OpenAPI_point_uncertainty_circle_all_of_t *point_uncertainty_circle_all_of)
|
||||
{
|
||||
OpenAPI_lnode_t *node = NULL;
|
||||
|
||||
if (NULL == point_uncertainty_circle_all_of) {
|
||||
return;
|
||||
}
|
||||
OpenAPI_lnode_t *node;
|
||||
OpenAPI_geographical_coordinates_free(point_uncertainty_circle_all_of->point);
|
||||
if (point_uncertainty_circle_all_of->point) {
|
||||
OpenAPI_geographical_coordinates_free(point_uncertainty_circle_all_of->point);
|
||||
point_uncertainty_circle_all_of->point = NULL;
|
||||
}
|
||||
ogs_free(point_uncertainty_circle_all_of);
|
||||
}
|
||||
|
||||
cJSON *OpenAPI_point_uncertainty_circle_all_of_convertToJSON(OpenAPI_point_uncertainty_circle_all_of_t *point_uncertainty_circle_all_of)
|
||||
{
|
||||
cJSON *item = NULL;
|
||||
OpenAPI_lnode_t *node = NULL;
|
||||
|
||||
if (point_uncertainty_circle_all_of == NULL) {
|
||||
ogs_error("OpenAPI_point_uncertainty_circle_all_of_convertToJSON() failed [PointUncertaintyCircle_allOf]");
|
||||
|
|
@ -38,6 +43,10 @@ cJSON *OpenAPI_point_uncertainty_circle_all_of_convertToJSON(OpenAPI_point_uncer
|
|||
}
|
||||
|
||||
item = cJSON_CreateObject();
|
||||
if (!point_uncertainty_circle_all_of->point) {
|
||||
ogs_error("OpenAPI_point_uncertainty_circle_all_of_convertToJSON() failed [point]");
|
||||
return NULL;
|
||||
}
|
||||
cJSON *point_local_JSON = OpenAPI_geographical_coordinates_convertToJSON(point_uncertainty_circle_all_of->point);
|
||||
if (point_local_JSON == NULL) {
|
||||
ogs_error("OpenAPI_point_uncertainty_circle_all_of_convertToJSON() failed [point]");
|
||||
|
|
@ -61,21 +70,22 @@ end:
|
|||
OpenAPI_point_uncertainty_circle_all_of_t *OpenAPI_point_uncertainty_circle_all_of_parseFromJSON(cJSON *point_uncertainty_circle_all_ofJSON)
|
||||
{
|
||||
OpenAPI_point_uncertainty_circle_all_of_t *point_uncertainty_circle_all_of_local_var = NULL;
|
||||
cJSON *point = cJSON_GetObjectItemCaseSensitive(point_uncertainty_circle_all_ofJSON, "point");
|
||||
OpenAPI_lnode_t *node = NULL;
|
||||
cJSON *point = NULL;
|
||||
OpenAPI_geographical_coordinates_t *point_local_nonprim = NULL;
|
||||
cJSON *uncertainty = NULL;
|
||||
point = cJSON_GetObjectItemCaseSensitive(point_uncertainty_circle_all_ofJSON, "point");
|
||||
if (!point) {
|
||||
ogs_error("OpenAPI_point_uncertainty_circle_all_of_parseFromJSON() failed [point]");
|
||||
goto end;
|
||||
}
|
||||
|
||||
OpenAPI_geographical_coordinates_t *point_local_nonprim = NULL;
|
||||
point_local_nonprim = OpenAPI_geographical_coordinates_parseFromJSON(point);
|
||||
|
||||
cJSON *uncertainty = cJSON_GetObjectItemCaseSensitive(point_uncertainty_circle_all_ofJSON, "uncertainty");
|
||||
uncertainty = cJSON_GetObjectItemCaseSensitive(point_uncertainty_circle_all_ofJSON, "uncertainty");
|
||||
if (!uncertainty) {
|
||||
ogs_error("OpenAPI_point_uncertainty_circle_all_of_parseFromJSON() failed [uncertainty]");
|
||||
goto end;
|
||||
}
|
||||
|
||||
if (!cJSON_IsNumber(uncertainty)) {
|
||||
ogs_error("OpenAPI_point_uncertainty_circle_all_of_parseFromJSON() failed [uncertainty]");
|
||||
goto end;
|
||||
|
|
@ -89,6 +99,10 @@ OpenAPI_point_uncertainty_circle_all_of_t *OpenAPI_point_uncertainty_circle_all_
|
|||
|
||||
return point_uncertainty_circle_all_of_local_var;
|
||||
end:
|
||||
if (point_local_nonprim) {
|
||||
OpenAPI_geographical_coordinates_free(point_local_nonprim);
|
||||
point_local_nonprim = NULL;
|
||||
}
|
||||
return NULL;
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue