mirror of
https://github.com/open5gs/open5gs.git
synced 2026-05-05 15:24:14 +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
|
|
@ -18,16 +18,18 @@ OpenAPI_redundant_pdu_session_information_t *OpenAPI_redundant_pdu_session_infor
|
|||
|
||||
void OpenAPI_redundant_pdu_session_information_free(OpenAPI_redundant_pdu_session_information_t *redundant_pdu_session_information)
|
||||
{
|
||||
OpenAPI_lnode_t *node = NULL;
|
||||
|
||||
if (NULL == redundant_pdu_session_information) {
|
||||
return;
|
||||
}
|
||||
OpenAPI_lnode_t *node;
|
||||
ogs_free(redundant_pdu_session_information);
|
||||
}
|
||||
|
||||
cJSON *OpenAPI_redundant_pdu_session_information_convertToJSON(OpenAPI_redundant_pdu_session_information_t *redundant_pdu_session_information)
|
||||
{
|
||||
cJSON *item = NULL;
|
||||
OpenAPI_lnode_t *node = NULL;
|
||||
|
||||
if (redundant_pdu_session_information == NULL) {
|
||||
ogs_error("OpenAPI_redundant_pdu_session_information_convertToJSON() failed [RedundantPduSessionInformation]");
|
||||
|
|
@ -35,6 +37,10 @@ cJSON *OpenAPI_redundant_pdu_session_information_convertToJSON(OpenAPI_redundant
|
|||
}
|
||||
|
||||
item = cJSON_CreateObject();
|
||||
if (redundant_pdu_session_information->rsn == OpenAPI_rsn_NULL) {
|
||||
ogs_error("OpenAPI_redundant_pdu_session_information_convertToJSON() failed [rsn]");
|
||||
return NULL;
|
||||
}
|
||||
if (cJSON_AddStringToObject(item, "rsn", OpenAPI_rsn_ToString(redundant_pdu_session_information->rsn)) == NULL) {
|
||||
ogs_error("OpenAPI_redundant_pdu_session_information_convertToJSON() failed [rsn]");
|
||||
goto end;
|
||||
|
|
@ -47,13 +53,14 @@ end:
|
|||
OpenAPI_redundant_pdu_session_information_t *OpenAPI_redundant_pdu_session_information_parseFromJSON(cJSON *redundant_pdu_session_informationJSON)
|
||||
{
|
||||
OpenAPI_redundant_pdu_session_information_t *redundant_pdu_session_information_local_var = NULL;
|
||||
cJSON *rsn = cJSON_GetObjectItemCaseSensitive(redundant_pdu_session_informationJSON, "rsn");
|
||||
OpenAPI_lnode_t *node = NULL;
|
||||
cJSON *rsn = NULL;
|
||||
OpenAPI_rsn_e rsnVariable = 0;
|
||||
rsn = cJSON_GetObjectItemCaseSensitive(redundant_pdu_session_informationJSON, "rsn");
|
||||
if (!rsn) {
|
||||
ogs_error("OpenAPI_redundant_pdu_session_information_parseFromJSON() failed [rsn]");
|
||||
goto end;
|
||||
}
|
||||
|
||||
OpenAPI_rsn_e rsnVariable;
|
||||
if (!cJSON_IsString(rsn)) {
|
||||
ogs_error("OpenAPI_redundant_pdu_session_information_parseFromJSON() failed [rsn]");
|
||||
goto end;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue