mirror of
https://github.com/open5gs/open5gs.git
synced 2026-05-05 07:08:11 +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
|
|
@ -24,16 +24,18 @@ OpenAPI_app_port_id_t *OpenAPI_app_port_id_create(
|
|||
|
||||
void OpenAPI_app_port_id_free(OpenAPI_app_port_id_t *app_port_id)
|
||||
{
|
||||
OpenAPI_lnode_t *node = NULL;
|
||||
|
||||
if (NULL == app_port_id) {
|
||||
return;
|
||||
}
|
||||
OpenAPI_lnode_t *node;
|
||||
ogs_free(app_port_id);
|
||||
}
|
||||
|
||||
cJSON *OpenAPI_app_port_id_convertToJSON(OpenAPI_app_port_id_t *app_port_id)
|
||||
{
|
||||
cJSON *item = NULL;
|
||||
OpenAPI_lnode_t *node = NULL;
|
||||
|
||||
if (app_port_id == NULL) {
|
||||
ogs_error("OpenAPI_app_port_id_convertToJSON() failed [AppPortId]");
|
||||
|
|
@ -62,8 +64,10 @@ end:
|
|||
OpenAPI_app_port_id_t *OpenAPI_app_port_id_parseFromJSON(cJSON *app_port_idJSON)
|
||||
{
|
||||
OpenAPI_app_port_id_t *app_port_id_local_var = NULL;
|
||||
cJSON *destination_port = cJSON_GetObjectItemCaseSensitive(app_port_idJSON, "destinationPort");
|
||||
|
||||
OpenAPI_lnode_t *node = NULL;
|
||||
cJSON *destination_port = NULL;
|
||||
cJSON *originator_port = NULL;
|
||||
destination_port = cJSON_GetObjectItemCaseSensitive(app_port_idJSON, "destinationPort");
|
||||
if (destination_port) {
|
||||
if (!cJSON_IsNumber(destination_port)) {
|
||||
ogs_error("OpenAPI_app_port_id_parseFromJSON() failed [destination_port]");
|
||||
|
|
@ -71,8 +75,7 @@ OpenAPI_app_port_id_t *OpenAPI_app_port_id_parseFromJSON(cJSON *app_port_idJSON)
|
|||
}
|
||||
}
|
||||
|
||||
cJSON *originator_port = cJSON_GetObjectItemCaseSensitive(app_port_idJSON, "originatorPort");
|
||||
|
||||
originator_port = cJSON_GetObjectItemCaseSensitive(app_port_idJSON, "originatorPort");
|
||||
if (originator_port) {
|
||||
if (!cJSON_IsNumber(originator_port)) {
|
||||
ogs_error("OpenAPI_app_port_id_parseFromJSON() failed [originator_port]");
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue