mirror of
https://github.com/open5gs/open5gs.git
synced 2026-05-02 13:20:08 +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,16 +20,18 @@ OpenAPI_geographical_coordinates_t *OpenAPI_geographical_coordinates_create(
|
|||
|
||||
void OpenAPI_geographical_coordinates_free(OpenAPI_geographical_coordinates_t *geographical_coordinates)
|
||||
{
|
||||
OpenAPI_lnode_t *node = NULL;
|
||||
|
||||
if (NULL == geographical_coordinates) {
|
||||
return;
|
||||
}
|
||||
OpenAPI_lnode_t *node;
|
||||
ogs_free(geographical_coordinates);
|
||||
}
|
||||
|
||||
cJSON *OpenAPI_geographical_coordinates_convertToJSON(OpenAPI_geographical_coordinates_t *geographical_coordinates)
|
||||
{
|
||||
cJSON *item = NULL;
|
||||
OpenAPI_lnode_t *node = NULL;
|
||||
|
||||
if (geographical_coordinates == NULL) {
|
||||
ogs_error("OpenAPI_geographical_coordinates_convertToJSON() failed [GeographicalCoordinates]");
|
||||
|
|
@ -54,23 +56,24 @@ end:
|
|||
OpenAPI_geographical_coordinates_t *OpenAPI_geographical_coordinates_parseFromJSON(cJSON *geographical_coordinatesJSON)
|
||||
{
|
||||
OpenAPI_geographical_coordinates_t *geographical_coordinates_local_var = NULL;
|
||||
cJSON *lon = cJSON_GetObjectItemCaseSensitive(geographical_coordinatesJSON, "lon");
|
||||
OpenAPI_lnode_t *node = NULL;
|
||||
cJSON *lon = NULL;
|
||||
cJSON *lat = NULL;
|
||||
lon = cJSON_GetObjectItemCaseSensitive(geographical_coordinatesJSON, "lon");
|
||||
if (!lon) {
|
||||
ogs_error("OpenAPI_geographical_coordinates_parseFromJSON() failed [lon]");
|
||||
goto end;
|
||||
}
|
||||
|
||||
if (!cJSON_IsNumber(lon)) {
|
||||
ogs_error("OpenAPI_geographical_coordinates_parseFromJSON() failed [lon]");
|
||||
goto end;
|
||||
}
|
||||
|
||||
cJSON *lat = cJSON_GetObjectItemCaseSensitive(geographical_coordinatesJSON, "lat");
|
||||
lat = cJSON_GetObjectItemCaseSensitive(geographical_coordinatesJSON, "lat");
|
||||
if (!lat) {
|
||||
ogs_error("OpenAPI_geographical_coordinates_parseFromJSON() failed [lat]");
|
||||
goto end;
|
||||
}
|
||||
|
||||
if (!cJSON_IsNumber(lat)) {
|
||||
ogs_error("OpenAPI_geographical_coordinates_parseFromJSON() failed [lat]");
|
||||
goto end;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue